RE: Displaying text in NSDrawer
RE: Displaying text in NSDrawer
- Subject: RE: Displaying text in NSDrawer
- From: "Mark" <email@hidden>
- Date: Tue, 3 Feb 2004 22:24:03 -0700
OK, now I'm really going crazy. I made a clean sample and it works
flawlessly. This is actually the fourth test project I've written but this
one works. I swear on my stack of Cocoa programming books that I really had
a problem previously.
I went back to my original application and ultimately I got it to work after
deleting the textView on the Content View window and reconnecting the outlet
from my controller instance. Now it's working fine. I think I had tried that
particular move previously with no success but now it works. Sometimes I'm
convinced that software is the 21st century equivalent of medieval magic or
VooDoo.
I appreciate the help and support and I hope this doesn't count as crying
wolf because I'm very sure I will need assistance on yet another aspect of
Cocoa development as I blaze my way through this new (for me) world.
-mark
-----Original Message-----
From: email@hidden
[
mailto:email@hidden] On Behalf Of Stefan Pantke
Sent: Tuesday, February 03, 2004 12:07 AM
To: Mark
Cc: email@hidden
Subject: Re: Displaying text in NSDrawer
Mark!
Am 03.02.2004 um 06:33 schrieb Mark:
>
I'm at a loss trying to display text in an NSDrawer.
>
>
I've got to the point where I can create an NSDrawer attached to a
>
window with a button that toggles the drawer open and closed. I've
>
even modified the content view to contain an NSTextView object and the
>
blank textView shows up fine. I just want the drawer to display
>
logging information.
>
>
My controller object contains the following outlet:
>
IBOutlet NSTextView *logWindow;
You would better name it lowTextViewOL or something like that, to indicate
it is an outlet and that it is a TextView, no Window.
>
I connect the outlet of my controller object directly to the
>
NSTextView using Interface builder.
OK, should be fine.
>
Elsewhere in my controller code, in response to a menu selection, I
>
make the following call with no errors:
>
>
[logWindow insertText:@"Add Entry Called"];
OK, should be fine as well and insert at cursor location or the complete
selected text.
>
The result is that I get nothing in the TextView of my drawer.
I suppose, you see the TextView. If not, it my be some sizing problem, so
that cocoa resized/repositened your TextView. But I suppose, this is not the
problem
>
Then, just as another datapoint, I added another NSTextView directly
>
to my main window and called it logWindow2. I added the outlet to my
>
controller, wired it up in interface builder and made a call just
>
after the original logWindow call and it works as expected.
>
Am I not allowed to directly access a control on the NSDrawer
>
instance? Do I have to go "through" the drawer object somehow (if so
>
why didn't I get some kind of error?)?
You may perform any operation in a drawer's view, since it it nothing
special...
Sorry, to not provide more information. It's a bit hard give any advice in
this situation.
Could you provide the source-code?
Kind regards,
Stefan
_______________________________________________
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.
_______________________________________________
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.