createdialog isnot working

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

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
yunusbbayram's picture

I do not know too much

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

Anubis's picture

its not a subrollout problem

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

my recent MAXScripts RSS (archive here)

yunusbbayram's picture

true my problem is not

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's picture

What Anubis tried to show you

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's picture

I do not know too much

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

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.