|
Heh... so, I used your class that extends the CheckBox, and
functionally it works great. Unfortunately, it's still not centered, and I'm
still not sure how to accomplish it.
I did try to use an inline itemRenderer, and put a HBox
around it (centered)... which centered the custom checkbox class, but then it
threw the same error as before...
ReferenceError: Error #1069:
Property selected not found on flexComponents.editMouse_inlineComponent1 and
there is no default value.
So... how do I center an extended checkbox? :)
Shan
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Anatole Tartakovsky Sent: Friday, July 14, 2006 7:04 PM To: [email protected] Subject: [Junk E-Mail - LOW] Re: [Junk E-Mail - MED] Re: [flexcoders] dataGrid drop-in itemRenderer/Editor
Jason,
Well, I looked at your sample and it got me confused - I am sure Flex will
be confused too. For one, on binding, you need to specify _expression_ that would
convert selected into 1|0 like selected?1:0.
Here is what I suggest to do to figure out the problem. Compile you app
with -keep-generated-actionscript=true. Take a look @ 3 (guessing) files
generated for your inline component. Read the code, see all the binding
happening there along with overhead related to extra container and think again.
Please review my posting again. Using class without container gives you
what you want - in simple transparent way
package com.theriabook.controls { import mx.controls.CheckBox; import mx.controls.dataGridClasses.DataGridListData;
public class CheckBox extends mx.controls.CheckBox { public var onValue:Object = 1; public var offValue:Object = 0; public function set value(o:Object) :void { selected = (o == onValue); } public function get value():Object { return selected?onValue:offValue; } override public function set data(item:Object):void { super.data = ""> if( item!=null ) value = item[DataGridListData(listData).dataField]; } } } and these attributes on the datagridcolumn
... itemRenderer="com.theriabook.controls.CheckBox" rendererIsEditor="true" editorDataField="value"> If you think you would not be able to reuse CheckBox class or would like in place definition in the same file please consider code above nevertheless and use className on component tag so the implementation is clean and it is easy to refactor when the code review / second generation of developers come Sincerely,
Anatole
On 7/14/06, Pan
Troglodytes <[EMAIL PROTECTED]>
wrote:
-- -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
YAHOO! GROUPS LINKS
-- |
- Re: [Junk E-Mail - MED] Re: [flexcoders] dataGrid drop... Anatole Tartakovsky
- RE: [Junk E-Mail - LOW] Re: [Junk E-Mail - MED] R... Shannon Hicks
- Re: [Junk E-Mail - LOW] Re: [Junk E-Mail - ME... Anatole Tartakovsky
- RE: [Junk E-Mail - LOW] Re: [Junk E-Mail ... Shannon Hicks
- Re: [Junk E-Mail - LOW] Re: [Junk E-M... Jeremy Lu
- Re: [flexcoders] dataGrid drop-i... Tim Hoff
- Re: [flexcoders] dataGrid dr... Anatole Tartakovsky

