"selected_Track_Index_Observable" Questions

Got some code here. Clearly I rushed this and didn’t put a lot of thought into it, but I have a couple of questions.

  
function foo(notifier) rprint(notifier) end  
renoise.song().selected_track_index_observable:add_notifier(foo)  
  

rprint(notifier) would always be nil. But the docs say “-> [number]” ; at least for the non-observable version of the function. Why always nil? I’ve used (renoise.song().tracks_observable:add_notifier(foo)) and had access to “notifier.type” in the past, for example. It would be nice to get the integer here? What’s different?

Concerning the version of the script linked in the first sentence, If I drag and drop, then selected_track_index_observable is launched after everything gets repositioned? Yes, no? Alright, so what’s a sane strategy to know my previously manipulated track so that I can revert it?

Thanks in advance.

Stuff the current contents in arrays on start-up in advance and compare with the changes?
If you are really paranoid on whether tracks are swapped and simply not renamed, then add some md5 checksum routines upon the track contents.