[Seaside] Re: [ANN] PDF of Dynamic Web Development with Seaside

Tony Giaccone tony at giaccone.org
Tue Feb 2 04:17:13 UTC 2010


John,

Thanks for your assistance. I really appreciate the quick response. 


One thing I really hate. Is struggling with understanding a new framework. Reaching a blockage point, fighting with it for a few days. Then asking for help, only to find the answer myself, shortly after posting  a message that say "Hey I can't figure out how to do this".  I hate that.

My problem of course is that I'm not reading the book sequentially from start to finish. That would make too much sense, be to logical and take too long (that should all be read with a note of irony). Instead I'm jumping around reading a bit here and a bit there.. So I jumped to chapter 24. Where I read about Magritte and found my quote:

This is clearly the place to hook a database commit for example.


I went back scanned through the book again and found the whole section 12.6.2 Behavioral Decorations. Shortly there after I  had my code using SandstoneDB and saving records to the filesystem. 



On Jan 31, 2010, at 7:17 PM, John McKeon wrote:

> Hello Tony,
> 
> 
> 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?
> 

page 364, second paragraph from the end. 


> If I'm not mistaken, you need to add an onAnswer: block to the editor := line of code:
>    editor := person asComponent
>      addValidatedForm;
>      onAnswer: [ :p | "do something with p" ];  
>      yourself.
> 

I actually do it on two different lines:

 editor := (person asComponent addValidatedForm). 

 editor onAnswer: [ :answer | answer isNil ifFalse: [answer doSave]].


I call my own save method here, rather then call the Sandstone save method so I can do any thing else that might be required before I save to the db. 


> 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 method.
>  
> 
> Yes, it clearly is.. what's not clear is how the heck you do it. LOL
> 
> 
> Tony
> 
> 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
> frustrating.
> 
> Look at the bright side: You aren't in Java anymore =)

Oh, where that only true. My full time day job is still java development. I'm just sneaking in a quick attempt to try and do a prototype proof of concept with smalltalk/seaside, with out anyone being the wiser and on my own time.  Yes, I have to say I'm enjoying this a great deal more than Java dev.


Tony



> 
> Regards
>  
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20100201/81adecd8/attachment.htm


More information about the seaside mailing list