• 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: RV: first steps
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RV: first steps


  • Subject: Re: RV: first steps
  • From: Daniel Jalkut <email@hidden>
  • Date: Sun, 5 Feb 2006 10:16:32 -0500


On Feb 5, 2006, at 8:11 AM, Lars Elden wrote:

I am bran new to cocoa and need to learn it from the command line (terminal
window), not using xcode by now.

Please elaborate on this restriction. You never have access to Xcode? This sounds like an artificial problem.


If you just prefer the command line, then set up your project with Xcode's GUI and then use the "xcodebuild" command-line tool to build your app from the command line.

but it creates a terminal window when I run it, and behind it there is the
alert window.


Is my code ok ? How to avoid the terminal window that shows when I run it ?

This is just a totally unconventional, maybe impossible, way of making a Cocoa-based GUI application. The Finder assumes that if your application has no resources (bundled or in the resource fork) that it must be a shell tool and not a regular application. In this case, I'd say it's right! Where's your menu bar? What is the application identifier? Your program is missing lots of information.


That said - the fact that it is run in a Terminal window by Finder is just a side-effect of double-clicking it from the Finder. If you want to run this program yourself from the Terminal, or invoke it programatically by other means, you'll find it doesn't cause a Terminal window to open.

As to the window showing behind the Terminal - I guess this is just one of the many freaky things you're going to notice if you try to write a GUI application in the weirdest way possible :) I'm sure it can be worked around but first I think you need to convince the system that your application is something that can be "in front."

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


References: 
 >RV: first steps (From: "Lars Elden" <email@hidden>)

  • Prev by Date: Re: objectifying a struct
  • Next by Date: Re: Programmatically resized NSWindow not being redrawn?
  • Previous by thread: RV: first steps
  • Next by thread: Re: Programmatically resized NSWindow not being redrawn?
  • Index(es):
    • Date
    • Thread