Contact Us

CATEGORIES

Whoops…Nothing found

Try other keywords in your search

PixcCommon.execAttribute(default,valOld,valNew,doSet)

 0 Minutes

 0 Likes

 1789 Views

This function is part of a helper script which ensures that values entered in this action are saved and at the same time displayed for the user in the input field.

The logic of this function is motivated by the need to support “naive” invocations that do not explicitly set both valNew and/or doSet.
e.g. local res = self.Atttribute() must deliver the old value.
e.g. self.Atttribute(25) must set the value to 25.
At the same time, invokers that explicitly set both parameters must also be able to control the attribute.
The basic approach is that setting requires a non-nil new value but can be blocked by explicitly using a false doSet.

The logic behind this is simply handling pixc.callRefs() and pixc.report()

For actions with attributes, this is generated automatically, different variables are transferred depending on the attribute

Example String:

self._string = pixcCommon.execAttribute("", self._string, val, doSet)

return self._string

Example Int:

self._int = pixcCommon.execAttribute(0, self._int, val, doSet)

return self._int

 

This helper script can be viewed under the path of the respective version:

"C:\Program Files\AV Stumpfl\Pixera\build_2-0-65\Avio\Scripts\Lua\pixcCommon.lua"

 


 

Pixera 2.0.124 | 11. July 2024 | J.B.

Was this article helpful?