| Hi Pilou, you would need to replace the alert with the code that opens the node editor dialog.
 So for example if you want to have v3 do this:
 
 moi.ui.createDialog( 'nodeeditor/index.html', 'resizeable,defaultWidth:680,defaultHeight:420', moi.ui.mainWindow );
 
 and have v4 do this:
 
 moi.ui.createDialog( 'moi://appdata/nodeeditor/index.html', 'resizeable,defaultWidth:680,defaultHeight:420', moi.ui.mainWindow );
 
 You would place the v3 code in this spot:
 
 script: if ( moi.majorVersionNumber == 3 ) { moi.ui.alert('running in v3'); } else if ( moi.majorVersionNumber == 4 ) { moi.ui.alert('running in v4'); }
 
 and place the v4 code in this spot:
 
 script: if ( moi.majorVersionNumber == 3 ) { moi.ui.alert('running in v3'); } else if ( moi.majorVersionNumber == 4 ) { moi.ui.alert('running in v4'); }
 
 
 So the whole thing would look like this:
 
 script: if ( moi.majorVersionNumber == 3 ) { moi.ui.createDialog( 'nodeeditor/index.html', 'resizeable,defaultWidth:680,defaultHeight:420', moi.ui.mainWindow ); } else if ( moi.majorVersionNumber == 4 ) { moi.ui.createDialog( 'moi://appdata/nodeeditor/index.html', 'resizeable,defaultWidth:680,defaultHeight:420', moi.ui.mainWindow ); }
 
 
 Hope that helps!
 
 - Michael
 |