Script.UnregisterEvents question

Download and get help for different MediaMonkey Addons.

Moderators: Peke, Gurus

raybeau528
Posts: 401
Joined: Thu Sep 27, 2007 4:19 pm
Location: Connecticut
Contact:

Script.UnregisterEvents question

Post by raybeau528 »

What's the correct method to Unregister a specific SDB event?

For example, if I have these two events registered:

Code: Select all

Script.RegisterEvent SDB, "OnShuffleClicked", "Event_ShuffleClicked"
Script.RegisterEvent SDB, "OnPlay", "Event_Play"
Then, if I execute this UnregisterEvents code:

Code: Select all

Script.UnRegisterEvents SDB
Both events are unregistered. How do I unregister just one of these events?

Edit: Can someone explain the use of UnregisterHandler ?


Thanks!
ZvezdanD
Posts: 3112
Joined: Thu Jun 08, 2006 7:40 pm

Re: Script.UnregisterEvents question

Post by ZvezdanD »

You could use:

Code: Select all

Script.UnRegisterHandler "Event_ShuffleClicked"
if you want to unregister just first event.
Magic Nodes 4.3.3 / 5.2 RegExp Find & Replace 4.4.9 / 5.2  Invert Selection/Select None 1.5.1  Export/Create Playlists for Child Nodes 4.1.1 / 5.4.1  Expand Child Nodes/Expand All 1.1.2  Event Logger 2.7  Filtered Statistics Report 1.6  Track Redirection & Synchronization 3.4.2  Restore/Synchronize Database 3.1.8 / 4.0.1  Find Currently Playing Track 1.3.2  Queue List 1.2.1  Add to Library on Play 1.0.1  Tree Report for Child Nodes 1.1.1  Update Location of Files in Database 1.4.5 / 2.3  Inherit Child Playlists 1.0.3  Add Currently Playing/Selected Track(s) to Playlist 1.2
raybeau528
Posts: 401
Joined: Thu Sep 27, 2007 4:19 pm
Location: Connecticut
Contact:

Re: Script.UnregisterEvents question

Post by raybeau528 »

Thanks ZvezdanD !
Post Reply