BTW I need to brush up on canvas but I see;

So I assume the HTMLCanvasElement.getContext() passes a
CanvasRenderingContext2D correct?

I can't wait to get out of this compiler stuff and actually try to test
some of this stuff in the browser. :)

Mike


public class CanvasRenderingContext2D {
...
    /**
     * @see html5
     */
    native public var canvas:HTMLCanvasElement;
...
}



public class HTMLCanvasElement extends HTMLElement {

    native public function HTMLCanvasElement();

    /**
     * @see html5
     */
    native public var height:Number;

    /**
     * @see html5
     */
    native public var width:Number;

    /**
     * @see html5
     */
    native public function toDataURL(opt_type:String = null,
...var_args):String;

    /**
     * @see html5
     */
    native public function getContext(contextId:String, opt_args:Object =
null):Object;

}



On Fri, Jun 5, 2015 at 5:50 AM, Michael Schmalle <teotigraphix...@gmail.com>
wrote:

>
>
> On Fri, Jun 5, 2015 at 12:39 AM, OmPrakash Muppirala <bigosma...@gmail.com
> > wrote:
>
>> Fantastic work,  Mike!
>>
>> I dont see any SVG elements, is that part of something other spec?
>>
>
> Haven't got that far yet, was busy getting inheritance and edge cases
> fixed with the base DOM stuff.
>
> I have looked through the closure/externs and it doesn't look like they
> have an SVG.js. If you now, you will need to find one or write it. :)
>
>
>>
>> On that line,  how would one get Canvas, Webgl, etc.?
>>
>
>
> I think Canavs is HTMLCanvasNode which is in the html5.js externs.
>
> WebGL,
> https://github.com/google/closure-compiler/blob/master/externs/webgl.js
>
> Yeah that is today, I will post up when I get them in.
>
> Mike
>
>
>
>>
>> Thanks,
>> Om
>> On Jun 4, 2015 5:31 PM, "Josh Tynjala" <joshtynj...@gmail.com> wrote:
>>
>> > Agreed! Great stuff, Mike.
>> >
>> > - Josh
>> >
>> > On Thu, Jun 4, 2015 at 2:07 PM, Alex Harui <aha...@adobe.com> wrote:
>> >
>> > > Amazing!
>> > >
>> > > On 6/4/15, 2:04 PM, "Michael Schmalle" <teotigraphix...@gmail.com>
>> > wrote:
>> > >
>> > > >Well so far I have got the below compiling into .as classes and
>> > interfaces
>> > > >using the following externals files;
>> > > >
>> > > >There is a definite order these need to be parsed in, I am still
>> > figuring
>> > > >them out. I plan on adding in the asdocs, the version of JS the API
>> was
>> > > >introduced in.
>> > > >
>> > > >Mike
>> > > >
>> > > >html5.js
>> > > >missing.js
>> > > >w3c_css.js
>> > > >w3c_css3d.js
>> > > >w3c_dom1.js
>> > > >w3c_dom2.js
>> > > >w3c_dom3.js
>> > > >w3c_event.js
>> > > >w3c_range.js
>> > > >
>> > > >
>> > > >Attr.as
>> > > >CanvasGradient.as
>> > > >CanvasPattern.as
>> > > >CanvasRenderingContext2D.as
>> > > >CaretPosition.as
>> > > >CDATASection.as
>> > > >CharacterData.as
>> > > >ClientInformation.as
>> > > >ClientRect.as
>> > > >ClientRectList.as
>> > > >Comment.as
>> > > >Counter.as
>> > > >CSSCharsetRule.as
>> > > >CSSFontFaceRule.as
>> > > >CSSImportRule.as
>> > > >CSSInterface.as
>> > > >CSSMatrix.as
>> > > >CSSMediaRule.as
>> > > >CSSPageRule.as
>> > > >CSSPrimitiveValue.as
>> > > >CSSProperties.as
>> > > >CSSRule.as
>> > > >CSSRuleList.as
>> > > >CSSStyleDeclaration.as
>> > > >CSSStyleRule.as
>> > > >CSSStyleSheet.as
>> > > >CSSUnknownRule.as
>> > > >CSSValue.as
>> > > >CSSValueList.as
>> > > >CustomEvent.as
>> > > >Database.as
>> > > >DatabaseCallback.as
>> > > >DataTransfer.as
>> > > >DedicatedWorkerGlobalScope.as
>> > > >Document.as
>> > > >DocumentCSS.as
>> > > >DocumentEvent.as
>> > > >DocumentFragment.as
>> > > >DocumentRange.as
>> > > >DocumentStyle.as
>> > > >DocumentType.as
>> > > >DOMApplicationCache.as
>> > > >DOMConfiguration.as
>> > > >DOMError.as
>> > > >DOMErrorHandler.as
>> > > >DOMException.as
>> > > >DOMImplementation.as
>> > > >DOMImplementationCSS.as
>> > > >DOMImplementationList.as
>> > > >DOMImplementationSource.as
>> > > >DOMLocator.as
>> > > >DOMStringList.as
>> > > >DOMTokenList.as
>> > > >DragEvent.as
>> > > >Element.as
>> > > >ElementCSSInlineStyle.as
>> > > >Entity.as
>> > > >EntityReference.as
>> > > >ErrorEvent.as
>> > > >Event.as
>> > > >EventListener.as
>> > > >EventTarget.as
>> > > >ExceptionCode.as
>> > > >FileList.as
>> > > >FontFace.as
>> > > >FontFaceSet.as
>> > > >HashChangeEvent.as
>> > > >HTMLAnchorElement.as
>> > > >HTMLAppletElement.as
>> > > >HTMLAreaElement.as
>> > > >HTMLAudioElement.as
>> > > >HTMLBaseElement.as
>> > > >HTMLBaseFontElement.as
>> > > >HTMLBodyElement.as
>> > > >HTMLBRElement.as
>> > > >HTMLButtonElement.as
>> > > >HTMLCanvasElement.as
>> > > >HTMLCollection.as
>> > > >HTMLContentElement.as
>> > > >HTMLDetailsElement.as
>> > > >HTMLDialogElement.as
>> > > >HTMLDirectoryElement.as
>> > > >HTMLDivElement.as
>> > > >HTMLDListElement.as
>> > > >HTMLDocument.as
>> > > >HTMLElement.as
>> > > >HTMLEmbedElement.as
>> > > >HTMLFieldSetElement.as
>> > > >HTMLFontElement.as
>> > > >HTMLFormElement.as
>> > > >HTMLFrameElement.as
>> > > >HTMLFrameSetElement.as
>> > > >HTMLHeadElement.as
>> > > >HTMLHeadingElement.as
>> > > >HTMLHRElement.as
>> > > >HTMLHtmlElement.as
>> > > >HTMLIFrameElement.as
>> > > >HTMLImageElement.as
>> > > >HTMLInputElement.as
>> > > >HTMLIsIndexElement.as
>> > > >HTMLLabelElement.as
>> > > >HTMLLegendElement.as
>> > > >HTMLLIElement.as
>> > > >HTMLLinkElement.as
>> > > >HTMLMapElement.as
>> > > >HTMLMediaElement.as
>> > > >HTMLMenuElement.as
>> > > >HTMLMenuItemElement.as
>> > > >HTMLMetaElement.as
>> > > >HTMLModElement.as
>> > > >HTMLObjectElement.as
>> > > >HTMLOListElement.as
>> > > >HTMLOptGroupElement.as
>> > > >HTMLOptionElement.as
>> > > >HTMLOptionsCollection.as
>> > > >HTMLParagraphElement.as
>> > > >HTMLParamElement.as
>> > > >HTMLPictureElement.as
>> > > >HTMLPreElement.as
>> > > >HTMLQuoteElement.as
>> > > >HTMLScriptElement.as
>> > > >HTMLSelectElement.as
>> > > >HTMLShadowElement.as
>> > > >HTMLSourceElement.as
>> > > >HTMLStyleElement.as
>> > > >HTMLTableCaptionElement.as
>> > > >HTMLTableCellElement.as
>> > > >HTMLTableColElement.as
>> > > >HTMLTableElement.as
>> > > >HTMLTableRowElement.as
>> > > >HTMLTableSectionElement.as
>> > > >HTMLTemplateElement.as
>> > > >HTMLTextAreaElement.as
>> > > >HTMLTitleElement.as
>> > > >HTMLUListElement.as
>> > > >HTMLVideoElement.as
>> > > >Image.as
>> > > >ImageData.as
>> > > >KeyboardEvent.as
>> > > >LinkStyle.as
>> > > >MediaError.as
>> > > >MediaList.as
>> > > >MediaQueryList.as
>> > > >MediaQueryListListener.as
>> > > >MessageChannel.as
>> > > >MessageEvent.as
>> > > >MessagePort.as
>> > > >MouseEvent.as
>> > > >MSCSSMatrix.as
>> > > >MutationEvent.as
>> > > >MutationObserver.as
>> > > >MutationRecord.as
>> > > >NamedNodeMap.as
>> > > >NameList.as
>> > > >Node.as
>> > > >NodeFilter.as
>> > > >NodeIterator.as
>> > > >NodeList.as
>> > > >Notation.as
>> > > >openDatabase.as
>> > > >PageTransitionEvent.as
>> > > >PopStateEvent.as
>> > > >postMessage.as
>> > > >ProcessingInstruction.as
>> > > >ProgressEvent.as
>> > > >Range.as
>> > > >RangeException.as
>> > > >Rect.as
>> > > >RelatedEvent.as
>> > > >RGBColor.as
>> > > >Screen.as
>> > > >ShadowRoot.as
>> > > >SharedWorker.as
>> > > >SharedWorkerGlobalScope.as
>> > > >SQLError.as
>> > > >SQLResultSet.as
>> > > >SQLResultSetRowList.as
>> > > >SQLTransaction.as
>> > > >StyleSheet.as
>> > > >StyleSheetList.as
>> > > >Text.as
>> > > >TextMetrics.as
>> > > >TextTrack.as
>> > > >TextTrackCue.as
>> > > >TextTrackCueList.as
>> > > >TextTrackList.as
>> > > >TimeRanges.as
>> > > >TreeWalker.as
>> > > >TypeInfo.as
>> > > >UIEvent.as
>> > > >UserDataHandler.as
>> > > >ValidityState.as
>> > > >ViewCSS.as
>> > > >VTTCue.as
>> > > >WebKitCSSMatrix.as
>> > > >WebSocket.as
>> > > >WebWorker.as
>> > > >Window.as
>> > > >Worker.as
>> > > >WorkerGlobalScope.as
>> > > >WorkerLocation.as
>> > > >XMLHttpRequestEventTarget.as
>> > > >XMLHttpRequestUpload.as
>> > > >
>> > > >
>> > > >
>> > > >On Thu, Jun 4, 2015 at 3:13 PM, Michael Schmalle
>> > > ><teotigraphix...@gmail.com>
>> > > >wrote:
>> > > >
>> > > >> Yeah sorry to confuse you, the Velocity stuff doesn't matter, for
>> that
>> > > >> matter my asdoc framework I wrote doesn't(it was just showing I had
>> > all
>> > > >> this working in the context of Falcon), we just need the
>> > ASDocTokenizer
>> > > >>to
>> > > >> tokenize the comment data given to the ASDocDelegate.
>> > > >>
>> > > >> Mike
>> > > >>
>> > > >> On Thu, Jun 4, 2015 at 3:12 PM, Michael Schmalle <
>> > > >> teotigraphix...@gmail.com> wrote:
>> > > >>
>> > > >>> The way I did it was, I did exactly what you did, implemented the
>> > > >>> ASDocDelegate and saved the tokes as it parsed all the files.
>> > > >>>
>> > > >>> Then I used the token String like you in the ASDocTokenizer to
>> parse
>> > > >>>the
>> > > >>> loop I showed you above.
>> > > >>>
>> > > >>> I would add the DocTag and stuff if you can get the ASDocTokenizer
>> > > >>> working like how I have it in the code above. I already wrote an
>> API
>> > > >>>for
>> > > >>> easy access to the tags and comment in an ASDocCOmment class that
>> > has a
>> > > >>> list of DocTags.
>> > > >>>
>> > > >>> Mike
>> > > >>>
>> > > >>> On Thu, Jun 4, 2015 at 3:09 PM, Alex Harui <aha...@adobe.com>
>> wrote:
>> > > >>>
>> > > >>>> For this exercise though, we don’t care about the output as
>> Velocity
>> > > >>>>or
>> > > >>>> XSL right?  All you want is ASDocTokens in the AST?  IIRC, in
>> Falcon
>> > > >>>>you
>> > > >>>> retrieve ASDoc comments via node.getASDocComment() and get an
>> > > >>>> ASDocComment
>> > > >>>> instance.  Do you want the Token to be the root of a mini-tree of
>> > > >>>>parsed
>> > > >>>> nodes?
>> > > >>>>
>> > > >>>> -Alex
>> > > >>>>
>> > > >>>>
>> > > >>>> On 6/4/15, 11:47 AM, "Michael Schmalle" <
>> teotigraphix...@gmail.com>
>> > > >>>> wrote:
>> > > >>>>
>> > > >>>> >I actually wrote a WHOLE NEW asdoc program that uses Apache
>> > Velocity
>> > > >>>> >templates instead of XSL.
>> > > >>>> >
>> > > >>>> >That DocTag is my class.
>> > > >>>> >
>> > > >>>> >Mike
>> > > >>>> >
>> > > >>>> >On Thu, Jun 4, 2015 at 2:45 PM, Alex Harui <aha...@adobe.com>
>> > wrote:
>> > > >>>> >
>> > > >>>> >> I don’t see any signs of ASDoc support in flex-falcon.  I see
>> > > >>>> >> ASDocTokenizer and ASDocToken, but no ASDOC.java that would be
>> > > >>>> >>equivalent
>> > > >>>> >> to MXMLC.java and have a main() method.  The current Flex SDK
>> has
>> > > >>>>an
>> > > >>>> >> ASDoc.jar.  Shouldn’t we have these pieces? Do you have them
>> > around
>> > > >>>> >> somewhere?   Otherwise I will try to quickly create them.
>> > > >>>> >>
>> > > >>>> >> -Alex
>> > > >>>> >>
>> > > >>>> >> On 6/4/15, 11:36 AM, "Michael Schmalle" <
>> > teotigraphix...@gmail.com
>> > > >
>> > > >>>> >>wrote:
>> > > >>>> >>
>> > > >>>> >> >BTW, the loop always happens at the VERY end of the comment,
>> so
>> > > >>>>when
>> > > >>>> >>you
>> > > >>>> >> >get to the end the(the last call of next() that should return
>> > > >>>>null);
>> > > >>>> >> >
>> > > >>>> >> >tok = tokenizer.next();
>> > > >>>> >> >
>> > > >>>> >> >never returns, it gets stuck trying to exit.
>> > > >>>> >> >
>> > > >>>> >> >Mike
>> > > >>>> >> >
>> > > >>>> >> >On Thu, Jun 4, 2015 at 2:34 PM, Michael Schmalle
>> > > >>>> >> ><teotigraphix...@gmail.com>
>> > > >>>> >> >wrote:
>> > > >>>> >> >
>> > > >>>> >> >> I posted about this a couple weeks ago and I tried
>> recompiling
>> > > >>>>with
>> > > >>>> >> >>JFlex
>> > > >>>> >> >> 1.5 I think, the older version and still had the problem.
>> > > >>>> >> >>
>> > > >>>> >> >> Maybe I messed up something but I tried with my same asdoc
>> > code
>> > > >>>> when
>> > > >>>> >>I
>> > > >>>> >> >> fixed the build for the FlexJS asdocs. I wanted to see it
>> work
>> > > >>>>with
>> > > >>>> >>my
>> > > >>>> >> >> version of a documentor.
>> > > >>>> >> >>
>> > > >>>> >> >> I think IIRC, I actually tried a simple test case and it
>> would
>> > > >>>> work.
>> > > >>>> >> >>
>> > > >>>> >> >> I have code that uses the tokenizer;
>> > > >>>> >> >>
>> > > >>>> >> >>
>> > > >>>> >> >>     public void compile()
>> > > >>>> >> >>     {
>> > > >>>> >> >>         if (token == null)
>> > > >>>> >> >>             return;
>> > > >>>> >> >>
>> > > >>>> >> >>         String data = token.getText();
>> > > >>>> >> >>         ASDocTokenizer tokenizer = new
>> ASDocTokenizer(false);
>> > > >>>> >> >>         tokenizer.setReader(new StringReader(data));
>> > > >>>> >> >>         ASDocToken tok = tokenizer.next();
>> > > >>>> >> >>         boolean foundDescription = false;
>> > > >>>> >> >>         DocTag pendingTag = null;
>> > > >>>> >> >>
>> > > >>>> >> >>         try
>> > > >>>> >> >>         {
>> > > >>>> >> >>             while (tok != null)
>> > > >>>> >> >>             {
>> > > >>>> >> >>                 if (!foundDescription
>> > > >>>> >> >>                         && tok.getType() ==
>> > > >>>> >> >>ASTokenTypes.TOKEN_ASDOC_TEXT)
>> > > >>>> >> >>                 {
>> > > >>>> >> >>                     description = tok.getText();
>> > > >>>> >> >>                 }
>> > > >>>> >> >>                 else
>> > > >>>> >> >>                 {
>> > > >>>> >> >>                     // do tags
>> > > >>>> >> >>                     if (tok.getType() ==
>> > > >>>> >>ASTokenTypes.TOKEN_ASDOC_TAG)
>> > > >>>> >> >>                     {
>> > > >>>> >> >>                         if (pendingTag != null)
>> > > >>>> >> >>                         {
>> > > >>>> >> >>                             addTag(pendingTag);
>> > > >>>> >> >>                             pendingTag = null;
>> > > >>>> >> >>                         }
>> > > >>>> >> >>                         pendingTag = new
>> > > >>>> >> >> DocTag(tok.getText().substring(1));
>> > > >>>> >> >>                     }
>> > > >>>> >> >>                     else if (tok.getType() ==
>> > > >>>> >> >> ASTokenTypes.TOKEN_ASDOC_TEXT)
>> > > >>>> >> >>                     {
>> > > >>>> >> >>
>> > > >>>>pendingTag.setDescription(tok.getText());
>> > > >>>> >> >>                         addTag(pendingTag);
>> > > >>>> >> >>                         pendingTag = null;
>> > > >>>> >> >>                     }
>> > > >>>> >> >>                 }
>> > > >>>> >> >>
>> > > >>>> >> >>                 foundDescription = true;
>> > > >>>> >> >>
>> > > >>>> >> >>                 tok = tokenizer.next();
>> > > >>>> >> >>             }
>> > > >>>> >> >>         }
>> > > >>>> >> >>         catch (Exception e)
>> > > >>>> >> >>         {
>> > > >>>> >> >>             e.printStackTrace();
>> > > >>>> >> >>         }
>> > > >>>> >> >>     }
>> > > >>>> >> >>
>> > > >>>> >> >> Mike
>> > > >>>> >> >>
>> > > >>>> >> >>
>> > > >>>> >> >> On Thu, Jun 4, 2015 at 2:30 PM, Alex Harui <
>> aha...@adobe.com>
>> > > >>>> wrote:
>> > > >>>> >> >>
>> > > >>>> >> >>>
>> > > >>>> >> >>>
>> > > >>>> >> >>> On 6/4/15, 11:23 AM, "Michael Schmalle" <
>> > > >>>> teotigraphix...@gmail.com>
>> > > >>>> >> >>> wrote:
>> > > >>>> >> >>> >>Hmm.  Maybe I should spend some time looking into fixing
>> > > >>>> >> >>>ASDocTokenizer?
>> > > >>>> >> >>> >> Was the problem that it didn’t work on every AS file we
>> > > >>>>current
>> > > >>>> >> >>>have?
>> > > >>>> >> >>> >>
>> > > >>>> >> >>> >
>> > > >>>> >> >>> >
>> > > >>>> >> >>> >It doesn't work on anything, there is an infinite loop in
>> > the
>> > > >>>> >>scanner
>> > > >>>> >> >>> that
>> > > >>>> >> >>> >is created by JFlex, the RawASDocTokenizer is broken.
>> > > >>>> >> >>> >
>> > > >>>> >> >>> >What is weird is I was using the SAME code base when I
>> wrote
>> > > >>>>the
>> > > >>>> >>asdoc
>> > > >>>> >> >>> >documenter I have 2 years ago and it worked fine.
>> > > >>>> >> >>>
>> > > >>>> >> >>> We upgraded the version of JFlex, IIRC.  I’ll take a look.
>> > > >>>>What
>> > > >>>> >>setup
>> > > >>>> >> >>>did
>> > > >>>> >> >>> you have for trying it?  Did you run it on the Flex SDK or
>> > > >>>>FlexJS
>> > > >>>> >>SDK
>> > > >>>> >> >>>or
>> > > >>>> >> >>> did it even loop on a simple test case?
>> > > >>>> >> >>>
>> > > >>>> >> >>> -Alex
>> > > >>>> >> >>>
>> > > >>>> >> >>>
>> > > >>>> >> >>
>> > > >>>> >>
>> > > >>>> >>
>> > > >>>>
>> > > >>>>
>> > > >>>
>> > > >>
>> > >
>> > >
>> >
>>
>
>

Reply via email to