[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 »

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 »

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

XCode

Post by elliswr »

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 »

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 »

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

Post by elliswr »

Like I said above... :roll:
Post Reply