mx2cc version 1.0.7 default constructor class.

About Monkey 2 Forums Monkey 2 Development mx2cc version 1.0.7 default constructor class.

This topic contains 1 reply, has 2 voices, and was last updated by  Mark Sibly 2 years, 6 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #4151

    Richard Betson
    Participant

    Hi,

    I’m using the newest mx2cc version 1.0.7 and have encountered a new behavior that was not an issue in v 1.0.4. If I do not have a default constructor class (ie: New() ) within a given class I get the following error:

    Super class ‘file.class’ has no default constructor

    This occurs when I do something like

     

    Do I need to now include a default constructor in every class I make? Something like:

    I suspect this behavior is normal and the way I had been doing it is a MX1 holdover.

    #4153

    Mark Sibly
    Keymaster

    Yes, unless the class has no ctors at all in which case it gets a default ctor ‘for free’.

    But as soon as you provide at least one ctor, then only the ctors you provide are available.

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

You must be logged in to reply to this topic.