Forums » General

How to inject into a VO property of a Class?

(10 posts)

Tags:

  1. My view has a property which I want to change using a VO from my manager. In my EventMap I want to set up a bunch of injectors like so ...

    <Injectors target="{VideoControlBar}" >
    <PropertyInjector targetKey="videoPlayhead" source="{appManager}" sourceKey="videoProgressVO.playhead" />
    </Injectors>

    Note the sourceKey. Now this aint going to work but how can I grab the property from the VO?

    Posted 1 year ago #
  2. Did you try that code and didn't work?

    Posted 1 year ago #
  3. it didn't work. Do you think it should have? Have you had success doing this?

    I've posted on this ... http://blog.lyraspace.com/2009/07/29/getting-your-head-around-the-mate-framework/

    Posted 1 year ago #
  4. @Nahuel - are you on this thread? I'd be interested to know if you think it should be possible to do this.

    Posted 12 months ago #
  5. tucsonjhall
    Member

    It's a bit difficult to know exactly what you're doing, but it looks like you're trying to update something on the basis of a video playback position. Is that component that you want to update not in the same view? I'll go read your other post now to see if it explains more.

    Posted 12 months ago #
  6. What you want should work make sure that your properties are Bindable.
    Here it is a simple example:
    http://paste-it.net/public/yc96605/

    Posted 12 months ago #
  7. Hey Nahuel .. thanks for your example. I will try this and get back to you.

    Coincidentally I'm trying to use your Rating component in my project at the moment but it doesn't seem to work in the latest Flex 4 sdk ... have you updated it to use Spark skins yet? I might be doing this with your classes but was wondering if you'd already had a go. You can get in touch off-forum about this if you wish.

    Posted 12 months ago #
  8. I didn't touched the Rating component from a long time. You are welcome to update the code to flex 4 that the good thing about open source :)

    Posted 11 months ago #
  9. danoso
    Member

    I think I've tried this before.. unfortunately I don't have my code right now.
    But I think what you should do there is try to set up a data binding chain, like this:

    sourceKey=[ "videoProgressVO", "playhead" ]

    Posted 11 months ago #
  10. Seth
    Member

    @leeprobert, @Nahuel - did the code example Nahuel provided work?

    I was trying to do the following:

    <DataCopier source="{ApplicationManager}" sourceKey="myVO.myProp" destination="data" destinationKey="myProp" />

    Which I think succeeds without error, but whenever I try to reference data.myProp later it's always null. I ultimately had to write a getter on my App manager that returned the value of myProp.

    Posted 11 months ago #

RSS feed for this topic

Reply

You must log in to post.