Re: programmatically instantiating and displaying NSWindow
Re: programmatically instantiating and displaying NSWindow
- Subject: Re: programmatically instantiating and displaying NSWindow
- From: Chris Hanson <email@hidden>
- Date: Sun, 25 Jan 2004 02:48:09 -0600
On Jan 24, 2004, at 5:31 PM, David Cairns wrote:
I am trying to programmatically instantiate an NSWindow object, because
most of my program is in C++, and i would like to avoid using IB as
much as possible
I can understand why many of its model classes may be in C++ if you're
writing a cross-platform application. But why would you like to avoid
using Interface Builder? It saves so much time and effort it's not
even funny.
One strategy for doing this in a cross-platform application is to
separate your controller classes into model-controllers and
view-controllers. Your model-controllers will continue to be in C++
and will manage your C++ model objects in the context of the workflow
your application enables. Your view-controllers will be in
Objective-C++ and will serve to tie the Cocoa front-end to your
model-controllers.
In other words, instead of
Model <---> Controller <---> View
you have
Model <---> Model-Controller <---> View-Controller <---> View
with the left half in C++ and the right half in Objective-C++. This is
typically what people mean when they suggest using a portable back-end
and a platform-specific front-end. It will make it easier to make your
application work on multiple platforms, particularly since the future
of Windows front-end development is C#.
-- Chris
--
Chris Hanson <email@hidden>
bDistributed.com, Inc.
Outsourcing Vendor Evaluation
Custom Mac OS X Development
Cocoa Developer Training
_______________________________________________
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.