Updating an index

Norberto Manzanos nmanzanos at gmail.com
Wed Mar 12 21:19:24 UTC 2008


Hi, Magma People

The question is: is there a way to force  an index to update its keys? or
Suposing an index is not properly updated or is not updated at all, can I
force this updating?

You would demand: why do you need this? Perhaps something is wrong in your
objects, so the index is not updated.

No, the problem is that this index doen't match with an instance variable of
the objects in the collection. It's a key generated when other condiciones
changes, produced by a message, not an instance vairable.
I suposse that magma doesn't update the indec because there's no changes
in  variables. Am I wright?

But you would insist: why do you need this? A "calculated" index? Why don't
you use a variable?

I have this situation: there are several methods for testing the objects,
that answer a boolean. I need to filter the collections regarding wich
objects answer true, and wich others answer false. I need something like a
filter, but I didn't find it.  The way I found to solve this problem is to
generate a single key that uses the boolens as they were bits, so with an
integer index, I cant retrieve the objetos with several filterings. But the
index is not updated!  The only way is to remove and recreate it.

Thanks in advance.

Norberto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/magma/attachments/20080312/1cee0035/attachment.htm


More information about the Magma mailing list