Re: NSSplitView layout problem

2022-09-16 Thread Andy Lee via Cocoa-dev
[catching up on email] On Thu, Sep 8, 2022, at 5:34 PM, James Walker via Cocoa-dev wrote: > I could insert the edit > field in a custom NSView and insert that in the split view, but I'm > wondering if there is a better way to handle the issue? This is how I would do it. Seems like a fine solut

NSSplitView layout problem

2022-09-08 Thread James Walker via Cocoa-dev
I have an editable text view and a combo box that I want to lay out horizontally in a split view. The regular size of a combo box defaults to 25 points high, while the regular size of an edit field defaults to 21 points high. But NSSplitView with horizontal layout sets its subviews to the

Re: NSSplitView Problems

2017-05-03 Thread Quincey Morris
On May 3, 2017, at 09:27 , Richard Charles wrote: > > So it appears that simply allowing the the size of a subview to go negative > when autoresizing fixes an issue that has been around since the days of > NeXTSTEP. So what am I missing? I dunno, but I think you need to be a bit cautious with

NSSplitView Problems

2017-05-03 Thread Richard Charles
I have a vertical split view that does not use auto layout or constraints. The split view contains a custom subview that has the autoresizing mask set to NSViewWidthSizable. During normal operation the user moves the split view divider which results in a collapsed subview. When the split view d

Re: NSSplitview and NSTableview

2016-03-20 Thread Roland King
> On 21 Mar 2016, at 12:05, yu...@aim.com wrote: > > Hi, > I spent sometime on this strange issue but still could not figure out. I > hope i could get some help from the group. > > > I have a NSScrollView which contains an NSSplitView; the splitView contains >

NSSplitview and NSTableview

2016-03-20 Thread yuleo
Hi, I spent sometime on this strange issue but still could not figure out. I hope i could get some help from the group. I have a NSScrollView which contains an NSSplitView; the splitView contains four panes; each pane is a NSTableView with just one row of text; After i added the last table

Re: NSSplitView in a separate NSWindowControl doesn't show for some reason

2015-10-25 Thread Nick
Graham, Thank you for your answer. Just to follow up - yes, I tried adding the view as a subview, instead of replacing the content view of the window. But the result was the same - the split view kept losing its arrangesAllSubviews property, whenever the split view was loaded from a different XIB t

Re: NSSplitView in a separate NSWindowControl doesn't show for some reason

2015-10-25 Thread Graham Cox
> On 25 Oct 2015, at 5:51 am, Nick wrote: > > What am I doing wrong? > This:- > self.window.contentView = self.vc.view; > A NSWindow is not itself a NSView, so it needs to have a closely associated view that hosts all the rest of the window’s content. That is the contentView. It should

Re: NSSplitView in a separate NSWindowControl doesn't show for some reason

2015-10-24 Thread Nick
An interesting discovery. I went through all properties one by one in NSSplitView, comparing ones that are set automatically to NSSplitView in a MainMenu.xib and the one that are set automatically in MyViewController.xib. When I load NSSplitView as part of another xib, its property

NSSplitView in a separate NSWindowControl doesn't show for some reason

2015-10-24 Thread Nick
Hi I am trying to create an NSSplitView-based application. For the sake of modularity, I would like to separate different parts of the app into several view controllers (each has its own xib). The problem is when I add a split view as a child view of NSViewController.view, then load my view

Re: NSSplitView parallel motion

2014-11-09 Thread Luther Baker
> Is there a "conventional way" to implement parallel divider bar motion in > an NSSplitView? > > While resizing a window, I get the general behavior I want by setting the > holding properties of 3 view split view to 200, 250, 100 respectfully. > While randomly resizing

NSSplitView parallel motion

2014-11-08 Thread Luther Baker
Is there a "conventional way" to implement parallel divider bar motion in an NSSplitView? While resizing a window, I get the general behavior I want by setting the holding properties of 3 view split view to 200, 250, 100 respectfully. While randomly resizing the view, the 3rd view colla

Re: NSSplitView divider position

2014-11-08 Thread Luther Baker
Thanks Ken. On Sat, Nov 8, 2014 at 9:02 AM, Ken Thomases wrote: > On Nov 8, 2014, at 8:19 AM, Luther Baker wrote: > > > Is there a direct way to determine the positions of the dividers in > > NSSplitView. > > No. > > > If not, are most people calculating thi

Re: NSSplitView divider position

2014-11-08 Thread Ken Thomases
On Nov 8, 2014, at 8:19 AM, Luther Baker wrote: > Is there a direct way to determine the positions of the dividers in > NSSplitView. No. > If not, are most people calculating this by adding the widths of all the > "visible" child/container views to the left of th

NSSplitView divider position

2014-11-08 Thread Luther Baker
Is there a direct way to determine the positions of the dividers in NSSplitView. I'm implementing splitView:additionalEffectiveRectOfDividerAtIndex: and would like to create a rect relative to the current position of the divider. If not, are most people calculating this by adding the w

Re: NSSplitView divider tracking-area

2014-10-30 Thread edward taffel
the cursor tracking that just happens to be > repeatable in the case you’ve described. true—& i might just leave it. > Because of all that, I’d say it’s well worth a bug report to ask for > clarification. if several NSSplitView users concur it’s a bug, i’ll write it ; oth

Re: NSSplitView divider tracking-area

2014-10-30 Thread Quincey Morris
On Oct 30, 2014, at 11:19 , edward taffel wrote: > > i agree! do you feel it should always track? [anyone else?] There’s an argument that says it should change the cursor if and only if mouse down while the cursor is changed would “grab” the splitter. (So that would be a “yes” in your scenari

Re: NSSplitView divider tracking-area

2014-10-30 Thread edward taffel
> On Oct 30, 2014, at 1:42 PM, Keary Suska wrote: > > A tracking area can choose when to track, and it appears that NSSplitView has > chosen to track only when the window is key. You may be able to access the > tracking area via the -trackingAreas method and swap it out w

Re: NSSplitView divider tracking-area

2014-10-30 Thread Keary Suska
hat's it. > > i’m not sure what you mean—i have verified: > if the NSPanel is key when mousing over the divider, the cursor changes to a > resize cursor, as expected; if not key the cursor is unaffected. A tracking area can choose when to track, and it appears that NSSplitView

Re: NSSplitView divider tracking-area

2014-10-30 Thread edward taffel
> On Oct 30, 2014, at 12:34 PM, Seth Willits wrote: > >> in a panel, the tracking area for NSSplitView’s divider is only active if >> the panel is key, i.e. the cursor is not affected otherwise. as a panel is >> not generally key unless needed, ought not this area be always active? >> anyone

Re: NSSplitView divider tracking-area

2014-10-30 Thread Seth Willits
> in a panel, the tracking area for NSSplitView’s divider is only active if the > panel is key, i.e. the cursor is not affected otherwise. as a panel is not > generally key unless needed, ought not this area be always active? anyone > agree? anyone have a workaround? What does "a panel" mean to

NSSplitView divider tracking-area

2014-10-30 Thread edward taffel
in a panel, the tracking area for NSSplitView’s divider is only active if the panel is key, i.e. the cursor is not affected otherwise. as a panel is not generally key unless needed, ought not this area be always active? anyone agree? anyone have a workaround? thanks, edward

Re: Resizing issue with NSSplitView

2014-09-02 Thread Kyle Sluder
On Tue, Sep 2, 2014, at 11:39 PM, Peter Hudson wrote: > Hi All > > I have recently migrated a project to xCode 5.1.1 and OSX 10.9.4 > > In one of the windows of the app I have an NSSplitView. > Previously, I could adjust the relative size of the splits in Interface > Bui

Resizing issue with NSSplitView

2014-09-02 Thread Peter Hudson
Hi All I have recently migrated a project to xCode 5.1.1 and OSX 10.9.4 In one of the windows of the app I have an NSSplitView. Previously, I could adjust the relative size of the splits in Interface Builder - and when I ran the app, the splits would appear as I set them. Mysteriously

Re: Auto Layout with NSSplitView, NSScrollView

2014-01-23 Thread SevenBits
On Thu, Jan 9, 2014 at 12:27 PM, Andy Lee wrote: > That's a great thread, thanks! > > BTW Apple removed the splitview-without-NSSplitView sample code that's > mentioned in the thread. For anyone still interested, someone named Darcy > Liu seems to have been archiving a

Re: Auto Layout with NSSplitView, NSScrollView

2014-01-09 Thread Andy Lee
On Jan 9, 2014, at 12:48 PM, Kyle Sluder wrote: > Nope. Please see the 10.8 AppKit Release Notes, which enumerate all the > delegate methods which will kick you out of Auto Layout mode: > >> splitView:constrainMinCoordinate:ofSubviewAt: >> splitView:constrainMaxCoordinate:ofSubviewAt: >> splitVie

Re: Auto Layout with NSSplitView, NSScrollView

2014-01-09 Thread Andy Lee
On Jan 9, 2014, at 12:48 PM, Kyle Sluder wrote: > On Thu, Jan 9, 2014, at 07:51 AM, Andy Lee wrote: >> As far as I know (see disclaimers), there's no reason you can't implement >> split view delegate methods just because you're using Auto Layout, as >> long as you aren't calling setFrame:. > > No

Re: Auto Layout with NSSplitView, NSScrollView

2014-01-09 Thread Ken Ferry
On Thu, Jan 9, 2014 at 9:48 AM, Kyle Sluder wrote: > To achieve this effect, add a mandatory greater-than-or-equal-to width > constraint to the subview you want to be collapsible, and implement > -splitView:canCollapseSubview: to return YES for that subview. > Yeah - not too much to it! BUT, lo

Re: Auto Layout with NSSplitView, NSScrollView

2014-01-09 Thread Andy Lee
On Jan 9, 2014, at 12:55 PM, SevenBits wrote: > On Thu, Jan 9, 2014 at 12:27 PM, Andy Lee wrote: >> That's a great thread, thanks! >> >> BTW Apple removed the splitview-without-NSSplitView sample code that's >> mentioned in the thread. For anyone still in

Re: Auto Layout with NSSplitView, NSScrollView

2014-01-09 Thread Kyle Sluder
On Thu, Jan 9, 2014, at 07:51 AM, Andy Lee wrote: > As far as I know (see disclaimers), there's no reason you can't implement > split view delegate methods just because you're using Auto Layout, as > long as you aren't calling setFrame:. Nope. Please see the 10.8 AppKit Release Notes, which enumer

Re: Auto Layout with NSSplitView, NSScrollView

2014-01-09 Thread Andy Lee
That's a great thread, thanks! BTW Apple removed the splitview-without-NSSplitView sample code that's mentioned in the thread. For anyone still interested, someone named Darcy Liu seems to have been archiving all of Apple's sample code: <https://github.com/darcyliu/Coc

Fwd: Re: Auto Layout with NSSplitView, NSScrollView

2014-01-09 Thread Michael Starke
There was something: http://www.cocoabuilder.com/archive/cocoa/326128-nssplitview-not-resizing-subviews-if-delegate-is-used.html#326128 -Michael On 09.01.2014 16:51, Andy Lee wrote: On Jan 6, 2014, at 11:54 AM, Fritz Anderson wrote: On 4 Jan 2014, at 1:38 PM, thatsanicehatyouh...@me.com wrote: I like

Re: Auto Layout with NSSplitView, NSScrollView

2014-01-09 Thread Andy Lee
On Jan 6, 2014, at 11:54 AM, Fritz Anderson wrote: > On 4 Jan 2014, at 1:38 PM, thatsanicehatyouh...@me.com wrote: > > I like your user name. > >> I have a couple of questions about using auto layout (AL) with NSSplitView >> and NSScrollView. I have watched the (exc

Re: Auto Layout with NSSplitView, NSScrollView

2014-01-06 Thread Fritz Anderson
On 4 Jan 2014, at 1:38 PM, thatsanicehatyouh...@me.com wrote: I like your user name. > I have a couple of questions about using auto layout (AL) with NSSplitView > and NSScrollView. I have watched the (excellent) WWDC videos from 2012, but > am having problems. > > I'm tr

Auto Layout with NSSplitView, NSScrollView

2014-01-04 Thread thatsanicehatyouhave
Hi, I have a couple of questions about using auto layout (AL) with NSSplitView and NSScrollView. I have watched the (excellent) WWDC videos from 2012, but am having problems. I'm trying to implement an NSSplitView (not a custom view that's similar to NSSplitView) and want to

Re: Autolayout error with NSSplitView When Divider Programmatically Moved

2013-11-10 Thread Darren Wheatley
Hi, After your reply I went back to the code and picked through everything again step by step. Looking into it I found I still had the base SDK set to 10.8 on one of the projects in the workspace. I fixed that, and manually wiped the Derived Data folder, and now it works fine. No code chan

Re: Autolayout error with NSSplitView When Divider Programmatically Moved

2013-11-09 Thread Kyle Sluder
> On Nov 9, 2013, at 4:04 PM, Darren Wheatley > wrote: > > I have a 10.7 app built on 10.9. I'm debugging on 10.9. > > My main view has a splitView with two panes: a webview in one, and an > NSScrollView in the other. > > When the app starts I programmatically move the divider to the right to

Autolayout error with NSSplitView When Divider Programmatically Moved

2013-11-09 Thread Darren Wheatley
I have a 10.7 app built on 10.9. I'm debugging on 10.9. My main view has a splitView with two panes: a webview in one, and an NSScrollView in the other. When the app starts I programmatically move the divider to the right to hide the right-hand pane and the enclosed NSScrollView. When this hap

Re: NSSplitView strange behavior

2013-08-13 Thread Seth Willits
On Aug 13, 2013, at 6:43 AM, Vincent CARLIER wrote: > I experience some strange behavior with NSSplitView. > ... > Anyone experienced something like this ? > Is there a better way to do what I'm trying to do ? Make your life easier and try AGNSSplitViewDelegate or (so I'

NSSplitView strange behavior

2013-08-13 Thread Vincent CARLIER
Hi list, I experience some strange behavior with NSSplitView. Let me explain what I'm trying to do : The split view contains 3 subviews (2 dividers), and has a delegate that controls it. It is an horizontal split view. Let number those 3 views from top to bottom 0, 1 and 2. The upper di

Re: NSSplitView similar to Xcode's editor/debug area split view

2013-07-03 Thread Chuck Soper
ng constraints to animate a subview of an NSSplitView. Chuck On 6/28/13 4:58 AM, "Andy Lee" wrote: >Hi Chuck, > >On Jun 26, 2013, at 8:30 PM, Chuck Soper wrote: >> 2. How should I animate the showing or hiding of the 'debug area' view? > >I do by send

Re: NSSplitView similar to Xcode's editor/debug area split view

2013-07-02 Thread Miron Iancu
ng to implement an NSSplitView similar to Xcode's editor/debug > area split view. I'm implementing a split view with two views (one above > the other). > > Like Xcode, I need my 'Debug Area' view to: > a) Have a minimum height. > b) Show or hide view with animati

Re: NSSplitView similar to Xcode's editor/debug area split view

2013-06-28 Thread Andy Lee
ne above the other. - (void)_setTopSubviewHeight:(CGFloat)newHeight forTwoPaneSplitView:(NSSplitView *)splitView animate:(BOOL)shouldAnimate { NSView *viewOne = [[splitView subviews] objectAtIndex:0]; NSRect frameOne = [viewOne frame]; NSView *viewTwo = [[

NSSplitView similar to Xcode's editor/debug area split view

2013-06-26 Thread Chuck Soper
I'm trying to implement an NSSplitView similar to Xcode's editor/debug area split view. I'm implementing a split view with two views (one above the other). Like Xcode, I need my 'Debug Area' view to: a) Have a minimum height. b) Show or hide view with animation by click

Re: NSSplitView: Many subviews and ViewControllers, best practices

2013-05-21 Thread Graham Cox
On 21/05/2013, at 6:39 PM, Trygve Inda wrote: > In one pane, I need to have three different views supported by an NSBox that > I can swap the views out (for icon, thumbnail and list view modes). These > views all need access to the same NSArrayController. Have you considered using a tabless NST

NSSplitView: Many subviews and ViewControllers, best practices

2013-05-21 Thread Trygve Inda
I have an NSDocument-based app. The NSDocument's window has at it's root, an NSSplitView with 7 separate panes/subviews... A Source list on the left and several panes to the right with horizontal and vertical splits. In one pane, I need to have three different views supported by an NS

Re: NSSplitView not Resizing Subviews if Delegate is used

2013-02-21 Thread Kevin Cathey
Michael, The issue here is that you are overriding one of several delegate methods that puts split view in "compatibility mode". Essentially some of the delegate methods on NSSplitView duplicate the functionality of what you can do with auto layout. In order to keep existing ap

Re: NSSplitView not Resizing Subviews if Delegate is used

2013-02-21 Thread Kevin Cathey
> Autolayout does not work with NSSplitView on 10.7. Auto layout does not work well with NSSplitView on 10.7. You can still have an NSSplitView in your UI and it will function, with the caveat that the min/max split positions will ignore what the constraints determine. So if you have a subv

Re: NSSplitView not Resizing Subviews if Delegate is used

2013-02-19 Thread Kyle Sluder
On Tue, Feb 19, 2013, at 03:31 PM, Chuck Soper wrote: > Autolayout works well with NSSplitView. There may be differences between > 10.7 or 10.8 but I can't remember. Does your app require Mac OS X 10.8 or > 10.7? Autolayout does not work with NSSplitView on 10.7.

Re: NSSplitView not Resizing Subviews if Delegate is used

2013-02-19 Thread Chuck Soper
Autolayout works well with NSSplitView. There may be differences between 10.7 or 10.8 but I can't remember. Does your app require Mac OS X 10.8 or 10.7? The way I use autolayout with NSSplitView is to add constraints to the subviews in IB. If you need to add or remove those constraints, yo

Re: NSSplitView not Resizing Subviews if Delegate is used

2013-02-19 Thread Michael Starke
I was thinking about Auto-Layout and indeed it is the source of the Problem. Even if the delgate just had - (BOOL)splitView:(NSSplitView *)splitView shouldAdjustSizeOfSubview:(NSView *)view { return YES; } the resizing did not work anymore. The proposedMinimumPosition was just the

Re: NSSplitView not Resizing Subviews if Delegate is used

2013-02-19 Thread Chuck Soper
AM, "Michael Starke" wrote: >Hello here, > >Yesterday a ran into a strange problem that I could not get my head >around. Simple setup created in InterfaceBuilder: > >A window with a horizontal NSSplitview with two subviews. > >If I run this without setting the

NSSplitView not Resizing Subviews if Delegate is used

2013-02-19 Thread Michael Starke
Hello here, Yesterday a ran into a strange problem that I could not get my head around. Simple setup created in InterfaceBuilder: A window with a horizontal NSSplitview with two subviews. If I run this without setting the delegate of the split view the two subviews get rescaled as expected

Re: NSSplitView -drawDividerInRect

2013-01-05 Thread koko
Now that you point this out it seems like the answer … sometimes we need a 'head slap'. I already use [NSSplitViewDelegate splitView:additionalEffectiveRectOfDividerAtIndex:] to add a rectangle to a vertical splitter tracking area. So it would be …. 1. Add a view configured as desired to th

Re: NSSplitView -drawDividerInRect

2013-01-04 Thread Graham Cox
On 05/01/2013, at 12:16 AM, koko wrote: > I am currently drawing a custom divider via -drawDividerInRect but want to > improve this and am not sure of the proper approach. > > I would like to draw a divider similar to that in the Xcode Utilities view > which has the four buttons for Template,

NSSplitView -drawDividerInRect

2013-01-04 Thread koko
I am currently drawing a custom divider via -drawDividerInRect but want to improve this and am not sure of the proper approach. I would like to draw a divider similar to that in the Xcode Utilities view which has the four buttons for Template, Code, Object and Media Libraries. This divider is i

Prevent NSSplitView from resizing when replacing sub views

2012-10-24 Thread Qiang Y
Hello all, I have a view defined in NIB. In my code, I am replacing one subview of a NSSplitView with the NIB view. Unfortunately, NSSplitView resizes its subviews to satisfy the size of the NIB view, which makes the ui jumpy. Is there a way to resize the NIBView to satisfy the NSSplitView

Re: NSSplitView crash upon restore from 10.8 Versions Browser

2012-09-13 Thread Jerry Krinock
cated object. Indeed, that is what was happening. I was sending setDelegate:nil during -windowWillClose:, but the message was not being delivered because when I replaced RBSplitView with NSSplitView to make the project buildable in Xcode 4, I neglected to reconnect the outlet from the window contr

Re: NSSplitView crash upon restore from 10.8 Versions Browser

2012-08-21 Thread Jerry Krinock
On 2012 Aug 20, at 14:14, Kevin Perry wrote: > Looks like the crash is happening while attempting to invoke > -respondsToSelector:. > > Odds are that this is a message being sent to [self delegate], which looks > like a deallocated object. Thank you, Kevin. I like it. > Is it possible that

Re: NSSplitView crash upon restore from 10.8 Versions Browser

2012-08-20 Thread Lee Ann Rucker
or try any more >> workarounds, so I'm throwing my observations out there in case someone else >> has seen or will see this problem. Maybe we can put our observations >> together and get further. >> >> DETAILS >> >> Crash report is at end of this

Re: NSSplitView crash upon restore from 10.8 Versions Browser

2012-08-20 Thread Kevin Perry
problem. Maybe we can put our observations > together and get further. > > DETAILS > > Crash report is at end of this message. You see all of the stack is in > Apple's code. > > Not knowing what else to do, I subclassed NSSplitView, to log the parameters > and inv

NSSplitView crash upon restore from 10.8 Versions Browser

2012-08-20 Thread Jerry Krinock
re in case someone else has seen or will see this problem. Maybe we can put our observations together and get further. DETAILS Crash report is at end of this message. You see all of the stack is in Apple's code. Not knowing what else to do, I subclassed NSSplitView, to log the parameters a

Re: NSSplitView question - how to implement my own "adjustViews" style method

2012-07-19 Thread Gary L. Wade
I don't know for sure, but you might be able to get around the 3rd party plug-in issue by using runtime attributes instead. -- Gary L. Wade (Sent from my iPad) http://www.garywade.com/ ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: NSSplitView question - how to implement my own "adjustViews" style method

2012-07-19 Thread Rainer Brockerhoff
hind current Cocoa > developments, and does not integrate well XCode 4.x and with SDK 10.7 or and > SDK 10.8. Testing with it I saw problems in: > 1. Look and feel (not coherent with recent standard NSSplitView variants). > 2. Integration with dev. environment (Apple broke the plugin

Re: NSSplitView question - how to implement my own "adjustViews" style method

2012-07-19 Thread Motti Shneor
(not coherent with recent standard NSSplitView variants). 2. Integration with dev. environment (Apple broke the plugin architecture of Interface-Builder in XCode 4). Everything must be done programmatically. 3. Does not mix well with auto-layout views. We don't yet use auto-layout (or we wou

Re: NSSplitView question - how to implement my own "adjustViews" style method

2012-07-18 Thread Gideon King
I always use RBSplitView - has all that stuff built in and more… http://brockerhoff.net/blog/tag/rbsplitview/ Seems to work fine for my needs. Regards Gideon On 03/07/2012, at 2:40 PM, Motti Shneor wrote: > Thanks Graham (Sigh…) > > I was beginning to think I'm stupid or something, strug

Re: NSSplitView question - how to implement my own "adjustViews" style method

2012-07-17 Thread Motti Shneor
litView doesn't seem to be easier than finding the answer to my question, because to inherit from NSSplitView I'd still need to understand how "super" works won't I?. Also I'll have to re-implement lots of behavior (animation, dynamics, efficient drawing etc.) tha

Re: NSSplitView question - how to implement my own "adjustViews" style method

2012-07-03 Thread Rainer Brockerhoff
On Jul 3, 2012, at 12:11 , Andy Lee wrote: > On Jul 3, 2012, at 10:31 AM, Rainer Brockerhoff wrote: >> Now that's an interesting idea, thanks Andy! I'll look into it soon, I hope. > > P.P.S. I'm not sure how to deal with autolayout constraints that might get > broken. Does replaceSubview:with: t

Re: NSSplitView question - how to implement my own "adjustViews" style method

2012-07-03 Thread Andy Lee
On Jul 3, 2012, at 10:31 AM, Rainer Brockerhoff wrote: > > On Jul 3, 2012, at 11:03 , Andy Lee wrote: > >> I haven't used RBSplitView, but it sounds like it might be handy to have a >> method for replacing an already-set-up NSSplitView with an RBSplitView. >&

Re: NSSplitView question - how to implement my own "adjustViews" style method

2012-07-03 Thread Andy Lee
On Jul 3, 2012, at 10:31 AM, Rainer Brockerhoff wrote: > On Jul 3, 2012, at 11:03 , Andy Lee wrote: > >> I haven't used RBSplitView, but it sounds like it might be handy to have a >> method for replacing an already-set-up NSSplitView with an RBSplitView. >> Maybe

Re: NSSplitView question - how to implement my own "adjustViews" style method

2012-07-03 Thread Rainer Brockerhoff
On Jul 3, 2012, at 11:03 , Andy Lee wrote: > I haven't used RBSplitView, but it sounds like it might be handy to have a > method for replacing an already-set-up NSSplitView with an RBSplitView. Maybe > it could be a category method on NSSplitView, something like this: > ... &

Re: NSSplitView question - how to implement my own "adjustViews" style method

2012-07-03 Thread Andy Lee
I haven't used RBSplitView, but it sounds like it might be handy to have a method for replacing an already-set-up NSSplitView with an RBSplitView. Maybe it could be a category method on NSSplitView, something like this: - (RBSplitView *)replaceWithRBSplitView { // Retain and autore

Re: NSSplitView question - how to implement my own "adjustViews" style method

2012-07-03 Thread Rainer Brockerhoff
On Jul 3, 2012, at 01:46 , cocoa-dev-requ...@lists.apple.com wrote: > Date: Tue, 03 Jul 2012 10:14:21 +1000 > From: Graham Cox > Message-ID: > > On 03/07/2012, at 12:21 AM, Motti Shneor wrote: > >> I really need an advice here. > > This will sound flippant but it's not meant to be: implement

Re: NSSplitView question - how to implement my own "adjustViews" style method

2012-07-03 Thread Motti Shneor
en delegate methods are being called. Rolling out my own SplitView >> doesn't seem to be easier than finding the answer to my question, because to >> inherit from NSSplitView I'd still need to understand how "super" works >> won't I?. >> Also I'll ha

Re: NSSplitView question - how to implement my own "adjustViews" style method

2012-07-02 Thread Kyle Sluder
On Tue, Jul 3, 2012, at 03:22 PM, Graham Cox wrote: > True in part. But you could subclass NSView instead. After all, > NSSplitView doesn't really bring that much to the table - it relies on > inheriting NSView to store its subviews, the only thing it draws is the > actual split

Re: NSSplitView question - how to implement my own "adjustViews" style method

2012-07-02 Thread Graham Cox
cause to inherit > from NSSplitView I'd still need to understand how "super" works won't I?. > Also I'll have to re-implement lots of behavior (animation, dynamics, > efficient drawing etc.) that might prove a big job. True in part. But you could subclass NSView

Re: NSSplitView question - how to implement my own "adjustViews" style method

2012-07-02 Thread Quincey Morris
e designing UI behavior that's intrinsically too complicated. Finally, to put words into Graham's mouth, I don't think he was suggesting you subclass NSSplitView, but that you rewrite the whole behavior in a new class of your own. In that case, you don't

Re: NSSplitView question - how to implement my own "adjustViews" style method

2012-07-02 Thread Todd Heberlein
y if necessary, and they snap back. The > class is 245 lines long compared with NSSplitView's 2502. This is of course > not a fair comparison because NSSplitView does more, but it's clear that it's > a lot simpler, particularly in the dragging code. This example i

Re: NSSplitView question - how to implement my own "adjustViews" style method

2012-07-02 Thread Motti Shneor
litView doesn't seem to be easier than finding the answer to my question, because to inherit from NSSplitView I'd still need to understand how "super" works won't I?. Also I'll have to re-implement lots of behavior (animation, dynamics, efficient drawing etc.) tha

Re: NSSplitView question - how to implement my own "adjustViews" style method

2012-07-02 Thread Graham Cox
On 03/07/2012, at 12:21 AM, Motti Shneor wrote: > I really need an advice here. This will sound flippant but it's not meant to be: implement your own split view. NSSplitView is the most bizarre piece of design and difficult to get to behave just how you want even in simple cases lik

NSSplitView question - how to implement my own "adjustViews" style method

2012-07-02 Thread Motti Shneor
Hello everyone. I have an NSSplitView with dynamic contents (views can be added and deleted in runtime). Views can also be collapsed by the user, or programmatically at certain situations. My problem is this. Each of my views has a minimum size and a maximum size, that must be met anytime, or

Re: NSSplitView-like cursor "grabbing"

2012-03-26 Thread Markus Spoettl
On 3/26/12 7:40 PM, Kevin Perry wrote: It overrides -[NSView hitTest:] to return self for clicks inside the draggable region. Fantastic, thanks a lot! Works great! Regards Markus -- __ Markus Spoettl ___ Coco

Re: NSSplitView-like cursor "grabbing"

2012-03-26 Thread Kevin Perry
It overrides -[NSView hitTest:] to return self for clicks inside the draggable region. -KP On Mar 26, 2012, at 10:30 AM, Markus Spoettl wrote: > Hello all, > > does anyone know how to grab the cursor like NSSplitView does? It somehow > manages to know that the cursor is near a

NSSplitView-like cursor "grabbing"

2012-03-26 Thread Markus Spoettl
Hello all, does anyone know how to grab the cursor like NSSplitView does? It somehow manages to know that the cursor is near a divider when it actually is within a sub-view, it also "captures" clicks in those cases, even though they should strictly be sent to the sub-view the curs

Re: Animated NSSplitView headache

2012-02-12 Thread Luc Van Bogaert
On 10 Feb 2012, at 14:21, Alvaro Costa Neto wrote: > When the user drags the divider and collapses it, the split view retains the > view's frames before the collapse and that's probably something that is > giving you some problems. In this sense, there are two different behaviors > going on wh

Re: Animated NSSplitView headache

2012-02-10 Thread Alvaro Costa Neto
calculating negative sized frames. Hope that helps! Abraços, Alvaro Costa Neto Em 10/02/2012, às 07:53, Luc Van Bogaert escreveu: > Hi, > > I'm really very close to having a working NSSplitView with animated > "collapse" & "uncollapse" of the subviews, b

Animated NSSplitView headache

2012-02-10 Thread Luc Van Bogaert
Hi, I'm really very close to having a working NSSplitView with animated "collapse" & "uncollapse" of the subviews, but there still is a problem when one of the subviews is first collapsed by dragging the divider over the subview's minimal size as controlled by

Re: Animating NSSplitView collapse/uncollapse

2012-02-07 Thread Luc Van Bogaert
On 06 Feb 2012, at 09:29, Martin Hewitson wrote: > Hi Luc, > > Attached is a split view controller which I think does what you want, or at > least should enough to go on. This is cobbled together from various examples > I found on the web. The code is experimental and probably needs some cleani

Re: Animating NSSplitView collapse/uncollapse

2012-02-06 Thread Martin Hewitson
nk I'm very > close to a working solution. There's a lot of documentation and sample code > on the internet, but none of what I have found seems to fit my needs. > > Currently, this is the code that does the animation (in a NSSplitView > subclass) : > > - (void)animate

Re: Animating NSSplitView collapse/uncollapse

2012-02-05 Thread Alvaro Costa Neto
", this is going to cause you problems. My solution to this was to nil the delegate in the NSSplitView subclass before starting the animations and, when the animations finish, get it back to the original value. Just remember: if you start animating both view's frames, the "ani

Animating NSSplitView collapse/uncollapse

2012-02-05 Thread Luc Van Bogaert
to fit my needs. Currently, this is the code that does the animation (in a NSSplitView subclass) : - (void)animateDividerToPosition:(CGFloat)dividerPosition { NSView *view0 = [[self subviews] objectAtIndex:0]; NSView *view1 = [[self subviews] objectAtIndex:1]; NSRect view0Rect

NSToolbar breaks auto layout constraints of NSSplitView in window

2011-12-05 Thread Sean Todd
I have a .xib file that uses auto layout. I setup a window with a sidebar using NSSplitView and NSOutlineView. Everything was working well with resizing the window until I added a NSToolbar. Things continued to look good when I resized the window in IB but not when the app is run. When the

Re: Prevent side subviews of NSSplitView from resizing during window zoom

2011-10-28 Thread Antonio Nunes
On 26 Oct 2011, at 17:46, Antonio Nunes wrote: > I use an NSSPlitView with three subviews. The general idea is that when the > window is resized, only the middle view resizes. I have this working just > fine when dragging the window frame. The split view consults the delegat

Prevent side subviews of NSSplitView from resizing during window zoom

2011-10-28 Thread Antonio Nunes
I use an NSSPlitView with three subviews. The general idea is that when the window is resized, only the middle view resizes. I have this working just fine when dragging the window frame. The split view consults the delegate with splitView:shouldAdjustSizeOfSubview:, and I return YES when the

NSSplitView and autosave

2011-08-30 Thread Andreas Mayer
e. But when the application is started next time, the split view will not show any subviews at all. The splitter is at the very top and the region below is empty. Now, I worked around the problem by subclassing NSSplitView. That didn't take all that long and does what I want. But I'd s

Re: Detecting MouseUp in NSSplitview

2010-12-30 Thread Peter Zegelin
Thanks Graham, Now I get it. Works great. On 30/12/2010, at 10:39 PM, Graham Cox wrote: > > On 30/12/2010, at 8:54 PM, Peter Zegelin wrote: > >> So it looks like NSSplitView is sufficiently different ( ie it has to move a >> divider ) that to get the mouseUp

Re: Detecting MouseUp in NSSplitview

2010-12-30 Thread Graham Cox
On 30/12/2010, at 8:54 PM, Peter Zegelin wrote: > So it looks like NSSplitView is sufficiently different ( ie it has to move a > divider ) that to get the mouseUp event I would have to handle the divider > drag myself, which is probably more complicated than it looks. > > Furt

Re: Detecting MouseUp in NSSplitview

2010-12-30 Thread Peter Zegelin
ed [super mouseDown:theEvent]; to my mouseDown: - (void)mouseDown:(NSEvent *)theEvent{ // I set something here [super mouseDown:theEvent]; } and the divider now works but mouseUp is never called. So it looks like NSSplitView is sufficiently different ( ie it has to move a divider ) that

Re: Detecting MouseUp in NSSplitview

2010-12-29 Thread Kyle Sluder
On Wed, Dec 29, 2010 at 9:30 PM, Peter Zegelin wrote: > I would like to detect when a user has finished dragging on a splitview > divider but unfortunately just adding: > > - (void)mouseUp:(NSEvent *)theEvent{ >        [super mouseUp:theEvent]; > } > > to my NSSplitview

Detecting MouseUp in NSSplitview

2010-12-29 Thread Peter Zegelin
I would like to detect when a user has finished dragging on a splitview divider but unfortunately just adding: - (void)mouseUp:(NSEvent *)theEvent{ [super mouseUp:theEvent]; } to my NSSplitview subclass doesn't seem to work as it never gets called. I get the mouseDown event but no

  1   2   3   >