two classes. First lines of the problem class:

import flash.geom.*;
import as.maps.model.GroupReference;
class as.maps.model.Topic{
...
}

first lines of the GroupReference class

import as.memomaps.model.Topic;
class as.memomaps.model.GroupReference{
...
}


Topic.as: Line 3: The name of this class, 'as.memomaps.model.Topic', conflicts with the name of another class that was loaded, 'as.memomaps.model.Topic'.
    class as.memomaps.model.Topic{

This makes sense. Topic imports groupreference which imports topic. Bad Andreas.

So how to work around this? I make a completely empty class called DataSource, and have Topic extend that. Then in GroupReference, i import as.memomaps.model.DataSource instead, and have whatever variables were expecting a Topic datatype to expect a DataSource type.
Whammy. no more errors.

The thing is, it's hard to simplify the Topic class down further: it's got a very specialized purpose. So is my method acceptable? To me it just looks terribly dirty.

Any suggestions as to how i can solve this kind of cross-import issue in a more elegant manner?

- Andreas
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to