Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Studio Chat / Feature Idea: Documenting user created function to show in help window

Author
Message
ShaunRW
DBPro Developer
16
Years of Service
User Offline
Joined: 7th Jan 2008
Location: Brisbane, Australia
Posted: 31st Mar 2019 09:25
I'm thinking of putting this in for a feature request, but just want to gauge if it is something everyone else would want or use.

So, when you need to know more about an AppGameKit command, you would press F1 while the command is highlighted in the code editor. This brings up the help doc for that command in the help tab to the left.

What I'm thinking is the same thing for our own functions. We could put a comment block just above or inside the function definition, and the studio editor could use that comment as a help doc for that function. Pressing F1 on the highlighted function name anywhere in code would bring up the function help in the same help tab just like normal help docs.

This code:



OR



would show in the help window as:



I believe this could be very useful. Is this something anyone else would like added?

Attachments

Login to view attachments
Takis76
19
Years of Service
User Offline
Joined: 9th Apr 2005
Location: Greece
Posted: 31st Mar 2019 13:04
I agree too.
+1
Kakise
AGK Tool Maker
7
Years of Service
User Offline
Joined: 25th May 2016
Location: Paris
Posted: 31st Mar 2019 13:21
That would be awesome, I often find myself lost when I read programs I made long ago and need to check what which function does what
PCG Lover
Using AppGameKit Tier 1&2

My creations:

[Tier 1 PLUGIN] Wave Function Collapse for Tier 1
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 31st Mar 2019 20:35
Nice idea but I think using some kind of definition file (maybe XML) would be more useful as this would enable plugin functions to be documented in the same manor.

PSY
Developer
7
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 31st Mar 2019 23:20
I always use comments above my functions, like:



But everybody has got their own style, so ShaunRW's request might be useful for a lot of people...


PSY LABS Games
Coders don't die, they just gosub without return
Dutchman
5
Years of Service
User Offline
Joined: 30th Mar 2019
Location:
Posted: 1st Apr 2019 06:39
This a very usefull idea

+1
ShaunRW
DBPro Developer
16
Years of Service
User Offline
Joined: 7th Jan 2008
Location: Brisbane, Australia
Posted: 1st Apr 2019 12:05
Quote: "Nice idea but I think using some kind of definition file (maybe XML) would be more useful as this would enable plugin functions to be documented in the same manor."

AGK uses html files for its documentation, which i assume the Studio IDE is displaying. It would be neat if we could drop our own files into a certain folder. This way plugin creators could provide the help files along with the plugin. DBPro did something like this IIRC.

Quote: "But everybody has got their own style"

That's true. If the function name and definition in the help are generated from the actual code, it would work ok. Then the description comes from the contents of the leading comment, whether it is a single line or block.

I went ahead and added the feature request to github: https://github.com/TheGameCreators/AGK-Studio/issues/238
janbo
15
Years of Service
User Offline
Joined: 10th Nov 2008
Location: Germany
Posted: 1st Apr 2019 18:21 Edited at: 1st Apr 2019 18:21
I thought this myself.
Like the XML Documentation Comments in Visual Studio
You can then create a html file from the XML code with sandcaste for example.
Not sure if I want an XML or a HTML
But II'l give this a +1 anyway
DavidAGK
AGK Developer
10
Years of Service
User Offline
Joined: 1st Jan 2014
Location:
Posted: 1st Apr 2019 19:51
I like the idea of being able to quickly and simply state what a function does and it’s inputs and outputs. Great idea.

Reckon it should be kept simple.
Using Tier 1 AppGameKit V2
Started coding with AMOS (Thanks Francois Lionet)

Login to post a reply

Server time is: 2024-04-26 06:28:31
Your offset time is: 2024-04-26 06:28:31