ScriptSpot

Forum topic · General Scripting

createdialog isnot working

By yunusbbayram · 2011-06-04

Description

global test


  Rollout test "cap1"
  (
    Spinner s1 "cap2"
  )
--   createdialog test


rollout test1 ""
(
	subrollout asdf width:140 height:100
	button asd""

	on asd pressed do    ------does not work
	(createdialog test)
		
	
)
createdialog test1
AddSubRollout test1.asdf test

Why does not consist of rollout asd?

Comments (5)

yunusbbayram · 2011-06-05

I do not know too much english
Would you help with code sample or in my code?

its not a subrollout problem

Anubis · 2011-06-05

i hope this code to help to see the problem

rollout test "cap1"
(
    Spinner s1 "cap2"
) 

cp = copy test
createDialog cp
cp.isDisplayed -- true
test.isDisplayed -- true

yunusbbayram · 2011-06-05

true my problem is not subrollout
my problem, new test windowdialog does not open when I press the button asd


global test
 
 
  Rollout test "cap1"
  (
    Spinner s1 "cap2"
  )
--   createdialog test
 
cp = copy test
cp.isDisplayed -- true
test.isDisplayed 
  
rollout test1 ""
(
	subrollout asdf width:140 height:100
	button asd""
 
	on asd pressed do    ------does not work
	(createdialog cp)
 
 
)
createdialog test1
AddSubRollout test1.asdf test

Swordslayer · 2011-06-05

What Anubis tried to show you is that you can't copy rollouts like this, it's just a pointer to the exact same rollout. Instead of seeing that both

cp.isDisplayed

and

test.isDisplayed

return true when you create dialog using one of them, you can just as well use

cp = copy test
cp == test -- true

to check that. You'd either have to use rolloutcreator or just define two distinct rollouts yourself.

yunusbbayram · 2011-06-05

I do not know too much english
Would you help with code sample or in my code?