Notifications
Clear all

[Closed] subRollouts and disappearing progressBars

the following script does what i expect it to. it creates a rollout (“mainRollout”) with a subrollout window (“SubRolloutWindow”) and inserts a previously defined rollout (“progbarRollout”) with a progressbar into the subRollout…


clearListener()
rollout progbarRollout “progbar”
(
progressbar progbar1 value:78 height:18
)

try(destroyDialog mainRollout)catch()
rollout mainRollout “Main Rollout”
(
subRollout SubRolloutWindow “SubRollOutWindow” width:480 height:70

 on mainRollout open do
 (
 addSubRollout mainRollout.subRolloutWindow progbarRollout
 --mainRollout.subRollOutWindow.progbarRollout.progbar1.value = 30
 )

)
createDialog mainRollout 500 90

however, when i uncomment the line…

mainRollout.subRollOutWindow.progbarRollout.progbar1.value = 30

…which should just change the predefined value for the progressbar, the progressbar completely disappears. if you rollup the “progbar” dialog and unroll it again, the progressbar appears as it should at the new value.

how can i get the progressbar to not disappear when i change the value on the fly?

prethanks,
steev

6 Replies

I think you’ve found a bug there! Surprise, surprise. :rolleyes:

Does it have to be as a subrollout? How about it’s own dialog?


    rollout progbarRollout "progbar"
    (
    	progressbar progbar1 value:78 height:18
    	on progbarRollout open do
    	(
    			progbarRollout.progbar1.value = 30
    	)
    )
    createDialog progbarRollout 500 90
    
Works just as well without all that nasty 'rollout' look and clutter.

Or this will work if you want to keep adding subrollouts too..

     rollout progbarRollout "progbar" 
     (
     	
     )
   rollout mainRollout "Main Rollout"
    (
    	progressbar progbar1 value:78 height:18
    	subRollout SubRolloutWindow "SubRollOutWindow" width:480 height:70
    
    	on mainRollout open do
    	(
    		addSubRollout mainRollout.subRolloutWindow progbarRollout
    		mainRollout.progbar1.value = 30
    	)
    )
    createDialog mainRollout 500 90

This also happens with Rollouts in a RolloutFloater.
Only createDialog does not have this problem.
There is no way to force an update – the user has to do some mouse work for the progressbar to redraw.
Another trick is to have the progressbar outside of the visible area – when the user scrolls up to its location, it would be updated (at least in the case of RolloutFloater rollouts)

Will have to log this in as a bug…

Cheers,
Bobo

yeah, was hoping it wasn’t a bug, but…

impus – yep, this needs to be the format. i’m using a tabbed interface (which i think i may have picked up from one of your posts on here) so i need to build these rollouts within subrollouts – since everything is built dynamically.

i have no idea if this is possible, but if i define the rollout as rolledUp:true, is there way to “unroll” it without user interaction when the rollout loads?

thanks bobo & impus

…and another thing.

bobo, will you be logging the bug or should i? if latter, what’s the best avenue for that?

i have no idea if this is possible, but if i define the rollout as rolledUp:true, is there way to “unroll” it without user interaction when the rollout loads?

Actually, Yes, there is! And it works for you

clearListener()
   rollout progbarRollout "progbar"
   (
   	progressbar progbar1 value:78 height:18
   )
   
   try(destroyDialog mainRollout)catch()
   rollout mainRollout "Main Rollout"
   (
   	subRollout SubRolloutWindow "SubRollOutWindow" width:480 height:70
   	
   	on mainRollout open do
   	(
   		addSubRollout mainRollout.subRolloutWindow progbarRollout
   		mainRollout.subRollOutWindow.progbarRollout.progbar1.value = 30
   		mainRollout.subRollOutWindow.progbarRollout.open = false;
   		mainRollout.subRollOutWindow.progbarRollout.open = true;
   	
   	)
   )
   createDialog mainRollout 500 90

OPEN!!! geez louise, why didn’t i try that? <smacks head>

thanks a gazillion! now i can get some work done (and sleep at night)