PDA

View Full Version : Accessing TXT field from another rollout...


Gibbz
02-20-2007, 05:57 AM
Ok, I have 3 rollouts on my Rolloutfloater.

This only happens the first time, any time after ive loaded the scipt once it seems to store it in memory.

So the problem is if i try to access something from a different rollout I get the following error.
>> MAXScript Rollout Handler Exception: -- Unknown property: "txtGroupName" in undefined <<

Is there a way to make a rollout global? Or should I assign stuff I need to access between rollouts to new global variables?


Edit:
A overview of my setup....

Globals
Functions
Rollouts

The problem seems to be that the functions are before the rollouts? Could the be the problem?

shibumenon
02-20-2007, 08:12 AM
I would make the rollouts global, and you wouldn't get the
scope errors then.

global unnamedRollout1
global unnamedRollout2

rollout unnamedRollout1 "Untitled" width:162 height:72
(
editText edt1 ""
on edt1 entered txt do
(
unnamedRollout2.edt1.text = txt
)
)

rollout unnamedRollout2 "Untitled" width:162 height:72
(
editText edt1 ""
on edt1 entered txt do
(
unnamedRollout1.edt1.text = txt
)



)

fltr = newRolloutFloater "test" 178 120
addrollout unnamedRollout1 fltr
addrollout unnamedRollout2 fltr

CGTalk Moderation
02-20-2007, 08:12 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.