Marc

Member

Last active [hidden]

  1. 3 weeks ago
    Wed Apr 24 20:44:29 2019
    Marc posted in Home/End key support.

    @marco Oh I see... by default they scroll to the beginning/end of the document and not of the current line.
    Is the current line the preferred way? (not easy to implement)

    Yes, current line. That’s how VS does it by default.

  2. Wed Apr 24 20:10:02 2019

    @marco I agree that a Locked state for control would be really useful. Let me check.

    I wasn't referring to a lock setting that you can set per control, but more of a global setting that will lock them by default, unless you hold a specific key while dragging the control.

  3. Wed Apr 24 20:08:41 2019
    Marc posted in Home/End key support.

    @marco Does a MacOS keyboard really have Home/End keys? Where?

    See attachment. On the newer model the words Home/End are replaced with arrow symbols, but they work the same.

  4. Wed Apr 24 19:04:26 2019
    Marc started the conversation Home/End key support.

    I know the Home/End keys, to navigate to begin/end of line, are typical (cough) Windows keys, but for me those two keys are very useful instead of the macOS equivalent key combinations.

    Visual Studio Mac does support them, so I guess it's possible. So wish would be to have them supported in Creo.

  5. Wed Apr 24 18:49:36 2019
    Marc started the conversation Prevent unintentional moving of controls.

    I don't know if I'm the only one, but when I have to select controls just for the purpose of changing properties, it often happens that I unintentionally move the control a bit. If I notice that, I can press Undo, but if I don't the control isn't properly positioned anymore.

    What I would like to suggest to have a setting that, if checked, wouldn't allow moving controls unless I also hold some key like the Option or Command key.

  6. 2 months ago
    Fri Mar 15 18:44:33 2019

    @marco The good news is that a Manifest/Incremental typing will be added to Gravity so more static checks will be performed (typing is necessary if we want to export Gravity code to Swift/Kotlin).

    In the meantime it has bitten me a number of times more. Dynamic typing does seem to make things easier, but honestly it's making it harder as it's much more difficult to prevent (runtime) bugs.

    In other words: can't wait till static typing is there (as much as possible) ..... ;)

  7. Wed Mar 13 16:12:05 2019
    Marc posted in SQLite transaction.

    @marco Here you go an updated version with transactions support:

    func executeList(r) { var index = 0; self.execute("BEGIN TRANSACTION;") for (var sql in r) { if (self.execute(sql) == false) { self.execute("ROLLBACK;") return index; } index += 1; } self.execute("COMMIT;") return true }

    I wonder if this would work in an async way with multiple connections performing transactions to the same database. I'm going to test that. Thanks so far.

  8. Wed Mar 13 16:05:44 2019

    @marco Hi @Marc it would be easier to do in a statically typed language but Gravity is dynamically typed so it is a lot harder and not always possible. For example consider this pseudo code:

    func test() {
       if (isSunday) return 1;
       else return "Hello World";
    }
    
    func main() {
       var s = test();
       return s.length;
    }

    That code cannot be checked at compile time but only at runtime and it will work all the days except on Sunday (because the number type does not have a length property).

    The good news is that a Manifest/Incremental typing will be added to Gravity so more static checks will be performed (typing is necessary if we want to export Gravity code to Swift/Kotlin).

    I understand that. But this scenario has occurred to me several times already. I don't mind the problem scenario in your pseudo code. Maybe you could somehow check breaking code after moving controls; eg. via a warning.

  9. Wed Mar 13 15:57:05 2019
    Marc posted in SQLite transaction.

    @marco Hi @Marc that would be an easy method to add to your database:

    func executeList(r) { var index = 0; for (var sql in r) { if (self.execute(sql) == false) return index; index += 1; } return true }

    But that doesn't do a rollback? What I'm looking for is an implementation of SQLite's transaction:

    https://www.sqlite.org/lang_transaction.html

  10. Wed Mar 13 15:54:09 2019
    Marc started the conversation Detect (more) errors on compile.

    Scenario:

    1. I add a reference to a control in code; eg.: windowTest.buttonTest.
    2. I reorganise the lay-out which results in inserting an extra container ("viewTest") that will have buttonTest as a child; eg.: windowTest.viewTest.buttonTest.
    3. Run or Compile don't complain about this and now I only encounter the error when I do something that triggers that part of the code. This makes it a bit hard to test.

    So it would be nice if these types of errors would be found when doing a compile.

    NB: I have check "Report errors on Null values".

View more