problem to understand the render: method from book.seaside.st

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

problem to understand the render: method from book.seaside.st

Vincent Dautremont
Hi,
I'm new here, am following the book (http://book.seaside.st)
and have a question about rendering components and getting the answer back from them.

- In section 11.5 (http://book.seaside.st/book/components/calling/answer)
the "answer:" method after a "call:" method is clear for me.

The result of (self call: view) is the object return by the answer: method.


- In section 11.9 (http://book.seaside.st/book/components/calling/show-answer) I've also understood that the same goes with the unblocking method "show:" that create inline html code of the component.

- What I don't understand is how to get the answer back if I call my component with the render: method.
In section 12.2 (http://book.seaside.st/book/components/embedding/example)
the component is now embeded using the render: method and the note and the end of the page refer to section 11.5 to get the answer back from the cancel/save  button.
I don't understand that because (html render: editor) doesn't answer true nor false when I press the save or cancel button.

Thank you for the help.

Vincent.
with Squeak Seaside 2.8.4 image



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: problem to understand the render: method from book.seaside.st

Philippe Marschall
2010/1/19 Vincent Dautremont <[hidden email]>:
> Hi,
> I'm new here, am following the book (http://book.seaside.st)
> and have a question about rendering components and getting the answer back from them.
>
> - In section 11.5 (http://book.seaside.st/book/components/calling/answer)
> the "answer:" method after a "call:" method is clear for me.
>
> The result of (self call: view) is the object return by the answer: method.

Correct.

> - In section 11.9 (http://book.seaside.st/book/components/calling/show-answer) I've also understood that the same goes with the unblocking method "show:" that create inline html code of the component.

Partly correct. You shouldn't use #show: or #call: for that matter
during rendering, only in callbacks.

> - What I don't understand is how to get the answer back if I call my component with the render: method.
> In section 12.2 (http://book.seaside.st/book/components/embedding/example)
> the component is now embeded using the render: method and the note and the end of the page refer to section 11.5 to get the answer back from the cancel/save  button.
> I don't understand that because (html render: editor) doesn't answer true nor false when I press the save or cancel button.

Render doesn't answer anything because the result of rendering is
markup to display. Only when the user actually does something,
something can be answered. What you probably want is a task and #call:
the component.

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: problem to understand the render: method from book.seaside.st

John McKeon
In reply to this post by Vincent Dautremont
Hello Vincent,


On Tue, Jan 19, 2010 at 8:18 AM, Vincent Dautremont <[hidden email]> wrote:
Hi,
I'm new here, am following the book (http://book.seaside.st)
and have a question about rendering components and getting the answer back from them.

- In section 11.5 (http://book.seaside.st/book/components/calling/answer)
the "answer:" method after a "call:" method is clear for me.

The result of (self call: view) is the object return by the answer: method.


- In section 11.9 (http://book.seaside.st/book/components/calling/show-answer) I've also understood that the same goes with the unblocking method "show:" that create inline html code of the component.

- What I don't understand is how to get the answer back if I call my component with the render: method.
In section 12.2 (http://book.seaside.st/book/components/embedding/example)
the component is now embeded using the render: method and the note and the end of the page refer to section 11.5 to get the answer back from the cancel/save  button.
I don't understand that because (html render: editor) doesn't answer true nor false when I press the save or cancel button.


Section 12.4 shows hw to accomplish this by assigning a block of code to execute using onAnswer:

John

 
Thank you for the help.

Vincent.
with Squeak Seaside 2.8.4 image



_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



--
http://jmck.seasidehosting.st

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside