On Thu, Feb 19, 2009 at 4:25 PM, Memo Akten <m...@memo.tv> wrote:
> but I was wondering if I could just directly use the controls in my update
> loop? I would only use them once per update loop (for loops etc. I would
> cache the value first if need be). E.g. if (mySwitch.on) or velocity =
> velSlider.value? Or will this be slow? Is there a preferred method for these
> situations?

Forget about performance: this is terrible design. Read up about MVC:
http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CocoaDesignPatterns/chapter_5_section_4.html

Your model should not be talking directly to your view. Instead, your
controller should set properties on the model when the UI changes, and
then the model can use its own properties directly.

Mike
_______________________________________________

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

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

Reply via email to