Re: NSTextView + other NSView in NSScrollView?
Alright, I'm able to get a view that can resize to a NSTextView subview's size, and it works as the document view of a scroll view, but I'm still not sure how to make it work with another view above it. On Mon, Jul 28, 2008 at 8:53 AM, Andy Lee [EMAIL PROTECTED] wrote: I don't know offhand. A quick search on CocoaBuilder for NSTextView flipped turns up this suggestion to flip the superview: http://www.cocoabuilder.com/archive/message/cocoa/2004/6/20/110164 But I haven't read it closely. --Andy On Jul 28, 2008, at 11:09 AM, Jacob Bandes-Storch wrote: On Jul 28, 2008, at 7:48 AM, Andy Lee [EMAIL PROTECTED] wrote: On Jul 27, 2008, at 11:31 PM, Jacob Bandes-Storch wrote: I'm trying to create a Mail-style scroll view, with a view for information (like the view for message headers) above a text view for the content. I created two NSViews in Interface Builder, changed the class of the bottom one to NSTextView, Just one more thought: I think some people have mentioned unexpected resizing behavior because they didn't take into account the fact that NSTextView uses a flipped coordinate system. Yes, I was wondering about that. It seems like that's the issue I run into when trying to use an NSTextView that's not the documentView of the NSScrollView. What can I do to work around that? ___ 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 [EMAIL PROTECTED]
Re: NSTextView + other NSView in NSScrollView?
On Jul 27, 2008, at 10:49 PM, Andy Lee wrote: On Jul 27, 2008, at 11:31 PM, Jacob Bandes-Storch wrote: I'm trying to create a Mail-style scroll view, with a view for information (like the view for message headers) above a text view for the content. I created two NSViews in Interface Builder, changed the class of the bottom one to NSTextView, Is there some reason you didn't drag an NSTextView into the window in the first place? Because the Text View that IB provides is embedded in a scroll view already and I can't add another view to it. selected both, and clicked Layout Embed Objects In Scroll View. Are you sure you didn't want a Split View rather than a Scroll View? If you were trying to create a Mail-like layout, I would have expected your two views to be an NSTableView and an NSTextView, both embedded in a Split View. No... what I want is like the bottom half of Mail's split view, with the view for the headers and the text view with the message content. ___ 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 [EMAIL PROTECTED]
Re: NSTextView + other NSView in NSScrollView?
On 28 Jul 2008, at 11:59 pm, Jacob Bandes-Storch wrote: Because the Text View that IB provides is embedded in a scroll view already and I can't add another view to it. Choose Unembed Objects to get the unenclosed NSTextView after dragging the view to the window in IB. No... what I want is like the bottom half of Mail's split view, with the view for the headers and the text view with the message content. I suspect Mail just uses a single NSTextView and just arranges the header text using custom text attributes, etc. Maybe someone at Apple reading this would know for sure. cheers, Graham ___ 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 [EMAIL PROTECTED]
Re: NSTextView + other NSView in NSScrollView?
On Jul 28, 2008, at 9:59 AM, Jacob Bandes-Storch wrote: On Jul 27, 2008, at 10:49 PM, Andy Lee wrote: If you were trying to create a Mail-like layout, I would have expected your two views to be an NSTableView and an NSTextView, both embedded in a Split View. No... what I want is like the bottom half of Mail's split view, with the view for the headers and the text view with the message content. Oh. Maybe it would help if you first wrap your two views in an enclosing view, get that working (get the resizing and auto-growing right), and put that (single) view into an NSScrollView. That seems to be Mail.app's approach. I made a copy of Mail.app and looked at the nib file MessageViewerContents.nib. --Andy ___ 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 [EMAIL PROTECTED]
Re: NSTextView + other NSView in NSScrollView?
On Jul 28, 2008, at 10:11 AM, Graham Cox wrote: I suspect Mail just uses a single NSTextView and just arranges the header text using custom text attributes, etc. Maybe someone at Apple reading this would know for sure. I guessed that too, but a look at the nib file in Mail.app indicates otherwise. I wonder if it *used* to be a single NSTextView -- I seem to remember Command-A used to select the message *and* headers, though it doesn't now. --Andy ___ 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 [EMAIL PROTECTED]
Re: NSTextView + other NSView in NSScrollView?
On Jul 27, 2008, at 11:31 PM, Jacob Bandes-Storch wrote: I'm trying to create a Mail-style scroll view, with a view for information (like the view for message headers) above a text view for the content. I created two NSViews in Interface Builder, changed the class of the bottom one to NSTextView, Just one more thought: I think some people have mentioned unexpected resizing behavior because they didn't take into account the fact that NSTextView uses a flipped coordinate system. --Andy ___ 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 [EMAIL PROTECTED]
Re: NSTextView + other NSView in NSScrollView?
On Jul 28, 2008, at 7:48 AM, Andy Lee [EMAIL PROTECTED] wrote: On Jul 27, 2008, at 11:31 PM, Jacob Bandes-Storch wrote: I'm trying to create a Mail-style scroll view, with a view for information (like the view for message headers) above a text view for the content. I created two NSViews in Interface Builder, changed the class of the bottom one to NSTextView, Just one more thought: I think some people have mentioned unexpected resizing behavior because they didn't take into account the fact that NSTextView uses a flipped coordinate system. Yes, I was wondering about that. It seems like that's the issue I run into when trying to use an NSTextView that's not the documentView of the NSScrollView. What can I do to work around that? ___ 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 [EMAIL PROTECTED]
Re: NSTextView + other NSView in NSScrollView?
I don't know offhand. A quick search on CocoaBuilder for NSTextView flipped turns up this suggestion to flip the superview: http://www.cocoabuilder.com/archive/message/cocoa/2004/6/20/110164 But I haven't read it closely. --Andy On Jul 28, 2008, at 11:09 AM, Jacob Bandes-Storch wrote: On Jul 28, 2008, at 7:48 AM, Andy Lee [EMAIL PROTECTED] wrote: On Jul 27, 2008, at 11:31 PM, Jacob Bandes-Storch wrote: I'm trying to create a Mail-style scroll view, with a view for information (like the view for message headers) above a text view for the content. I created two NSViews in Interface Builder, changed the class of the bottom one to NSTextView, Just one more thought: I think some people have mentioned unexpected resizing behavior because they didn't take into account the fact that NSTextView uses a flipped coordinate system. Yes, I was wondering about that. It seems like that's the issue I run into when trying to use an NSTextView that's not the documentView of the NSScrollView. What can I do to work around that? ___ 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 [EMAIL PROTECTED]
NSTextView + other NSView in NSScrollView?
I'm trying to create a Mail-style scroll view, with a view for information (like the view for message headers) above a text view for the content. I created two NSViews in Interface Builder, changed the class of the bottom one to NSTextView, selected both, and clicked Layout Embed Objects In Scroll View. This all works (it puts the views inside a scroll view), but the NSTextView doesn't play well with the scroll view when it increases in size, and when the scroll view changes size. When the text view increases in size, instead of just getting longer by a line, it gets longer and moves down, and the scroll view doesn't enable the scrollbar. If I shrink the scroll view by means of resizing the window (and I do have the autosizing set properly), the text view moves up erratically, and doesn't move back down when I increase the window size again. Everything works just fine when I create an NSTextView and embed it in a scroll view without another view alongside... because the NSTextView itself becomes the scroll view's document view. So... what's the right way to go about doing this? Should I even try to be putting 2 views in a scroll view for the effect I'm aiming for? Thanks in advance. ___ 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 [EMAIL PROTECTED]
Re: NSTextView + other NSView in NSScrollView?
Putting two views inside a scroll view seems like a weird way to go about this. What I would do is create a custom NSView subclass that draws information at the top and has an NSTextView as a subview drawn underneath. Omar Qazi Hello, Galaxy! 1.310.294.1593 On Jul 27, 2008, at 8:31 PM, Jacob Bandes-Storch wrote: I'm trying to create a Mail-style scroll view, with a view for information (like the view for message headers) above a text view for the content. I created two NSViews in Interface Builder, changed the class of the bottom one to NSTextView, selected both, and clicked Layout Embed Objects In Scroll View. This all works (it puts the views inside a scroll view), but the NSTextView doesn't play well with the scroll view when it increases in size, and when the scroll view changes size. When the text view increases in size, instead of just getting longer by a line, it gets longer and moves down, and the scroll view doesn't enable the scrollbar. If I shrink the scroll view by means of resizing the window (and I do have the autosizing set properly), the text view moves up erratically, and doesn't move back down when I increase the window size again. Everything works just fine when I create an NSTextView and embed it in a scroll view without another view alongside... because the NSTextView itself becomes the scroll view's document view. So... what's the right way to go about doing this? Should I even try to be putting 2 views in a scroll view for the effect I'm aiming for? Thanks in advance. smime.p7s Description: S/MIME cryptographic signature ___ 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 [EMAIL PROTECTED]
Re: NSTextView + other NSView in NSScrollView?
On Jul 27, 2008, at 11:31 PM, Jacob Bandes-Storch wrote: I'm trying to create a Mail-style scroll view, with a view for information (like the view for message headers) above a text view for the content. I created two NSViews in Interface Builder, changed the class of the bottom one to NSTextView, Is there some reason you didn't drag an NSTextView into the window in the first place? selected both, and clicked Layout Embed Objects In Scroll View. Are you sure you didn't want a Split View rather than a Scroll View? If you were trying to create a Mail-like layout, I would have expected your two views to be an NSTableView and an NSTextView, both embedded in a Split View. --Andy ___ 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 [EMAIL PROTECTED]