[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] IdentityDictionary possible bug: does not behave correctly after a readArchive WAS Re: [sc-users] Parameter space - saving to disk



Not a bug. IdentityDictionaries should use only atomic types as keys.
Point is not an atomic type. Therefore you should be using Dictionary
instead.
hjh

On Thu, May 14, 2009 at 1:50 PM, Miguel Negrao
<miguel.negrao@xxxxxxxxxxxxxxxxx> wrote:
> With some investigations I concluded that IdentityDictionary's
> cannot be loaded with a readArchive.
>
> z = Point(0.5,0.5)
> y = Point(0.2,0.5)
> a = IdentityDictionary.new;
> a.put(z,"the point");
> a.put(y,"another point")
> a.writeArchive("/test")
> b = Object.readArchive("/test")
> b[b.keys.asArray[0]]
>
> this gives nil. This seems to me to be a bug, and I wonder if it could
> be fixed (devs ?). MultiLevelIdentityDictionary suffers from the same
> problem and that's what is keeping ParameterSpace from being saved
> correctly.



-- 
James Harkins /// dewdrop world
jamshark70@xxxxxxxxxxxxxxxxx
http://www.dewdrop-world.net

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/