default view size RUNTIME ERROR!!!

0 views
Skip to first unread message

Freddie

unread,
Jan 8, 2009, 6:01:54 PM1/8/09
to OpenFlux
I've tried a few methods of setting the default size of a view,
haven't got far. I tried overriding measure within the View class:

override protected function measure():void {
super.measure();
measuredWidth = 50;
measuredHeight = 40;
}

this didn't work. I also tried overriding get explicitHeight/Width to
return these values. again, no joy. also tried a switch statement to
set the size in the createChildren() of the component.

by 'didn't work' i mean a runtime error:

Cannot access a property or method of a null object reference.
at com.openflux.layouts::ContraintLayout/measure()

etc. etc.

within the class there is

<flux:content>
<degrafa:Surface id="image">
<degrafa:GeometryGroup>
<degrafa:RoundedRectangle width="{width}" height="{height}"
fill="{photo}" stroke="{edge}" cornerRadius="5"/>
</degrafa:GeometryGroup>
</degrafa:Surface>
</flux:content>

I can make it work, but only if I set the width and height inline in
the parent document. My preference would be for the View itself figure
out what size it should be from css - dynamic and decoupled.

thanks again for OpenFlux! Heck once I understand it better and
there's still more milage after flex4 I'd be up for contributing some.
peace and love.
Reply all
Reply to author
Forward
0 new messages