Bug : Interface generation

DTO2Fx
Marty Pitt
2009-04-28
2013-04-29
  • Marty Pitt

    Marty Pitt - 2009-04-28

    Hi

    Congrats on DTO2FX -- It's brillaint!

    However, I think there's a bug with interface generation.

    Given Class

    User.java implements IUser.java

    Generates :

    interface IUser.as extends interface _IUser.as

    Class User.as extends  _User.as implements IUser.as

    However, wouldn't this be better?

    _User.as implements _IUser.as
    User.as extends _User.as implements IUser.as

    In the current implementation, I'm unable to add any methods to IUser.as, as the generated class doesn't implement them (but the overridden User.as does)

    Thoughts?

    Regards

    Marty

     
    • Valery Silaev

      Valery Silaev - 2009-04-28

      Indeed, this is a really interesting issue.

      Initially, the aim was to minimize amount of code used in "custom classes" where developer may add own code, so "extends/implements" clauses are shifted to _Generated files. The best option would be to declare _Generated classes as "abstract", however this is not supported in ActionScript 3.

      We need to evaluate how proposed changes would affect existing code created with generator, what are associated drawbacks and benefits.

      For now, I would suggest you to create interface IUser2 (extends IUser), add your additional methods here, and make User class implements IUser2 in addition to extending _User superclass (generated). This should help with adding new methods/properties to interface.

      VS

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks