New feature: built-in documentation

Erel

B4X founder
Staff member
Licensed User
Longtime User
Basic4android V2.00 will include a new built-in documentation feature.

Comments above subs, such as:
SS-2012-06-07_15.30.52.png


Will automatically appear in the pop-up window:
SS-2012-06-07_15.33.24.png




If you want to add a code example you can use <code> tags:
B4X:
'Parses a raw mail message and returns a Message object
'Mail - The mail raw text
'AttachmentsDir - Attachments will be saved in this folder
'
'Example: <code>
'Dim m As Message
'm = MailParser.ParseMail("Content-Type: text/plain; charset=" & QUOTE & "utf-8" & QUOTE, File.DirRootExternal)
'Log(m)</code>

The code will be syntax highlighted:
SS-2012-06-07_15.37.42.png
 

PaulR

Active Member
Licensed User
Longtime User
It is a way to add notes to Autocomplete to describe your Subs.

Here is a screenshot...
9b8233507a5ac0c46539d2a3118c08ff.png


Every line must have a '. Including the code....
c961f0b9bd994e0e8159c204ae0ff60c.png
 
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
Hi PaulR,
Please help me edit my widget to complete. I should understand this thread.
I read the last replied. I'm very dizzy.
Best Regards
Theera
:sign0013:
 
Last edited:
Upvote 0

klaus

Expert
Licensed User
Longtime User
I modified your code.
In the example code at line 30 a = Root add ( and you will see the help like in the attached picture.
The help must be before the Sub line without empty lines.

Best regards.
 

Attachments

  • Test.jpg
    Test.jpg
    85 KB · Views: 244
  • testdoc.zip
    5.7 KB · Views: 237
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
Why different between your picture and mine?

Hi Klaus,
I have start understand what do you figure me about text tool tip. But why mine doesn't like your picture attached.
Best Regards
Theera
:)
 
Last edited:
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
Hi Klaus,PaulR,and Ricky D
Thank you very much for everybody. I have understand already. The last my reply. I must add <code>...</code> .This thread make me very teribly.
Best Regards
Theera
 
Upvote 0

JackKirk

Well-Known Member
Licensed User
Longtime User
OK, I know this is an old thread but it seems the best place to pose this question.

I realise the question may not strictly relate to the built-in documentation feature but it is at least heavily associated with it.

If I have this method in a class module (note no return type on sub declaration because it never returns anything):

class.jpg


And then use it in another module (main say):

main.jpg


I get a spurious return type (highlit in red).

And I can not find a way to suppress it - I have seen other methods that do not return anything that do not have spurious return types so I assume it is possible.

Thanks in anticipation...
 
Upvote 0

Roycefer

Well-Known Member
Licensed User
Longtime User
All B4X methods without a specified return type are given a return type of String when the B4X code is transpiled into Java. The only way to get no return type listed in the documentation is to have a return type of type void. B4X doesn't have a void type. The methods you are seeing without specified return type are most likely in libraries written in Java.

As an aside, I'm pretty sure Erel will insist that this should have been a new thread.
 
Upvote 0
Top