Page 1 of 1

Access violation when using removenode Node_Location

Posted: Tue Sep 06, 2005 7:59 am
by hkleppe
Hi

I get an access violation error message when using this line in my auto script:

SDB.MainTree.RemoveNode(SDB.MainTree.Node_Location)

Except for the error message, the script works as it's supposed to: The node 'Location' disappears from the tree. When I remove the line from my script, the error message disappears. Is there a better way to remove the node 'Location' without getting the access violation error message? Can anyone help? Thanks in advance.

:) hkleppe

Re: Access violation when using removenode Node_Location

Posted: Sat Sep 10, 2005 10:40 am
by hkleppe
*BUMP*
hkleppe wrote:Hi

I get an access violation error message when using this line in my auto script:

SDB.MainTree.RemoveNode(SDB.MainTree.Node_Location)

Except for the error message, the script works as it's supposed to: The node 'Location' disappears from the tree. When I remove the line from my script, the error message disappears. Is there a better way to remove the node 'Location' without getting the access violation error message?
Can anyone help me on this?

:) hkleppe

Posted: Sat Sep 10, 2005 2:20 pm
by jiri
These system nodes shouldn't be removed, MM depends on them. You can hide them instead.

Jiri

Posted: Sun Sep 11, 2005 7:30 am
by hkleppe
Thanks jiri. But how can I hide them? Nothing happens when I change the options in Tools | Options | Appearance | Tree.

:) hkleppe

Posted: Sun Sep 11, 2005 10:57 am
by jiri
I suppose you need something like

SDB.MainTree.Node_Location.Visible := false

then.

Jiri

Posted: Sun Sep 11, 2005 11:36 am
by hkleppe
SDB.MainTree.Node_Location.Visible=false works fine. Thanks a lot, jiri.

:) hkleppe

And the others?

Posted: Sat Mar 18, 2006 8:31 am
by Z|S
Hi, I've tried to hide it and it works.
But how do you hide Virutal CD?

I've tried "virtual cd" and "virtual_cd" (without the ") but that doesn't work. Also "ratings" won't hide :(

Anyone have a line for those?

Posted: Sat Mar 18, 2006 8:41 am
by Steegy
You need:
Node_VirtualCD
Node_Rating

So this would become:

Code: Select all

SDB.MainTree.Node_VirtualCD.Visible = False
SDB.MainTree.Node_Rating.Visible = False
BTW: This info can be found in the Scripting Reference help file (under the developers page: http://www.mediamonkey.com/developers.htm (downloadable help file))

Cheers
Steegy

Tnx

Posted: Sat Mar 18, 2006 9:42 am
by Z|S
Thank you!

I saw the file on the web. But for some reason I can only see the TOC in the chm file, but not the articles :(

Posted: Sat Mar 18, 2006 11:05 am
by Steegy
This is because Windows disables this "possibly dangerous" contents, and you only see "page not found" pages.
Of course it's safe in this case so you can tell Windows to stop it blokking the file. For that, open the file's file properties and push the "cancel blocking" a-like button.

Posted: Sun Jul 16, 2006 8:26 am
by Jaymis
I'd really like to hide some nodes but I can't seem to use the above code to hide any nodes. I've tried to put them in their own script and in some other Auto scripts but I get various errors, probably because I don't really know what I'm doing.

Is there an example of a script that does this which I could edit to hide various nodes?

Posted: Sun Jul 16, 2006 1:27 pm
by Teknojnky
tweakmonkey lets you select which nodes are visibile and expanded, among other options.

check my sig.