RE: [flexcoders] BindingUtils.bindProperty versus mx:Binding

2007-01-20 Thread Alex Uhlmann
Closer to your mx:Binding tag is:
 
BindingUtils.bindProperty( userVO, Name, this, [ nameTextInput,
text ] );
 
but keep in mind that binding of mx.binding.utils using ChangeWatcher
and BindingUtils work differently from the mx.binding package (MXML
compiler binding). The latter supports much more use cases, i.e. binding
to expressions, XML, having functions and Array elements in property
chains, etc. BindingUtils i.e. only supports property chains. 
 
I'd question why you would want to replace all our MXML bindings when
it's working like a charm for you? ;) Aren't MXML bindings (curly
braces, function bindings, mx:Binding/Observe) easier to write and
maintain?
 
Best,
Alex
 

 Alex Uhlmann 
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, 
South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951
[EMAIL PROTECTED]
http://weblogs.macromedia.com/auhlmann

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Anderson
Sent: 20 January 2007 05:14
To: flexcoders@yahoogroups.com
Subject: [flexcoders] BindingUtils.bindProperty versus mx:Binding



Hello All,

I am not having much luck, using the bindProperty method of creating
bindings.

At the moment, I am using the mx:Binding method, and it's working like
a charm.

But, I am trying to get away from this, so I can put all my binding
logic into my ActionScript Code. I was under the impression, that
BindingUtils.bindProperty was the ActionScript direct replacement for
the mx:Binding tag.

A quick example of my usage:

BindingUtils.bindProperty( nameTextInput, text, userVO, Name );

Which replaces:

mx:Binding source=nameTextInput.text destination=userVO.Name/

I've tried executing the AS code, in the CreationComplete and the
Initialize Functions of my Control, without any success. I just don't
get any data binding taking place - unless, I am still executing this
code too early, and need to listen for another event. Still, I thought
CreationComplete or Initialize only fired off, when pretty much
everything on the Control was 100% instantiated.

Am I properly using the AS Bindings, or is there something else I am
missing?

Thanks in advance for your help,

Mike


 


att1c92c.gif
Description: att1c92c.gif


Re: [flexcoders] BindingUtils.bindProperty versus mx:Binding

2007-01-20 Thread Xavi Beumala

On 1/20/07, Alex Uhlmann [EMAIL PROTECTED] wrote:




I'd question why you would want to replace all our MXML bindings when it's
working like a charm for you? ;) Aren't MXML bindings (curly braces,
function bindings, mx:Binding/Observe) easier to write and maintain?




AFAIK Not aplicable to curly braces, but yes to mx:Binding/. mx:Binding
has some memory issues not freeing the memory when the container instance is
removed from stage (even from memory). The binding never gets removed.

http://tech.groups.yahoo.com/group/flexcoders/message/55432

Best
X.


RE: [flexcoders] BindingUtils.bindProperty versus mx:Binding

2007-01-20 Thread Mike Anderson
So with that said, is it safe to say that using the bindProperty method
in AS, DOES release the memory it uses whenever the control gets
destroyed?
 
If this is in fact the case, that would be another huge deciding factor
for me - since my Flex App is a HUGE Master/Detail type application, in
which PopUp Windows are used extensively to display the extended
information to the user.  It's in these PopUp Windows, where I have to
create all these bindings, so that the ValueObjects which reside in the
Model, get properly updated when the user changes the information.
 
This is an interesting subject, and I hope it gets discussed further :)
 
Thanks everybody so far, for all your help and insights.
 
Mike



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Xavi Beumala
Sent: Saturday, January 20, 2007 1:29 PM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] BindingUtils.bindProperty versus mx:Binding



On 1/20/07, Alex Uhlmann [EMAIL PROTECTED] wrote: 


 
I'd question why you would want to replace all our MXML bindings
when it's working like a charm for you? ;) Aren't MXML bindings (curly
braces, function bindings, mx:Binding/Observe) easier to write and
maintain?



AFAIK Not aplicable to curly braces, but yes to mx:Binding/.
mx:Binding has some memory issues not freeing the memory when the
container instance is removed from stage (even from memory). The binding
never gets removed.

http://tech.groups.yahoo.com/group/flexcoders/message/55432

Best
X. 

 


RE: [flexcoders] BindingUtils.bindProperty versus mx:Binding

2007-01-20 Thread Mike Anderson
Thanks Alex, I will give that a try, and see if that fixes my binding
problems...
 
And to answer your question, Libby hit it on the head - I am trying to
separate my Code from my Views as much as possible.  In fact, all of my
Controls use the Code Behind method of programming - and it's really
made a cleaner environment for me, since my ActionScript code can get
VERY lengthy.
 
Thanks again -
 
Mike



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Alex Uhlmann
Sent: Saturday, January 20, 2007 8:20 AM
To: flexcoders@yahoogroups.com
Subject: RE: [flexcoders] BindingUtils.bindProperty versus mx:Binding


Closer to your mx:Binding tag is:
 
BindingUtils.bindProperty( userVO, Name, this, [ nameTextInput,
text ] );
 
but keep in mind that binding of mx.binding.utils using ChangeWatcher
and BindingUtils work differently from the mx.binding package (MXML
compiler binding). The latter supports much more use cases, i.e. binding
to expressions, XML, having functions and Array elements in property
chains, etc. BindingUtils i.e. only supports property chains. 
 
I'd question why you would want to replace all our MXML bindings when
it's working like a charm for you? ;) Aren't MXML bindings (curly
braces, function bindings, mx:Binding/Observe) easier to write and
maintain?
 
Best,
Alex
 

 Alex Uhlmann 
Consultant (Rich Internet Applications)
Adobe Consulting
Westpoint, 4 Redheughs Rigg, 
South Gyle, Edinburgh, EH12 9DQ, UK
p: +44 (0) 131 338 6969
m: +44 (0) 7917 428 951
[EMAIL PROTECTED]
http://weblogs.macromedia.com/auhlmann

 



From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Mike Anderson
Sent: 20 January 2007 05:14
To: flexcoders@yahoogroups.com
Subject: [flexcoders] BindingUtils.bindProperty versus mx:Binding



Hello All,

I am not having much luck, using the bindProperty method of creating
bindings.

At the moment, I am using the mx:Binding method, and it's working like
a charm.

But, I am trying to get away from this, so I can put all my binding
logic into my ActionScript Code. I was under the impression, that
BindingUtils.bindProperty was the ActionScript direct replacement for
the mx:Binding tag.

A quick example of my usage:

BindingUtils.bindProperty( nameTextInput, text, userVO, Name );

Which replaces:

mx:Binding source=nameTextInput.text destination=userVO.Name/

I've tried executing the AS code, in the CreationComplete and the
Initialize Functions of my Control, without any success. I just don't
get any data binding taking place - unless, I am still executing this
code too early, and need to listen for another event. Still, I thought
CreationComplete or Initialize only fired off, when pretty much
everything on the Control was 100% instantiated.

Am I properly using the AS Bindings, or is there something else I am
missing?

Thanks in advance for your help,

Mike


 


att1c92c.gif
Description: att1c92c.gif


[flexcoders] BindingUtils.bindProperty versus mx:Binding

2007-01-19 Thread Mike Anderson
Hello All,

I am not having much luck, using the bindProperty method of creating
bindings.

At the moment, I am using the mx:Binding method, and it's working like
a charm.

But, I am trying to get away from this, so I can put all my binding
logic into my ActionScript Code.  I was under the impression, that
BindingUtils.bindProperty was the ActionScript direct replacement for
the mx:Binding tag.

A quick example of my usage:

   BindingUtils.bindProperty( nameTextInput, text, userVO, Name );

Which replaces:

   mx:Binding source=nameTextInput.text destination=userVO.Name/

I've tried executing the AS code, in the CreationComplete and the
Initialize Functions of my Control, without any success.  I just don't
get any data binding taking place - unless, I am still executing this
code too early, and need to listen for another event.  Still, I thought
CreationComplete or Initialize only fired off, when pretty much
everything on the Control was 100% instantiated.

Am I properly using the AS Bindings, or is there something else I am
missing?

Thanks in advance for your help,

Mike