bhnh

01-22-2008, 02:36 PM

OK, here's a simple rollout with two spinners that link to each other...

rollout spns "Example 1: Rollout spinners"

(

spinner spn_A "1st spinner"

spinner spn_B "2nd spinner"

local n

on spn_A changed value do

(

n = spn_A.value

spn_b.value = n

)

on spn_B changed value do

(

n = spn_B.value

spn_A.value = n

)

)

createDialog spns 200 50

As you can see, any change in one spinner updates the other.

Now here's a floater with spinners in two rollouts...

(

local m

rollout r1 "RollOut1"

(spinner spn_r1

on spn_r1 changed value do

(

m=spn_r1.value

spn_r1.value = m

)

)

rollout r2 "RollOut2"

(spinner spn_r2

on spn_r2 changed value do

(

spn_r2.value = m

)

)

nf = newRolloutFloater "Example 2: Floater spinners" 225 115

addRollout r1 nf

addRollout r2 nf

)

My question is, is there any way to get the spinners in Example 2 to behave in the same ways as in Example 1? I understand that the floater is basically just a wrapper for the two rollouts and that, as such, the rollouts aren't aware of each other's existence. I've tried any number of finagles and can't get them to interact with each other. Any advice would be greatly appreciated. Thanks.

rollout spns "Example 1: Rollout spinners"

(

spinner spn_A "1st spinner"

spinner spn_B "2nd spinner"

local n

on spn_A changed value do

(

n = spn_A.value

spn_b.value = n

)

on spn_B changed value do

(

n = spn_B.value

spn_A.value = n

)

)

createDialog spns 200 50

As you can see, any change in one spinner updates the other.

Now here's a floater with spinners in two rollouts...

(

local m

rollout r1 "RollOut1"

(spinner spn_r1

on spn_r1 changed value do

(

m=spn_r1.value

spn_r1.value = m

)

)

rollout r2 "RollOut2"

(spinner spn_r2

on spn_r2 changed value do

(

spn_r2.value = m

)

)

nf = newRolloutFloater "Example 2: Floater spinners" 225 115

addRollout r1 nf

addRollout r2 nf

)

My question is, is there any way to get the spinners in Example 2 to behave in the same ways as in Example 1? I understand that the floater is basically just a wrapper for the two rollouts and that, as such, the rollouts aren't aware of each other's existence. I've tried any number of finagles and can't get them to interact with each other. Any advice would be greatly appreciated. Thanks.