[BUG R185b] Function name auto-complete not working

0 favourites
  • 11 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • There is no longer auto-complete when entering a function name

    When adding a 'Function: Call function' action, the pop-up to enter the function 'Name' no longer auto completes. Previously (R184) this field would auto-complete object and variable names.

    Capx

    [attachment=0:ernue8hj][/attachment:ernue8hj]

    Description of Capx

    The capx contains an object (SpriteFont) that contains 3 Text instance variables that match 3 function names. The capx doesn't 'do' anything but allows the user to try the steps below in the editor. It also contains a global text variable for similar purposes. Finally it contains a Function object.

    Steps to Reproduce Bug

    • Load the provided capx
    • Navigate to Event sheet 1
    • Add an action anywhere
    • Double click the Function object
    • Double click "Call function"
    • Type the letter F (alternatively, type the letter G)

    Observed Result

    When typing F or G, the letter appears in the edit box.

    Expected Result

    When typing F or G, the letter should appear in the edit box and also there should be a drop-down displaying object and variable names* that start with F (e.g. the FN object) or G (the variable GLOBAL_FUNCTION_NAME) as appropriate.

    *Edit: also system expressions, etc etc.

    Affected Browsers

    N/A; editor issue only

    Operating System and Service Pack

    Windows 8.1

    Construct 2 Version ID

    R185 beta

  • Also r185 introduced new issue with "Parameters for Function" window.

    If you open call function action and function have some parameters, you can't use TAB to switch between "Name", and parameters". Pressing tab goes from "Name" to "Add parameter" but if you select any of parameters you can then cycle between them using TAB. Shift+TAB works fine.

    Should I leave it here, or make a new bug report?

  • Also r185 introduced new issue with "Parameters for Function" window.

    If you open call function action and function have some parameters, you can't use TAB to switch between "Name", and parameters". Pressing tab goes from "Name" to "Add parameter" but if you select any of parameters you can then cycle between them using TAB. Shift+TAB works fine.

    Should I leave it here, or make a new bug report?

    Yea, it's a different bug I guess. Up to you.

  • Made a new bug report, so Ashley can attack them one by one

  • Well, this is kind of difficult to resolve. We can either use the normal expression input control which has auto-complete, syntax highlighting, and so on, but no dropdown. Or we can use a dropdown control which doesn't have auto-complete and syntax highlighting.

    I guess we would need to somehow bolt on a new dropdown feature of the normal expression control. That could be complicated. Is this definitely something which is important to your project?

  • Well, this is kind of difficult to resolve. We can either use the normal expression input control which has auto-complete, syntax highlighting, and so on, but no dropdown. Or we can use a dropdown control which doesn't have auto-complete and syntax highlighting.

    I guess we would need to somehow bolt on a new dropdown feature of the normal expression control. That could be complicated. Is this definitely something which is important to your project?

    Well, it's definitely second nature to me now to type "fn." then have all my function names appear.

    Then I thought, well maybe the new feature isn't so bad, I'll give it a try. Typing " and having my function names appear is just as good after all

    So I try R185 again and find that when I type " there is NO auto complete How do we keyboard jockeys use this system? (yea I know, Alt-down arrow then arrow or " to scroll)

    So I'm kind of bummed out about that. But if it's only me then, meh.

    Couldn't we have this:

    User types " (double quote) -> function names dropdown appears, with auto complete

    OR

    User types anything else -> 'normal' dropdown appears with auto complete

    I don't understand why, if the function name parsing is already done (viz the dropdown) that auto complete couldn't work here?

    ANYWAY I'm sure I could come to terms with the new way and everyone else seems ecstatic, so I'm sure I'd get used to it before long It does save me the trouble of having to add Text instance vars to a FN object.

    Have re-installed 185 now, see how I go. Thanks.

  • I looked in to this more and it could be fairly tricky to sort out and take a while. I'd prefer not to spend a lot of time on it if it's not really a huge problem since as ever we get more feature requests than we can address quickly... the easiest two options are:

    1) leave it as it is (my preferred, since it involves no work )

    2) go back to the old way, but list the functions in auto-complete when you type "

    What do you think is the best way? How about if this same change is extended to animation names, layout names etc - would you want the same solution?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I would say that auto-complete suits better current C2 system (like global vars, objects, etc.) and is a bit faster to type first few words then select an item from dropdown list with mouse

  • not working active with construct for a while, so i didn't tested, but autocomplete would be great, not a big fan of the text list.(but better then not)

    but how would it work exactly? I call my function object just "f" so something like f.myFunction("add","1","1")

    (when typing f. you get the list of custom functions + normal function methods)

  • Yeah, I tried it out and the autocomplete kind of works better, since it updates as you type and you also get all syntax highlighting/other autocomplete features. This is done for the next build so closing.

  • Sorry I somehow missed these last posts. Thanks for the change, really appreciate it!

    There is a second reason to keep using 'function name container' objects and that is when renaming a function, all your references (calls) get changed as well.. So I will probably keep using that technique, in which case this change has been essential. Thanks again.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)