Mark Sibly

Forum Replies Created

Viewing 15 posts - 706 through 720 (of 1,431 total)
  • Author
    Posts
  • in reply to: TypeInfo #8943

    Mark Sibly
    Keymaster

    But can we have type info for simple pointers, array…?

    Still not sure what you mean – this works (as per docs):

    What are you trying to do is the 64k Q?

    in reply to: Structs and foreach loops #8929

    Mark Sibly
    Keymaster

    Nice!

    in reply to: Multidimensional Arrays and Copyto? #8928

    Mark Sibly
    Keymaster

    Arrays are not copied automatically, ie: they are reference types.

    in reply to: Multidimensional Arrays and Copyto? #8922

    Mark Sibly
    Keymaster

    There is no built-in way to do this yet (it’s easy for ‘2’ or ‘3’ dimensions, harder for ‘N’!) but abakobo’s solution look cool, although I’d probably rename it to Copy2DArray.

    in reply to: TypeInfo #8921

    Mark Sibly
    Keymaster

    Have you looked at the reflection section in the language manual? This shows the correct use of TypeOf and TypeInfo.

    (you may need to grab the latest github develop branch, this may have only recently been added).

    in reply to: Structs and foreach loops #8920

    Mark Sibly
    Keymaster

    I did this experiment and I see that I can’t mutate the element of the list directly, however I can mutate the local copy. Is this behavior valid or not?

    Yes, because structs are always passed ‘by value’ (ie: copied), so this line…

    Local item := list.FirstNode().Value

    …copies FirstNode().Value to item.

    One way to deal with thinking about this stuff is to mentally replace ‘some struct type’ with, say, ‘int’ (also a struct type) in which case you’ve simply got a list of Ints, and hopefully it’s clear that…

    Local item := list.FirstNode().Value

    …will set item to a *copy* of FirstNode().Value as, like all struct types, ints are copied when passed to functions, returned from functions or assigned to variables.

    in reply to: Hot to set the focus to a TextField (or other View)? #8868

    Mark Sibly
    Keymaster

    textView.MakeKeyView()

    Have a look in the modules/mojox/tests folder for some mojox examples.

    in reply to: Hot to set the focus to a TextField (or other View)? #8869

    Mark Sibly
    Keymaster

    textView.MakeKeyView()

    Have a look in the modules/mojox/tests folder for some mojox examples.

    in reply to: cxx2mx2 #8860

    Mark Sibly
    Keymaster

    No, cxx2mx2 is not functional and probably never will be. I should really remove it…

    I had it ‘sort of’ working with chunks of bullet, but realized it was all becoming super bullet-specific (and even bullet wasn’t following its own conventions all the time) and eventually went back to hand converting stuff as necessary.

    So cxx2mx2 is dead for now as c++ is (for me anyway) just too hard to convert via automation.

    in reply to: Which NDK version should be used for the Android target? #8854

    Mark Sibly
    Keymaster

    You first need to install the NDK from android studio, and then make sure monkey2 can ‘see’ it, either by adding the dir ndk-build is in to your PATH, or modifing this line in bin\env_windows.txt

    PATH=D:\devtools\Android\sdk\ndk-bundle;${PATH}

    in reply to: Help with Emscripten/Wasm #8762

    Mark Sibly
    Keymaster

    Actually, I recommend using the current instructions in the monkey2 manual:

    Monkey2 uses the emscripten sdk compilers and tools to build emscripten and wasm apps.

    To install the emscripten sdk, please see this page: https://github.com/juj/emsdk/blob/master/README.md.

    After installation, you should have em++ 1.37.9 installed. Use ’em++ -v’ to check version.

    Emscripten is still kinda in flux and is unlikely to be ‘fun’ to get going for a while yet!

    in reply to: Wasm – Chrome – Not reloading. #8761

    Mark Sibly
    Keymaster

    when I upload to the website the old cashed version loads and not the new.

    This is likely to be a webserver issue I think, eg: there may be some apache config settings for cache control?

    in reply to: Mserver on Windows 10 #8742

    Mark Sibly
    Keymaster

    No idea what’s up, all is working OK here – anyone else these problems?

    in reply to: Help with Emscripten/Wasm #8740

    Mark Sibly
    Keymaster

    What version of emscripten are you running? I’m on 1.37.9, use ’em++ -v’ to find out.

    Use this link to grab installer for 1.37.9, there’s another one around that installs an older version I think…

    https://github.com/juj/emsdk/blob/master/README.md

    in reply to: Wasm – Chrome – Not reloading. #8726

    Mark Sibly
    Keymaster

    Are you using mserver to host/run it?

Viewing 15 posts - 706 through 720 (of 1,431 total)