[Q] Subclassing WAComponent or WACompound?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[Q] Subclassing WAComponent or WACompound?

Chun, Sungjin
Hi,

I'm currently developing project manamgent application(simple, just for learning seaside and its canvas api) and want to create date selector widget(?) with
calendar support - I mean attaching small button toggling calendar to date input tag. I first tried and make it work with subclassing WAComponent which
has two subcomponent: date input and mini calendar. But this does break the style - original code can be written like this

html dateInput value: self project dueDate; callback: [ :v | self project dueDate: v ]

but modified code be written like this

html render: dueDateEditor

so, here comes the question, which is better case, subclassing WACompoent or create a new tag for new widget by subclassing WACompound?

Thanks in advance.
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: [Q] Subclassing WAComponent or WACompound?

Michel Bany-3
S.J.Chun a écrit :

>so, here comes the question, which is better case, subclassing WACompoent or create a new tag for new widget by subclassing WACompound?
>
>  
>
WACompound subclasses were introduced to ease migration from the
"classic'" api
#dateInputWithValue:callback: and #timeInputWithValue:callback:
I suggest you subclass WAComponent.
HTH
Michel.
_______________________________________________
Seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside