Request for a default constructors to Node.

About Monkey 2 Forums Monkey 2 Development Request for a default constructors to Node.

This topic contains 5 replies, has 2 voices, and was last updated by  Jesse 2 years, 1 month ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #7370

    Jesse
    Participant

    @Mark can you please add a default constructor to the Node class inside the list class?
    I am trying to extend the Node class but can’t do it because it needs a default New Method.

    #7384

    Mark Sibly
    Keymaster

    Example of problem please…and this should really probably be a github issue if you want to be 100% I’ll (eventually) take a look at it.

    #7386

    Mark Sibly
    Keymaster

    I am trying to extend the Node class but can’t do it because it needs a default New Method.

    Not necessarily – suibclass ctors can call ‘Super.New( blah )’ if super class has no default new.

    #7387

    Jesse
    Participant

    I am doing some abnormal stuff and I need for it to have a default constructor to be able to extend it to my a class of my own.

    [/crayon]

    this gives me an error because there is no default constructor.
    you are probably right it should be left as is and that’s why i didn’t put it on Github.

    #7388

    Mark Sibly
    Keymaster

    Well, you can do this, but I wouldn’t advise it.

    List/Node hasn’t been designed to be extended, and there may or may not be 1001 other problems you encounter trying to do so!

     

    #7389

    Jesse
    Participant

    Oh, That works.
    I know I am always doing of the wall stuff and it’s probably not a good idea to do it but I am stubborn so I will keep on doing it until I run into a wall or you decide to make some changes to brake my code.

    Thanks Mark.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.