Search the web
Sign In
New User? Sign Up
Rebol_New · For beginning Rebol programmers
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want your group to be featured on the Yahoo! Groups website? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Modular pop-up (dialogue) window   Message List  
Reply | Forward Message #30 of 315 |
I've been working with Rebol/View for a while now and I seem to be stumped
as to how I can set up an error or debugging message which will act as a
"modular" window, i.e., it stays on top until dismissed, and program
execution does not continue until it is dismissed.

I thought I had solved this with a loop that would do a do-events (see
below), but whenever it executes do-events, it never iterates and in fact
execution of the funtion is suspended until the main window is destroyed.
Here's the code as it stands:

REBOL [
Title: "current test routine"
Author: "Ted A. Campbell"
Date: 1999-08-15
]

;---------------------
; generic handler for debug and error popup messages
;
myDebErr: func [ inString [string!] inTitle [string!] /local waitingForPanel
t ] [
t: ""
clear t
append t inTitle
append t ": "
print "Enter iDebErr..."
waitingForPanel: true
inform layout

title t with [ font: [ shadow: 1x1 ]]
text inString
button "OK" [ waitingForPanel: false hide-popup ]
] ; end of layout

while [ waitingForPanel == true ] [ print "Waiting..." do-events ] ;
wait...
; and here's the problem:
; code from this point is never executed until after the main window
; is destroyed
print "This doesn't execute until after the main (first) window is
unviewed..."
print "Now (at last) returning from iDebErr function..."
return true ; then return
]

; debug pop-up message
;
myDebug: func [ inString [string!] ] [
return myDebErr inString "DEBUG"
]

; error pop-up message
;
myError: func [ inString [string!] /local waitingForPanel t ] [
return myDebErr inString "ERROR"
]


mainWindow: layout [
backdrop effect [gradient 0.100.0 0.0.0]
title "Example"
button "Error Popup" [ myError "Hello. This is an error message from
myError." ]
button "Debug Popup" [ myDebug "Hello. This is a debug message from
myDebug." ]
button "Quit" [ unview/all ]
]

view mainWindow
print "done"

----

Can anyone help me figure out how to build a truly modular dialogue box with
Rebol/view?

Ted A. Campbell
ted@...






Tue Aug 15, 2000 5:14 pm

ted@...
Send Email Send Email

Forward
Message #30 of 315 |
Expand Messages Author Sort by Date

I've been working with Rebol/View for a while now and I seem to be stumped as to how I can set up an error or debugging message which will act as a "modular"...
Ted Campbell
ted@...
Send Email
Aug 15, 2000
5:17 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help