View Single Post
Old 10-11-2012, 08:19 AM   #6
Pepin33
Zealot
Pepin33 has a complete set of Star Wars action figures.Pepin33 has a complete set of Star Wars action figures.Pepin33 has a complete set of Star Wars action figures.Pepin33 has a complete set of Star Wars action figures.Pepin33 has a complete set of Star Wars action figures.
 
Posts: 109
Karma: 419
Join Date: Aug 2012
Location: Spain
Device: Kindle Touch
Smile

Quote:
Originally Posted by kovidgoyal View Post
Use a timer an keep polling till you have the new ids.
This is not a good solution, because the user may cancel the iaction, and we never will get new ids.

Quote:
Originally Posted by kovidgoyal View Post
Or you can be sophisticated and monkey patch the callback function on the iaction object so that your callback is called instead. Just remeber to retore the original function after you are done.
I had no idea about what a monkey patch was. But google is my friend, so I search, found... and it works!
I monkey patch the "_files_added" function at the iaction to make its work, and then to call my own function to get the ids. And works OK.

Thank you again for your help, kovidgoyal, you're the king!

Last edited by Pepin33; 10-11-2012 at 02:02 PM.
Pepin33 is offline   Reply With Quote