PDA

View Full Version : Callbacks being ignored


Mathieson
06-18-2007, 10:51 PM
I have callbacks set up for when I merge a file, but when I merge a file through script the callbacks seem to be ignored.

Any idea why this is happening, and if there is a workaround?

Thanks!

JohnSwafford
06-18-2007, 11:34 PM
...but when I merge a file through script the callbacks seem to be ignored.

First of all, it sounds like you haven't confirmed that they are not executing. If you haven't done this, put some print commands (i.e. print "XcallbackStarting" and print "XcallbackEnding") in your callback to confirm whether they are being triggered. If you don't see these strings appearing in the Listener, then you know they aren't being triggered.

Second, this might be the designed behavior of callbacks not to be triggered by script-initiated merges? (I'm actually not sure about this.) As a workaround, I would suggest that you simply remove the callbacks prior to your script-based merge, then directly execute the function/string that your callback would normally execute, and finally rebuild the callbacks after your merge code is finished. I've had to do this on a PreRender/PostRender pair of callbacks in my script....works very well.

CGTalk Moderation
06-18-2007, 11:34 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.