[BUG R185b] Function name auto-complete not working

Bugs will be moved here once resolved.

Post » Tue Oct 21, 2014 4:46 am

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
editor_bug.capx


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
You do not have the required permissions to view the files attached to this post.
Last edited by codah on Tue Oct 21, 2014 12:12 pm, edited 1 time in total.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Tue Oct 21, 2014 11:09 am

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?
ImageImageImageImage
B
157
S
66
G
41
Posts: 2,599
Reputation: 34,825

Post » Tue Oct 21, 2014 11:17 am

shinkan wrote: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.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Tue Oct 21, 2014 11:51 am

Made a new bug report, so Ashley can attack them one by one ;)
ImageImageImageImage
B
157
S
66
G
41
Posts: 2,599
Reputation: 34,825

Post » Wed Oct 22, 2014 3:36 pm

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?
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,762

Post » Wed Oct 22, 2014 8:54 pm

Ashley wrote: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 :shock: 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.
B
24
S
9
G
4
Posts: 1,646
Reputation: 6,596

Post » Thu Oct 30, 2014 11:15 am

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?
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,762

Post » Thu Oct 30, 2014 11:26 am

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 ;)
ImageImageImageImage
B
157
S
66
G
41
Posts: 2,599
Reputation: 34,825

Post » Thu Oct 30, 2014 1:01 pm

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)
ImageImage
B
70
S
21
G
7
Posts: 827
Reputation: 10,052

Post » Thu Oct 30, 2014 3:42 pm

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.
Scirra Founder
B
395
S
232
G
88
Posts: 24,371
Reputation: 193,762

Next

Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 4 guests