unique objects

Chris Muller asqueaker at gmail.com
Thu Aug 9 03:51:09 UTC 2007


Hi Dan, if you have only a few users (less than 500) and the
collection doesn't change much, you may want to use a standard
Smalltalk collection (like a Set).

My guess is you want to display an error if someone tries to add a new
ULUser with the same #login as another.  So using a Set or MagmaSet
might not report that a duplicate was attempting to be added, just
quietly ignore the add, leaving the registering user thinking they
were successful.

Perhaps you want to just as easily perform a #where: (or #select:)
query in your application to see if some ULUser with that #login
already exists and then signal a UserError..?

Regards,
  Chris

On 8/8/07, Dan Corneanu <cdan at savatech.ro> wrote:
> Hi,
> I have to maintain a collection of ULUser(s). How can I make sure
> that I can't register two users with the same #login (instance
> attribute)? Is MagmaSet the solution to the problem?
>
> Best regards,
> cdan.
> _______________________________________________
> Magma mailing list
> Magma at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/magma
>


More information about the Magma mailing list