[futurebasic] Re: [FB] (FB^3) Modal Windows Problems

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 2000 : Group Archive : Group : All Groups

From: Mark Goodes <mgoodes@...>
Date: Sat, 13 May 2000 11:58:55 -0400
Walter:

I'm not familiar enough with FB^3 to help you make it work in that venue, but I
have two ideas for accomplishing what you want.

1.  Make your window in ResEdit, call it using GETNEWDIALOG, and process it using
MODALDIALOG, or

2.  Hack your own version of MODALDIALOG by writing something along these lines:
       - build the window and put a _modal flag in the refcon field of the window
structure
       - set up a handleevents loop to process the window, something like this:
         DO
            HANDLEEVENTS
          UNTIL window is closed
        - set up an ON EVENT FN DoEvent something like this:
          Local FN DoEvent
           - get front window pointer and check the refcon to see if it's modal
           - if front window is modal
             - check mouse position
               - if it's not in the window's rectangle then clear the event
             - check item type
               - if it's a menu item selection you don't want then clear the
event

I realize this is lazy pseudo-code but I haven't programmed for a number of weeks
so I'm hazy on the details.  Hope this helps a little anyway.

Mark

Walter Lenk wrote:

> I am having a problem with modal windows in FB^3,