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

Re: [Sc-devel] relativeOrigin...




let's not confuse the background issue with the contents drawing where it should.


scott, you actually just introduced the background not drawing issue today.

it didn't do that from my previous (yesterday) build.


or maybe its somewhat correct : it only draws a background behind what is actually there.

you can see the smallest speck of yellow.  but the background should be drawn behind the whole frame at least, and up a to the minimumSize (contents size) at most.


maybe check the diffs since then ?


(


w = SCWindow.new;


c = SCCompositeView(w,Rect(30,30,300,300));

c.relativeOrigin = true;

c.background = "" style="color: #0000bf">Color.blue;



// where it should be

d = SCStaticText(c,Rect(0,0,40,40));

d.background = "" style="color: #0000bf">Color.red;



// although its parent is relativeOrigin, the scroll view does not position itself

s = SCScrollView(c,Rect(0,0,40,40));

s.background = "" style="color: #0000bf">Color.yellow;


// inside the scroll

t = SCStaticText(s,Rect(0,0,40,40));

t.background = "" style="color: #0000bf">Color.green;



w.front;


// bounds says (0,0,40,40) which is correct (relatively specified)

s.bounds;


// says (30,30,40,40) which would be correct, but that's not where its drawing

s.absoluteBounds


)



On Feb 7, 2008 5:23 PM, Scott Wilson <i@xxxxxxxxxxxxxx> wrote:

On 7 Feb 2008, at 15:48, Scott Wilson wrote:


On 7 Feb 2008, at 15:38, felix wrote:


scroll view still doesn't work correctly with it.
i posted a test that shows the failure.  maybe you can suss it.

This is the yellow square thing? Yes that's weird.


Actually there's something wrong in that example even without a scrollview. Observe:

// wrong
(
w = SCWindow.new;

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

ah ... scott ?

the w is not fronted yet.
you are maybe looking at the previous fuckery still open in the same position ?

 
//
//// although its parent is relativeOrigin, the scroll view does not position itself
//s = SCScrollView(c,Rect(0,0,40,40));
//s.background = "">

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

w.front;

now
 
)


If you execute it as two blocks it's different than as one.

S.

as milarepa explains it :  a meditator may have many interesting experience and another may have none.  its like poking your fingers in the corner of your eye and causing yourself to see two moons.  one meditator may think "i see two moons ! I must be very special !" and another may think "i only see the one moon, I must be a bad meditator".  pay no attention to interesting experiences or to the lack of them.

or maybe it really is a bug.

-cx