Re: [Pharo-users] PharoJS
Hi Noury, Thanks for the link to the documentation. I have managed to get up and running now - very cool! One question. When I execute 1+1 on the Pharo (pink) playground, I see the code appearing in the web browser log, but it doesn't appear to execute. Is it supposed to, or at this stage is it just showing that it made it over to the web browser? Cheers Andy
On 15 Jul 2015, at 15:37, Andy Burnett <andy.burnett@knowinnovation.com> wrote:
One question. When I execute 1+1 on the Pharo (pink) playground, I see the code appearing in the web browser log, but it doesn't appear to execute. Is it supposed to, or at this stage is it just showing that it made it over to the web browser?
It does actually execute on the browser, but 1+1 has no side effect :-). You can try to call native javascript object to see stuff changing. For example, you can evaluate the following> console native_log: 'Hello from Smalltalk'. "Displays the string in the console of the browser" window native_alert: 'This is cool'. "Opens an alert window on the browser" Note: You need to load version 51 (just pushed it to SmalltalkHub) that fixes a bug in the PharoJS workspace. Noury
Is PharoJS related to / based on http://www.squeaksource.com/@45sUWABDUdZM7Og0/Uycfg_AQ ST2JS - Traductor de Smalltalk a JavaScript http://diegogomezdeck.blogspot.com/2006/07/st2js-traductor-de-smalltalk.html Las caracterÃsticas de JavaScript mencionadas anteriormente, usadas con picardÃa, permiten hacer un traductor de Smalltalk a JavaScript que respete toda la semántica del Smalltalk. ? --Hannes On 7/16/15, Noury Bouraqadi <bouraqadi@gmail.com> wrote:
On 15 Jul 2015, at 15:37, Andy Burnett <andy.burnett@knowinnovation.com> wrote:
One question. When I execute 1+1 on the Pharo (pink) playground, I see the code appearing in the web browser log, but it doesn't appear to execute. Is it supposed to, or at this stage is it just showing that it made it over to the web browser?
It does actually execute on the browser, but 1+1 has no side effect :-).
You can try to call native javascript object to see stuff changing. For example, you can evaluate the following>
console native_log: 'Hello from Smalltalk'. "Displays the string in the console of the browser" window native_alert: 'This is cool'. "Opens an alert window on the browser"
Note: You need to load version 51 (just pushed it to SmalltalkHub) that fixes a bug in the PharoJS workspace.
Noury
The only connection is that they share the same goal of converting Smalltalk code to JavaScript. Noury
On 07 Aug 2015, at 21:02, H. Hirzel <hannes.hirzel@gmail.com> wrote:
Is PharoJS related to / based on
http://www.squeaksource.com/@45sUWABDUdZM7Og0/Uycfg_AQ
ST2JS - Traductor de Smalltalk a JavaScript http://diegogomezdeck.blogspot.com/2006/07/st2js-traductor-de-smalltalk.html Las caracterÃsticas de JavaScript mencionadas anteriormente, usadas con picardÃa, permiten hacer un traductor de Smalltalk a JavaScript que respete toda la semántica del Smalltalk. ?
--Hannes
On 7/16/15, Noury Bouraqadi <bouraqadi@gmail.com> wrote:
On 15 Jul 2015, at 15:37, Andy Burnett <andy.burnett@knowinnovation.com> wrote:
One question. When I execute 1+1 on the Pharo (pink) playground, I see the code appearing in the web browser log, but it doesn't appear to execute. Is it supposed to, or at this stage is it just showing that it made it over to the web browser?
It does actually execute on the browser, but 1+1 has no side effect :-).
You can try to call native javascript object to see stuff changing. For example, you can evaluate the following>
console native_log: 'Hello from Smalltalk'. "Displays the string in the console of the browser" window native_alert: 'This is cool'. "Opens an alert window on the browser"
Note: You need to load version 51 (just pushed it to SmalltalkHub) that fixes a bug in the PharoJS workspace.
Noury
participants (3)
-
Andy Burnett -
H. Hirzel -
Noury Bouraqadi