var pointViewer = Map.PointViewer(); // PointViewer is also exported.
var point = Map.Point(29.8, 14.9);
pointViewer.addGeometry(point);
The third line give me a type cast error if addGeometry wants an
IGeometry interface (this interface is also exported) as an argument.
However, if it wants a Point as an argument, it runs correctly.
Another thing is that:
if i used this method, which wants IGeometry as argument, in closure:
Map.Adapter.createGeometry( // static method which create an
IGeometry.
function(geometry)
{
pointViewer.addGeometry(geometry); // no matter which geometry
type it creates, this code runs correctly
});
May you explain this cases to me and I wonder there is a way to use
interfaces as method parameters like first example I tried. What can
you suggest to me. How should I use my hierarchy while exporting them.
Thanks in advance.
I'm having problems with interfaces myself. I have defined interfaces
that extend the Exportable interface plus implementations that also
extend the exportable interface.
This used to work with exporter 2.3.1-SNAPSHOT, but since
2.4.0-SNAPSHOT this fails. I don't know why, but I have logged an
issue for it.
2011/12/16 cs.ozgur <cs.o...@gmail.com>:
On Dec 16, 10:00 am, Pieter De Graef <pied...@gmail.com> wrote:
> Hi,
>
> I'm having problems with interfaces myself. I have defined interfaces
> that extend the Exportable interface plus implementations that also
> extend the exportable interface.
> This used to work with exporter 2.3.1-SNAPSHOT, but since
> 2.4.0-SNAPSHOT this fails. I don't know why, but I have logged an
> issue for it.
>
> 2011/12/16 cs.ozgur <cs.oz...@gmail.com>: