• 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: NSApplicationMain question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSApplicationMain question


  • Subject: Re: NSApplicationMain question
  • From: Keary Suska <email@hidden>
  • Date: Sun, 25 Apr 2010 08:27:43 -0600

On Apr 25, 2010, at 7:44 AM, Bill Appleton wrote:

> hi all,
>
> i wanted to do a reality check on some of my code & ask some specific
> questions.
>
> 1) how do i get that nifty application/preferences/services menu? i create
> my menus dynamically (not nibs)

There is nothing special about these menus, other than that the system will populate the Services menu. Research services for more info on that. Is there something specific that you are unable to accomplish?

> 2) i need to create a raw NSScroller and control it like a NSSlider  (min,
> max, value, proportion) is that possible?

If you must, yes, it is possible.

> 3) are there window styles for palettes / document windows? there seems to
> be only one style...

Technically there are a few, depending on your target OS. But this is just what the API gives you for free. You can make your own fairly easily (with some caveats).

> 4) how do you guys check for memory leaks in the cocoa objects? when i
> delete a menu... do i have to delete the individual items?

For general leak detection, you can use the clang static analyzer (a simple per-project setting) and the Instruments leak tool. Read the "Memory Management Programming Guide" (don't have as link handy--easily found in Xcode docs or just google "memory management cocoa"). If you ask memory management-related questions on this list, you will just get directed to that document so you might as well get it over with. If you plan to use garbage collection, also (and I mean *also*, not *instead*) read "Garbage Collection Programming Guide".

> 5) is my screen flipping code below going to work on multiple monitors?

You can easily determine this yourself. The NSScreen documentation is a good place to start for understanding how this is handled in Cocoa.

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: NSApplicationMain question
      • From: "Paul Sanders" <email@hidden>
References: 
 >NSApplicationMain question (From: Bill Appleton <email@hidden>)
 >Re: NSApplicationMain question (From: Abhinay Kartik Reddyreddy <email@hidden>)
 >Re: NSApplicationMain question (From: Bill Appleton <email@hidden>)
 >Re: NSApplicationMain question (From: Shawn Erickson <email@hidden>)
 >Re: NSApplicationMain question (From: Bill Appleton <email@hidden>)
 >Re: NSApplicationMain question (From: Michael Ash <email@hidden>)
 >Re: NSApplicationMain question (From: Bill Appleton <email@hidden>)
 >Re: NSApplicationMain question (From: Jens Alfke <email@hidden>)
 >Re: NSApplicationMain question (From: Bill Appleton <email@hidden>)
 >Re: NSApplicationMain question (From: Jack Carbaugh <email@hidden>)
 >Re: NSApplicationMain question (From: Bill Appleton <email@hidden>)

  • Prev by Date: Re: NSApplicationMain question
  • Next by Date: Re: NSApplicationMain question
  • Previous by thread: Re: NSApplicationMain question
  • Next by thread: Re: NSApplicationMain question
  • Index(es):
    • Date
    • Thread