SDL App menu title on OS X

An embedded and charset-unspecified text was scrubbed…
Name: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20021115/19f3c2d2/attachment.txt

You need to change the InfoPlist.strings CFBundleIdentifier.

-DOn Friday, November 15, 2002, at 07:36 AM, fredm at spamcop.net wrote:

I have added SDLMain.nib to my application and defined
SDL_USE_NIB_FILE to 1 in
my SDLMain.m. This seems to kinda work, as my app menu entries now
have ‘About
my appname’, ‘Quit my appname’ etc., but the menu title shows ‘SDL
App’, even if
I edit SDLMain.nib in interface builder to put in my app name!

An embedded and charset-unspecified text was scrubbed…
Name: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20021115/4d3557b6/attachment.asc

A general question: Is there a HOWTO or a FAQ about getting SDL to
interact with Cocoa, or to work in an app with a Cocoa GUI? If not,
should there be? :slight_smile:

best,
wb

Hi Darrell,
Thanks for reply!

I did not have CFBundleIdentifier set in my app, I have now set it,
and rebuilt
everything, but I still have SDL App up in the corner :slight_smile:

Any other ideas what I am missing?

I myself changed the CFBundleIdentifier which caused the app to behave
itself. This works for me, but perhaps that only works if you have
other things setup right.

Checkout the Info.plist entries and make sure the main nib file is set
to “SDLMain.nib” and the principal class is “NSApplication”. If that
doesn’t work, try playing with other settings in there.

-DOn Friday, November 15, 2002, at 11:37 AM, fredm at spamcop.net wrote:

A general question: Is there a HOWTO or a FAQ about getting SDL to
interact with Cocoa, or to work in an app with a Cocoa GUI? If not,
should there be? :slight_smile:

I’ve created an SDL Mac OS intro that has some information about
setting up Cocoa (though not comprehensive). I need to polish that up
before posting it because some of the info in there is outdated, plus I
want to add a section on OpenGL.

There probably should be an FAQ, since these questions are getting more
and more common, though IMHO there still aren’t that many.

If you or others would like to scour the newsgroup for Cocoa questions
we could start by putting them in the general FAQ on the website. If
you send me what you find I’ll update the FAQ (I have write permission
on that part of the site).

Cheers,
DarrellOn Friday, November 15, 2002, at 12:12 PM, Will Benton wrote:

I did not have CFBundleIdentifier set in my app, I have now set it, and rebuilt
everything, but I still have SDL App up in the corner :slight_smile:

I tried again by creating a new ‘SDL Application’ (“Test”) using the PB
stationary, set SDL_USE_NIB_FILE to 1 in SDLMain.m, added SDLMain.nib to the
project from SDL.framework/Resources, set CFBundleIdentifier to ‘Test’, main nib
file to SDLMain, and compiled and ran the app. I still get ‘SDL App’ as my menu
title :frowning:

Call SDL_WM_SetCaption() from your code to set the title bar text.

-Sam Lantinga, Software Engineer, Blizzard Entertainment

Hi Sam,

First of all thanks for all your work on SDL over the years, and for
helping out with my problem!

Sam Lantinga wrote:

I did not have CFBundleIdentifier set in my app, I have now set it, and rebuilt
everything, but I still have SDL App up in the corner :slight_smile:

I tried again by creating a new ‘SDL Application’ (“Test”) using the PB
stationary, set SDL_USE_NIB_FILE to 1 in SDLMain.m, added SDLMain.nib to the
project from SDL.framework/Resources, set CFBundleIdentifier to ‘Test’, main nib
file to SDLMain, and compiled and ran the app. I still get ‘SDL App’ as my menu
title :frowning:

Call SDL_WM_SetCaption() from your code to set the title bar text.

I do call SDL_WM_SetCaption() in my code, but my problem is not the
title bar having no text. It is that the SDL-generated program menu on
Mac OS X has ‘SDL App’ where it should say ‘Test’ for my example above.
The other SDL-generated menu items in this menu correctly substitute my
app name (‘Test’ above) for ‘SDL App’. As other SDL programs for Max OS
X I have looked at don’t seem to have the same problem I am sure I am
missing something (not so) obvious…

Fred

@Fredrick_Meunier wrote:

I tried again by creating a new ‘SDL Application’ (“Test”) using the PB
stationary, set SDL_USE_NIB_FILE to 1 in SDLMain.m, added SDLMain.nib to the
project from SDL.framework/Resources, set CFBundleIdentifier to ‘Test’, main nib
file to SDLMain, and compiled and ran the app. I still get ‘SDL App’ as my menu
title :frowning:

I tried again from scratch, this time I created a new project (“Test2”)
without using the SDL project stationary, instead using the instructions
from README.MacOSX under the section ‘Setting up a new project by hand’.
This time it worked perfectly! I notice that the version of SDLMain.m in
the project stationary is not the same as that in src/main/macosx in SDL
1.2.5. Could this be the problem?

Thanks,
Fred