public class MyExtension extends AbstractExtension
{
TestFunc();
}
I wanna invoke other room's function "TestFunc".
so I have to other room extension instance.
I try like this
void InvokeTest( int otherRoomId )
{
Zone zone = helper.getZone(extension.getOwnerZone());
Room room = zone.getRoom(otherRoomId);
MyExtension roomExtension = (MyExtension)room.getExtManager().get("MyExtension");
roomExtension.TestFunc();
}
but fail with very strange cast fail exception like this.
"MyExtension cannot be cast to MyExtension"
If I was in room 1 and I call InvokeTest(1), success.
If I was in room 2 and I call InvokeTest(1), raise cast exception.
could you help me.