Notifications
Clear all

[Closed] addhandler help

Hey guys Im having some issues with the following snipet of code:

rolloutFileLabels.addControl #label LabelName LabelText paramStr:LabelParams
rolloutFileLabels.addControl #spinner SpinnerName SpinnerText paramStr:SpinnerParams
local GetLabelNum = replace SpinnerName 1 7 “Label”
rolloutFileLabels.addHandler SpinnerName #changed paramStr:“val” codeStr:“setUserProp $ GetLabelNum.text val”

I have it set up so the ending numbers for the spinner and label are the same, so I am trying to swap out the current spinner name to label then set user props this wa. On the set up loop GetLabelNum works right, but on the handler change it comes up as undefined… any one have a better way of doing this or maybe i am missing something simple?

2 Replies

ok the issue is SpinnerName is undefined… so how do i get the name for the spinner being chnaged when it was dynamiccaly generated like so?

nm got it figured out…
Sorry to waste a post