NSTextField and MVC-compliance?
NSTextField and MVC-compliance?
- Subject: NSTextField and MVC-compliance?
- From: Johnny Lundy <email@hidden>
- Date: Thu, 10 Apr 2008 14:18:27 -0400
Greetings.
Main Point: How to control a simple NSTextField without resorting to
making it an IBOutlet - IOW, to get its endEditing and value using the
Controller Layer and a Model object.
I'm porting an AS Studio app to Cocoa to bolster my skills in MVC
design and Cocoa Bindings.
I have learned a lot.
I have used the "Selector Name" field of NSButtons to keep the Model
separate from the View.
So far I have zero glue code.
My question:
A simple NSTextField where I want to enter a string and on EndEditing,
have one of my methods know about that fact and do some code to modify
some Model objects, of course using the entered string.
Can this be done without resorting to an IBOutlet? I am doing this
project not to necessarily just get it working, but to learn about
ways to maintain MVC compliance.
If there were a selector that could be assigned to an NSTextField in
IB, I would know how to do it.
I have tried making an NSObject in IB and connecting that to its own
NSObjectController, and I suspect that is the way to go (it works for
writing to an NSTextView, but I need to read the NSTextField, not
write it).
Any and all assistance greatly appreciated.
Cheers,
Johnny
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden