Hi Scott,
below is a simple example. It doesn't crash immediately but add a
few views and remove them, scroll around and remove and at a
certain point it's time for beachball!
cheers,
Jan
(
var addView, removeView, allviews, win, scroll;
win = SCWindow.new;
win.view.decorator_(FlowLayout(Rect(0, 0, win.view.bounds.width,
20)));
SCButton(win, Rect(0,0, 80,20)).states_([['add']])
.action_{|v| addView.value};
SCButton(win, Rect(0,0, 80,20)).states_([['remove']])
.action_{|v| removeView.value};
win.view.decorator.nextLine;
scroll = SCScrollView(win, Rect(0,24,150,100));
scroll.decorator_(FlowLayout(scroll.bounds));
addView = {
allviews = allviews.add(SC2DSlider(scroll, Rect(0,0,100,100)));
};
removeView = {
if(allviews.size > 0){
allviews.last.remove;
allviews.removeAt(allviews.size-1);
scroll.decorator.shift(0, -100);
}
};
win.front;
)
On Dec 1, 2007, at 2:30 PM, Scott Wilson wrote:
Hi,
Can you send a simple example that causes this?
There's some futzing involved in making SCScrollView behave as
expected, so it's possible I've missed a corner case.
S.
On 29 Nov 2007, at 16:18, Jan Trutzschler wrote:
Hi,
i'm adding & removing views from a SCScrollView and at a
certain point (i guess when it's trying to hide the scrollbars)
SC shows me a beachball ... i paused the debugger and he hangs at
- (void)userScrolled:(NSNotification *)notification
{
// if this happens from a visibleOrigin method we can't use
sendMessage, so the action gets called from the lang
if(!((SCScrollTopView*)mTopView)->isInSetClipViewOrigin()) {
mTopView->sendMessage(s_doaction, 0, 0, 0); // this must be a
scroll view
}
}
i commented the sendMessage out and the beachball does not
coming back anymore ...
any ideas?
Jan
_______________________________________________
Sc-devel mailing list
Sc-devel@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-devel
_______________________________________________
Sc-devel mailing list
Sc-devel@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-devel
_______________________________________________
Sc-devel mailing list
Sc-devel@xxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-devel