Re: [FALCONJX][FLEXJS] XML handling (was Re: [FlexJS] Back port)

2015-11-12 Thread Harbs
Cool! I’ll give it a go next week. On Nov 13, 2015, at 9:30 AM, Alex Harui wrote: > Interesting. I think I got simple support for this stuff up and running > in the compiler. Even simple filters. I’m sure there will be bugs, but > give it a try when you get a chance and let me know what you

Re: [FALCONJX][FLEXJS] XML handling (was Re: [FlexJS] Back port)

2015-11-12 Thread Alex Harui
Interesting. I think I got simple support for this stuff up and running in the compiler. Even simple filters. I’m sure there will be bugs, but give it a try when you get a chance and let me know what you find. I did decide to change XMLList.removeChild to XMLList.removeChildAt in order to bette

Re: [FALCONJX][FLEXJS] XML handling (was Re: [FlexJS] Back port)

2015-11-12 Thread Alex Harui
On 11/12/15, 1:58 PM, "Harbs" wrote: >I have a really busy weekend (my son’s bar mitzvah is this week), so it’s >likely that I’m not going to have anything to commit until sometime next >week. > >I’m glad we found something that looks like it should work. No worries about the schedule. I’ve g

Re: [FALCONJX][FLEXJS] XML handling (was Re: [FlexJS] Back port)

2015-11-12 Thread Harbs
That looks like about it. Putting off #6 is fine for now. 7) We’re also going to have to map any XML function call to the version with the prepend. I have a really busy weekend (my son’s bar mitzvah is this week), so it’s likely that I’m not going to have anything to commit until sometime next

Re: [FALCONJX][FLEXJS] XML handling (was Re: [FlexJS] Back port)

2015-11-12 Thread Alex Harui
OK, it’s a deal. I will look into some changes to the compiler. I think the changes are: 1) XML literals will call "new XML(literal_as_string)" and your code will parse the string 2) delete on XMLList will call _as3_removeChild() but delete on XML just does delete 3) all function calls on XML and

Re: [FALCONJX][FLEXJS] XML handling (was Re: [FlexJS] Back port)

2015-11-12 Thread Harbs
Prepending a decoration might work. I’d probably pick something like “_as3_” rather than “AS3” for the reason that it looks more like a prepend to the name and it makes the unlikely chance that someone has an element with the prepended namespace even more unlikely. defineProperty with one extra

Re: [FALCONJX][FLEXJS] XML handling (was Re: [FlexJS] Back port)

2015-11-12 Thread Alex Harui
On 11/12/15, 12:48 PM, "Harbs" wrote: >What I mean was that the dynamic object structure could be a property of >XML rather than being XML itself. > >So the API would be XML which would have all the necessary functions, but >it would keep a living structure as a separate dynamic object. > >If t

Re: [FALCONJX][FLEXJS] XML handling (was Re: [FlexJS] Back port)

2015-11-12 Thread Harbs
This was the approach that I started with, but I changed to mimicking the standard XML class in JS so existing XML code can be used without modification. I do think that approach has merit (especially because it allows us to improve on the current external API), and once I have the JS side of st

Re: [FALCONJX][FLEXJS] XML handling (was Re: [FlexJS] Back port)

2015-11-12 Thread OmPrakash Muppirala
I'm sorry if this approach was discussed and discarded, but here it is anyway: 1. Create a new XML class type in actionscript 2. Immediately convert it into an actionscript object using the mx.rpc.xml.XMLDecoder class 3. Provide the usual public apis to the XML class 4. Internally, do all the

Re: [FALCONJX][FLEXJS] XML handling (was Re: [FlexJS] Back port)

2015-11-12 Thread Harbs
What I mean was that the dynamic object structure could be a property of XML rather than being XML itself. So the API would be XML which would have all the necessary functions, but it would keep a living structure as a separate dynamic object. If the compiler could modify all delete operator ca

Re: [FALCONJX][FLEXJS] XML handling (was Re: [FlexJS] Back port)

2015-11-12 Thread Alex Harui
I only read this article quickly. I’m not sure what you mean by “proxies to XML.xmlObj”. My takeaway from the article is that the XML class you are writing will need to handle new XML(someString) by implementing one of the conversions. I didn’t know about JXON until you posted the link

Re: [FALCONJX][FLEXJS] XML handling (was Re: [FlexJS] Back port)

2015-11-12 Thread Harbs
BTW, there’s a good JXON doc on MDN here[1] Maybe there’s some way to have a dynamic object as a property of XML so all XML methods could get proxied to XML.xmlObj? [1]https://developer.mozilla.org/en-US/docs/JXON On Nov 12, 2015, at 10:02 PM, Harbs wrote: >> So, given all that, if your XML c

Re: [FALCONJX][FLEXJS] XML handling (was Re: [FlexJS] Back port)

2015-11-12 Thread Harbs
I did not think of your case of (obj is Array). Yeah. That could be a problem. Here’s some examples of how I’ve used XML in the past: 1. myXMLList[myXMLList.length()] = myNewXML. This adds the object to the XML list and inserts it into the underlying XML object. Under the hood this could be som

Re: [FlexJS] internal namespace

2015-11-12 Thread Michael Schmalle
> But to me, the advantages of abstracting implementations with Interfaces outweighs the effort to “fake” namespaces in the JS side. This is essentially a namespace anyway. The interface is the namespace, if you make the framework interface centric, then casting to the concrete type is the public

Re: [FlexJS] internal namespace

2015-11-12 Thread Harbs
OK. So I’ll just use public for now and put @private in the ASDocs. We’ll figure it all out later. On Nov 12, 2015, at 7:10 PM, Alex Harui wrote: > > > On 11/12/15, 8:52 AM, "Harbs" wrote: > >> Here’s where I am (and why I’m asking): >> >> I figured out how to use Document and Element as t

Re: [FALCONJX][FLEXJS] XML handling (was Re: [FlexJS] Back port)

2015-11-12 Thread Alex Harui
On 11/12/15, 9:28 AM, "Alex Harui" wrote: >I will spend some time looking into how the compiler sees XML Literals. XML Literals are parsed into a simple set of nodes that should be able to convert into a String passed into a "new XML" call

Re: [FALCONJX][FLEXJS] XML handling (was Re: [FlexJS] Back port)

2015-11-12 Thread Alex Harui
I will spend some time looking into how the compiler sees XML Literals. Regarding length(), delete, and extending Array: If you extend Array, I would worry that some code like: if (obj is Array) createArrayCollection(obj) else createXMLListCollection(obj) will not do what the developer woul

Re: [FlexJS] internal namespace

2015-11-12 Thread Alex Harui
On 11/12/15, 8:52 AM, "Harbs" wrote: >Here’s where I am (and why I’m asking): > >I figured out how to use Document and Element as the underlying structure >for JS XML. But to use them correctly, I need to manipulate the internal >structure of one XML object from another. > >One example: in Acti

Re: [FlexJS] internal namespace

2015-11-12 Thread Harbs
Here’s where I am (and why I’m asking): I figured out how to use Document and Element as the underlying structure for JS XML. But to use them correctly, I need to manipulate the internal structure of one XML object from another. One example: in ActionScript XML you can call appendChild to move

Re: [FlexJS] internal namespace

2015-11-12 Thread Alex Harui
On 11/12/15, 3:16 AM, "Harbs" wrote: >While working on XML, I have a situation where I’d like to use an >internal namespace for some functions (like mx_internal and tlf_internal >scattered around the classic Flex SDK). I do not see internal used in >FlexJS. Was this a conscious decision, or not

Re: FlexJS - unable to open spark.css with falcon compiler

2015-11-12 Thread Alex Harui
Resending so new subscribers can see it more easily. On 11/11/15, 9:14 AM, "Alex Harui" wrote: >And to use the Apache Flex SDK Installer, run the installer, right-click >and choose “Show Dev Builds” and the list of versions should now include >Apache FlexJS 0.5.0 RC1 > >Thanks, >-Alex > >On 11/1

Re: [FALCONJX][FLEXJS] XML handling (was Re: [FlexJS] Back port)

2015-11-12 Thread Harbs
Another question regarding FalconJX: How easy will it be to handle xml literals? The most straightforward way I can think of that would be to convert: var myXML:XML = ; into var myXML:XML = new XML("”); Right now I’m left with three open questions: 1. Will it be hard to convert XMLList.length()

[FlexJS] internal namespace

2015-11-12 Thread Harbs
While working on XML, I have a situation where I’d like to use an internal namespace for some functions (like mx_internal and tlf_internal scattered around the classic Flex SDK). I do not see internal used in FlexJS. Was this a conscious decision, or nothing came up where internal was desirable?

Re: [FALCONJX][FLEXJS] XML handling (was Re: [FlexJS] Back port)

2015-11-12 Thread Harbs
On Nov 12, 2015, at 6:58 AM, Alex Harui wrote: > > > On 11/11/15, 4:11 PM, "Harbs" wrote: > >> A little update on my progress: >> >> XMLList turned out to be easy with the exception of length(). Most of the >> functionality is being offloaded to XML. > > I don’t remember what happens to th