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
 

BarrySumpter

Active Member
Licensed User
Longtime User
LOL.
Was just wondering how to implement this!
As always, the solution is there, I just have to find it.
Too Easy!
Brilliant!

Thanks Erel.
 
Upvote 0

etLux

Member
Licensed User
Longtime User
Nice!

I've said it before, but it bears repeating:

B4A is one of the best development software bargains around!

Great product, great price, great support -- and an unparalleled effort to continually improve it.

Best,




David
-----
David Sosnowski

The Music of David Sosnowski
www.DavidSosnowski.com
 
Last edited:
Upvote 0

jeeradate

Member
Licensed User
Longtime User
Erel you are the greatest

B4A is so simply to use without knowing java programming. Thank you a lot

Alien124.gif

I am agree with him that Erel is the Great.
:sign0098:
 
Upvote 0

Djembefola

Active Member
Licensed User
Longtime User
The built-in documentation is so easy to use: brilliant, Erel!

The only thing i am currently missing: because there is no way to implement public properties as class members, i often have to use public variables (disadvantage: no encapsulation) as a workaround. Unfortunately public variables are excluded from the built-in documentation.

Would it be possible to include comment lines above public variables in the documentation?


Maybe my question is obsolete because you already plan to implement class properties in the next version...;)
 
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
Example built-in documentation

Hi all,
Help me to show Example about built-in documentation? I don't know to apply continue.

Best Regards
Theera
 
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
Have a look at Erels first post everything is shown there.

Best regards.

Hi Klaus,
I try understand Erel's post,but I don't see example ,I don't clear.
P.S.I'm not good at both English and Programming,Please understand me.
Best Regards
Theera
 
Upvote 0

Ricky D

Well-Known Member
Licensed User
Longtime User
Hi Theera like Klaus said look at Erel's first post.

He has the example there.

Regards, Ricky
 
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
I'm sorry,please to see my code.

Hi Theera like Klaus said look at Erel's first post.

He has the example there.

Regards, Ricky

I'm sorry,I'm really stupid. Please to correct to me. I need to learn more.

Best Regards
Theera
 
Last edited:
Upvote 0

Ricky D

Well-Known Member
Licensed User
Longtime User
That's okay mate. You're not stupid either. I'm sure all of us have trouble understanding something or other.

By asking questions shows me you're keen to understand and that's a sign of a hungry mind.

Regards, Ricky
 
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
No one help me

Hi Klaus,
I try understand Erel's post,but I don't see example ,I don't clear.
P.S.I'm not good at both English and Programming,Please understand me.
Best Regards
Theera

Hi Klaus,
Excuse me,Would like you help me correct my code please? I have no idea to edit my code.
Best Regards
Theera
 
Upvote 0

PaulR

Active Member
Licensed User
Longtime User
Here's what you have...
B4X:
Sub btn_Click
   '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)
End Sub
Sub ParseMail(Mail As String,AttachmentDir As String) As message
  index = 0
  multipart = Flase
  boundary =""
  Dim msg As message
  msg.initialize
  msg.Attachments.initialize
End Sub

Hi, you have put the documentation comments inside the btn_click sub. It shouldn't be in any sub. You need to put the documentation comments directly above the Sub declaration you want the documentation for... with no blank lines. You also need to comment ALL lines, including the code.

Finally, you need to put <code> at the beginning of the code example AND </code> at the end of the code example.


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>
Sub ParseMail(Mail As String,AttachmentDir As String) As message
  index = 0
  multipart = Flase
  boundary =""
  Dim msg As message
  msg.initialize
  msg.Attachments.initialize
End Sub

Hope that clears things up.... :)
 
Last edited:
Upvote 0

Theera

Well-Known Member
Licensed User
Longtime User
Here's what you have...
B4X:
Sub btn_Click
   '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)
End Sub
Sub ParseMail(Mail As String,AttachmentDir As String) As message
  index = 0
  multipart = Flase
  boundary =""
  Dim msg As message
  msg.initialize
  msg.Attachments.initialize
End Sub

Hi, you have put the documentation comments inside the btn_click sub. It shouldn't be in any sub. You need to put the documentation comments directly above the Sub declaration you want the documentation for... with no blank lines. You also need to comment ALL lines, including the code.

Finally, you need to put <code> at the beginning of the code example AND </code> at the end of the code example.


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>
Sub ParseMail(Mail As String,AttachmentDir As String) As message
  index = 0
  multipart = Flase
  boundary =""
  Dim msg As message
  msg.initialize
  msg.Attachments.initialize
End Sub

Hope that clears things up.... :)

Hi PaulR,
I 'm sorry for my stupid.I still not clear up.Please give example for me.Because I 'm not good at English too.I understand English only 5-10% .

Best Regards
Theera
 
Upvote 0
Top