Re: Subclassing NSWindowController
Re: Subclassing NSWindowController
- Subject: Re: Subclassing NSWindowController
- From: Mike Ferris <email@hidden>
- Date: Tue, 10 Dec 2002 11:16:21 -0800
You can have something in IB to serve as a placeholder. What I usually
do in this case is put a custom view that is just an NSView in a scroll
view in IB and have an outlet to the custom view. Then, once the nib
loads you can replace the NSView with an NSTextView you create in code
using NSScrollView's -setDocumentView: method. That way you can
configure the scroll view in IB.
Mike Ferris
Begin forwarded message:
From: Chaffinch <email@hidden>
Date: Tue Dec 10, 2002 4:51:13 AM US/Pacific
To: Mike Ferris <email@hidden>
Cc: email@hidden
Subject: Re: Subclassing NSWindowController
--- Mike Ferris <email@hidden> wrote:
Both TextEdit and Sketch do this sort of thing. Mostly,
programmatically creating a text system is simple. If you just
alloc/init the pieces and hook them up, you'll get something that
behaves, by default, pretty much like the one in IB (the one in IB is
inside a scroll view, but you can do that too if you want).
Aha, is this where I am going wrong. I have created a document.nib
with an
NSTextView, IBOutlet and all the trimming in IB. But if I am
understanding
you correctly I do not need to do this. Rereading this and your
previous
posts I think I now realise what you mean by "programmatically
creating a
text system".
I'll look through the TextEdit and Sketch source. Funnily enough, I was
looking at TextEdit last night and noticed the name at the top of the
files -
are you the same Mike Ferris responsible for TextEdit? If so then its
no
wonder you know so much about my problem, if not then this is some
coincidance.
Thanks.
=====
Regards
Chaffinch
----------------------------------------------
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
_______________________________________________
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.