Initialization event order / when are handles ready to be used?

Getting real close to get everything I need working. :slight_smile:
I stumbled on widget/plugin handles being unknown during project startup.
Added some logging based on the SDK callbacks to find out more about the order of events during project loadup.

I found that

  • OnRackspaceActivated is being called twice
  • OnVariationChanged is being called 3 times, always with both oldIndex and newIndex being 0.

The full log generated by various ScriptLog() calls in extension and GPScript:

Extension: OnOpen
Extension: OnRackspaceActivated. ID: 0
Extension: OnVariationChanged 0->0
GPScript:  Initialization of GLOBAL Rackspace called
Scriptlet: Initialization callback called
Extension: call setWidgetCaption for "w1"
Extension: MISSING WIDGET HANDLE: w1
Extension: OnVariationChanged 0->0
GPScript:  Initialization of Rackspace called
Extension: call setWidgetCaption for "w1"
Extension: FOUND WIDGET HANDLE: w1
Extension: OnVariationChanged 0->0
Extension: OnRackspaceActivated. ID: 0

Do you have any info on why OnRackspaceActivated is called multiple times?
My guess was that after OnRackspaceActivated, all handles in the rackspace would be known.
I cannot see a callback that’s explicitly firing after handles are ready for use.
Any advice on when one can be sure they have been loaded?

GP Script and SDK are not necessarily in sync.

Have you read the documentation for the SDK? For example,

and one of the status types is GPStatus_GigFinishedLoading

Sorry, missed that one. Works fine!