I put hljs.as class in a library, and in doing that hljs.as is
processed in GoogDepsWriter
and inject_html is pulled from that @externs class. This solve the problem
from that point.
So the real problem here is: If users has @externs classes in the
Application project, then they will get another
Hi Alex,
trying to make inject_html work for @externs classes.
I'm seeing that GoogDepsWriter are not processing hljs.as extern class in
my B012 example, that is located directly in top level package.
I output with println all getFileInfo() classes there and hljs is not part
of that set. Maybe
On 5/7/19, 1:37 AM, "Yishay Weiss" wrote:
I still have a feeling newcomers to Royale will be asking for readymade
TLCs and that it’s important to have them available. Whether or not they should
be an included in the SDK I’m not sure. Different topic I suppose.
Definitely,
@royale.apache.org
Subject: Re: Using @extrens ( RE: Example of access external JS using Apache
Royale)
Hi Yishay,
IMO, there are application developers (users) and component developers. Some
folks will be both. Component developers do pay for lots of things in Royale
in order to make reusable
Sent: Monday, May 6, 2019 9:02:18 AM
To: dev@royale.apache.org
Subject: Re: Using @extrens ( RE: Example of access external JS using
Apache Royale)
IMO, it is PAYG. There is no cost until you use it, since getBeadByType is
part of the IStrand implementation.
In a true impl
of access external JS using Apache
Royale)
IMO, it is PAYG. There is no cost until you use it, since getBeadByType is
part of the IStrand implementation.
In a true implementation, you would test for animateBead == null if you expect
that it can be null, since that would be handling the &quo
IMO, it is PAYG. There is no cost until you use it, since getBeadByType is
part of the IStrand implementation.
In a true implementation, you would test for animateBead == null if you expect
that it can be null, since that would be handling the "has not" case.
If your concern is performance,
Hi,
IMO, new "standardized" browser features will eventually show up in js.swc
because they'll show up in the Google Closure's externs. We can put those in
the js.swc's missing.js in the interim.
AIUI, 3rd-parties add other things to the prototypes that are not standardized.
If those are
Hi,
I agree in most of the points explained here, but want to expose a point
that maybe will change this particular case.
A Polyfill for me is a JS implementation of an API that will be part of all
browsers natively, and use to be already implemented by 1 or 2 browsers,
but not for all the most
>if you can get yourself away from trying to access features on concrete
>instances
(…)
>var animateBead:IAnimateBead = indicator_content.getBeadByType(IAnimateBead);
>animateBead.animate();
Is this PAYG? getBeadByType iterates through an array.
Also, animateBead may turn out to be null which
FWIW, the AVM (ActionScript Virtual Machine) has sealed classes (not modifiable
at runtime) on purpose: to secure your code from hacking. Polyfills are
dangerous. A good one helps, but the mere fact they work means that others can
inject capabilities into your classes at runtime.
Also,
I just searched the compiler code. Current inject_html handling appears to be
in GoogDepsWriter.java.
On 5/3/19, 2:04 PM, "Carlos Rovira" wrote:
Hi,
I now Greg is busy now with an important update
I can try to do it myself if Alex point me to the code I should look, for
This is something I also ran into while converting my projects.
I would be great if we had a class tag to allow generic properties and
methods as is the case with MovieClip in flash.
Currently, you can get around this by setting the -strict flag to false,
but you lose a lot of error checking from
Another more question I just found and don't know how to solve.
if I have a polyfill like Web Animations API that adds "animate" method to
any Element object.
Can someone post an example of an @extern file for a case like this? I
don't imagine right now how can this be done, and maybe right not
Hi,
I now Greg is busy now with an important update
I can try to do it myself if Alex point me to the code I should look, for
me it would be part of the task to make this blog example in the best way
possible.
thanks
El vie., 3 may. 2019 a las 22:58, Greg Dove ()
escribió:
> 'I'm pretty sure
'I'm pretty sure externs are not scanned for inject_html. Volunteers are
welcome to teach the compiler to do so.'
I am happy to look into this sometime in the next few days. Just trying to
finish up something else first...
On Sat, May 4, 2019 at 8:54 AM Alex Harui wrote:
> Hi Carlos,
>
> I'm
Hi Carlos,
I'm pretty sure externs are not scanned for inject_html. Volunteers are
welcome to teach the compiler to do so.
-Alex
On 5/3/19, 1:50 PM, "Carlos Rovira" wrote:
Hi,
while putting the pieces together for the blog example I'm finding the
following.
For
Hi,
while putting the pieces together for the blog example I'm finding the
following.
For classes that wraps a js code that is an intrinsic file needed to make
the code function I think inject_html should work but I'm trying it and
seems this is not working. The code is like this:
package
{
Hi Alex,
for me is difficult right now think about what would be better for
TypeScript. I think all will depend on how people interact in the following
months/years to show us what't the best for Royale in the long term.
I think bringing TS to Royale as a first citizen language will make us more
The word "package" has many meanings. In AS3 it is a way of avoiding API name
collisions. AIUI, an AS3 package in SWF code has no object or function
representation. It effectively just creates a longer "qualified name". IOW,
in a SWF, if there is a class "mx.core.UIComponent", there is no
Hi Dany,
I only see TS convenient to gain more audience making TS a first language
side to side with AS3, so people could code in TS his royale projects
and/or AS3/MXML. But adding TS to Royale will require someone to make it
happen, and the effort will be significative, so I don't expect this to
Yes, it's possible to create for Node.js typedefs in that style. For instance,
here are a couple of typedefs for Node.js modules that I needed in my asconfigc
tool (which builds vscode-as3mxml projects from the command line):
Thanks Alex and Josh,
that worked! :)
I'll be explaining that in blog example so people is aware they can't use
package in this case :)
thanks!
El jue., 2 may. 2019 a las 19:57, Josh Tynjala ()
escribió:
> Just for fun, here's another way that you could create a typedef for hljs
> so that the
Hi Josh,
Aren’t most of the packages just functions?
In ES6, you’d import packages as
Import { myFunct, myVar } from ‘my-package’
In older javascript you’d:
const myPackagePointer = require(‘my-package’)
So your ‘fun’ example sounds like heaven to me! This is exactly what we need.
About
Just for fun, here's another way that you could create a typedef for hljs so
that the highlightBlock() function is directly in a package (similar to
flash.net.navigateToURL), instead of as a static method on a class:
https://paste.apache.org/khVI
If you did it this way, you'd need to import it
Exactly right. When you create a typedef class, you're trying to simulate how
you would access the API as if you were writing in plain JavaScript. You call
hljs.highlightBlock() in JavaScript, so you need a class that works the same
way in ActionScript.
Another option for organization would be
Hi Carlos,
I don’t think hljs is in a package called "externs". In Josh's example, hljs
was in the top-level package. And that's because hljs is found at runtime off
of the global window object, not some sub-object called "externs". So, the
hljs.as file containing the externs has to go in
27 matches
Mail list logo