Connecting Controller and NSView
Connecting Controller and NSView
- Subject: Connecting Controller and NSView
- From: Chad Armstrong <email@hidden>
- Date: Sat, 13 Apr 2002 15:09:43 -0600
Is it possible to 'connect' a Controller object to an NSView? What I'd
like to do is have my window with several buttons, and when pressed will
alter the data which is drawn inside the NSView. From what I've read,
an instance of the view (customized to be called EGView for my
application) is created when the program starts, and I'd like to be able
to send and work with data from that first instance of the view. Can
outlets be created and connected so my classes can communicate between
each other? Or should I just try and put all of my information in my
EGView.h and EGView.m files?
Chapter 8 in Learning Cocoa seems to follow after some of the ideas I
want by having buttons or controllers to alter data drawn in a View, but
I would like to have my Controller class (EGController) to contain the
info to control and manage the buttons, and the view class (EGView) to
contain the information on how and what to draw to the screen. However,
the EGController will need to be able to send messages to the view such
as new data and then to refresh itself.
Best regards,
Chad Armstrong
email@hidden
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.