home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / mac / oop / misc / 214 < prev    next >
Encoding:
Internet Message Format  |  1993-01-12  |  3.3 KB

  1. Path: sparky!uunet!mcsun!uknet!comlab.ox.ac.uk!oxuniv!vollrath
  2. From: vollrath@vax.oxford.ac.uk (Alun ap Rhisiart)
  3. Newsgroups: comp.sys.mac.oop.misc
  4. Subject: Re: TCL Q: enableCmd ??
  5. Message-ID: <1993Jan12.194817.11240@vax.oxford.ac.uk>
  6. Date: 12 Jan 93 19:48:17 GMT
  7. References: <1iu6jkINNhc@urmel.informatik.rwth-aachen.de> <1993Jan12.132001@informatik.uni-kl.de>
  8. Organization: Oxford University VAX 6620
  9. Lines: 62
  10.  
  11. In article <1993Jan12.132001@informatik.uni-kl.de>, kemper@informatik.uni-kl.de (Michael Kemper [RHRK]) writes:
  12. > In article <1iu6jkINNhc@urmel.informatik.rwth-aachen.de>, GRAFF <pier@reze-1.rz.rwth-aachen.de> writes:
  13. > |> Hi !
  14. > |> 
  15. > |> I've got a big problem using TCL: I create a new Menu Item via
  16. > |> ResEdit. Then, I add the menu Command after the Name of the Menu,
  17. > |> like this:   Show Highscores#4711   (Also in ResEdit :)
  18. > |> In my MyDoc - Class I call after the call of inherited::setupMenus()
  19. > |> the Bartender:   gBartender->enableCmd(4711);
  20. > |> 
  21. > |> BUT IT DOESN'T WORK. I tried this call ^^^^^ almoust everywhere, but
  22. > |> it didn't worked as well. 
  23. > |> 
  24. > |> Now, does anybody knows how to enable this (d*mm) menu item?? Where
  25. > |> does I have to put the call? And where can I disable it again?
  26. > |> 
  27. > |>     Thanks
  28. > |>     
  29. > |>             Jochen
  30. > |>             
  31. > |> P.S: English is not my native Language, Stig Hemmer ;)
  32. > |> P.P.S: Heard about the new Apple products? And the prices? Wow!
  33. > Hi,
  34. > normally yoy call EnableCmd and DisableCmd in the UpdateMenus method. This method is called when
  35. > the user clicks in the menu bar and handles all menu enabling (in general all menus are disabled
  36. > before UpdateMenus is called). The CApplication.UpdateMenus and CDocument.UpdateMenus (sorry I
  37. > am a Pascal fan) manage the correct settings for New, Open, Close, Save, etc. (standard items),
  38. > but you have to manage your own items by yourself by overriding UpdateMenus in your MyDoc class
  39. > (remember to call inherited UpdateMenus).
  40. > Hope this helps
  41. > -- 
  42. > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
  43. >   
  44. >   \_        \_  \_  \_    | Michael Kemper
  45. >   \__      \__  \_ \_     | University of Kaiserslautern, Germany
  46. >   \_\_    \_\_  \_\_      | email: kemper@rhrk.uni-kl.de 
  47. >   \_ \_  \_ \_  \__       | 
  48. >   \_  \_\_  \_  \_ \_     | Although they gave me that email address,
  49. >   \_   \_   \_  \_  \_    | this is not the opinion of rhrk, uni-kl or de!
  50. > \_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_\_
  51.  
  52. A little more information is needed here. Does the menu itself appear,
  53. but this item remains disabled (ie, does this menu appear in the MBAR
  54. resource)? Have you put a stop in MyApp->updatemenus to see that the
  55. line is executed? Maybe the document does not appear in the chain of
  56. command. Or perhaps something earlier in the chain (eg a pane->updatemenus
  57. ) does not call inherited? A little more info and we'll track it down.
  58.  
  59. I know how you feel, I am having great problems with bugs that make no
  60. sense now that I am using TCL 1.1.2, which I didn't have with the first
  61. version.
  62. -- 
  63. ***********************************
  64. * Alun ap Rhisiart                *    | When I wrote this, only God | 
  65. * Animal Behaviour Research Group *    |  and I knew what it meant.  |
  66. * Oxford University               *    | Now, only God knows.        |
  67. * vollrath@vax.ox.ac.uk           * 
  68. ***********************************
  69.