PharoJS - converting to Javascript error

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

PharoJS - converting to Javascript error

Smaran
Hello. I am trying to convert my Pharo (4.0) classes to Javascript.

I wrote a Pharo PBE-LightsOut application as book PBE.
Initially converted LOCell and LoGame classes.
Loaded these classes in a browser from an index.html and accused lack of SimpleSwitchMorph, SimpleButtonMorph and BorderedMorph.

Command to convert:
JbSmalltalkToJavaScriptExporter exportClasses: {BorderedMorph } packages: #() inNewFileNamed: 'BorderedMorph.js'

Converting BorderedMorph this error occurs:
MessageNotUndestood: WorldMorph >> javaScriptName

The other classes were converted to JavaScript without problems.

Appreciate any help.

thank you
Reply | Threaded
Open this post in threaded view
|

Re: PharoJS - converting to Javascript error

Noury Bouraqadi-2

> On 14 Dec 2015, at 17:43, Smaran Rneu <[hidden email]> wrote:
>
> Hello. I am trying to convert my Pharo (4.0) classes to Javascript.
>
> I wrote a Pharo PBE-LightsOut application as book PBE.
> Initially converted LOCell and LoGame classes.
> Loaded these classes in a browser from an index.html and accused lack of SimpleSwitchMorph, SimpleButtonMorph and BorderedMorph.
>
> Command to convert:
> JbSmalltalkToJavaScriptExporter exportClasses: {BorderedMorph } packages: #() inNewFileNamed: 'BorderedMorph.js'
>
> Converting BorderedMorph this error occurs:
> MessageNotUndestood: WorldMorph >> javaScriptName
>
Ok. This is a bug I wasn't aware of. Thanks for reporting it.
I'll have a look.

But, even if we fix it, don't expect morphs to work on JS.
PharoJS doesn't support graphic primitives... at least not in the near future :-)

Noury



Reply | Threaded
Open this post in threaded view
|

Re: PharoJS - converting to Javascript error

Stephan Eggermont-3
On 14/12/15 23:09, Noury Bouraqadi wrote:
> But, even if we fix it, don't expect morphs to work on JS.
> PharoJS doesn't support graphic primitives... at least not in the near future :-)

Connect to lively kernel?

Stephan



Reply | Threaded
Open this post in threaded view
|

Re: PharoJS - converting to Javascript error

Noury Bouraqadi-2

> On 14 Dec 2015, at 23:22, Stephan Eggermont <[hidden email]> wrote:
>
> On 14/12/15 23:09, Noury Bouraqadi wrote:
>> But, even if we fix it, don't expect morphs to work on JS.
>> PharoJS doesn't support graphic primitives... at least not in the near future :-)
>
> Connect to lively kernel?
>
PharoJS allows connecting to third-party JS code and of course all HTML5 DOM objects and handle them from pharo.
I'd rather bet on a solution that follows this route. But, it's way too early to decide anything.
We'll see once we'll be there.

Noury