On 10/05/2013, at 10:35 AM, YT <y...@redwoodcontent.com> wrote:

> BUT how does one send data from myDataModel to MyController.
> OR is that by request from MyController only?

It can be, but not exclusively. Sometimes your data model might want to "push" 
a value to the interface for display. It all depends on what it does.

> I tried to send MyController's ID during MyDataModel initialization.
> That works NSLOGs indicate MyDataModel receives MyController's ID.
> 
> When I have MyController call a method in MyDataModel and attempt to call a 
> method in MyController
> I get an error during compile "! No Visible @interface for NSObject ...."
> 
> I have MyDataModel do the [super init] initialization.  
> At the moment I'm baffled - 
> Any advise would be appreciated. 


-init is too soon. The interface is loaded after initialization, which is why 
it isn't available then. Instead, override the -awakeFromNib method and do the 
necessary stuff there. That is called after the interface is loaded, and is 
provided for this purpose. It is guaranteed to be called only once all of the 
interface is available.

--Graham


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to