nerobot

Forum Replies Created

Viewing 15 posts - 91 through 105 (of 805 total)
  • Author
    Posts
  • in reply to: Ted2Go IDE #13743

    nerobot
    Participant

    Enjoy coding and bla bla bla. 🙂

    Forgot to say – I also removed IRC chat stuff to cooperate all community in a single place – Discord.

    in reply to: Ted2Go IDE #13722

    nerobot
    Participant

    Hi guys.

    There are some recent improvements in develop branch:

    1. New feature – using spaced indentation! Now, you can
      • use spaces instead of tabs;
      • set desired tab size (works with tabs and spaces);
      • and even automatically fix “wrong” indentation.
    2. New feature – duplicate line or selected area with shortcut Ctrl+Shift+D (or just Ctrl+D on windows).
    3. Improved support of array type in code completion and code tree view.
    4. Completion list – some colors added into theme file:
      • completion-list-selected – color of selected line
      • completion-list-marked-bg– background color of highlighted chars
      • completion-list-marked-text – foreground color of highlighted chars
    5. Added some preprocessor directives into completion list:
      • __WEB_TARGET__ , __DEBUG__ , __RELEASE__ , __CONFIG__ , __MAKEDOCS__
    6. Added option “Rename folder” into Project browser context menu; and now open a *containing folder* by option “open on desktop” for files (don’t try to open file itself).
    7. Now storing latest opened tab in prefs dialog.
    in reply to: Compare json values. #13665

    nerobot
    Participant

    If we declare new sub-class JsonNull extends JsonValue and replace current NullValue with them – will it helps us to check if x is null-value w/o any stack-ish problems?

    in reply to: Compare json values. #13664

    nerobot
    Participant

    There may be a virtual method CompareTo:Int( value:JsonValue ) of JsonValue.

    By default it will return -1.

    And any sub-classes will override it.

    Technically it will be the same as your functions above.

    The difference is a way of call: json1.CompareTo( json2 ) in this case.

    If we aware of nullability of json1, then we can use ?. operator.

    Also in your code you check y=NullValue and return 1 if true, but x can be null itself and then we should get zero in result.

    Sorry, I did’n understand about stack exploding reason. 🙂

    If we use just functions like ones above – do we avoid stack exploding when using if Self.IsNull?

    (JsonValue has a property IsNull.)

    in reply to: Simple cheat code class (My first attempt at using Monkey2!) #13615

    nerobot
    Participant

    Did you try to check event.Type property inside your filter method?

    If Not event.Type=EventType.KeyReleased Return

    in reply to: Simple cheat code class (My first attempt at using Monkey2!) #13607

    nerobot
    Participant

    I’m lost on the App.KeyEventFilter though… There is no real documentation, and looking at the source has me scratching my head. It’s a field, but has a void return type?? And parameters? Wouldn’t that make it a method instead of a field? So confusing!

    It is called “First class functions”, it’s a reference to a function/method stored in a variable.

    It uses for signals, like KeyEventFilter, and you can to subscribe to it via += operator.

    or

    And there is my variant of your class (with comments):

    As you can see I added OnSuccess signal that will be emitted right after user press key that finished the sequence.

    To use this signal you should to subscribe to it, somewhere you create the sequence – inside of MyWindow::New() in your case:

    And you should remove all usages of Succes and Update methods of CheatSequence from MyWindow code – they are private now!

    So, now CheatSequence became more independant of Window class or any other – you just create sequence and fill it with keys and subscribe to its OnSucces.

    in reply to: Simple cheat code class (My first attempt at using Monkey2!) #13599

    nerobot
    Participant

    A few notes:

    • There is App.KeyEventFilter event you can subscribing to instead of OnKeyEvent – it allow us grab events outside of View class hierarchy
    • You can also provide method AddStrokes( strokeType:Int,strokeValues:Int[] ) so that we can add sequences simplier way passing array.
    in reply to: Anyone have a VR headset? #13598

    nerobot
    Participant

    I have dk2 (probably) I never used yet. 🙂

    I have the idea for demo, maybe try to playing with it!

    in reply to: Vsync issues with Linux? #13573

    nerobot
    Participant

    Look at Window::SwapInterval property.

    Try to set it to 1.

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

    nerobot
    Participant

    Wow, good news!

    When you omit key it passes as Null ?

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

    nerobot
    Participant

    You refer to this one right?

    Yes. Your example is not good enough because I want to omit the key at all.

    Also, if you pass False as a string parameter, you’ll get the string “False”, not an empty string,

    and expression If key then... always be true.

    I think you mean to pass Null here.

     

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

    It seems to be the only way here. 🙂

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

    But I don’t expect to break parser and our minds just because the PHP syntax. 🙂

    in reply to: Syntax Bomb #13357

    nerobot
    Participant

    Great! 💪

    in reply to: m2stp – Simple text processing module #13227

    nerobot
    Participant

    Formatting? Processing! 🙂

    in reply to: Simple Unit-Tests for Monkey2 #13225

    nerobot
    Participant

    👍

    in reply to: One way platform collision? #13224

    nerobot
    Participant

    I saw link to example of one side platform on Chipmunk homepage…

Viewing 15 posts - 91 through 105 (of 805 total)