Mark Sibly

Forum Replies Created

Viewing 15 posts - 166 through 180 (of 1,431 total)
  • Author
    Posts
  • in reply to: CString memory management #13489

    Mark Sibly
    Keymaster

    No, the CString memory is automatically released after the function call.

    in reply to: iOS Missing Files for Simulator #13470

    Mark Sibly
    Keymaster

    One thing that is missing from the simulator builds is fiber support.

    This wont be easy to do either as there is no appropriate x86_64 asm file in the fcontext lib I pinched.

    But I gather not many people are using fibers so this is OK for now?

    in reply to: How can I get the device Width and Height? #13469

    Mark Sibly
    Keymaster

    Should I ditch the HighDPI flag? Should it just always be ‘on’? It would save a lot of headaches as DesktopSize could returned scaled/physical/retina size, and DPI/retina handling could all be done internally etc.

    in reply to: iOS Missing Files for Simulator #13460

    Mark Sibly
    Keymaster

    Ok, simple simulator support added to develop branch.

    It’s implemented as a sort of psuedo target so you’ll need to set MX2_IOS_SIMULATOR=1 in bin/env_macos.txt and rebuild modules – a bit clunky but it works.

    in reply to: how to check if an asset exists #13459

    Mark Sibly
    Keymaster

    AssetsDir()+path etc will work for most targets, it’s only android that causes problems as assets are stored in a zip file on android. On all other targets, assets are just files in the filesystem, so GetFileType etc will work.

    What will work safely is opening the asset as a stream, eg:

    (untested).

    in reply to: How can I get the device Width and Height? #13449

    Mark Sibly
    Keymaster

    Its shouldn’t matter what you set window size to, as it will always be maximised. Just check Width and Height after creating window/

    in reply to: iOS Missing Files for Simulator #13447

    Mark Sibly
    Keymaster

    The ios simulator is not currently supported – you need to build directly to a device.

    I can add simulator support but it will require rebuilding all modules etc as it will effectively require a whole new target.

    in reply to: Chipmunk working in latest version? #13415

    Mark Sibly
    Keymaster

    What host platform is this? I’ve tweaked the windows rebuild batch files to halt on any error but not the .sh files yet (not sure how).

    Also, If you build modules in IDE it should error out if one module fails to build.

    in reply to: Monkey 3d dead #13382

    Mark Sibly
    Keymaster

    …mojo3d is alive and well!

    in reply to: Operator overloading (hello, php) #13381

    Mark Sibly
    Keymaster

    Brackets show us we deal with array, but += don’t.

    That’s about all it shows. The syntax ‘[]=’ to append to an array is typical php WTF-ness!

    But I did have a quick look at the parser and, I sort of hate to say it, but it’s actually a pretty simple tweak to allow no args for array indexing. With a 2 line change to parser.monkey2 I can compile this…

    …which isn’t quite what you wanted, but enough to be able to do what you want I believe?

    I still really dislike []= to append to an array though, boring old Method Add() is IMO a much better option!

    in reply to: Console terminal sequences #13380

    Mark Sibly
    Keymaster

    You need to turn off ‘Use legacy console’ in ‘Command prompt properties’ (right click on shell drag bar).

    With this off, you don’t even need SetConsoleMode. In fact, your SetConsoleMode isn’t doing anything due to incorrect stdout const (should be -11) and use of Varptr hOut (should just be hOut).

    Or you could use something like the mighty conemu…

    in reply to: Any suggestion on how to deal with std::vector ? #13370

    Mark Sibly
    Keymaster

    I recommend using #include <bbmonkey.h> if you want to access the native types in c++.

    There are GC issues you need to be a bit careful of too. I’ll try to write something up about this soon.

    in reply to: Operator overloading (hello, php) #13369

    Mark Sibly
    Keymaster

    that means append the string to array.

    It sure doesn’t look like it!

    This would require major changers to the parser though, as ‘[]’ is not a valid ‘value expression’ (it may only appear in type expressions, ie: when declaring the type of something).

    How about ‘+=’ instead? This looks much more logical to me.

    in reply to: Mojox Mouse Event destroyed #13326

    Mark Sibly
    Keymaster

    it would be nice to emulate how ListView works, by being able to listen to clicks from the container rather than each element

    Well, AcceptsMouseEvents sort of lets you play with this idea, although I think FilterMouseEvent() would be the nicer way to do it –  you’d be able to filter only some mouse events (not all) plus you wouldn’t have to change state of child view.

    I think what you’re really thinking here is why is there a specialized ListView.Item class, why don’t ListViews just contain ‘Views’.

    The reasons for this are actually mostly practical – an Item is lighter weight than a View, useful if you want lists of 10000 items (although less useful than it once was); an Item can also be highly customized, eg: TreeView.Item can be expanded/collapsed – but it is a valid question and in theory it is possible to write a more ‘pure’ gui like this. It’s harder though (try it!) and most/all guis I’ve used like Qt, cocoa, windows etc use ‘specialized’ ListView.Item types in a similar way so it’s not just me…

    But I’ll keep thinking on this one ‘coz it’s interesting, and while I think emulating a ListView is pointless (just use a ListView!) it does mean you can’t use, say, a GridView to contain items ListView style…

    in reply to: m2libui – Libui wrapper (Cross-Platform Native UI) #13325

    Mark Sibly
    Keymaster
Viewing 15 posts - 166 through 180 (of 1,431 total)