🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac.oop.misc
Article #146

Re: TCL Q: enableCmd ??

#146
From: Alun ap Rhisiart
Date: Tue, 12 Jan 1993 19:48
62 lines
3482 bytes
In article <1993Jan12.132001@informatik.uni-kl.de>, kemper@informatik.uni-kl.de (Michael Kemper [RHRK]) writes:
> In article <1iu6jkINNhc@urmel.informatik.rwth-aachen.de>, GRAFF <pier@reze-1.rz.rwth-aachen.de> writes:
> |> Hi !
> |> 
> |> I've got a big problem using TCL: I create a new Menu Item via
> |> ResEdit. Then, I add the menu Command after the Name of the Menu,
> |> like this:   Show Highscores#4711   (Also in ResEdit :)
> |> In my MyDoc - Class I call after the call of inherited::setupMenus()
> |> the Bartender:   gBartender->enableCmd(4711);
> |> 
> |> BUT IT DOESN'T WORK. I tried this call ^^^^^ almoust everywhere, but
> |> it didn't worked as well. 
> |> 
> |> Now, does anybody knows how to enable this (d*mm) menu item?? Where
> |> does I have to put the call? And where can I disable it again?
> |> 
> |> 	Thanks
> |> 	
> |> 			Jochen
> |> 			
> |> P.S: English is not my native Language, Stig Hemmer ;)
> |> P.P.S: Heard about the new Apple products? And the prices? Wow!
> 
> Hi,
> 
> normally yoy call EnableCmd and DisableCmd in the UpdateMenus method. This method is called when
> the user clicks in the menu bar and handles all menu enabling (in general all menus are disabled
> before UpdateMenus is called). The CApplication.UpdateMenus and CDocument.UpdateMenus (sorry I
> am a Pascal fan) manage the correct settings for New, Open, Close, Save, etc. (standard items),
> but you have to manage your own items by yourself by overriding UpdateMenus in your MyDoc class
> (remember to call inherited UpdateMenus).
> 
> Hope this helps
> -- 
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
>   
>   \_        \_  \_  \_    | Michael Kemper
>   \__      \__  \_ \_     | University of Kaiserslautern, Germany
>   \_\_    \_\_  \_\_      | email: kemper@rhrk.uni-kl.de 
>   \_ \_  \_ \_  \__       | 
>   \_  \_\_  \_  \_ \_     | Although they gave me that email address,
>   \_   \_   \_  \_  \_    | this is not the opinion of rhrk, uni-kl or de!
> 
> \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_

A little more information is needed here. Does the menu itself appear,
but this item remains disabled (ie, does this menu appear in the MBAR
resource)? Have you put a stop in MyApp->updatemenus to see that the
line is executed? Maybe the document does not appear in the chain of
command. Or perhaps something earlier in the chain (eg a pane->updatemenus
) does not call inherited? A little more info and we'll track it down.

I know how you feel, I am having great problems with bugs that make no
sense now that I am using TCL 1.1.2, which I didn't have with the first
version.
-- 
***********************************
* Alun ap Rhisiart                *    | When I wrote this, only God | 
* Animal Behaviour Research Group *    |  and I knew what it meant.  |
* Oxford University               *    | Now, only God knows.        |
* vollrath@vax.ox.ac.uk           * 
***********************************
Technical Details
Message-ID: <1993Jan12.194817.11240@vax.oxford.ac.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!comlab.ox.ac.uk!oxuniv!vollrath
References: <1iu6jkINNhc@urmel.informatik.rwth-aachen.de> <1993Jan12.132001@informatik.uni-kl.de>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!comlab.ox.ac.uk!oxuniv!vollrath
From: vollrath@vax.oxford.ac.uk (Alun ap Rhisiart)
Newsgroups: comp.sys.mac.oop.misc
Subject: Re: TCL Q: enableCmd ??
Message-ID: <1993Jan12.194817.11240@vax.oxford.ac.uk>
Date: 12 Jan 93 19:48:17 GMT
References: <1iu6jkINNhc@urmel.informatik.rwth-aachen.de> <1993Jan12.132001@informatik.uni-kl.de>
Organization: Oxford University VAX 6620
Lines: 62