• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: menu-free app
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: menu-free app


  • Subject: Re: menu-free app
  • From: Daniel Child <email@hidden>
  • Date: Thu, 08 Dec 2005 10:55:48 -1000

Thanks for the suggestion. I have a couple of follow-up questions.

Logically, should "myAppDelegate" be my GUI controller? Can it be as simple as
[myController new], where myController is the one set up in InterfaceBuilder?

Secondly, when I tried running this code, I got the following message:

"Run session cancelled. No launchable executable present to run."

I tried adding an executable ("TestPanel.app"), but got the same message. Do you know what else needs to be done to make this thing fly?

On Thursday, December 8, 2005, at 03:35 AM, Alex Fischer wrote:

The code in main() can be something like that:

int main(int argc, char *argv[])
{

NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];

[NSApplication sharedApplication];

[NSApp setDelegate: [myAppDelegate new]];

[NSApp run];

[pool release];

return 0;
}

"myAppDelegate" can be a custom subclass of NSObject. If it implements the NSApplication delegate methods it will get the corresponding application launch and finish events. Have a look at the corresponding documentation of NSApplication.


Alexander Fischer

Basasoft, S.L.



c/ Bahía de Cadiz, 65 / 2º D

28042 Madrid



www.basasoft.com

email@hidden





On Dec 8, 2005, at 12:50 , Daniel Child wrote:

Hi again,

I am still looking for a way to set up a menu-free app. I thought this might help:


#import <Cocoa/Cocoa.h>

int main(int argc, const char *argv[])
{
   [NSApplication sharedApplication];
   [NSBundle loadNibNamed:@"TestPanel" owner:NSApp];
   [NSApp run];
   return 0;
}

Unfortunately, the execution gets canceled because there is "no launchable application to run." Does anyone know what I am missing? Essentially, I want to launch a helper application that contains a window with a bunch of useful tools. I'm using ProjectBuilder and 10.2.8. Thanks.

Daniel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list     (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >Re: menu-free app (From: Alex Fischer <email@hidden>)

  • Prev by Date: Re: Programmatically creating the Application Menu
  • Next by Date: Re: KVC setter selector from property name
  • Previous by thread: Re: menu-free app
  • Next by thread: Coredata and NSTreeController
  • Index(es):
    • Date
    • Thread