[Seaside] Re: Comet and #call:
tamackinnon at gmail.com
Fri Aug 6 13:28:22 UTC 2010
I've been following this thread with some interest - as I've kind of been doing
something similar (although I didn't realise that I was).
Julian - I don't really understand your example - I had written something
different and I'm wondering why it seems so different.
html render: self holderView.
onClick: (html jQuery ajax script: [ :s | self releaseToken ]);
with: 'Honk It' ].
self tokenModel releaseToken.
jsScript << ((jsScript jQuery id: 'noise') each: (JSStream this call: 'play'))
, (self waitersView ajaxReplace: jsScript jQuery) , (self holderView
ajaxReplace: jsScript jQuery) ]
Then I have components that implement #ajaxReplace
^(jQuery id: myId) replaceWith: [:r | r render: self].
(Note: myId is an instance variable where I cache an "html nextId" as I figured
the components should know their own id's. Haven't quite got that bit clean yet
- I was trying to make it order independent, but I haven't always got the html
object where I need it? I'm wondering if these components should just keep their
This seems much different from what Julian did:
contentType: WAMimeType textHtml;
nextPutAll: (aComponent rendererClass builder render: aComponent) ]
So I'm wondering what the merit of the different approaches is?
More information about the seaside