PharoJS - converting to Javascript error
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
On 14 Dec 2015, at 17:43, Smaran Rneu <rneu2011@gmail.com> 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
On 14 Dec 2015, at 23:22, Stephan Eggermont <stephan@stack.nl> 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
participants (3)
-
Noury Bouraqadi -
Smaran Rneu -
Stephan Eggermont