View Issue Details

IDProjectCategoryView StatusLast Update
0007680MMW v4Framework: Scripts/Extensionspublic2011-04-20 20:20
Reporterzvezdan Assigned To 
PriorityhighSeverityfeatureReproducibilityalways
Status assignedResolutionopen 
Summary0007680: ISDBApplicationEvents::OnNodeLeave, OnNodeFocusing and OnNodeFocused events needed
DescriptionThe current behavior with the node switching and OnChangedSelection event is totally confusing, especially because that event is fired also when an user change selection in the tracklist or NP panel. We need new events which would be fired only when an user switch some node. OnChangedSelection could stay as it is now because of the backward compatibility with two calls per node switching.

OnNodeLeave event handler:
- SDB.MainTree.CurrentNode should return the old node object;
- SDB.AllVisibleSongList should return tracks from the old tracklist.

OnNodeFocusing event handler:
- SDB.MainTree.CurrentNode should return the new node object;
- SDB.AllVisibleSongList should return empty tracklist.

OnNodeFocused event handler:
- SDB.MainTree.CurrentNode should return the new node object;
- SDB.AllVisibleSongList should return the new filled tracklist.
TagsNo tags attached.
Fixed in build

Relationships

related to 0006719 feedbackLudek Bugs with OnNowPlayingSelectionChanged, OnTrackListSelectionChanged and OnTrackListFilled (and problem with OnChangedSelection) 

Activities

Ludek

2011-04-19 11:46

developer   ~0024400

Last edited: 2011-04-19 14:03

Isn't
OnNodeFocused the same as current OnTracklistFilled ?
and
OnNodeFocusing the same as current OnTracklistFilling ?

So wouldn't it be enough to add just OnNodeLeave?

zvezdan

2011-04-19 16:12

updater   ~0024404

Well, I guess you are right. I didn't try, but I supposed that you fire OnTracklistFilled and OnTracklistFilling whenever the tracklist is filling/filled, not matter after which action. I supposed this could be done not only because of the node switching, but also after Add/Rescan or some another operation. My English is not very well, but I think that your description in wiki is not very clear if this happens only after node switching: "This event is called when filling of tracklist is about to be started (i.e. tree node has been changed)". I would say that as: This event is called when filling of tracklist is about to be started because tree node has been changed.

By the way, if you decide to add the OnNodeLeave event, maybe you should add "Tree" in the front of "Node", so it could have similar syntax as SDBTreeNode, i.e. OnTreeNodeLeave.

zvezdan

2011-04-19 17:18

updater   ~0024405

There is at least one more action beside of the node switching for which I know (I just tried) that fires OnTracklistFilled and OnTracklistFilling - Refresh (F5). So, answer to your questions is - no, OnNodeFocused is not the same as current OnTracklistFilled and OnNodeFocusing is not the same as current OnTracklistFilling.

zvezdan

2011-04-19 17:43

updater   ~0024406

There is one more action which fires OnTracklistFilled (but not OnTracklistFilling) - SDB.MainTracksWindow.FinishAdding. Note that in this case, as well as it is with the previous (Refresh), the current node is not changed.

Ludek

2011-04-20 15:38

developer   ~0024418

Last edited: 2011-04-20 15:39

Ok, you are right that the description in wiki isn't very clear so I would prefer to clear the description there for OnTracklistFilling and OnTracklistFilled events rather than to add another two very similar events.

zvezdan

2011-04-20 20:20

updater   ~0024423

As you could see from my two last post, OnTracklistFilling and OnTracklistFilled events are firing not only when someone change node, but in other situations as well. I bet there are some another situations when you are firing those events beside of mentioned, but they are unknown to me right now. So, it is obvious that two new proposed events, OnNodeFocusing and OnNodeFocused, are not similar to OnTracklistFilling and OnTracklistFilled. Acctually, they are similar as OnPlaybackEnd is similar to OnTrackEnd (OnTrackEnd is firing when end of track is reached and OnPlaybackEnd is firing when end of track is reached plus some another situations).