This is a bug in this sample - you should try to register your event listeners when you recieve a kAICSXSPlugPlugSetupCompleteNotifier notification, not post startup. You can add a notifier handle and listen out for it in the usual way - FreeGrid actually does this in addition to trying to register on PostStartup.
We've already fixed this for the next release of the SDK - thanks for spotting it!
Thanks for your great help! but kAICSXSPlugPlugSetupCompleteNotifier is not given in plug-in notifier list.
I tried kAICSXSPlugPlugSetupCompleteNotifier but I was gettting compiling error showing this is undeclare.
How did you fix it? can you plz tell?
My mistake - looks like there isn't a notification for this at all - I would try registering for event listeners as late as you can - it depends what your plugin is doing. Maybe take a look at how FreeGrid and StrokeFilter do it.
I'm in the same boat. Any word on when to register for these listeners? I really need a Notifier that will allow me to do this before the user makes any moves. Strokefilter doesn't provide any answers.
1 person found this helpful
HERE'S A WORKAROUND FOR THE BUG!
It comes from David_a_Clark in another forum:
"Ah, this is a known issue. For CS5 the workaround I used was to start an AI Timer in my plug-in's startup code which went off after '1 tick' (AI SDK terminology, IIRC). After 1 tick, PlugPlug has started up and is available to use.
In the next version of AI SDK I believe there will be a 'PlugPlug set up' notifier which removes the need for the timer workaround."