Page 2 of 2

Re: I have a big problem with the help in the Gambas IDE

Posted: Saturday 19th November 2022 8:42am
by thatbruce
(The other bruce)
Here's a little project that is a pet of mine at the moment. Although it's still a work in progress, the goal is to provide a formatted output to stdout.
If you load it in the IDE you will see a lot of gibberish at the top of the Main.PrintF() sub. Then hit F1 and select
Selection_007.png
Selection_007.png (36.14 KiB) Viewed 1416 times
and you should get
Selection_008.png
Selection_008.png (138.59 KiB) Viewed 1416 times
. That's what Bruce S was talking about. It's how you can write help for your own projects.
regards
b

Re: I have a big problem with the help in the Gambas IDE

Posted: Saturday 19th November 2022 5:32pm
by gambafeliz
Interesting !!!
Thanks, you're very kind

Cheers

Re: I have a big problem with the help in the Gambas IDE

Posted: Sunday 20th November 2022 2:29pm
by BruceSteers
gambafeliz wrote: Saturday 19th November 2022 8:00am BruceSteers

As usual for me, you're right, how strange isn't it? :)

1. I apologize to Debian users with Gambas3, BruceSteers is right, I was driven by passion with Gambas3 in my early days with Debian 10 and I said that everything was fine in Debian 10 when it's the same in Debian 11. Sorry.

2. After digging deeper, I have observed that Gambas3's help is very poor, at least in Spanish. This makes Prawns smaller to enjoy.

3. Honestly if you think like me in programming. If one puts a functionality in Gambas3 as OffLine Help and it is poor and even disastrous, in my opinion it is a big mistake, and we must put the same passion in developing it well and optimally as developing any functionality or class in our own code. don't you think so?

4. BruceSteers, due to the language difference, I have not understood very well your explanation of the help in the Gambas3 Classes. And I'm not sure if what you told me is a trick to get more help, and I haven't even figured out how to try that trick. Would you be so kind to explain it to me again or with a good example to reproduce it. Thanks.

Thank you BruceSteers, you truly are a well of wisdom.
A good example is the HelpText() command I added to gb.args.
If you look at the source code for Args.class in gb.args component here.. https://gitlab.com/gambas/gambas/-/blob ... rgs.module

at line 113 there is this..
'' Get the default help message.<br>Must be used **after** Args.Begin()\
'' Returns the message text and will Print to stdout if boolean arg PrintText is True.
Public Sub HelpText(Optional PrintText As Boolean) As String

If Not $aHelp Then
  DoAbort(("Error: Args.Helptext() must be called after the command Args.Begin()"))
Endif

  Dim sVar As String
    If $sUsage Then
      sVar &= $sUsage & "\n"
    Else
      sVar &= Subst(("Usage: &1 <options> <arguments>"), Application.Title) & "\n"
    Endif

    sVar &= "\n" & ("Options:") & "\n"
    sVar &= $aHelp.Join("\n")
  
  If PrintText Then Print sVar
  
  Return sVar

End

these 2 lines..
'' Get the default help message.<br>Must be used **after** Args.Begin()\
'' Returns the message text and will Print to stdout if boolean arg PrintText is True.

Those lines show the help in the IDE Auto-Complete for the HelpText() command, because the lines start with 2 ' singlequote marks.
It also shows on the online wiki. http://gambaswiki.org/wiki/comp/gb.args/args/helptext

Re: I have a big problem with the help in the Gambas IDE

Posted: Sunday 20th November 2022 6:43pm
by gambafeliz
It is understood. Heard kitchen. :)
thank you young man