Hello World with AppeX, VW7.10

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

Hello World with AppeX, VW7.10

Deyan Yanchev
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
Reply | Threaded
Open this post in threaded view
|

Re: Hello World with AppeX, VW7.10

Deyan Yanchev
Found the answer:

buildHtml() {
        var response = this.messageToServer("helloWorld", null, {async: false});
        var text = document.createTextNode(response.object);
        document.body.appendChild(text);

        return this;
}
Reply | Threaded
Open this post in threaded view
|

Re: Hello World with AppeX, VW7.10

askoh
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
Reply | Threaded
Open this post in threaded view
|

Re: Hello World with AppeX, VW7.10

Nowak, Helge
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
Reply | Threaded
Open this post in threaded view
|

Re: Hello World with AppeX, VW7.10

Thomas Sattler
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.
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
Reply | Threaded
Open this post in threaded view
|

Re: Hello World with AppeX, VW7.10

Kogan, Tamara
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
Reply | Threaded
Open this post in threaded view
|

Re: Hello World with AppeX, VW7.10

Kogan, Tamara

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
Sent: Monday, February 03, 2014 11:20 AM
To: [hidden email]
Subject: Re: [vwnc] Hello World with AppeX, VW7.10

 

Thank you Tamara! But isn't that duplicating my previous post?
http://forum.world.st/Hello-World-with-AppeX-VW7-10-td4740377.html


Thanks, Deyan

On Mon, Feb 3, 2014 at 4:21 AM, Kogan, Tamara [via Smalltalk]
<[hidden email]> wrote:


> 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
>
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://forum.world.st/Hello-World-with-AppeX-VW7-10-tp4740377p4741081.html
> To unsubscribe from Hello World with AppeX, VW7.10, click here.
> NAML

 


View this message in context: Re: Hello World with AppeX, VW7.10
Sent from the VisualWorks mailing list archive at Nabble.com.


_______________________________________________
vwnc mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/vwnc