How do you delete a script created node?

Download and get help for different MediaMonkey for Windows 4 Addons.

Moderators: Peke, Gurus

jmaver
Posts: 92
Joined: Thu Feb 19, 2004 10:26 am

How do you delete a script created node?

Post by jmaver »

Delete seems to be disabled. I end up restarting MM to get rid of "test" nodes.
Pablo
Posts: 554
Joined: Sun Feb 22, 2004 2:59 am

Post by Pablo »

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.
Octopod
Posts: 463
Joined: Tue Jun 10, 2003 9:09 am

Post by Octopod »

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)
Octopod
Image
Pablo
Posts: 554
Joined: Sun Feb 22, 2004 2:59 am

Post by Pablo »

I totally agree with Octopod's request. There should be methods to access/delete/modify nodes, at least the ones created by the script.
Pablo
Posts: 554
Joined: Sun Feb 22, 2004 2:59 am

Post by Pablo »

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
Octopod
Posts: 463
Joined: Tue Jun 10, 2003 9:09 am

Post by Octopod »

Thanks Pablo but i don't understand how you select the node this way :o
Octopod
Image
jiri
Posts: 5419
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post by jiri »

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
Octopod
Posts: 463
Joined: Tue Jun 10, 2003 9:09 am

Post by Octopod »

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)
Octopod
Image
Pablo
Posts: 554
Joined: Sun Feb 22, 2004 2:59 am

Post by Pablo »

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)
Octopod
Posts: 463
Joined: Tue Jun 10, 2003 9:09 am

Post by Octopod »

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.
Octopod
Image
Pablo
Posts: 554
Joined: Sun Feb 22, 2004 2:59 am

Post by Pablo »

Nice 8)

This method doesn't appear in the help file either, is there any way to see the complete API?
Peke
Posts: 17527
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Post by Peke »

I think that Refresh is not strict to MM but for VBScript so this is why it dosn't show in API.
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
jiri
Posts: 5419
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post by jiri »

Pablo,

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

Jiri
Pablo
Posts: 554
Joined: Sun Feb 22, 2004 2:59 am

Post by Pablo »

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?
jiri
Posts: 5419
Joined: Tue Aug 14, 2001 7:00 pm
Location: Czech Republic
Contact:

Post by jiri »

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
Post Reply