• 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: I need help on simple Sketch app and Cocoa bindings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I need help on simple Sketch app and Cocoa bindings


  • Subject: Re: I need help on simple Sketch app and Cocoa bindings
  • From: George Orthwein <email@hidden>
  • Date: Sat, 1 Jul 2006 12:42:52 -0400

I remember wanting to do something similar when I was starting out. Problem is, it can quickly get complex... especially if you involve bindings.

You'll need to set up a custom view to draw in and receive mouse events. Most of the starter books should cover this... I know Hillegass's does.

Definitely check out Graphics Bindings on mmalc's page:
http://homepage.mac.com/mmalc/CocoaExamples/controllers.html

As noted, it's the most complicated example and will take quite a bit of time to fully understand. The difficulty is primarily in adding bindings support for a custom view... though there is now also a nice step through of that here (Bindings in More Detail):
http://developer.apple.com/documentation/Cocoa/Conceptual/ CocoaBindings/Concepts/HowDoBindingsWork.html#//apple_ref/doc/uid/ 20002373-194182


So I would consider instead using normal target-action/outlets between your custom view and controller and not worry about making the custom view bindings-enabled. At least to start. You can still use bindings other places like between the textfields and controller, and between controller and model. I just remember jumping into the Graphics Bindings example a little too early myself. :)

More info on these topics:
http://developer.apple.com/documentation/Cocoa/Conceptual/ CocoaFundamentals/CocoaDesignPatterns/chapter_5_section_4.html
http://developer.apple.com/documentation/Cocoa/Conceptual/ CocoaFundamentals/CommunicatingWithObjects/chapter_6_section_1.html
http://developer.apple.com/documentation/Cocoa/Conceptual/ CocoaDrawingGuide/index.html
http://developer.apple.com/documentation/Cocoa/Conceptual/ CurrencyConverterBindings/index.html


Hope that helps,
George
_______________________________________________
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


  • Prev by Date: KVO - Observing self from self
  • Next by Date: Re: QuickTime... No NSMovieView
  • Previous by thread: Re: KVO - Observing self from self
  • Next by thread: Changing file & directory names
  • Index(es):
    • Date
    • Thread