Well in this particular example you know
that cellRenderer doesn’t need to use a binding _expression_, it can be
done as a string and we know that CellRenderers are usually classes so we do a
lookup?
But assuming the issue still needs to be
solved bindings tend to get assigned right before the initialize event of the
component fires. I don’t remember if the document._bindings will
even be instantiated by the time createChildren is called on the document,
though it might be. It could happen while the app itself is going through
its initialize phase and the bindings will be assigned later. So
unfortunately the answer is no, no great way of reliably determining what
properties will be assigned into you before you are constructed.
The getUIComponentWatcherForDestination is
to make the validation errors work correctly, it isn’t going to provide
what you need.
Matt
Just to add more
perspective to this.
I basically want to have the ability to provide an array of some sort, that
will turn off binding for a given property and simply add it to a containers
properties.
At present if you did cellRenderer="{ whatever }", that
argument wouldn't show up in obj.properties list, unless its a simple string
value. It instead gets placed in document._bindings. What i'm trying to do is
remove this out of bindings (that or find some way to get information on all
known attributes provided within MXML and their values at createChildren())
So far, the only way i can see this being done is to look in two parts,
obj.properties and look in obj.document._bindings or
obj.document._bindingsByDestination[dest]...
Catch22, is if i do this, i have to *know* all potential properties being
passed into a custom MXML components (maybe a simmiliar mergeProperties array maybe?
Anyway, anyone within MM or in this list had much experience with MXML tags and
how to intercept various routines before construct commences, i'd greatly
appreciate it.
On 10/24/05, Scott Barnes <[EMAIL PROTECTED]> wrote:
Heyas,
I've been wanting to basically access a property on a MXML tag thats not
"string", ie cellRenderer="{ com.mossyblog.myRenderer }"
before "createComponent" is executed. In that, i want to firstly
determine what the renderer is and based on this, delegate that instantion
elsewhere.
Now, on first pass i noticed that the moment you place "{}" within an
argument, BindingManager basically takes that and treats it as a
"binding". How does one ask the BindingManager for that reference at
say "createChildren"?
Is it a matter of:
mx.managers.BindingManager.getUIComponentWatcherForDestination(this, this.id )
--
Regards,
Scott Barnes
http://www.mossyblog.com
--
Regards,
Scott Barnes
http://www.mossyblog.com
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
YAHOO! GROUPS LINKS