Yalla T.
Yalla T.

Reputation: 3727

How do I get a Part in the sirius-web scripting interface?

When using the system scripting interface ("system/scripting") of sirius-web (part of the sirius framework), what method is available to use to get a specific registered Part to use in my script?

Upvotes: 1

Views: 61

Answers (2)

Andreas Haufler
Andreas Haufler

Reputation: 411

One could extend the DefaultGlobalContextExtender and place an instance of Injector in the context...

Upvotes: 0

Tobias Bischoff
Tobias Bischoff

Reputation: 21

Create an object implementing sirius.web.templates.GlobalContextExtender and add the object by extending the collectScripting Method:

globalParameterCollector.accept("objectNameToAccess", objectToAdd);

Can be accessed from within the scripting by calling:

@objectNameToAccess.methodName()

Upvotes: 2

Related Questions