What's new in 0.8.6

We just released a new build (0.8.6b) with the following features:

DelegateInvoker: This was a contribution by Darron Schall (thank you Darron :)). He explains in detail how that works in his post

PropertySetter: This is a similar tag to the MethodInvoker but instead of calling a method in the generated object, it sets a property. The benefits are that your source can be anything, such as an ISmartObject, Class from the Cache, or just a regular value.

Example:
<PropertySetter generator="{ClassA}" targetKey="propertyOnClassA" source="{ClassB}" sourceKey="propertyOnClassB" sourceCache="inherit" />

AsyncCommandInvoker: This is a similar class to AsyncMethodInvoker but will always use the execute method instead of the one supplier in the Method argument.

ServiceInvokerBuilder: A base class that was added to suport DelegateInvoker. You don’t need to worry about this one unless that you are extending the framework.

Property: Have you ever wanted to set a property in an object, but didn’t want to use the Properties tag because you needed more control? Well here you have a Property tag. Just like the Properties tag, Property is an inner tag for all builder tags like MethodInvoker, ObjectBuilder, etc.

An example of a MethodInvoker with 2 inner tags, one that reads from the cache and the other that reads from the event:
<MethodInvoker generator="{ClassA}" method="someMethod" >
   <Property sourceCache="inherit" source="{MyClassB}" sourceKey="propertyOnClassB" targetKey="propertyOnClassA"/>
   <Property sourceCache="inherit" source="{event}" sourceKey="target" targetKey="myProp"/>
</MethodInvoker>

MockServices: We wrote a whole pdf about it so I don’t want to cover that here.
Now that the mock services have been released, the documentation in the pdf will be transferred to the website. The complete api docs for all mock services are coming soon.

3 responses so far

  1. Can you explain a bit more about the differences between PropertySetter and PropertyInjector?
  2. Thanks for the DelegateInvoker class. Unfortunately, I can't get it to work. See http://mate.asfusion.com/forums/topic.php?id=421 for a description of the problem. A working example would be nice to see.
  3. Hello guys, there's no much information on the forum about PropertySetter, just this (http://mate.asfusion.com/forums/topic.php?id=650). I'm testing this tag, debugging I realized that this tag doesn't set a property as it's supposed to be, what it does is call or create an instance of the Class, and calls the Constructor passing as parameters the information in the constructorArguments property, example:

    EventMap
    ***********
    <EventHandlers type="{OEProgressEvent.GET_WEEKLY_PROGRESS}"
       start="trace('Progress')" debug="true">
       <RemoteObjectInvoker debug="true"
          instance="{oeServices.progressService}"
          method="getAllWeeklyProgress">
          <resultHandlers>
             <PropertySetter
                targetKey="weeklyProgress"
                source="{resultObject}"
                generator="{ProgressManager}"
                constructorArguments="{resultObject}">
             </PropertySetter>
             <!--<MethodInvoker
                generator="{ProgressManager}"
                method="setWeeklyProgress"
                arguments="{resultObject}">
             </MethodInvoker>-->
          </resultHandlers>
       </RemoteObjectInvoker>
    </EventHandlers>

    ProgressManager Class
    ***************************

    The result of using PropertySetter tag

    gets here
    ***********
    private var val:*;

    public function ProgressManager(value:*):void{
             val=value;
    }

    instead of
    **********
    public function set weeklyProgress(value:ArrayCollection):void{
       this._weeklyProgress = value;
       dispatchEvent(new Event("weeklyProgressDataChange"));
       Alert.show("weekly progress set");
    }   


    Laura, any idea?

    Thank you.

Leave a Reply