[futurebasic] Re: [FB] Re: Menu problems

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

From: Chris Stasny <staz@...>
Date: Fri, 24 Sep 1999 14:43:03 -0500
I can't imagine how this worked in FBII. Your statement...

   itemID% = MENU (menuID)

was supposed to be...

   itemID% = MENU (_itemID)  ' _itemID = 1

That means it should only have worked for menu #1.


>>
>> Anders said:
>
>> > I have a program with four menus on the menu bar: Apple, File, Edit and
>> > Transactions. All menus return the proper event when clicked, but only
>> > the File menu returns the line clicked. All other  menus return zero no
>> > matter which line is clicked.
>> >
>> > Could we see a little code?
>
>Here it  is:
>
>LOCAL FN doMenu
>   DIM menuID%, itemID%, View%          ' In this case, always 3 for the
>desired menu
>   menuID% = MENU(0)
>   itemID% = MENU (menuID)
>
>   print % (10,50), itemID%                          ' Checking, always zero
>   TRON BREAK
>
>   SELECT menuID%
>      CASE _mappleMenu:
>         'FN doAppleMenu (itemID)
>      CASE _mFile: FN doFileMenu (itemID%)
>      CASE _mEdit: PRINT "Inside EDIT"
>      CASE _mTrans
>         SELECT itemID%
>            CASE _iEnter: FN CheckEntry
>            CASE _iEdit
>               View% = _noFramed
>               FN CkEdit(View%,"Edit")
>               'CASE _iDelete                             'Use Edit
>               '--------------
>            CASE _iView:
>               View% = _statNoFramed
>               FN CkEdit(View%,"View")
>            CASE _iReconcile: FN Reconcile
>         END SELECT
>
>      CASE _mAccounts
>         SELECT itemID%
>            CASE _iSelect :WINDOW CLOSE(_activeWnd):FN SelectUser
>            CASE _iEditAc :FN doAcctMenu(itemID)
>            CASE _iDelAc  :FN doAcctMenu(itemID)
>            CASE _iViewAct:                       'FN ViewAccounts
>         END SELECT
>
>   END SELECT
>   MENU
>END FN
>
>The menuID% is always 3 as it should be
>The itemID% can be 1, 2, 3 or 4. This worked without a problem in FB II
>
>
>
>--
>To unsubscribe, send ANY message to <futurebasic-unsubscribe@...>




Best,

-STAZ  ~)~

800.348.2623 Orders  http://www.stazsoftware.com
228.255.7086 FAX     mailto:staz@...