discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GWorkspace issues


From: Enrico Sersale
Subject: Re: GWorkspace issues
Date: Mon, 29 Jan 2001 13:37:16 +0200 (EET)

On Sun, 28 Jan 2001, Nicola Pero wrote:

> >>>>> "Enrico" == Enrico Sersale <address@hidden> writes:
>
> ...
>
>     Enrico> I'm having some problems in fixing this.  Or I can't see
>     Enrico> where the error is, or a bug was added in NSSplitView.
> 
> ...
>
> So - I implemented for you the Apple extension
> 
> - (float)splitView:(NSSplitView *)splitView
> constrainSplitPosition:(float)proposedPosition 
> ofSubviewAt:(int)offset
> 
> and added it to NSSplitView - so you can use a standard API
> independent on the library internals to do what you need.  You can now
> implement this method in your NSSplitView's delegate as follows:
> 
> ...
>
> to constrain the splitview divider to the positions of your choice
> during dragging - it is also much nicer for the user since he/she sees
> the divider only going to where he/she can move it.
> 
> This should constrain the splitview divider where you want it.  Then,
> rearranging positions/sizes inside each splitview subview should be
> done by code belonging to the subview - and you should not need to use
> notifications for frame changes - just use the standard ways of
> rearranging the subviews inside a view when it's resized - for
> example, to resize the lower views, you can either try with
> autoresizing masks, or embed them into a view in which you implement
> resizeWithOldSuperviewSize: to position them at your wish.  
> ...

Thanks to the new method, I have implemented 
resizeWithOldSuperviewSize: for the iconspath & browser view and
eliminated all the notifications. Good.

But, anyway, I think that there is a little bug in NSSplitView ;-)

After moving the divider, the delegate 
__splitView_resizeSubviewsWithOldSize_ method is never called.

I think that you should add [self adjustSubviews] at the end of
__mouseDown_ .

I've tried this and it works.

Ciao,
Enrico




reply via email to

[Prev in Thread] Current Thread [Next in Thread]