View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0007680 | MMW v4 | Framework: Scripts/Extensions | public | 2011-04-19 07:47 | 2011-04-20 20:20 |
Reporter | zvezdan | Assigned To | |||
Priority | high | Severity | feature | Reproducibility | always |
Status | assigned | Resolution | open | ||
Summary | 0007680: ISDBApplicationEvents::OnNodeLeave, OnNodeFocusing and OnNodeFocused events needed | ||||
Description | The 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. | ||||
Tags | No tags attached. | ||||
Fixed in build | |||||
|
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? |
|
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. |
|
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. |
|
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. |
|
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. |
|
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). |