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

Re: [Sc-devel] [sc-users] SCScrollView bounds change problem



I've been thinking about this, and I think maybe it would be cleaner to change the behaviour of the scroll views than implement the fix I've come up with.

Basically it's this:

1. Scrollviews can have an action which fires when the user scrolls.
2. At the moment this fires when you change the visible origin from code. Because you can't call the action from a primitive (mutex issue) this is blocked in source and done in the method. 3. The set bounds of a contained view issue that Wouter discovered is basically the same problem; it causes the scrollview's internal bounds to resize and thus under some circumstances the view scrolls. The solution I've implemented takes the same approach, firing the action from the method.

I think however it would maybe make sense to have the action not fire when scrolling happens from code. The user could simply call doAction if desired. This would make things a lot simpler, and would be similar to setting a control view's value without firing the action.

I'm not sure if this has SwingOSC implications. I don't think it would break much code, as I suspect most people aren't using scrollview actions. IAC it's a trivial fix if it does.

Thoughts?

S.

On 5 Feb 2008, at 09:54, Scott Wilson wrote:

Okay, I have a fix for this, but would like a little time to test it.

Does this mean we're looking at another RC?

S.

On 5 Feb 2008, at 00:10, Scott Wilson wrote:

Okay I know what it is. Just need to sort out the best solution.

S.

On 4 Feb 2008, at 17:52, Scott Wilson wrote:

It's a problem with the lang mutex. There's some tricky stuff that
needs to go on to get the scrollview to behave properly in corner
cases. I'll see if I can figure it out, but might not be in the
immediate future...

S.

On 4 Feb 2008, at 17:26, Wouter Snoei wrote:

Hi,

I got a stability problem with SCScrollView. If I run the following
code (based on example):

(
a = SCWindow.new.front;
b = SCScrollView(a, Rect(0, 0, 300, 300));
c = SC2DSlider(b, Rect(0, 0, 240, 240));
)

// everything is fine. No scrollbars because c is too small. If I
make the bounds of c bigger like this:

c.bounds_( Rect(0,0,400,400) );

// sliders appear. No problems yet. Now if I move the scrollbars a
bit like here:

b.visibleOrigin = 20@10; // or by hand

// and then change the bounds of c back to anything within 300,300
like so:

c.bounds_( Rect(0,0,240,240) );

// I get the eternal beachball.. What's happening?
//
// cheers,
// wouter

Wouter Snoei

info@xxxxxxxxxxxxxx
http://www.woutersnoei.nl

_______________________________________________
sc-users mailing list
sc-users@xxxxxxxxxxxxxxx
http://lists.create.ucsb.edu/mailman/listinfo/sc-users
_______________________________________________
sc-users mailing list
sc-users@xxxxxxxxxxxxxxx
http://lists.create.ucsb.edu/mailman/listinfo/sc-users
_______________________________________________
sc-users mailing list
sc-users@xxxxxxxxxxxxxxx
http://lists.create.ucsb.edu/mailman/listinfo/sc-users

_______________________________________________
Sc-devel mailing list
Sc-devel@xxxxxxxxxxxxxxx
http://lists.create.ucsb.edu/mailman/listinfo/sc-devel