Hello,
If I use the following code in my AppeX client class it works fine: buildHtml() { var text = document.createTextNode("Hello World!"); document.body.appendChild(text); return this; } I would like to do the same but "Hello World!" message to be returned by Smalltalk method. My AppeX server class has the method to do this: helloWorld <plainText: 'helloWorld'> ^'Hello World!' Now, on the client side I'm modifying the buildHtml method to: buildHtml() { var response = this.messageToServer("helloWorld"); var text = document.createTextNode(response); document.body.appendChild(text); return this; } This is not working - it returns [object Object] in my browser. How to process this [object Object] to get the "Hello World!" string? What should I change in my buildHtml() ? Thanks, Deyan |
Found the answer:
buildHtml() { var response = this.messageToServer("helloWorld", null, {async: false}); var text = document.createTextNode(response.object); document.body.appendChild(text); return this; } |
Administrator
|
In reply to this post by Deyan Yanchev
I have been a long time user of VisualWorks, but I have not heard of AppeX. What is it in VisualWorks?
Thanks, Aik-Siong Koh |
Our new web application framework: http://www.cincomsmalltalk.com/main/2013/07/cincom-smalltalk-foundation-series-appex/
-----Ursprüngliche Nachricht----- Von: [hidden email] [mailto:[hidden email]] Im Auftrag von askoh Gesendet: Freitag, 31. Januar 2014 15:31 An: [hidden email] Betreff: Re: [vwnc] Hello World with AppeX, VW7.10 I have been a long time user of VisualWorks, but I have not heard of AppeX. What is it in VisualWorks? Thanks, Aik-Siong Koh -- View this message in context: http://forum.world.st/Hello-World-with-AppeX-VW7-10-tp4740377p4740654.html Sent from the VisualWorks mailing list archive at Nabble.com. _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by askoh
Uh ... why don't you just click on the link? On Fri, Jan 31, 2014 at 9:30 AM, askoh <[hidden email]> wrote: I have been a long time user of VisualWorks, but I have not heard of AppeX. _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
In reply to this post by Deyan Yanchev
Try the following:
buildHtml() { var response = this.messageToServer("helloWorld", null, {async: false}); var text = document.createTextNode(response.data); document.body.appendChild(text); return this; } Tamara Kogan Smalltalk Development Cincom Systems -----Original Message----- From: [hidden email] [mailto:[hidden email]] On Behalf Of Deyan Yanchev Sent: Thursday, January 30, 2014 10:21 AM To: [hidden email] Subject: [vwnc] Hello World with AppeX, VW7.10 Hello, If I use the following code in my AppeX client class it works fine: buildHtml() { var text = document.createTextNode("Hello World!"); document.body.appendChild(text); return this; } I would like to do the same but "Hello World!" message to be returned by Smalltalk method. My AppeX server class has the method to do this: helloWorld <plainText: 'helloWorld'> ^'Hello World!' Now, on the client side I'm modifying the buildHtml method to: buildHtml() { var response = this.messageToServer("helloWorld"); var text = document.createTextNode(response); document.body.appendChild(text); return this; } This is not working - it returns [object Object] in my browser. How to process this [object Object] to get the "Hello World!" string? What should I change in my buildHtml() ? Thanks, Deyan -- View this message in context: http://forum.world.st/Hello-World-with-AppeX-VW7-10-tp4740377.html Sent from the VisualWorks mailing list archive at Nabble.com. _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
You are correct. My reply duplicates your previous post. I guess there is some mess in email order. Tamara Kogan Smalltalk Development Cincom Systems From: [hidden email] [mailto:[hidden email]]
On Behalf Of Deyan Yanchev Thank you Tamara! But isn't that duplicating my previous post?
View this message in context:
Re: Hello World with AppeX, VW7.10 _______________________________________________ vwnc mailing list [hidden email] http://lists.cs.uiuc.edu/mailman/listinfo/vwnc |
Free forum by Nabble | Edit this page |