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

New to Gambas? Post your questions here. No question is too silly or too simple.
User avatar
thatbruce
Posts: 60
Joined: Saturday 4th September 2021 11:29pm

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

Post 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 49 times
and you should get
Selection_008.png
Selection_008.png (138.59 KiB) Viewed 49 times
. That's what Bruce S was talking about. It's how you can write help for your own projects.
regards
b
Attachments
PrintF-0.0.1.tar.gz
(13.2 KiB) Downloaded 7 times
User avatar
gambafeliz
Posts: 67
Joined: Friday 2nd September 2022 7:50pm
Location: I live in the same city as Picasso

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

Post by gambafeliz »

Interesting !!!
Thanks, you're very kind

Cheers
For your misfortunes I am Spanish and I only know Spanish, please, be patient with me, Thank you. :)
User avatar
BruceSteers
Posts: 987
Joined: Thursday 23rd July 2020 5:20pm
Location: Isle of Wight
Contact:

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

Post 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
If at first you don't succeed , try something different.
BruceS
User avatar
gambafeliz
Posts: 67
Joined: Friday 2nd September 2022 7:50pm
Location: I live in the same city as Picasso

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

Post by gambafeliz »

It is understood. Heard kitchen. :)
thank you young man
For your misfortunes I am Spanish and I only know Spanish, please, be patient with me, Thank you. :)
Post Reply