Ask a Question related to Mac Programming, Design and Development.
-
brucecoughlin #1
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
-
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,... -
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... -
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... -
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... -
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... -
Tom Dowdy #2
Re: menuID conflict with Page Setup dialog
In article <BB8D6D83.41E6%brucecoughlin@nyc.rr.com>,
brucecoughlin <brucecoughlin@nyc.rr.com> wrote:
Application resources (including menu IDs) are allocated the range of> 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.
positive short integers greater or equal to 128.
I recommend renumbering your resources.
Tom Dowdy Guest
-
Miro Jurisic #3
Re: menuID conflict with Page Setup dialog
In article <dowdy-89F616.03233317092003@news.apple.com>,
Tom Dowdy <dowdy@apple.com> wrote:
Menu IDs are not resources.> 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.
meeroh
--
If this message helped you, consider buying an item
from my wish list: <http://web.meeroh.org/wishlist>
Miro Jurisic Guest
-
David Phillip Oster #4
Re: menuID conflict with Page Setup dialog
In article <macdev-FD71D7.10292217092003@senator-bedfellow.mit.edu>,
Miro Jurisic <macdev@meeroh.org> wrote:
MenuIDs must match their resource ids in 68K & Classic. Where was this> 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
changed in Carbon?
David Phillip Oster Guest
-
brucecoughlin #5
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
-
Miro Jurisic #6
Re: menuID conflict with Page Setup dialog
In article <oster-C55E20.08110617092003@newssvr14-ext.news.prodigy.com>,
David Phillip Oster <oster@ieee.org> wrote:
No, they don't. Where does it say they do?> MenuIDs must match their resource ids in 68K & Classic. Where was this
> changed in Carbon?
meeroh
--
If this message helped you, consider buying an item
from my wish list: <http://web.meeroh.org/wishlist>
Miro Jurisic Guest
-
Tom Dowdy #7
Re: menuID conflict with Page Setup dialog
In article <macdev-D2F8BD.12001117092003@senator-bedfellow.mit.edu>,
Miro Jurisic <macdev@meeroh.org> wrote:
Yes, they do/did -- at least sometimes. The two cases I personally know> 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.
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).
IM explicitly says that while it is convention to make them the same,> Where does it say they do?
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
-
Miro Jurisic #8
Re: menuID conflict with Page Setup dialog
In article <dowdy-A0FEB9.09415317092003@news.apple.com>,
Tom Dowdy <dowdy@apple.com> wrote:
Tech-note! Tech-note! Tech-note!> 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.
meeroh
--
If this message helped you, consider buying an item
from my wish list: <http://web.meeroh.org/wishlist>
Miro Jurisic Guest
-
David Phillip Oster #9
Re: menuID conflict with Page Setup dialog
In article <macdev-D2F8BD.12001117092003@senator-bedfellow.mit.edu>,
Miro Jurisic <macdev@meeroh.org> wrote:
If you do a groups.google.com search for> 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?
"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



Reply With Quote

