[Seaside] Re: [ANN] PDF of Dynamic Web Development with Seaside
p3anoman at gmail.com
Mon Feb 1 00:17:34 UTC 2010
On Sun, Jan 31, 2010 at 4:52 PM, Tony Giaccone <tgiaccone at gmail.com> wrote:
> Well I purchased a copy. And now I've reached a point where I'm very
> Great progress, but now reached a limit and I feel like I'm not
> understanding the basic ways the framework should be used.
> Here's my dilemma. Imagine a page with an editor and a browser. The
> browser lists the entries of a particular type. The editor allows you
> to create a new entry or edit one which exists already.
> The page as a whole is initialized like this:
> super initialize.
> person := Person new initialize.
> editor := (person asComponent addValidatedForm).
> browser := PersonBrowser new initialize.
> The renderContentOn method looks like this:
> html text: 'Hello'; break.
> html div class: 'personInfo'; with: [
> editor isNil ifFalse: [html render: editor].
> browser isNil ifFalse: [html render: browser].
> What I can't figure out how to do is to connect into the method that
> gets called when the user presses save on the editor. At that point I
> want to persist the person, and do some other things. I see this
> lovely line from the book:
> This is clearly the place to hook a database commit for example.
Could you point us to where in the book you find this lovely line?
If I'm not mistaken, you need to add an onAnswer: block to the editor :=
line of code:
editor := person asComponent
onAnswer: [ :p | "do something with p" ];
To explore further put a self halt in the block to see when it gets called.
Also, I don't think you need to send initialize after you send new.
And be sure person and browser are returned in an array in the children
> Yes, it clearly is.. what's not clear is how the heck you do it. LOL
> PS I have this feeling, coming from a Java background that I'm totally
> am not doing things in the tao of smalltalk. It's extremely
Look at the bright side: You aren't in Java anymore =)
> On Sun, Jan 31, 2010 at 1:29 PM, Squeaker <squeakman at gmail.com> wrote:
> > Lukas Renggli wrote:
> >> The PDF version of the book "Dynamic Web Development with Seaside" is
> >> available for download now:
> >> http://book.seaside.st/book/introduction/pdf-book
> > Any chance of getting some stats on how well it is selling. It would be
> > nice to gauge community support.
> > BTW - I purchased the pdf book.
> > _______________________________________________
> > seaside mailing list
> > seaside at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> seaside mailing list
> seaside at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside