menuID conflict with Page Setup dialog

Ask a Question related to Mac Programming, Design and Development.

  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. Similar Questions and Discussions

    1. Conflict between flashforms and custom 404 error page
      My webhost tells me there is a conflict between having custom CF 404 error pages and using flashforms. Apparently with the custom 404 pages set up,...
    2. Cannot combine PDF's (insert page) because of font subset conflict
      I'm experiencing a conflict when trying to "insert pages" of a PDF file into another PDF file. A warning pops up with something about the naming of...
    3. Page setup/paper setup
      Hi I use Freehand MXa in MacOSX 13.2. I wonder, does Freehands own paper setup (in print dialog box) owerride all paper setup settings.(In...
    4. ASP startup page invokes a file download dialog
      I'm relatively new to ASP.NET. I'm running it under Win XP Pro, using Visual Studio 2002.NET (haven't migrated to VS2003 yet). The ASP.NET...
    5. GET / POST conflict in a multi-page form.
      Hi, Wonder if anyone can help with this problem: I am using an app with several pages, using a session to track vars between the pages, and...
  3. #2

    Default Re: menuID conflict with Page Setup dialog

    In article <BB8D6D83.41E6%brucecoughlin@nyc.rr.com>,
    brucecoughlin <brucecoughlin@nyc.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

  4. #3

    Default Re: menuID conflict with Page Setup dialog

    In article <dowdy-89F616.03233317092003@news.apple.com>,
    Tom Dowdy <dowdy@apple.com> wrote:
    > In article <BB8D6D83.41E6%brucecoughlin@nyc.rr.com>,
    > brucecoughlin <brucecoughlin@nyc.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

  5. #4

    Default Re: menuID conflict with Page Setup dialog

    In article <macdev-FD71D7.10292217092003@senator-bedfellow.mit.edu>,
    Miro Jurisic <macdev@meeroh.org> wrote:
    > In article <dowdy-89F616.03233317092003@news.apple.com>,
    > Tom Dowdy <dowdy@apple.com> wrote:
    >
    > > In article <BB8D6D83.41E6%brucecoughlin@nyc.rr.com>,
    > > brucecoughlin <brucecoughlin@nyc.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

  6. #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

  7. #6

    Default Re: menuID conflict with Page Setup dialog

    In article <oster-C55E20.08110617092003@newssvr14-ext.news.prodigy.com>,
    David Phillip Oster <oster@ieee.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

  8. #7

    Default Re: menuID conflict with Page Setup dialog

    In article <macdev-D2F8BD.12001117092003@senator-bedfellow.mit.edu>,
    Miro Jurisic <macdev@meeroh.org> wrote:
    > In article <oster-C55E20.08110617092003@newssvr14-ext.news.prodigy.com>,
    > David Phillip Oster <oster@ieee.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

  9. #8

    Default Re: menuID conflict with Page Setup dialog

    In article <dowdy-A0FEB9.09415317092003@news.apple.com>,
    Tom Dowdy <dowdy@apple.com> wrote:
    > In article <macdev-D2F8BD.12001117092003@senator-bedfellow.mit.edu>,
    > Miro Jurisic <macdev@meeroh.org> wrote:
    >
    > > In article <oster-C55E20.08110617092003@newssvr14-ext.news.prodigy.com>,
    > > David Phillip Oster <oster@ieee.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

  10. #9

    Default Re: menuID conflict with Page Setup dialog

    In article <macdev-D2F8BD.12001117092003@senator-bedfellow.mit.edu>,
    Miro Jurisic <macdev@meeroh.org> wrote:
    > In article <oster-C55E20.08110617092003@newssvr14-ext.news.prodigy.com>,
    > David Phillip Oster <oster@ieee.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

Posting Permissions

  • You may not post new threads
  • You may 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