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

Re: [Sc-devel] relativeOrigin...




On 7 Feb 2008, at 21:19, Jan Trutzschler wrote:

Hi Scott,
i fixed it for now, although i have to say, that the interaction  
between Cocoa and the SCViews is indeed sometimes mysterious  ;-}
i will do some more tests tomorrow.
cu,
Jan


Okay, attached is a diff which seems to fix the SCCompositeView issue with scrollviews. (Debugging code still in.) Please kick the hell out of it. The following at least now seems to work, as do the help file examples.

(

w = SCWindow.new;

c = SCCompositeView(w,Rect(30,30,300,300));
c.relativeOrigin = true;
c.background = "">Color.blue;


// where it should be
d = SCStaticText(c,Rect(0,0,40,40));
d.background = "">Color.red;

s = SCScrollView(c,Rect(0,0,40,40));
s.background = "">Color.yellow;
//s.autohidesScrollers = false;

// inside the scroll
t = SCStaticText(s,Rect(0,0,20,40));
t.background = "">Color.green;

u = SCStaticText(s,Rect(20,20,20,20));
u.background = "">Color.black;


w.front;

)


I think it might be an idea if some of us wrote a 'rough guide' for the GUI implementation. It's so easy to introduce bugs or not account for corner cases with the current state of affairs. Speaking for myself at least, I find that every time I touch that code I need to spend a fair amount of time just remembering how it works. Having something more substantial than the sparsely strewn comments might be helpful.

S.

Attachment: scrollfix.diff
Description: Binary data