Pages: [1]   Go Down
Author Topic: help ballons on functions  (Read 1289 times)
0 Members and 1 Guest are viewing this topic.
SE USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

here is an idea as I run to the reference again, back when I participated in secondlife (3d social network thing) they had a "in world" scripting system

The in world editor was basic and focused, like the Arduino ide, but one very handy thing was if you typed in a function, lets say for arduino digitalWrite(), and forgot which argument came first, you could mouse over the function name and it would bring up a box containing a example argument and a 1 or 2 line description


Logged


Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17294
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That would be a very cool feature.

Lefty
Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 40
Posts: 5575
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

That's basically what I was proposing here:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1267047298

...for items #1 and #2 - if done right, then not only would your code be self-documenting, it would be self-referential in that not only would the Arduino functions/methods have the pop-up documentation, but user's could as well (how many times have you forgotten what parameters a function you wrote used? Happens to me all the time, unless I document it, and then I still have to reference that).

If you added code-folding on top of that...

Now, don't anybody say "use Eclipse", I've heard the argument. I think it is a valid argument, but sometimes you just want something simpler, but not as simple as the Arduino IDE. I think these few extras that I've mentioned before would help both newbies and more experienced users alike; I do think they need to be disabled by default - in effect have the IDE start out as "simplified", and as a user's skillset broadens, they can turn on those options as needed in the preferences (or via the config file if you wanted).

 smiley
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

SE USA
Offline Offline
Faraday Member
**
Karma: 41
Posts: 3783
@ssh0le
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

use eclipse hippy

oh wait! never mind
Logged


Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 613
Posts: 49310
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I do think they need to be disabled by default - in effect have the IDE start out as "simplified", and as a user's skillset broadens, they can turn on those options as needed in the preferences (or via the config file if you wanted).

I can remember the arguments for digitalRead and digitalWrite The number of posts on the forum where newbies try to use digitalRead like digitalWrite (with 2 arguments) indicates that the newbies are the ones that need code completion, balloon help, etc.

I think that if these features were included, they should be on by default, and easy to turn off.

Newbies have enough trouble learning that making them hunt for things that make life easier seems counter-productive.
Logged

Cape Town, South Africa
Offline Offline
Full Member
***
Karma: 0
Posts: 177
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To be honest, this should be very trivial to implement.

Even if you show a bunch of ambiguous matches, it helps  smiley
Logged

Norway@Oslo
Offline Offline
Edison Member
*
Karma: 13
Posts: 2033
loveArduino(true);
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

A static list is trivial. It's just to loop through the list and rate each identifier with a probability score, and show them in order.

BUT when one wants a dynamic list, thigs get uglier. We already suffer from one sideeffect from the hazzle of determining wether a token is a function or not (namely the user-defined struct problem, where the arduino preprocessor won't generate function prototypes.), I do not think it should be thought of as a small and simple deal to implement a dropdown as seen in Visual Studio.

You need to parse all files, for all identifiers. And when this is done, you should remember what scope they're in, what arguments they take, if any. And the list continues on.


I'm not saying that this is impossible, but it's not easy either.

A dropdown for the core functions might be a compromise, but it will add another thing to the list of things to remember to modify between releases. Or, maybe we could use the identifers from the highlighting token list?
« Last Edit: May 31, 2010, 03:19:06 pm by AlphaBeta » Logged

Pages: [1]   Go Up
Jump to: