[Seaside] dateInput Question

Michel Bany michel.bany at gmail.com
Fri Nov 3 08:15:53 UTC 2006

Hi Ron,
> I was wondering if you could help me understand something.
You do not provide enough background information.
Are you using Squeak or VW ?
Are you using SeasideAsynx of Scriptaculous ?

> I’m trying to add a livecallback to dateInput.  It works fine but  
> since I have a liveCallback now the regular callback doesn’t work.
Since you are refering to liveCallback, it looks as if you are using  
Also, the code you are wondering about is using the canvas api.
However, live callbacks are not implemented (yet) for the canvas api.
Are you implementing it ?
Did you copy/paste some code into your component ?
> I’m trying to understand the following code:
> canvas hiddenInput
>                         callback:
>                                     [value := Date
>                                                 newDay: (day min:  
> (Date daysInMonth: month forYear: year))
>                                                 monthNumber: month
>                                                 year: year.
>                                     callbackBlock value: value];
>                         close.
>             canvas forgetCurrentBrush.
> It all makes sense except the part of what triggers the callback in  
> the first place.  Can someone point me to how this hiddenInput  
> callback is triggered?  I’d like to modify my liveCallbackYear: to  
> call this code and the regular callback code and then my  
> liveCallback block.
Regular callbacks are triggered by the submission of the form.
i.e. click a submit button, hit the return key, execution of a submit 
() javascript.
Therefore you need a form if you want regular callbacks triggered.

The dateInput composite is made up of four html elements
a select for the month, an input for the day, an input for the year and
the hidden input, each with a callback. The first three callbacks
are for collecting the input values. The fourth callback assembles
the input values into an instance of Date and passes it to
the component callback.

> Ultimately I’m trying to have a date with a field next to it that  
> shows age.  If you change the age it changes the date, and if you  
> change the date it changes the age.  I have the age updating the  
> date just fine.  Now I need the date changes updating the age.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20061103/6b2bf09a/attachment.htm

More information about the Seaside mailing list