[Seaside] Re: Scriptaculous problem

Sebastian Sastre ssastre at seaswork.com
Wed Sep 26 17:02:49 UTC 2007


Yeah that’s fine in that context, but what if you need reference #id and
you're not at render time?
I have components that are created at a time (structure bewteen them, etc),
wired a another time (action/reaction between them in the UA) and as last
task rendered in canvas.

	cheers,

Sebastian Sastre


> -----Mensaje original-----
> De: seaside-bounces at lists.squeakfoundation.org 
> [mailto:seaside-bounces at lists.squeakfoundation.org] En nombre 
> de John Thornborrow
> Enviado el: Miércoles, 26 de Septiembre de 2007 13:53
> Para: Seaside - general discussion
> Asunto: Re: [Seaside] Re: Scriptaculous problem
> 
> renderContentOn: html
> 	| anHtmlId |
> 	anHtmlId := html nextId.
> 	html div
> 		id: anHtmlId;
> 		with: 'some text'.
> 	html anchor
> 		onClick: (html effect id: anHtmlId; shake);
> 		with: 'Shake it baby!'
> 
> Can you not use like that, or with instance var? :)
> 
> Regards,
> John
> 
> Sebastian Sastre wrote:
> > Because that makes me unable to recall the id of the 
> components at nay 
> > time to wire events between them among other uses.
> > 
> > 	regards,
> > 
> > Sebastian Sastre
> > 
> >> -----Mensaje original-----
> >> De: seaside-bounces at lists.squeakfoundation.org
> >> [mailto:seaside-bounces at lists.squeakfoundation.org] En nombre de 
> >> Lukas Renggli Enviado el: Miércoles, 26 de Septiembre de 2007 13:35
> >> Para: Seaside - general discussion
> >> Asunto: Re: [Seaside] Re: Scriptaculous problem
> >>
> >>> All $().fooBar is not a function is js unable to create 
> the element 
> >>> object for some reason. I also remember happening that to 
> me, and I 
> >>> solved that using a whole hierarchy of WAComponent
> >> subclasses that has
> >>> an instVar #id that is guaranteed to be unique (get from a class 
> >>> variable #Counter in the abstract superclass) per element
> >> per page and is set at #initialize time.
> >>
> >> Why not use
> >>
> >>      html nextId
> >>
> >> to generate an unique id?
> >>
> >> Lukas
> >>
> >> --
> >> Lukas Renggli
> >> http://www.lukas-renggli.ch
> >> _______________________________________________
> >> 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
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> > 
> > 
> >  
> > 
> 
> 
> Pinesoft Computers are registered in England, Registered 
> number: 2914825. Registered office: 266-268 High Street, 
> Waltham Cross, Herts, EN8 7EA
> 
> 
> 
> This message has been scanned for viruses by BlackSpider 
> MailControl - www.blackspider.com
> 
> _______________________________________________
> Seaside mailing list
> Seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



More information about the seaside mailing list