[MAC] Changing application title at runtime Topic is solved

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
mr1x
Knows some wx things
Knows some wx things
Posts: 34
Joined: Mon Jan 05, 2009 3:24 am

[MAC] Changing application title at runtime

Post by mr1x » Sat Oct 17, 2009 3:25 am

Does anyone know of a way to change application title (i.e. what is displayed as a title for "application menu" on the top left, and also in the "Quit XXX" item)?

I found Java API for that, so clearly there is a way to do so, but C/C++ is another matter.

protocol
Moderator
Moderator
Posts: 680
Joined: Wed Jan 18, 2006 6:13 pm
Location: Dallas, TX
Contact:

Post by protocol » Sat Oct 17, 2009 5:39 am

You will have to review the Carbon API, available from Apple.
/* UIKit && wxWidgets 2.8 && Cocoa && .Net */
QuRegExmm
wxPCRE & ObjPCRE - Regex It!

elliswr
Earned a small fee
Earned a small fee
Posts: 23
Joined: Sun Apr 05, 2009 2:39 am
Contact:

XCode

Post by elliswr » Mon Oct 19, 2009 12:04 am

Assuming you are using Xcode, just change the product name to whatever your application is. This is also located in the info.plist file.

protocol
Moderator
Moderator
Posts: 680
Joined: Wed Jan 18, 2006 6:13 pm
Location: Dallas, TX
Contact:

Post by protocol » Mon Oct 19, 2009 4:55 am

With that being said, please clarify your intentions. Do you want to set the app name at runtime or build time?
/* UIKit && wxWidgets 2.8 && Cocoa && .Net */
QuRegExmm
wxPCRE & ObjPCRE - Regex It!

mr1x
Knows some wx things
Knows some wx things
Posts: 34
Joined: Mon Jan 05, 2009 3:24 am

Post by mr1x » Tue Oct 20, 2009 2:47 pm

I wanted to modify application name *before starting* it. Anyway, if anyone is interested, one way to do that is by modifying Info.plist file. It's probably not the most graceful method but I haven't found another API to do so and I am not a Carbon/Cocoa expert (and neither are too many people on this list, evidently - understandably so :) ).

Replace CFBundleName value with whatever it is you want to be shown as application name, and that will be the visible name in the top menu and elsewhere. Solves the issue for me.

elliswr
Earned a small fee
Earned a small fee
Posts: 23
Joined: Sun Apr 05, 2009 2:39 am
Contact:

Post by elliswr » Wed Oct 21, 2009 3:26 am

Like I said above... :roll:

Post Reply