Re: I need help on simple Sketch app and Cocoa bindings
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