Giter VIP home page Giter VIP logo

Comments (26)

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
A two in one report.

1. Flex apparently looks at the declared type of the bindable reference for 
binding information. In your case IMap (second check box) does not provide any 
bindable properties and is therefore ignored. If you switch your initializer to 
"preinitialize", the check boxes are selected properly. But this is not what 
you want, is it?

2. You are right, the Fx collections do not have binding tags at all. You may 
catch change events with pure ActionScript approach (addEventListener). I will 
consider your feature request in the next bigger update.

Original comment by [email protected] on 16 Mar 2011 at 5:46

from as3-commons.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024

Original comment by [email protected] on 16 Mar 2011 at 5:53

  • Changed state: Accepted
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

from as3-commons.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024

Original comment by [email protected] on 16 Mar 2011 at 5:54

from as3-commons.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
Thanks for your reply. Yes, i just want to use the inner binding mechanism to 
get the view updated. I think add the Bindable metadata tag in IMap is a good 
idea no matter the instance is Map or MapFx. When I bind to IMap and 
instantiate a MapFx, I just think the data binding should work because I do not 
instantiate a Map.

Original comment by [email protected] on 17 Mar 2011 at 9:19

from as3-commons.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
[deleted comment]

from as3-commons.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
A work-around for the problem is to create a sub-interface of IMap which is 
annotated with [Bindable], like:

    [Bindable]
    public interface IMapBindable extends IMap{


    }

In addition you need a subclass of Map that dispatches a PropertyChangeEvent 
whenever the map changes.

As long as you declare the variable of type IMapBindable the bindings will work.

Original comment by [email protected] on 25 May 2011 at 4:32

from as3-commons.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
https://github.com/AS3Commons/as3commons-collections/wiki/Roadmap-1.4

Original comment by [email protected] on 26 May 2011 at 8:11

from as3-commons.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
Hey Guys are you able to fork the project on GitHub, perform changes and submit 
a pull request?

Original comment by [email protected] on 26 May 2011 at 8:21

from as3-commons.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
Finished.
https://github.com/hydra1983/as3commons-collections
I just implemented everything including in my patch.

Original comment by [email protected] on 27 May 2011 at 3:19

from as3-commons.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
Where's the bindable-tag? 
https://github.com/hydra1983/as3commons-collections/blob/master/src/org/as3commo
ns/collections/framework/IMap.as

Original comment by [email protected] on 27 May 2011 at 7:42

from as3-commons.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
Here :-)

https://github.com/hydra1983/as3commons-collections/blob/master/src/org/as3commo
ns/collections/framework/IMapFx.as

Original comment by [email protected] on 27 May 2011 at 7:45

from as3-commons.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
You need on IMap as well, there's no sense in IMapFx being Bindable and IMap 
not. Also, the bindable-tag is to be placed on everything which value's might 
change due to the collectionChange-event.

You need to place it on itemFor as well.

Original comment by [email protected] on 27 May 2011 at 7:51

from as3-commons.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
Each of the collections comes in two versions: A plain and a bindable. The 
reason is simply performance. The majority of use cases utilize non-bindable 
versions.

Original comment by [email protected] on 27 May 2011 at 7:59

from as3-commons.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
Ah, that's fine. I still want the bindable-tag on itemFor though.

Original comment by [email protected] on 27 May 2011 at 9:23

from as3-commons.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
[deleted comment]

from as3-commons.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
..since I want to do this:

<mx:Label text="{myMap.itemFor('foo')}"/>

And myMap is populated by some asynchronous call.

Original comment by [email protected] on 27 May 2011 at 10:37

from as3-commons.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
latest solutions:
#remove IMapFx and IDuplicatesFx

#set [Bindable("collectionChanged")] for IMap and MapFx methods:
* function hasKey(key : *) : Boolean;
* function itemFor(key : *) : *;
* function keysToArray() : Array;

#set [Bindable("collectionChanged")] for IDuplicates and MapFx methods:
function count(item : *) : uint;

Original comment by [email protected] on 27 May 2011 at 12:46

from as3-commons.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
I think Jens want the IMap-interface free of bindable-tags for performance. 
Looks like you guys got this under control, looking forward to the next release.

Original comment by [email protected] on 27 May 2011 at 1:07

from as3-commons.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
Is there actually any performance hit if no one is binding to those methods?  
Certainly the implementation that supports binding will be less performant as 
it is dispatching events on changes, but I don't see how Binding tag on IMap 
interface actually is affected.

Original comment by [email protected] on 27 May 2011 at 1:51

from as3-commons.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
If no one is binding to the methods, they don't need to be bindable in the 
first place.

If you're going to support data binding, Flex goes through all methods 
annotated with Bindable when the event is dispatched and look for clients.

See this article on data binding issues: 
http://www.screenshot.at/blog/2009/04/18/databinding-under-the-hood-part-1-perfo
rmance/

And google "dive into data binding waters" for another presentation on the 
implementation on data bindings.

Original comment by [email protected] on 27 May 2011 at 2:12

from as3-commons.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
@hydra do you mind to check the updated versions using this performance check 
tool?

http://code.google.com/p/sibirjak/source/browse/trunk/#trunk%2Fasperform%2Fcom%2
Fsibirjak%2Fasperform

It should be not more effort than just replace the as3commons collections 
version.

Original comment by [email protected] on 27 May 2011 at 2:29

from as3-commons.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
So, it's better to create a separate IMapxFx interface to support data binding 
and keep the unbindable IMap? 

By the way, I looked into 
com.sibirjak.asperform.collectiontests.CollectionTests, shoud I run all the 
tests? 

How can I know there is no performance problem with the updated version?

Original comment by [email protected] on 28 May 2011 at 7:57

from as3-commons.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
this is the performance test results. I run it with flash builder with sdk 3.5 
and have -debug set to false.

Original comment by [email protected] on 28 May 2011 at 8:02

Attachments:

from as3-commons.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024
the results are from the execution of "AS3CommonsTests"

Original comment by [email protected] on 28 May 2011 at 8:04

from as3-commons.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024

Original comment by [email protected] on 12 Sep 2011 at 6:14

  • Added labels: SubProject-ui

from as3-commons.

GoogleCodeExporter avatar GoogleCodeExporter commented on July 20, 2024

Original comment by [email protected] on 12 Sep 2011 at 6:14

  • Added labels: SubProject-collections
  • Removed labels: SubProject-ui

from as3-commons.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.