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

Problems using view/new

 [1/9] from: jvargas::whywire::net at: 16-Apr-2003 0:06


Does anybody has an explanation for this behavior: d1: layout [ choice "one" "two" "three" field 100x200 ] ; Display the window, and the face styles respond to events view d1 ; However in this case there is no response to events view/new d1 To me both should work, and I am puzzle by view/new freezing when the window. Is this a bug or I am missing something? Cheers, Jaime -- The best way to predict the future is to invent it -- Steve Jobs

 [2/9] from: antonr:iinet:au at: 16-Apr-2003 17:01


This is normal. See the help on view: (excerpt) REFINEMENTS: /new -- Creates a new window and returns immediately This means that it does not listen for events. Use do-events or wait none after view/new to "activate" the window: view/new layout [text "bonjour"] wait none view/new layout [text "hi"] do-events If you are listening for events already, such as when you have opened a window with 'view, then it is not necessary to call do-events or wait none again: view layout [ button 150 "open new window" [ view/new center-face layout [area] ] ] Anton Rolls.

 [3/9] from: gchiu:compkarori at: 16-Apr-2003 19:32


On Wed, 16 Apr 2003 00:06:24 -0400 Jaime Vargas <[jvargas--whywire--net]> wrote:
>To me both should work, and I am puzzle by view/new >freezing >when the window. Is this a bug or I am missing something?
It's normal behaviour. You need to start the view event loop. -- Graham Chiu http://www.compkarori.com/cgi-local/vanilla.r Rebol Encyclopaedia Project

 [4/9] from: Maarten:Koopmans:surfnet:nl at: 16-Apr-2003 10:55


Or, if you're using RUgby's server capabilitites: view/new serve with server starting the wait event loop. --Maarten Jaime Vargas wrote:

 [5/9] from: jvargas:whywire at: 16-Apr-2003 11:14


So in rugby, Is it better to start the event loop with serve and never use the view layout form ? On Wednesday, April 16, 2003, at 04:55 AM, Maarten Koopmans wrote:

 [6/9] from: jvargas:whywire at: 16-Apr-2003 11:12


Thanks this clarifies a lot and really helps. Cheers, Jaime On Wednesday, April 16, 2003, at 03:01 AM, Anton wrote:
> This is normal. See the help on view: > (excerpt)
<<quoted lines omitted: 37>>
> [rebol-request--rebol--com] with "unsubscribe" in the > subject, without the quotes.
Cheers, Jaime -- The best way to predict the future is to invent it -- Steve Jobs

 [7/9] from: maarten:koopmans:surfnet:nl at: 16-Apr-2003 18:34


In a server, yes. --Maarten Jaime Vargas wrote:

 [8/9] from: antonr:iinet:au at: 17-Apr-2003 4:05


I think there is room for misunderstanding here, so I add that Maarten's 'serve function calls wait in order to wait for network events. Whenever you call wait, even with none or an empty block as argument, then view events are also waited for. I think Maarten's example should have been more like this: view/new layout [button "hello"] serve ; <- this starts event processing If you had written this: view layout [button "hello"] ; <- this starts event processing serve ; <- this starts event processing then the server would not be started until the window was closed. This is what I think Maarten was pointing out. Anton Rolls.

 [9/9] from: maarten:koopmans:surfnet:nl at: 16-Apr-2003 21:41


Couldn't have written it better. In fact, I haven't ;-) --Maarten Anton wrote:

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted