• 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: "Paul Sanders" <email@hidden>
  • Date: Mon, 26 Apr 2010 15:06:25 +0100

> did anyone have some more color on question (2)  the need to create a raw
> NSScroller and control it like a NSSlider  (min, max, value, proportion) is
> that possible?

Yes, just instantiate it and call initWithFrame.  Then add it to your window's content view, which will retain it so you can release it.  Other than that, consult the NSScroller docs (and read up on the target/action mechanism for NSControls so that you can catch events generated by the scroller).

Addendum to my earlier post: requests to draw come though your content view's drawRect: method (or said method of any subviews thereof), so yu can use that to trigger the drawing of any 'bare metal' widgets.  To force a redraw, call setNeedsDisplay or setNeedsDisplayInRect: on your content view.

I learnt all this stuff by reading about it and by experimenting with my toy Cocoa app...  It's a method that works.  Apple's Cocoa framework docs are actually very good.  They should all have been installed with Xcode.

Paul Sanders.
_______________________________________________

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: Bill Appleton <email@hidden>
References: 
 >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>)
 >Re: NSApplicationMain question (From: Charles Srstka <email@hidden>)
 >Re: NSApplicationMain question (From: Charles Srstka <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