NoOdle

Forum Replies Created

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • in reply to: First class function / callback help #16092

    NoOdle
    Participant

    The only thing I can see that might affect it is the callback char_t params are defined as PTR PTR. Just a guess, only started playing with Monkey2 the other day and this is all new to me.

    in reply to: What is an interface? (POO) #16080

    NoOdle
    Participant

    An interface allows you to add specific functionality to any class, avoiding deep/complex class hierarchies. You can store instances of any class that implement the same interface in a collection and invoke any of the interface methods.

    Sorry if that makes no sense, I’m not the best at explaining things. Here’s a quick untested example:

    in reply to: Fist class function in collection with struct parameter #16079

    NoOdle
    Participant

    Thanks Danilo, it didn’t occur to me to look at the C++ code. I’ll report the bug now.

    in reply to: Where keyword #16075

    NoOdle
    Participant

    Thanks, its good to be back!

    I don’t think I would have had the patience to figure it out if it wasn’t for those lovely red squiggly lines, allowed me to try lots of different combinations until it worked… although I discovered later on with variants that no squiggles doesn’t mean it will actually run 😛

    in reply to: Where keyword #16073

    NoOdle
    Participant

    OK after some more tinkering I have figured it out

    Struct Test<T> Where T = Int Or T = Float

    Constrains generics like it says in the help file, pretty handy for things like Vec2

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