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
plugins:own_javascript_plugin [2015/08/29 18:40]
peers40 [How can you uninstall your plugin?]
plugins:own_javascript_plugin [2019/09/17 15:35] (current)
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 168: Line 173:
 </code> </code>
  
-  * **File 4: A blanc jar-file without any text** +  * **It is no longer necessary to add an empty jar-file and we recommend you do not so**
- +
-<code Java MyPlugin.jar> +
- +
-</code>+
  
  
Line 233: Line 234:
     //Add layout to app.         //Add layout to app.    
     app.AddLayout( lay );     app.AddLayout( lay );
 +
 +    lvw.Show();
 } }
  
Line 252: Line 255:
        var yesNo = app.CreateYesNoDialog( "Do you really want to uninstall the plugin " + txt.GetText() + "? \nThe following files or folders will be all deleted:\n\n" + list + "\n\nIt is no way for undo!");        var yesNo = app.CreateYesNoDialog( "Do you really want to uninstall the plugin " + txt.GetText() + "? \nThe following files or folders will be all deleted:\n\n" + list + "\n\nIt is no way for undo!");
        yesNo.SetOnTouch( yesNo_OnTouch );        yesNo.SetOnTouch( yesNo_OnTouch );
 +       yesNo.Show();
     }     }
 } }
plugins/own_javascript_plugin.1440873630.txt.gz · Last modified: 2015/08/30 02:40 (external edit)