User Tools

Site Tools


plugins:own_javascript_plugin

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
plugins:own_javascript_plugin [2017/01/25 15:45]
83.151.227.219 adding yesNo.Show() in accordance to updates
plugins:own_javascript_plugin [2017/09/18 18:52]
190.237.183.152 [How can you uninstall your plugin?] lvw.Show();
Line 59: Line 59:
  <p>Then you can create an instance of the plugin object when you need it like this:</p>  <p>Then you can create an instance of the plugin object when you need it like this:</p>
   
- <div class="samp">&nbsp;plg = app.CreateObject"MyPlugin" );</div>+ <div class="samp">&nbsp;plg = app.CreateMyPlugin();</div>
        
  <br>  <br>
Line 76: Line 76:
  &nbsp;&nbsp;lay.AddChild( btn );<br><br>  &nbsp;&nbsp;lay.AddChild( btn );<br><br>
  <b id="snip1"  style="font-size:100%">  <b id="snip1"  style="font-size:100%">
- &nbsp;&nbsp;plg = app.CreateObject"MyPlugin" );<br>+ &nbsp;&nbsp;plg = app.CreateMyPlugin();<br>
  </b><br>  </b><br>
  &nbsp;&nbsp;app.AddLayout( lay );<br>  &nbsp;&nbsp;app.AddLayout( lay );<br>
Line 107: Line 107:
  &nbsp;&nbsp;lay.AddChild( btn );<br><br>  &nbsp;&nbsp;lay.AddChild( btn );<br><br>
  <b id="snip2"  style="font-size:100%">  <b id="snip2"  style="font-size:100%">
- &nbsp;&nbsp;plg = app.CreateObject"MyPlugin" );<br>+ &nbsp;&nbsp;plg = app.CreateMyPlugin();<br>
  &nbsp;&nbsp;plg.SetOnMyReply( OnMyReply );<br>  &nbsp;&nbsp;plg.SetOnMyReply( OnMyReply );<br>
  </b><br>  </b><br>
Line 140: Line 140:
  
 <code Javascript MyPlugin.inc> <code Javascript MyPlugin.inc>
 +
 +app.CreateMyPlugin = function() 
 +
 +    return new MyPlugin();
 +}
  
 function MyPlugin() function MyPlugin()
Line 233: Line 238:
     //Add layout to app.         //Add layout to app.    
     app.AddLayout( lay );     app.AddLayout( lay );
 +
 +    lvw.Show();
 } }
  
plugins/own_javascript_plugin.txt · Last modified: 2019/09/17 15:35 (external edit)