codifies

Forum Replies Created

Viewing 15 posts - 151 through 165 (of 202 total)
  • Author
    Posts
  • in reply to: Making Rnd more random. #5288

    codifies
    Participant

    set the random seed to a value derived from the time

    in reply to: would $1 patreon be insulting? #5287

    codifies
    Participant

    I ended up with a modest $2 a month, as I found some wiggle room, but yeah if I ever get around to publishing something with it and it actually sells, a decent donation has to be in order!

    in reply to: need help solving a logic problem. #5279

    codifies
    Participant

    it would be easier to test with this #Import “vec2d.monkey2”

    jplib?

    can you reduce it to a minimal example that can be run on the defaul modules ?

    in reply to: Loop through only part of list? #5276

    codifies
    Participant

    the more complex version! you can replicate what happens to eachin loop

    If you wanted you could implement a custom iterator too, but in the real world… just do what Jesse suggested…

    in reply to: Tutorial using the GC with C++ objects #5265

    codifies
    Participant

    got it!

    but what I don’t quite follow, if this never gets executed (and it doesn’t) why is it needed ?

    in reply to: Tutorial using the GC with C++ objects #5264

    codifies
    Participant

    won’t compile for example

    in reply to: Tutorial using the GC with C++ objects #5263

    codifies
    Participant

    I’m not sure what you mean, as Super.New(..  also doesn’t compile

    I can’t see any way to extend an extern class at all

    in reply to: Possible to add method to Rect with "Extension" ? #5262

    codifies
    Participant

    trouble using extern classes with any kind of extention

    using either extends or extention I get Error : Super class ‘default.Rect’ has no default constructor
    there is a slight complication in that the only a (float,float) constructor, but it will say the same if there is a () constructor…

    in reply to: canvas.Scale() Bug or bad practice? #5243

    codifies
    Participant

    hows that

    there might be a rounding error involved ?

    in reply to: Tutorial using the GC with C++ objects #5242

    codifies
    Participant

    gah just when I thought I had it all,

    if I try to extend MXRectangle (in MX2 code) (so I can add extra code to some of the methods) its asking for the default constructor of MXRectangle ?

    I have callbacks (from C++ to MX2) working but then that would mean ctor / del callbacks and a callback for any method I wanted to intercept – doable but cumbersom

    for example if I want each instance to keep a list of children to protect them from the GC (while the parent is still alive) ….

    JNI (in Java) , Lua etc have a bunch of C routines to create language objects another way round would be if I could create a List<T> in C code without having to cope with all the MX2 name massaging (its not quite as bad as mangling!) but then that would probably be a bunch of work for something maybe not many people would use ??

    in reply to: Tutorial using the GC with C++ objects #5228

    codifies
    Participant

    lol just as well i’m having dns issues….

    I’ll correct it, thanks

     

    websites off line for a bit – sleeeeeeep (please 🙁 )

    new changes really made things a lot easier, now a proper 1st class citizen, with c++ methods called from the mx2 class wonderful!

    in reply to: extending a C++ class with GC ? #5225

    codifies
    Participant

    I’m tidying the code and just writing it all up now, I’ll post the link before long…

    in reply to: how to get an extern class that extends bbObject and not void? #5223

    codifies
    Participant

    yeah, gotcha, cheers Mark

    in reply to: doccing memory access violation #5218

    codifies
    Participant

    oh gods but the horror show…..

    check your email….

    in reply to: extending a C++ class with GC ? #5217

    codifies
    Participant

    ding ding ding, we have a winner, thanks Mark 😀

    I wasn’t actually thinking of bullet (as anyhow you promised it soon ;-p – still tempted to throw a very limited temporary thing together mind…)

    Very good point about factory methods but you could always call the factory place the pointer in a field of a GC’d class that you *then* return from the wrapper… :-/ !

    I’m thinking about putting together a blog post about wrapping for MX2 and including this idea as well, you wouldn’t happen to have any other wrapping secret sauce, that you think would be good to go in such a blog post would you?

Viewing 15 posts - 151 through 165 (of 202 total)