Notifications
Clear all

[Closed] How to get Rollout loacal variable?

Hi

Is there any way to get rollout local variable?


rollout d1 "" width:162 height:300
(
	local a = "c:	emp"
	
	fn create_d2 =
	(
		rollout d2 "" width:162 height:300
		(
			local b = a
		)
		createDialog d2
	)
)
createDialog d1

-- Runtime error: Rollout not created, unable to access rollout local or parameter: A

thanks for any suggestion
–fixed name of second dialog (thx Kameleon

7 Replies

d1.a ? Also it seems you have a typo in the second rollout declaration, should be d2 instead of d1

1 Reply
(@merlinel)
Joined: 11 months ago

Posts: 0

Hi
nop I tryed this before

rollout d1 “” width:162 height:300
(
local a = “c: emp”

fn create_d2 =
(
	rollout d2 "" width:162 height:300
	(
		local b = d1.a
	)
	createDialog d2
)

)
createDialog d1

– Unknown property: “A” in Rollout:d1

foud a tricky way , thank you


rollout d1 "" width:162 height:300
(
	local a = "c:\	emp"
	
	fn create_d2 =
	(
		rollout d2 "" width:162 height:300
		(
			local b
			fn variableCheck = format "var_check:%
" b
			on d2 open do 
			(
				b=a+"\	est\\"
				variableCheck()
			)
		)
		createDialog d2
	)
)
createDialog d1
d1.create_d2()


Cant you do it like this?

fn create_d2 =
	(
		rollout d2 "" width:162 height:300
		(
			local b = d1.a
			
			on d2 open do print b
		)
		createDialog d2
	)

rollout d1 "" width:162 height:300
(
	local a = "c:	emp"

	on d1 open do create_d2()
)
createDialog d1
1 Reply
(@merlinel)
Joined: 11 months ago

Posts: 0

I allmost forget this way why not thanks


rollout d1 "" width:162 height:300
(
	local a = "c:	emp"
	
	fn create_d2 =
	(
		rollout d2 "" width:162 height:300
		(
			local b = ::a
		)
		createDialog d2
	)
)
createDialog d1
1 Reply
(@merlinel)
Joined: 11 months ago

Posts: 0

Hi cyfer

It almost worked :lightbulb


global d1
global d2

rollout d1 "" width:162 height:300
(
	local a = "c:	emp"
	
	fn create_d2 =
	(
		rollout d2 "" width:162 height:300
		(
			local b = ::a
			on d2 open do format "var b:%
" b
		)
		createDialog d2
	)
)
createDialog d1
d1.create_d2()

--var b:undefined