[futurebasic] Re: [FB] Good Event Sorting Structure

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 1999 : Group Archive : Group : All Groups

From: pochas <pochas@...>
Date: Tue, 02 Nov 1999 15:26:13 -0500
Your structure is tha same one I use for multiple windows, except that a
_wndRefresh event should be checked for first, since it may be for a
window that is not active.  I then use a mini- "doDialog" function for
each window.

HTH,  Charles P.

local fn doDialogs
evt% = dialog(0)
id% = dialog (evt%)

long if evt% = _wndRefresh
  select id%
    case 1
       fn refreshWnd1
    case 2
       fn refreshWnd2
  end select
  xelse
   select window(_activeWnd)
      case 1
          wndDlg1(evt%, id%)
      case 2
          wndDlg2(evt%, id%)
    end select
  end if
end fn


Paul Bruneau wrote:

> So basically, it first sees what window is active, then it looks at
what
> type of event.
>
> I'm afaid that this is stupid, and I should be first seeing what the
> event is, then acting appropriately depending upon which window the
> event occurred in. (Although the program has worked great up until
now,
> where I am having trouble with expanding it to include another window
> and a palette for use with the new window)
>
> Can anyone verify that I am, indeed, a dork?
>
> Thanks,
>
> PB