Request: class/struct extention private acces

About Monkey 2 Forums Monkey 2 Development Request: class/struct extention private acces

This topic contains 2 replies, has 2 voices, and was last updated by  abakobo 2 years, 3 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6465

    abakobo
    Participant

    Would it be possible to have access to private stuffs when using Extension or having a new keyword like Pextension or whatever?

    It would be usefull when making/experimenting extension for module classes without having to rebuild the module all the time.

    #6469

    Mark Sibly
    Keymaster

    access to private stuffs when using Extension

    Nope.

    a new keyword like Pextension

    What would this do?

    How about using ‘Protected’? Creating a class extension is very much like subclassing a class (in fact, this is how it’s implemented) so it makes sense to me.

    #6473

    abakobo
    Participant

    I’d like to add primitive Draws to mojo.canvas. I don’t feel like I want to subclass the big mojo thing..

    But rebuildin using makemods for mojo only is actually pretty fast

    What would this do?

    Pextension would let me create extension that can call some private methods (addvertex in this case) without having to git the mojo module with my own changes each time I update mx2..

    so I can have a simple canvas.DrawBezier(blah) or canvas.DrawRoundedCornerPoly(blah) or … in my onrender

    could be uesfull in other situations and I thought it can maybe very easy to add..

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

You must be logged in to reply to this topic.