[kepler-dev] [Bug 4049] - Import actor that already exists appends strange numbering scheme

bugzilla-daemon at ecoinformatics.org bugzilla-daemon at ecoinformatics.org
Wed May 20 14:05:07 PDT 2009


http://bugzilla.ecoinformatics.org/show_bug.cgi?id=4049





------- Comment #5 from barseghian at nceas.ucsb.edu  2009-05-20 14:05 -------
Re: comment#4, for example, if an actor RExpressionRain2001 is created and
saved in the library, when dragged to canvas, it becomes RExpressionRain. One
reason is that NamedObj's uniqueName method strips the numeric suffix. I've
made a change to NamedObj locally to not do this, to instead optionally append
an underscore followed by a unique number. If it's the first instance, it will
be RExpressionRain2001. The second would be RExpressionRain2001_2. However, the
first instance still gets its numeric suffix (2001) stripped by the time the
actor hits the canvas, because MoMLParser's attribute calls CompositeEntity's
uniqueName().

I see 5 declarations of uniqueName(), and many calls to them. I'm a little
reluctant to make changes, it seems like there could be many ramifications...

One slightly hackish solution is to have the first instance of e.g.
RExpressionRain2001 dragged to canvas be called RExpressionRain2001_. This
seems to work, but isn't very satisfying.


More information about the Kepler-dev mailing list