flex-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From OK <OKrue...@edscha.com>
Subject [FlexJS] Issues with casting to an Interface
Date Mon, 21 Mar 2016 10:55:43 GMT
Hi,
I continue exploring FlexJS and have following issue wich is hard to explain
for me:

I would like to decouple the view from the rest of my app using interfaces.
With the swc version all works fine, with the js versions it doesn't (0
errors, 0 warnings).
It seems to me that the js version doesn't like it if an interface is given
instead of the view that implements this interface. As soon as I try to cast
to an interface the js version refuse to work.
Perhaps at least it makes no sense to cast to an interface?

I have the following parts:

Main.mxml:
The application file that put it all together.
At applicationComplete event the method setData() is called tree times.

MyInitialView.mxml:
A minimial view that implements IViewMyInitialView.as

IViewMyInitialView.as:
An interface that contains only one method declaration:
setData(data:String):void

TestClass.as:
Expects the interface as constructor argument and implements a getter that
returns it

I pasted all parts with its code into one gist cause probably the code is
better formatted there:
https://gist.github.com/ok-at-github/8c4b94817fde72202231

Thanks for reading and sorry for posting so much probably confusing text. I
tried to reduce it all as best as I can.

Any ideas?

Thanks,
Olaf








--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/FlexJS-Issues-with-casting-to-an-Interface-tp12299.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Mime
View raw message