[aida] Another question...(about WebUser)

Janko Mivšek janko.mivsek at eranova.si
Fri Oct 26 11:08:11 CEST 2007

nicolas petton a écrit :
> First, I'm sorry for all this questions...
Don't worry, you are asking right and useful ones!
> I want to add a new variable to WebUser. I added this : 
> WebUser>>website
> 	^self otherValuesAt: 'website' ifAbsent: [self otherValuesAt: 'website'
> put: ''] 
> WebUser>>website: aString
> 	self otherValuesAt: 'website' put: aString 
> in a custom category, so no problem.
> But what about views ? I would like to display the new feild in views
> (WebAdminApp>>viewRegistration and
> WebSecurityManagerApp>>userElementForm:).
> My first idea was to subclass this apps, and override MyWebSite>>admin
> and MyWebSite>>securityManager.
> But if I do it, I need to create empty subclasses of WebAdmin and
> WebSecurityManager too, and I really don't like it. Is there another way
> to do it without creating those empty subclasses ?
You are right, better avoid subclassing and rather use extensions. So on 
Squeak, if you have a package MyPackage, add method category *MyPackage 
in class WebUser and that's it! You don't need change any other classes 
in that case, specially not WebSecurityManager etc.


More information about the Aida mailing list