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

nicolas petton petton.nicolas at gmail.com
Fri Oct 26 13:34:33 CEST 2007


Le vendredi 26 octobre 2007 à 11:08 +0200, Janko Mivšek a écrit :
> 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.

But if I don't suclass, there will be no field for website (in the
registration form, and update form), right ? I didn't see the code for
this in WebSecurityManagerApp>>userElementForm: or
WebAdminApp>>viewRegistration

Nicolas 
> 
> Janko
> _______________________________________________
> Aida mailing list
> Aida at aidaweb.si
> http://lists.aidaweb.si/mailman/listinfo/aida
-- 
Nicolas Petton
http://nico.bioskop.fr
             ___
           ooooooo
          OOOOOOOOO
         |Smalltalk|
          OOOOOOOOO
           ooooooo
            \   /
             [|]
--------------------------------
Ma clé GPG est disponible ici :
http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xE788C34D

-------------- section suivante --------------
Une pi�ce jointe non texte a �t� nettoy�e...
Nom: non disponible
Type: application/pgp-signature
Taille: 189 octets
Desc: Ceci est une partie de message
	=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=
Url: http://lists.aidaweb.si/pipermail/aida/attachments/20071026/792e1888/attachment.sig 


More information about the Aida mailing list