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

BUG in INFORM

 [1/4] from: g::santilli::tiscalinet::it at: 10-Oct-2002 16:48


This is probably a known issue, I hope resubmitting is not a problem. BUG: INFORM does not set the default window feel EXAMPLE: If you wonder why your requestors don't respond to keystrokes, this is the reason. REQUEST assigns the #"Y" key to the "yes" button, #"N" to the "no" button and ESC (#"^(1B)") to the "cancel" button; however, these keys don't work (except for ESC that works because it is handled separately in SYSTEM/VIEW/WAKE-EVENT).
>> system/product
== View
>> system/version
== 1.2.8.3.1
>> request "Hello there."
(try pressing Y or N) REASON: Keys are handled in SYSTEM/VIEW/WINDOW-FEEL; the VIEW function sets the feel of the window to that, but INFORM doesn't. FIX: inform: func [ {Display an exclusive focus panel for alerts, dialogs, and requestors.} panel [object!] /offset where [pair!] "Offset of panel" /title ttl [string!] "Dialog window title" /timeout time ][ panel/text: copy any [ttl "Dialog"] panel/offset: either offset [where] [system/view/screen-face/size - panel/size / 2] panel/feel: system/view/window-feel ; <<----- show-popup panel either time [wait time] [do-events] ] Also, I'd suggest to change the keys in REQUEST to be #"y" and #"n" instead of #"Y" and #"N" that require pressing shift. The RETURN key would be a nice synonym for #"y" (at least in the case of REQUEST/OK).

 [2/4] from: ptretter:charter at: 10-Oct-2002 19:26


I actually think that is by design Gabriele. I think that is why we have center-face to give us the same positioning that inform does. Inform is useful in this manner as we can ensure that inform is useful for providing a warning message or to ensure that no other window receives events until the inform windows is closed/unviewed. Paul Tretter ----- Original Message ----- From: "Gabriele Santilli" <[g--santilli--tiscalinet--it]> To: <[feedback--rebol--com]> Cc: <[rebol-list--rebol--com]>

 [3/4] from: greggirwin:mindspring at: 10-Oct-2002 20:15


Thank you! This has always bugged me, but obviously not enough to track down the culprit. This is an enormously important fix IMO. --Gregg

 [4/4] from: g:santilli:tiscalinet:it at: 11-Oct-2002 11:34


Hi Paul, On Friday, October 11, 2002, 2:26:27 AM, you wrote: PT> I actually think that is by design Gabriele. I think that is why we have PT> center-face to give us the same positioning that inform does. Inform is PT> useful in this manner as we can ensure that inform is useful for providing a PT> warning message or to ensure that no other window receives events until the PT> inform windows is closed/unviewed. I think I have not been clear. I'm not saying that the problem is that INFORM stops other windows from working; that is by design and is done in SYSTEM/VIEW/WAKE-EVENT. The problem is that INFORM does not correctly handle the keys you set in LAYOUT in the window that you are showing with INFORM. I.e. when you use the REQUEST function, the requester that is shown does not respond to the "Y" and "N" keys as it should (based on its source code). I hope this is clearer now. If not, maybe someone speaking a better English than me could explain it better. :) Regards, Gabriele. -- Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r