Professional Web Applications Themes

menuID conflict with Page Setup dialog - Mac Programming

I'm having a problem with a conflict of menuID's in my app. I have a font menu which is a hierarchical menu for one of my app's menus. This font menu has menuID 100. When I call Page Setup from the File menu, the standard OS X Page Setup box comes up. If I choose anything from the "Format For" popup in Page Setup my appEventHandler gets called. The event class is kEventClassCommand and the menuID is 100... the same as my hierarchical font menu! So my app calls the function which would be called if the font menu had ...

  1. #1

    Default menuID conflict with Page Setup dialog

    I'm having a problem with a conflict of menuID's in my app.
    I have a font menu which is a hierarchical menu for one of my app's menus.
    This font menu has menuID 100.

    When I call Page Setup from the File menu, the standard OS X Page Setup box
    comes up. If I choose anything from the "Format For" popup in Page Setup my
    appEventHandler gets called. The event class is kEventClassCommand and the
    menuID is 100... the same as my hierarchical font menu! So my app calls the
    function which would be called if the font menu had been picked and a new
    item selected from the menu and the font changes.

    I'm not sure why this conflict is taking place... It's almost like a
    GetPort/SetPort type of problem.. though with menuIDs.

    Thanks for any insight.

    MachO CW8 C compiler

    brucecoughlin Guest

  2. #2

    Default Re: menuID conflict with Page Setup dialog

    In article <BB8D6D83.41E6%brucecoughlinnyc.rr.com>,
    brucecoughlin <brucecoughlinnyc.rr.com> wrote:
    > I'm having a problem with a conflict of menuID's in my app.
    > I have a font menu which is a hierarchical menu for one of my app's menus.
    > This font menu has menuID 100.
    Application resources (including menu IDs) are allocated the range of
    positive short integers greater or equal to 128.

    I recommend renumbering your resources.
    Tom Dowdy Guest

  3. #3

    Default Re: menuID conflict with Page Setup dialog

    In article <dowdy-89F616.03233317092003news.apple.com>,
    Tom Dowdy <dowdyapple.com> wrote:
    > In article <BB8D6D83.41E6%brucecoughlinnyc.rr.com>,
    > brucecoughlin <brucecoughlinnyc.rr.com> wrote:
    >
    > > I'm having a problem with a conflict of menuID's in my app.
    > > I have a font menu which is a hierarchical menu for one of my app's menus.
    > > This font menu has menuID 100.
    >
    > Application resources (including menu IDs) are allocated the range of
    > positive short integers greater or equal to 128.
    >
    > I recommend renumbering your resources.
    Menu IDs are not resources.

    meeroh

    --
    If this message helped you, consider buying an item
    from my wish list: <http://web.meeroh.org/wishlist>

    Miro Jurisic Guest

  4. #4

    Default Re: menuID conflict with Page Setup dialog

    In article <macdev-FD71D7.10292217092003senator-bedfellow.mit.edu>,
    Miro Jurisic <macdevmeeroh.org> wrote:
    > In article <dowdy-89F616.03233317092003news.apple.com>,
    > Tom Dowdy <dowdyapple.com> wrote:
    >
    > > In article <BB8D6D83.41E6%brucecoughlinnyc.rr.com>,
    > > brucecoughlin <brucecoughlinnyc.rr.com> wrote:
    > >
    > > > I'm having a problem with a conflict of menuID's in my app.
    > > > I have a font menu which is a hierarchical menu for one of my app's menus.
    > > > This font menu has menuID 100.
    > >
    > > Application resources (including menu IDs) are allocated the range of
    > > positive short integers greater or equal to 128.
    > >
    > > I recommend renumbering your resources.
    >
    > Menu IDs are not resources.
    >
    > meeroh
    MenuIDs must match their resource ids in 68K & Classic. Where was this
    changed in Carbon?
    David Phillip Oster Guest

  5. #5

    Default Re: menuID conflict with Page Setup dialog

    That's odd. Toolbox Essentials:
    "The menu ID of a submenu of an application must be from 1 through 235"
    Did this change in OS X

    The real mystery to me is why my appEventHandler is receiving
    kEventClassCommand events when I choose an item in a popup menu in Page
    Setup dialog... Is this normal behavior?
    >
    > Application resources (including menu IDs) are allocated the range of
    > positive short integers greater or equal to 128.
    >
    > I recommend renumbering your resources.
    brucecoughlin Guest

  6. #6

    Default Re: menuID conflict with Page Setup dialog

    In article <oster-C55E20.08110617092003newssvr14-ext.news.prodigy.com>,
    David Phillip Oster <osterieee.org> wrote:
    > MenuIDs must match their resource ids in 68K & Classic. Where was this
    > changed in Carbon?
    No, they don't. Where does it say they do?

    meeroh

    --
    If this message helped you, consider buying an item
    from my wish list: <http://web.meeroh.org/wishlist>

    Miro Jurisic Guest

  7. #7

    Default Re: menuID conflict with Page Setup dialog

    In article <macdev-D2F8BD.12001117092003senator-bedfellow.mit.edu>,
    Miro Jurisic <macdevmeeroh.org> wrote:
    > In article <oster-C55E20.08110617092003newssvr14-ext.news.prodigy.com>,
    > David Phillip Oster <osterieee.org> wrote:
    >
    > > MenuIDs must match their resource ids in 68K & Classic. Where was this
    > > changed in Carbon?
    >
    > No, they don't.
    Yes, they do/did -- at least sometimes. The two cases I personally know
    about are some early systems for heirarchical menus, and most (all?)
    Classic systems for non-code installed popup menus (ie, those popups
    where you place the "menuID" in the CNTL resource).
    > Where does it say they do?
    IM explicitly says that while it is convention to make them the same,
    there isn't a requirement to do so. In the above two cases, however, it
    is incorrect.

    The OP cited another incorrect older IM statement, in which he thought
    he had to keep sub-menus between 0 and 255. This is no longer the case
    as of, gee, probably System 6 or so.

    I keep all of my menuIDs at 128 or higher because there certainly used
    to be menu IDs floating around the system in the low positive number
    range (0-10). In more modern times, system software I've been involved
    in has tried to keep in the negative range only.

    -- Tom
    Tom Dowdy Guest

  8. #8

    Default Re: menuID conflict with Page Setup dialog

    In article <dowdy-A0FEB9.09415317092003news.apple.com>,
    Tom Dowdy <dowdyapple.com> wrote:
    > In article <macdev-D2F8BD.12001117092003senator-bedfellow.mit.edu>,
    > Miro Jurisic <macdevmeeroh.org> wrote:
    >
    > > In article <oster-C55E20.08110617092003newssvr14-ext.news.prodigy.com>,
    > > David Phillip Oster <osterieee.org> wrote:
    > >
    > > > MenuIDs must match their resource ids in 68K & Classic. Where was this
    > > > changed in Carbon?
    > >
    > > No, they don't.
    >
    > Yes, they do/did -- at least sometimes. The two cases I personally know
    > about are some early systems for heirarchical menus, and most (all?)
    > Classic systems for non-code installed popup menus (ie, those popups
    > where you place the "menuID" in the CNTL resource).
    >
    > > Where does it say they do?
    >
    > IM explicitly says that while it is convention to make them the same,
    > there isn't a requirement to do so. In the above two cases, however, it
    > is incorrect.
    >
    > The OP cited another incorrect older IM statement, in which he thought
    > he had to keep sub-menus between 0 and 255. This is no longer the case
    > as of, gee, probably System 6 or so.
    >
    > I keep all of my menuIDs at 128 or higher because there certainly used
    > to be menu IDs floating around the system in the low positive number
    > range (0-10). In more modern times, system software I've been involved
    > in has tried to keep in the negative range only.
    Tech-note! Tech-note! Tech-note!

    meeroh

    --
    If this message helped you, consider buying an item
    from my wish list: <http://web.meeroh.org/wishlist>

    Miro Jurisic Guest

  9. #9

    Default Re: menuID conflict with Page Setup dialog

    In article <macdev-D2F8BD.12001117092003senator-bedfellow.mit.edu>,
    Miro Jurisic <macdevmeeroh.org> wrote:
    > In article <oster-C55E20.08110617092003newssvr14-ext.news.prodigy.com>,
    > David Phillip Oster <osterieee.org> wrote:
    >
    > > MenuIDs must match their resource ids in 68K & Classic. Where was this
    > > changed in Carbon?
    >
    > No, they don't. Where does it say they do?
    If you do a groups.google.com search for

    "menu id" resource

    you'll find numerous threads from the '90s of programmers reporting
    problems because their resource ids don't match their menuIDs. One
    reason they have problems is that GetNewMBar() uses resource ids, while,
    I imagine, MenuSelect() uses MenuIDs. Certainly, keeping them in synch
    was part of the lore of Macintosh programming since I started
    programming them, in 1984. Before posting this, I checked that
    Resorcerer, Constructor, and (I believe) ResEdit all change the menuID
    for you when you change the resource id, so their authors must have
    thought the two had to match.
    David Phillip Oster Guest

Similar Threads

  1. Conflict between flashforms and custom 404 error page
    By Conanicut in forum Coldfusion Server Administration
    Replies: 5
    Last Post: April 3rd, 06:49 PM
  2. Cannot combine PDF's (insert page) because of font subset conflict
    By Jerry_W.@adobeforums.com in forum Adobe Acrobat Windows
    Replies: 1
    Last Post: April 30th, 04:52 PM
  3. Page setup/paper setup
    By Opaliski in forum Macromedia Freehand
    Replies: 0
    Last Post: February 16th, 05:51 PM
  4. Replies: 1
    Last Post: October 26th, 02:56 AM
  5. GET / POST conflict in a multi-page form.
    By sentinel in forum PHP Development
    Replies: 3
    Last Post: July 30th, 12:12 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139