initWithSquirrel

initWithSquirrel();

initWithSquirrel()

No parameters and no return.

This method should be called once the addon has finished it’s own configuration and initialization. This will send a message to Squirrel to inform it that the addon is setup and ready to start sending and receiving messages.

This method will store a copy of state and bindingDimensions.

state

Squirrel will respond to the initWithSquirrel() method call with a handshake response. The handshake will include a complete copy of state.

State matches the defaultState structure provided in the defaultState.json file. The state object passed from Squirrel will contain all the current values for any bound cells or hard-coded values in the property panel.

State is a private variable which you cannot access directly, however you can request a copy of state by using the getCopyOfState() method. And a copy of state is passed into the onInitState(state: any) method.

bindingDimensions

Squirrel will respond to the initWithSquirrel() method call with a handshake response. The handshake will include a complete copy of all the known bindings.

The bindingDimensions object will contain a property name matching your default state, following dot notation, with the value being the size of the binding.

This variable is private and not directly accessibly, however you can get the dimension for a specific property by calling the getBindingDimension(property: string) method

Last updated

Was this helpful?