• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mixin extending custom node

 
bryan lim
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having a issue of mixin not able to extend CustomNode since it can only extends other mixin or interface.

But i want to inherit CustomNode so that i can have draggable functionality. and int he future, i might want to inherit more functionality, that's why i need mixin for multiple inheritance.

anybody knows a solution to this?

thanks! n_n
 
bryan lim
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anybody can help me out here?
 
Jim Clarke
author
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's not possible to include CustomNode (abstract class) into a Mixin.
 
avi tshuva
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hehehe....

Well, you can use the fact (?) that the concrete class will be a Node, and treats your mixin as a Node by applying dynamic type casting on the instance you work on...

Not very pretty, but sometimes it's the most elegant of the options you got...


:-)
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic