Comments (7)
I hav already been in the need for this, that is why i created de.karfau.signals.PropertyRelaySignal
This works (none of my tests are failing) with the latest version of robert penners as3-signals.
U don't need any other class from the project if u have sources or swc frm ropertpenner/as3-signals.
hope it help, feedback welcome, karfau
from as3-signals.
Hey Karfau I have also made my own class to handle this, which is the more generic case than your PropertyRelaySignal.
But i think it should be part of the actual signals project. The basic difference between the PropertyRelaySignal and the NativeMappedSignal is that former specifically deals with the properties of an Event, while the latter will forward anything you give it, either an object or the result of a function.
from as3-signals.
yes, it is somehow more generic, but the same effect can be achived with PropertyRelaySignal. If u look at the code/docs it can also have a function (to be more precise a function is needed if any value should be dispatched) that returns (one ore multiple) values typed like valueclasses. The only "big" difference I see is that this function can not be attached in the constructor.
This could be changed, as could the package.
I would be glad if we find a a soloution to the problem that can be used by both of us (and other people), wich might be more likely to be included by robert. As I think the use for such Signal is there an it would be cool to have a "default implementation". I also think, otherwise this discussion might repeat. :)
Maybe this and possible implementation details could be discussed with more participants @ googlegroups.
from as3-signals.
Ah yes I see the setPropertyFilterFunction now. You've put more effort into your classes then I have into mine :) Yep I'm good with a possible merge of the concepts, my classes is there for reference. Would you like to start the dicussion on googlegroups?
from as3-signals.
yeah, i could do it, but i will not have time for a good initial post before the weekend.
So its either somebody else starting the thread, or waiting for more responses until weekend. ;)
from as3-signals.
karfau and Preacher,
Thanks for the discussion. The fact that both of you came up with solutions validates your use case. If you two could work out a solution that you both like, with unit tests and AsDocs, I'd be favorable to adding it to the core (not an absolute promise, but 90%). =)
Robert
from as3-signals.
The code for this has been merged into the master. The class can be found at:
org.osflash.signals.natives.NativeMappedSignal
from as3-signals.
Related Issues (20)
- Cannot add listener Functions with varargs HOT 3
- Listeners with rest-parameter should not cause ArgumentError HOT 3
- SignalBindingList executes listeners in reverse order HOT 2
- Ambiguity in priority dispatching HOT 10
- use of swfplayer10 event types HOT 8
- Sending params with NativeSignal fails. HOT 2
- ISignal in as3-signals-v0.8.swc without ISignal.dispatch() HOT 1
- Manual "bubbling" (redispatching) — arguments error HOT 3
- Events bus HOT 1
- Bug in SlotList#insertWithPriority HOT 3
- priority signal bug HOT 3
- Bubbling from non-displayobject classes HOT 1
- Starling and NativeSignal ( IEventDispatcher )
- Is a bug? Why use a single equal sign for while operation? HOT 7
- NativeMappedSignal mapTo Function with return Class HOT 2
- Vector.<ISignal> over Array? HOT 3
- TypeError: Error #1034: Can't change the org.osflash.signals::SlotList@9d633e1 to org.osflash.signals.SlotList
- cinemanow player
- TypeError: Error #1006: value is not a function HOT 2
- Official v0.9 release? or even v1.0? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from as3-signals.