IDE - HELP-Comment, to set the displayed Help-Text in Editor

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
PureLust
Enthusiast
Enthusiast
Posts: 477
Joined: Mon Apr 16, 2007 3:57 am
Location: Germany, NRW

IDE - HELP-Comment, to set the displayed Help-Text in Editor

Post by PureLust »

So far, the whole Declaration of a Procedure or Macro will be displayed as Help-Text at the Bottom of the IDE.

Would it be possible to define this Help-Text, maybe by a following Comment with a Keyword (like the TODO or FIXIT Keywords)?

Example:
Procedure.s hBox(Expand, Align=#PB_Default, Spacing=#PB_Default, XmlParam$="") actually generates the Help Text:

hBox(Expand, Align=#PB_Default, Spacing=#PB_Default, XmlParam$="") which is not very clear to read.

A Help-Text in the usual PB-Format would be much easier to read:

hBox(Expand [, Align [, Spacing [, XmlParam$]]]) - generates a String with a <hbox...>-Tag in XML-Format


Maybe it could be implemented like this:

Procedure.s hBox(Expand=#PB_Default, Align=#PB_Default, Spacing=#PB_Default, XmlParam$="") ; HELP: hBox(Expand [, Align [, Spacing [, XmlParam$]]]) - generates a String with a <hbox...>-Tag in XML-Format
[Dynamic-Dialogs] - create complex GUIs the easy way
[DeFlicker] - easily deflicker your resizeable Windows
[WinFX] - Window Effects (incl. 'click-through' Window)
User avatar
Sicro
Enthusiast
Enthusiast
Posts: 559
Joined: Wed Jun 25, 2014 5:25 pm
Location: Germany
Contact:

Re: IDE - HELP-Comment, to set the displayed Help-Text in Ed

Post by Sicro »

A workaround to realize this now, was found by the thread creator, when he wrote his "DynamicDialogs" module.

He certainly will not mind if I also make known here.

Example:

Code: Select all

DeclareModule test
  CompilerIf #False
    ; Dummy declarations
    Declare bla(a.s, [b.s, c.s])
    Declare bla(a.s, [b.s, [c.s]])
  CompilerElse
    Declare bla(a.s, b.s = "", c.s = "")
    Declare bla2(a.s, b.s = "", c.s = "")
  CompilerEndIf
EndDeclareModule

Module test
  Procedure bla(a.s, b.s = "", c.s = "")
    ; ...  
  EndProcedure

  Procedure bla2(a.s, b.s = "", c.s = "")
    ; ...  
  EndProcedure
EndModule
Now if you typing

Code: Select all

test::bla(
in the editor, this info text appears below in the status bar:

Code: Select all

bla(a.s, [b.s, c.s])
Now if you typing

Code: Select all

test::bla2(
in the editor, this info text appears below in the status bar:

Code: Select all

bla2(a.s, [b.s, [c.s]])
Image
Why OpenSource should have a license :: PB-CodeArchiv-Rebirth :: Pleasant-Dark (syntax color scheme) :: RegEx-Engine (compiles RegExes to NFA/DFA)
Manjaro Xfce x64 (Main system) :: Windows 10 Home (VirtualBox) :: Newest PureBasic version
Post Reply