🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.mac.oop.misc
3 messages
3 total messages Started by GRAFF Tue, 12 Jan 1993 10:30
TCL Q: enableCmd ??
#144
Author: GRAFF
Date: Tue, 12 Jan 1993 10:30
20 lines
1323 bytes
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!
Re: TCL Q: enableCmd ??
#145
Author: Michael Kemper [RHRK]
Date: Tue, 12 Jan 1993 12:20
43 lines
2463 bytes
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!

\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
Re: TCL Q: enableCmd ??
#146
Author: 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           * 
***********************************
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads