Hello
What do you think about implementing a method, which walks through all script nodes, looks if they have the language attribute set to text/smalltalk-amber (or whatever) and if so, compile and execute that? An example: <html> <head> <script language="text/smalltalk-amber"> | name | name := window prompt: 'What is your name?' suggestedInput: 'Guest'. window alert: 'Hello' , String space , name. </script> </head> <body> Greetrings from Amber. </body> </html> Something like that was diskussed on the Pharo-List some time ago… |
Yeah, that would be cool!
Cheers, Nico On Fri, 2011-12-09 at 14:54 +0100, Amber Milan Eskridge wrote: > Hello > > What do you think about implementing a method, which walks through all > script nodes, looks if they have the language attribute set to > text/smalltalk-amber (or whatever) and if so, compile and execute > that? > > An example: > > <html> > <head> > <script language="text/smalltalk-amber"> > | name | > name := window prompt: 'What is your name?' suggestedInput: 'Guest'. > window alert: 'Hello' , String space , name. > </script> > </head> > <body> > Greetrings from Amber. > </body> > </html> > > Something like that was diskussed on the Pharo-List some time ago… |
Wow - that is a super cool idea. I love it!
JohnnyT On Dec 9, 2011, at 7:05 AM, Nicolas Petton wrote: > Yeah, that would be cool! > > Cheers, > Nico > > On Fri, 2011-12-09 at 14:54 +0100, Amber Milan Eskridge wrote: >> Hello >> >> What do you think about implementing a method, which walks through all >> script nodes, looks if they have the language attribute set to >> text/smalltalk-amber (or whatever) and if so, compile and execute >> that? >> >> An example: >> >> <html> >> <head> >> <script language="text/smalltalk-amber"> >> | name | >> name := window prompt: 'What is your name?' suggestedInput: 'Guest'. >> window alert: 'Hello' , String space , name. >> </script> >> </head> >> <body> >> Greetrings from Amber. >> </body> >> </html> >> >> Something like that was diskussed on the Pharo-List some time ago… > > |
I took a few minutes to experiment with:
<script type='text/smalltalk-amber'> Hello. </script> Typing (jQuery value: 'script[type*=''smalltalk'']') in the workspace gives the corresponding tag. Using the #doIt code from Workspace, compiling and executing the coresponding source-texts should not really be a problem, I guess. On Fri, Dec 9, 2011 at 6:41 PM, JohnnyT <[hidden email]> wrote: > Wow - that is a super cool idea. I love it! > > JohnnyT > > On Dec 9, 2011, at 7:05 AM, Nicolas Petton wrote: > >> Yeah, that would be cool! >> >> Cheers, >> Nico >> >> On Fri, 2011-12-09 at 14:54 +0100, Amber Milan Eskridge wrote: >>> Hello >>> >>> What do you think about implementing a method, which walks through all >>> script nodes, looks if they have the language attribute set to >>> text/smalltalk-amber (or whatever) and if so, compile and execute >>> that? >>> >>> An example: >>> >>> <html> >>> <head> >>> <script language="text/smalltalk-amber"> >>> | name | >>> name := window prompt: 'What is your name?' suggestedInput: 'Guest'. >>> window alert: 'Hello' , String space , name. >>> </script> >>> </head> >>> <body> >>> Greetrings from Amber. >>> </body> >>> </html> >>> >>> Something like that was diskussed on the Pharo-List some time ago… >> >> > |
That's awesome.
On Dec 9, 2011, at 11:13 AM, Amber Milan Eskridge wrote: I took a few minutes to experiment with: |
Free forum by Nabble | Edit this page |