Git Product home page Git Product logo

Comments (4)

fincs avatar fincs commented on June 16, 2024

Works for me, after fixing the indentation. Also, the property parameter stuff is for property accesses such as obj.property[13], NOT the actual value to be set.
Could you post here a complete example that does not work?

This is what I would write:

/*!
    Property: alwaysOnTop [get/set]
        Specifies whether the window (?) is always on top (true/false).
*/

from gendocs.

hoppfrosch avatar hoppfrosch commented on June 16, 2024

Here's an example what I mean:
Trying to document the following file (note the @UseShortForm in Class documentation) results in different content of documentation of alwaysontop-property (dependend on the presence of @UseShortForm):

/*!
    Library: bla

        ### License
        abcd

        ### Author
        [hoppfrosch]([email protected])


    Author: [email protected]
    License: WTFPL
*/

/*!
    Class: XX
        bla

    Extra:
        ### License
        abcd

    Remarks:
        ### Author
            [hoppfrosch]([email protected])
    @UseShortForm

*/

/*! ---------------------------------------------------------------------------------------
    Property: alwaysOnTop [get/set]
        Get or Set the *AlwaysOnTop*-Property. To toogle current *Always-On-Top*-Property, simply use `obj.alwaysOnTop := !obj.alwaysOnTop`
    Parameters:
        flag - true or false (activates/deactivates *AlwaysOnTop*-Property)
*/

/*!
    End of class
*/

WITH @UseShortForm I get the following:

alwaysOnTop

Get or Set the AlwaysOnTop-Property. To toogle current Always-On-Top-Property, simply use obj.alwaysOnTop := !obj.alwaysOnTop

OutputVar := XX.alwaysOnTop
XX.alwaysOnTop := Value

flag    true or false (activates/deactivates AlwaysOnTop-Property)

WITHOUT @UseShortForm I get the following:

XX.alwaysOnTop

Get or Set the AlwaysOnTop-Property. To toogle current Always-On-Top-Property, simply use obj.alwaysOnTop := !obj.alwaysOnTop

OutputVar := XX.alwaysOnTop
XX.alwaysOnTop := Value

Value 
<-- No documentration here

Note the line "flag true or false (activates/deactivates AlwaysOnTop-Property)! when using @UseShortForm

from gendocs.

hoppfrosch avatar hoppfrosch commented on June 16, 2024

Works for me, after fixing the indentation. Also, the property parameter stuff is for property accesses such as obj.property[13], NOT the actual value to be set.

Understood this - if I want to document the argument given to the property-Setter, I have to use the keyword value - and not parameter.

I used parameter, because I took your AFC-Library documentation as example: within documentation of NextSelectedRow() in https://github.com/fincs/AFC/blob/master/Lib/CCtrlListView.ahk you also used Parameter instead of Value ... ;-)

Nevertheless - Using or omitting @UseShortForm should not produce different output for keyword Parameter ...

from gendocs.

fincs avatar fincs commented on June 16, 2024

Trying to document the following file (note the @UseShortForm in Class documentation) results in different content of documentation of alwaysontop-property (dependend on the presence of @UseShortForm):

Oh, I get it; I thought it was the @UseShortForm version which was missing the information. I will fix it. GenDocs' "long form" code is assuming that only functions/methods will have parameters, and that properties will always have 'Value'.

I used parameter, because I took your AFC-Library documentation as example: within documentation of NextSelectedRow() in https://github.com/fincs/AFC/blob/master/Lib/CCtrlListView.ahk you also used Parameter instead of Value ... ;-)

That's because those properties actually take some extra parameters:

lv.Item[1,1] := "stuff"
msgbox % lv.Item[1,1]

from gendocs.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.