Mark Sibly

Forum Replies Created

Viewing 15 posts - 1,186 through 1,200 (of 1,431 total)
  • Author
    Posts
  • in reply to: mojox thoughts and layout #3596

    Mark Sibly
    Keymaster

    Lastly. because of all the problems I am looking at completely scrapping mojox for something else that answers the above issues.

    I think this is probably a good idea.

    You’re obviously not getting into mojox and have plenty of your own ideas so go for it, it certainly wouldn’t hurt monkey2 to have several GUI systems.

    in reply to: Vector additions #3595

    Mark Sibly
    Keymaster

    Yep, it’s because it’s a property returning a struct.

    When a property (or method, or function, or anything ‘callable’) returns a struct, it always returns a copy of the struct – that’s just how structs work, and is what really allows them to be so lightweight and require no memory management.

    So the TargetVector property is only returning a ‘temporary’ copy of the Vec2f you’re interested in, and modifying this copy is effectively a NOP. All you can really do with this copy is read it – think of it being stored in a ‘hidden’ local…

    The compiler does in fact detect writes to fields of temporary copies like this, ie: this generates a ‘not assignable’ error:

    TargetVector.x+=10    ‘note: lowercase ‘x’ – ie: just the field!

    But in the case where you’re assigning ‘x’ via the ‘X’ property, the compiler doesn’t/can’t know that the ‘X’ property assigns something to Self and doesn’t even try to detect this.

    Getting this to generate an error is complicated. Either the user would have to mark properties/methods as ‘Const’ or not, ala c++, which is not a lot of fun, or the compiler has to automatically detect which properties/methods modify ‘Self’, which is trickier than it may sound. Just because X() might not write a field, it might invoke another method that (ultimately) *does* etc. In fact, thanks to functions pointers it may be logically impossible.

    in reply to: Vector additions #3593

    Mark Sibly
    Keymaster

    There are a number of reasons why this may not work – what error are you getting?

    in reply to: Bug or not ? 2 times using a (mouse) event = ignoring both #3583

    Mark Sibly
    Keymaster

    KeyPressed and ButtonPressed pressed currently ‘clear’ themselves after being read.

    This is because there’s not really an ‘update’ phase in mx2 the way there is in mx1 so the system doesn’t really know when to ‘auto clear’ them.

    Thinking about it now though, I guess auto clearing these after rendering would be OK…


    Mark Sibly
    Keymaster

    Multilpe windows has NOT been thoroughly tested yet is likely to cause problems!

    Also, you can only use multiple windows on desktop targets, not mobile/web.

    in reply to: multi line statement? #3561

    Mark Sibly
    Keymaster

    Lines can currently only be split after ‘[‘, ‘(‘ or ‘,’ tokens.

    in reply to: How to catch drag & drop views? #3514

    Mark Sibly
    Keymaster

    Something like this might work:

    Like I say, FindViewAtWindowPoint is technically ‘hidden’ right now, but we need some way to do this so have a play and let me know what you need!

    in reply to: How to catch drag & drop views? #3513

    Mark Sibly
    Keymaster

    You currently can’t (easily) – MouseDown ‘captures’ a view so that all successive mouse events until the next MouseDown are sent to the same view.

    There’s a hidden method in View called ‘FindViewAtWindowPoint’ that could be used to help here – you’d need to transform the mouse location to ‘null’ (ie: window coords) and then pass this to ‘FindViewAt…’ – but there really needs to be a better way to do this.

    in reply to: Creating new arrays #3512

    Mark Sibly
    Keymaster

    Slice() can shrink an array but it can’t grow it – I still need to add a proper Resize().

    in reply to: Delayed execution #3492

    Mark Sibly
    Keymaster

    Be careful – UpdateWindows is currently a hidden API and may or may not change in future or may become private etc (it probably should be).

    I’ll have a go at adding App.Sleep…

    in reply to: BlitzMax is Greenlit #3490

    Mark Sibly
    Keymaster

    Yay!

    in reply to: Delayed execution #3489

    Mark Sibly
    Keymaster

    Check out the Timer code in spacechimps, the basic idea is:

    New Timer( 60,OnUpdate )

    Method OnUpdate()
    End

    I plan to add a ‘Sleep’ function to Fiber too.

    in reply to: Drag and drop? #3488

    Mark Sibly
    Keymaster

    Looks nice and easy, will have a hack at this today.

    in reply to: Experimental module manager now online! #3395

    Mark Sibly
    Keymaster

    Published.

    in reply to: Experimental module manager now online! #3387

    Mark Sibly
    Keymaster

    Sorry Shane!

    It’s there and I’ll get it up ASAP. Just noticed it when deleting portaudio…

    Not sure how I missed the auto-email, but there it is in my inbox so my bad.

Viewing 15 posts - 1,186 through 1,200 (of 1,431 total)