eeLCDoc Documentation

Overview

Main Screen

When you open the plugin within the Livecode Editor you’ll see a start screen as seen in the picture below.

  • Refresh: The refresh button is loading all the currently open stacks in the Livecode Editor.
  • List field: In the list field you can see all open stacks after pressing the refresh button.
  • Generate Doc: This will create a database file in which the documentation is stored in the same location as the stack file.
  • Open Doc: This opens the generated documentation and lets you view it.
  • Generate Source: This will generate the source code in to plain text files. If you generate the source before checking in you can see all the changes in subversion or git.

img1

View Screen

When you click on to the Open Doc button then a screen will open as seen in the picture below. The screen is divided in 3 sections. On the left hand side, all stacks and cards are listed, on the top right hand side all the methods are listed, on the bottom right side the documented details are listed.

  • Search: This lets you search for a method name.
  • Generate Html: This lets you generate html files. The files will be generated in the same location as the db file.

img2

Installation

After downloading the eeLCDoc plugin put eeLCDoc.livecode in to the Plugins folder within your Documents/My Livecode folder.
More information on how to install a plugin can be found here.

Documentation Parameters

–@Summary:

This documentation tag is used to describe a summary about what the method does.

--@Summary: Opens connection to MySQL database

–@Param:

This documentation tag is used to describe a parameter of a method. You can add multiple parameters.

--@Param: pUsername String The MySQL username
--@Param: pPassword String The MySQL password

–@Returns:

This documentation tag is used to describe the return value of a function

--@Returns: Integer The MySQL connection id

–@Used:

This documentation tag specifies if the method is currently in use

--@Used: true

–@Type:

This documentation tag specifies the type of the method or attribute. Type can be: message, keyword, command, property, object, function.

--@Type: command

–@SeeAlso:

This documentation tag can be used to note related commands or functions

--@SeeAlso: ee.sql.connect ee.sql.disconnect

–@Introduced:

This documentation tag specifies in what version the command or function was introduced

--@Introduced: v1.1

–@Platforms:

This documentation tag specifies on what platforms the method is working.

--@Platforms: Desktop, Mobile

–@OS:

This documentation tag specifies on what operating systems the method is working.

--@Platforms: MacOS, Windows, iOS, Android

–@Reference:

This documentation tag can be used to add a reference to for example an external wiki page. Multiple references are possible.

--@Reference: http://myproject.fantastic.org/wiki
--@Reference: http://other.pagewithdetails.com

–|

This documentation tag can be used for a complete description over multiple lines.

--| This function is used to connect to the MySQL database.
--| An integer will be returned with the MySQL connection id. If there
--| is an error then false will be returned.

–:

This documentation tag can be used for examples on how to use the function over multiple lines.

--: put "testuser" into tUsername
--: put "mypass" into tPassword
--: put "http://localhost:5984/mydb" into tURL
--:
--: put ee.couchdb.init(tURL, tUsername, tPassword) into tResult

Example Documentation

Example 1

--@Summary: Sets the header to connect to CouchDB
--@Param: pUrl String Full url to the database (example: http://localhost:5984/mydb)
--@Param: pUsername String The CouchDB username
--@Param: pPassword String The CouchDB password
--@Returns: Array Connection information
--: put "testuser" into tUsername
--: put "mypass" into tPassword
--: put "http://localhost:5984/mydb" into tURL
--:
--: put ee.couchdb.init(tURL, tUsername, tPassword) into tResult
function ee.couchdb.init pUrl, pUsername, pPassword
...
end ee.couchdb.init

Example 2

--@Summary: Used to upload an attachment to a document
--@Param: pDocID String The id of the document
--@Param: pDocRev String The revision id of the document
--@Param: pFileName String The name of the file to upload
--@Param: pContentType String The content type
--@Param: pContent String The content to upload (in binary or text form)
--@Param: pStatusObjectID String The long ID of the stack or card
--@Returns: Array Array with the url response
--: put url ("binfile:test.jpg") into tContent
--: 
--: put ee.couchdb.init(tURL, tUsername, tPassword) into tResult
--: put ee.couchdb.getDocument("id_of_document") into tDoc
--: put ee.couchdb.addAttachment(tDoc["_id"], tDoc["_rev"], "test.jpg", "image/jpg", tContent, the long id of me) into tResult
function ee.couchdb.addAttachment pDocID, pDocRev, pFileName, pContentType, pContent, pStatusObjectID
...
end ee.couchdb.addAttachment