Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: View app consuming memory

From: cyphre:seznam:cz at: 13-Jun-2003 11:38

Hi All, ----- Original Message ----- From: "Volker Nitsch" <[nitsch-lists--netcologne--de]> To: <[rebol-list--rebol--com]> Sent: Friday, June 13, 2003 3:23 AM Subject: [REBOL] Re: View app consuming memory ........
> because 'rate runs even if we throw the face away. And so does not get > garbage-collected: > > view/new main-box: make face [size: 300x300] > main-box/pane: layout [ > sl: slider rate 10 > feel [engage: func [f a e] [probe random 6]] ; will run without face > visible.. > ] > show main-box > main-box/pane: layout [text "no slider"] > show main-box > do-events > > >
You can use also HIDE command to stop all rates easily...it is handy when you are using structure of nested faces with RATE so you don't have to set all the RATEs to none. view/new main-box: make face [size: 300x300] main-box/pane: layout [ box rate 10 feel [engage: func [f a e] [probe join "box " random 6]] with [ pane: layout [ sl: slider rate 10 feel [engage: func [f a e] [probe join "slider " random 6]] ] ] ] show main-box hide main-box/pane ;try to comment this line :) main-box/pane: layout [text "no slider, no box :)"] show main-box do-events (BTW this functionality has been requested by me two years ago ;-)). Anyway sometimes we need to remove the time events without hiding the face(s) but how to do it?? Holger said looong time ago: "For removing timeouts without hiding a face ? The solution is probably something like "face/changes: 'timeout show face" in the next version. We are already using face/changes in some other places to limit the work show has to do, and to avoid flickering. Seems like a natural addition." Unfortunately this feature is still not available in View so I hope RT will add it into the next 1.3 View. regrads, Cyphre