Hi Greg,
I didn't even realize the old thread was on users@ so thanks for moving it
here.
I'm sure there are lots of improvements needed to make this work in the
general case so thanks for noticing and offering to help out. I wondered
for a bit whether there already was a "collect the properties" utility.
Maybe we should create one that takes into account all of the issues you
raised.
It was cool to see the reflection APIs work, so thanks for doing them.
BTW, you need the latest compiler to add the [RemoteClass] data to the app
so the ClassAliasBead can register those classes.
Thanks,
-Alex
On 9/1/17, 4:44 PM, "Greg Dove" wrote:
>Hi Alex,
>
>
>Nice to see this stuff progressing within the framework itself. I moved
>this comment to dev because of content below, and I will try to take a
>look
>at this, to see if I can also test things in the coming week.
>
>I quickly looked at some of the commits, perhaps I have missed something
>and you may have already addressed these somewhere in the code, but here
>are some quick comments just in case:
>I saw some parts where you were accessing the reflection data directly.
>
>Exclude static data items from variables and accessors
>for accessors and variables they can be static as well which need to be
>excluded
>to keep the data compact I made the output prepend a pipe char "|" to the
>items data fields that represent static members - the Refection API
>classes
>(TypeDefinition) support this currently.
>
>Avoid getter-only or setter-only accessors
>For accessors data, there is an 'access' field which should filter those
>only include accessors with access: 'readwrite' for serialization
>purposes.
>This field has the same values as the xml data in flash native reflection.
>
>Check Overrides
>Overrides may provide duplicated data items when collected through the
>inheritance chain.
>
>This is an area that I need to test more in the Reflection classes, and it
>may affect classification of accessors for serialization purposes.
>
>Overriden accessors may perhaps represent themselves differently at
>different levels iirc - I need to check this - I can't recall if I set it
>up so the access status is resolved from inheritance in the data or not.
>There may be a case where only a getter or setter is overridden is a
>subclass from a getter/setter pair in a base class and the reflection data
>may indicate it is writeonly or readonly (at the subclass level) when it
>is
>not because of the base class definition. There could be other unusual
>combinations here. (e.g. setter in base class and new getter added in
>subclass which together provide readWrite access in the subclass but not
>the base class). I am intending to write tests for these cases and address
>any issues for the reflection api.
>
>That's all I can think of for now, but as mentioned, I will try to check
>this out in the coming week.
>
>cheers
>Greg
>
>
>
>On Sat, Sep 2, 2017 at 6:38 AM, Alex Harui
>wrote:
>
>> Hi Folks,
>>
>> I just pushed changes that include a back port of amf.js to
>>ActionScript.
>> In doing so, the AMF code now uses the Reflection APIs that Greg Dove
>> contributed. The test still only passes a String to the server, but in
>> doing so, it has to wrap the String in an AsyncMessage subclass and I
>> think I have watched the AMF code correctly serialize and deserialize
>> those FlexJS classes to AMF and back.
>>
>> Next step is to try it with an actual ValueObject. Can someone help
>>with
>> what changes would need to be made to the service to handle a custom
>>Java
>> class instead of just a String?
>>
>> One other note: In doing the back port, I created an AMFBinaryData that
>> works like BinaryData, but doesn't subclass it. That's because it
>>appears
>> to me that APIs like writeUTF do differently things. Maybe we can
>>factor
>> out some common base class at some point. But I think you can now use
>> AMFBinaryData.writeObject/readObject to clone objects like we do with
>> ByteArray. AMFBinaryData is currently only for JS, but I think it could
>> easily have SWF code that writes to a ByteArray added to it.
>>
>> Thanks,
>> -Alex
>>
>> On 8/23/17, 10:32 AM, "Alex Harui" wrote:
>>
>> >Hi Prashant,
>> >
>> >The AMF work is in a separate branch so make sure you get the latest
>>code.
>> > Maybe Piotr or another volunteer will merge the branch into develop
>>so it
>> >appears in the nightly.
>> >
>> >-Alex
>> >
>> >On 8/23/17, 9:52 AM, "PKumar" wrote:
>> >
>> >>Sure, I will download the FlexJS nightly build and check it.
>> >>
>> >>On 23-Aug-2017 10:01 PM, "Alex Harui-2 [via Apache Flex Users]" <
>> >>ml+s246n1580...@n4.nabble.com> wrote:
>> >>
>> >>> Hi Prashant,
>> >>>
>> >>> If you could add to RemoteObjectAMFTest and SampleAmfWebApp to work
>> >>>with
>> >>> an actual ValueObject, that would be great!
>> >>>
>> >>> Thanks,
>> >>> -Alex
>> >>>
>> >>> On 8/23/17, 9:21 AM, "PKumar"