How do you delete a script created node?

Post a reply

Smilies
:D :) :( :o :-? 8) :lol: :x :P :oops: :cry: :evil: :roll: :wink:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: How do you delete a script created node?

by jiri » Tue Jan 25, 2005 5:29 am

Octopod,
- when browsing within custom nodes created by scripts, they are added to the history but ignored when you try to click prev/next buttons (MM jumps to its own 1st node in the list and the unknown ones are removed from the list)
Thanks, you are right, that will be ok in the next release.

Jiri

by jiri » Tue Jan 25, 2005 4:55 am

Sorry Pablo, I should have made it clear that until 2.3 is released there is a beta documentation in another location: http://www.mediamonkey.com/beta/MediaMo ... ipting.chm

Jiri

by Pablo » Tue Jan 25, 2005 4:43 am

Jiri,

No, they aren't in the help file. Just to make sure we're talking about the same file, I'm looking at the one I downloaded from http://www.mediamonkey.com/sw/webhelp/M ... ipting.chm.

By the way, is there any way to add menus to the pop up menu in the tree so that they're only shown when clicking on specific nodes?

by jiri » Tue Jan 25, 2005 3:58 am

Pablo,

both methods you mentioned are in the help file, are you sure you cannot find them there?

Jiri

by Peke » Tue Jan 25, 2005 2:34 am

I think that Refresh is not strict to MM but for VBScript so this is why it dosn't show in API.

by Pablo » Mon Jan 24, 2005 9:33 pm

Nice 8)

This method doesn't appear in the help file either, is there any way to see the complete API?

by Octopod » Mon Jan 24, 2005 9:30 pm

Pablo wrote:it would be nice to have a method to refresh the main track window (or is it possible to do this already?) 8)
I assume ISDBTracksWindow::Refresh does it.

by Pablo » Mon Jan 24, 2005 9:20 pm

jiri wrote:In order to set the selected node you can use CurrentNode property of Tree object.

Also, in the next release it will be possible to remove nodes and some other useful minor features will be added.

Jiri
Good to know about CurrentNode... this isn't documented, may be the help file doesn't reflect the latest version of the API?

Removing nodes looks great... if it's not too difficult, it would be nice to have a method to refresh the main track window (or is it possible to do this already?) 8)

by Octopod » Mon Jan 24, 2005 3:44 pm

Thanks, exactly what i was looking for.

I noticed two weird behaviour (bugs or enhancements?):

- when assigning a shortcut to a users' script, you must add a menu entry for this script (ie. only adding an icon on a toolbar and its shortcut does not work until the same is added as a menu entry)

- when browsing within custom nodes created by scripts, they are added to the history but ignored when you try to click prev/next buttons (MM jumps to its own 1st node in the list and the unknown ones are removed from the list)

by jiri » Mon Jan 24, 2005 2:05 pm

In order to set the selected node you can use CurrentNode property of Tree object.

Also, in the next release it will be possible to remove nodes and some other useful minor features will be added.

Jiri

by Octopod » Sun Jan 23, 2005 6:11 am

Thanks Pablo but i don't understand how you select the node this way :o

by Pablo » Sun Jan 23, 2005 5:11 am

Octopod, I found a way to add a shortcut which selects and expands a script-made node (like F8 for artist node): when creating the node, add a statement

Code: Select all

SDB.Objects("myNode") = myNode
You can access your node later using SDB.Objects("myNode"). Then create a menu, set its visibility to false (if you wish) and associate a shortcut with it. Finally, in the function called by the menu add the follwing:

Code: Select all

SDB.Objects("myNode").expanded=false
SDB.Objects("myNode").expanded=true

by Pablo » Sun Jan 23, 2005 12:19 am

I totally agree with Octopod's request. There should be methods to access/delete/modify nodes, at least the ones created by the script.

by Octopod » Sat Jan 22, 2005 7:20 pm

Some other APIs & attributes would be useful for future versions:
- it is not possible to designate all major nodes (eg. if i want to create a node after the genre node, i can't designate "Node_Genre" or "Node_Year")
- also it does not seem possible to select a node by script (eg. allowing a keyb shortcut to expand & select a new node, like hitting "F8" for accessing the artist one)

by Pablo » Fri Jan 21, 2005 11:10 pm

You're right, It's not possible to delete a user created script. What's more, the MM scripting API doesn't seem to contain any methods to delete nodes, so even if the programmer wanted to add the possibility it wouldn't be clear how to do it. Restarting the program isn't too bad though.

Top