Reply To: declaring and getComponent-better way?

Home Forums General Programming declaring and getComponent-better way? Reply To: declaring and getComponent-better way?

human fly
  • Topics: 124
  • Replies: 1070
  • Total: 1194
  • ★★★★

just tried that now, didn’t like it

At line [13]: [string "tabsToneTimb0_pt1"]

Error message: [string "tabsToneTimb0_pt1"]:13: attempt to index global 'tabs_Main_pt1' (a nil value)

strange. could it be because it’s declared as getComponent, and not
getModulatorByName? even tried:
tabs_Main_pt1 = panel:getModulatorByName():getComponent("tabs_Main_pt1")

>definitely didn’t like that: this crashes the panelLoaded method that
calls the ‘panelModulators’ method.

>strange: where i have things declared as getModulatorByName, this type
of call works fine. maybe getComponent is no good for startup declaration?
– – – –
as a side-note, what i would like to do here ultimately is combine 5 methods
into one. i have 5 buttons, and each has a method that 1/sets a tab view, 2/
changes the button text colour 3/sets another tab view, (etc. if i want more
stuff to happen)

these are ‘old’ methods in my panel, with everything declared there.
although i have a separate ‘panel modulators’ (as opposed to ‘parameter
modulators’, separate startup declaration method, just to keep things
readable) it wasn’t/isn’t doing anything, apparently.

not sure if startup declaration NEEDS to be getModulatorByName,
rather than just getComponent ? > doesn’t seem to change it anyway.