[futurebasic] This @#$% window won't close

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

From: Tony Hansen <thansen@...>
Date: Mon, 24 Nov 1997 13:30:08 -0700
Here is the code for the Window that won't close.
Thanks for the suggestions. I tried deleting and
adding the window again. I tried replacing the
_Preferences constant with the actual number 5.
No go.

'====        wPreferences.FLTR        ====
INCLUDE FILE _aplIncl
GLOBALS "Runtime.GLBL"
COMPILE 0,_pGproject        'dimmedVarsOnly
GLOBALS "INSIGHT.GLBL"
END GLOBALS
'-----------------------------------------
GOTO "wPreferences"
'-----------------------------------------
DEF FN pGbuild(wndRefNum) USING GLBLbuild&
DEF FN pGclose(wndRefNum) USING GLBLclose&

'=========================================
LOCAL FN PrefSave
  '
END FN

LOCAL FN ShowPrefs
  '
END FN

LOCAL FN Preferences
  FN pGbuild(_Preferences):FN ShowPrefs
END FN

LOCAL FN PrefsInit     'called at startup
  gPreferences& = @FN Preferences
END FN

'=========================================
"wPreferences"
'=========================================
LONG IF gActiveWnd = _Preferences
  SELECT gLongAction&
    CASE _mStart
    CASE _btnLong
      SELECT gWhichButton
        CASE _btnOK
          FN PrefSave
          BEEP   'it beeps when I click OK but does not close
          FN pGClose(_Preferences)
        CASE _btnCancel
          FN pGClose(_Preferences)
      END SELECT
    CASE _wClose
      gKissOfDeath = _false:gAction=0
    CASE _wUpdate
  END SELECT
END IF
IF 0 THEN RETURN

Here is part of the globals source file:

'=========================================
'     Window Class Reference Numbers
'=========================================
_SplashWnd              = 1     'Splash
_RecipeWnd              = 2     'INSIGHT Recipe Window
_windowClass3           = 3     'Untitled 3
_TxtWnd                 = 4     'Text Window
_Preferences            = 5     'Untitled 5
_MaterialWnd            = 6     'Material Definitions
_OxidesWnd              = 7     'Oxide Definitions
_EnterFormulaWnd        = 9     'Enter Formula
_SupplyOxWnd            = 10    'Supply Oxide  -

-- 
-------
T o n y   H a n s e n        thansen@...
Get INSIGHT, Magic of Fire at http://digitalfire.com