FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour FWH new AutoHelp feature !!!
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
FWH new AutoHelp feature !!!
Posted: Wed Jul 12, 2023 07:19 AM
We know that it is a tedious task to write help for an app, so we have implemented a real simple way to do it using FWH:

SetAutoHelp( lOnOff, lEditable ) // lEditable is .T. by default

just call that function at the beginning of your app, and press F1 on any control of your FWH app, you will be prompted to write the help for it, using richedit text and the next time you press F1 the help will be shown! FWH automatically creates a help.dbf with index and updates it properly.

To test it using FiveDBU, just go to the DBF builder or any other dialog, place the focus on any control and press F1 :-)



Here you can download the EXE (FiveDBU) using AutoHelp to test it:
https://github.com/FiveTechSoft/FWH_tools/blob/master/fivedbu_autohelp.zip
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1487
Joined: Tue Jun 14, 2016 07:51 AM
Re: FWH new AutoHelp feature !!!
Posted: Wed Jul 12, 2023 10:19 AM

Testing.

Wen can create a help text. ex. COPY button (ok)

When you go to a other control (ODBC) it will sometimes show the txt from COPY.

But when you click ODBC, see the menu and return, when you click then, the correct help is shown.

Could it be that the ID is not always correct ?

Marc Venken

Using: FWH 23.08 with Harbour
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FWH new AutoHelp feature !!!
Posted: Wed Jul 12, 2023 10:24 AM
Dear Marc,

It is failing for source code created controls as the controls IDs change. It works fine for resource created controls.

The control must have the focus in order to work fine

We are thinking for a solution :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FWH new AutoHelp feature !!!
Posted: Wed Jul 12, 2023 10:58 AM
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1487
Joined: Tue Jun 14, 2016 07:51 AM
Re: FWH new AutoHelp feature !!!
Posted: Wed Jul 12, 2023 11:11 AM

I see no different behavior, but i'm a source code control user.

The system is for now for resources ?

Marc Venken

Using: FWH 23.08 with Harbour
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FWH new AutoHelp feature !!!
Posted: Wed Jul 12, 2023 11:54 AM
Dear Marc,

FWH AutoHelp already works fine with source code created controls, this is what we have fixed.

start FiveDBU, go to the DBF Builder, focus will go to the first control, press F1, write something, save it

then exit from DBF Builder, go back to it and press F1 again... :-)

Now do it for the second control of DBF Builder, etc...
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1487
Joined: Tue Jun 14, 2016 07:51 AM
Re: FWH new AutoHelp feature !!!
Posted: Wed Jul 12, 2023 01:04 PM
aha... that's for the builder to test ))) I was testing with the buttons on the main menu.



For controls, you mean the gets, not the buttons ?



I was thinking of the tooltip. Many controls have a tooltip and show data based on it. What if the tooltip contains a help code



tooltip = "Just testing a idea [ID]"



the [ID] could become a ID from the dialog+control if possible.



For showing the tooltip itself first it should remove the [ID]. The [ID] then can look for a item in the helpfile en show it.



I don't know if a unique ID can be build from

ID of window

ID of DIALOG

ID of control
Marc Venken

Using: FWH 23.08 with Harbour
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FWH new AutoHelp feature !!!
Posted: Thu Jul 13, 2023 04:53 AM
Dear Marc,

> For controls, you mean the gets, not the buttons ?

Any control

> I was thinking of the tooltip. Many controls have a tooltip and show data based on it. What if the tooltip contains a help code

All the FWH windows, dialogs and controls already have a DATA nId

We are already using the title of the window or dialog, plus the control order in its parent window or dialog:
Code (fw): Select all Collapse
function GetDlgCtrlOrder( hCtrl )

   local hWndParent := GetParent( hCtrl )
   local nOrder := 0, nResult := 0

   EnumChildWindows( hWndParent, { | hWnd | nOrder++, If( hWnd == hCtrl, nResult := nOrder, ) } )

return nResult
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1445
Joined: Mon Oct 10, 2005 02:38 PM
Re: FWH new AutoHelp feature !!!
Posted: Thu Jul 13, 2023 08:55 AM

Hola Antonio,

Te comento que es lo que hice yo, al menos la idea.

Algo parecido a lo que has desarrollado pero con la particularidad de que tiene 2 redactados de ayuda.

El de la aplicación (que entiendo que es lo que has desarrollado), y el del usuario, para que el mismo pueda anotar 'cosas' al respecto de ese dato que debe informar, es decir escribir su propia ayuda.

Eso lo tengo puesto en una MDI con 2 controles Richedit, uno no editable y el otro si.

Es solo una sugerencia.

Muchas gracias,

Un Saludo

Carlos G.



FiveWin 25.12 + Harbour 3.2.0dev (r2502110321), BCC 7.7 Windows 11 Home

Posts: 6983
Joined: Fri Oct 07, 2005 07:07 PM
Re: FWH new AutoHelp feature !!!
Posted: Thu Jul 13, 2023 09:06 AM

Dear Antonio,

Thank you very much. I think that's a great feature.

Is the source code already in the update?

I'll try using the Tinymce HTML Editor for writing.

Best regards,

Otto

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FWH new AutoHelp feature !!!
Posted: Thu Jul 13, 2023 09:27 AM
Dear Otto,

It will be included in FWH build, probably by end of July

Estimado Carlos,

Vamos a comenzar con un diseño sencillo y simple y luego en base al feedback que recibamos lo iremos mejorando y ampliando :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1487
Joined: Tue Jun 14, 2016 07:51 AM
Re: FWH new AutoHelp feature !!!
Posted: Thu Jul 13, 2023 10:04 AM

FIVEWIDI +1

A second screen, based on a flag ( lDebughelp ) would indeed be helpfull. Now I have to write it down into the source what i still need TODO. Then it will be on each controle/dialog. Nice feature.

But OK, First things first !! we will see .....

Marc Venken

Using: FWH 23.08 with Harbour
Posts: 1487
Joined: Tue Jun 14, 2016 07:51 AM
Re: FWH new AutoHelp feature !!!
Posted: Sun Aug 06, 2023 02:01 PM

I'm looking for a other way of help.

When I hover over a button, folderex, xbrowse,... we can see that the hover is changing a color background or showing a tooltip etc..

At that moment, is there a option to get the value or ID from that items i'm hovering over ? Mayby in combination with a Dialog ID so that there is a Unique ID to retrieve from the help dbf ?

I want to show help text before they click on a item. Almost like the tooltip does, but then with the F1 key.

Some of you a able of making a extension on a class, so mayby the tooltip can have one like "TooltipF1" and show the tooltip of the hovered item with F1.

In my case it is not needed that F1 is used. Any key is ok.

I hope I make some sence )))

Marc Venken

Using: FWH 23.08 with Harbour
Posts: 1789
Joined: Tue Oct 11, 2005 05:01 PM
Re: FWH new AutoHelp feature !!!
Posted: Sun Aug 06, 2023 08:18 PM

Antonio, pienso que un help por window o dialog sería más eficiente en lugar de cada control, asi solo le agregamos in id a la ventana o dialogo para que muestre la ayuda.

bueno es una opinion...

salu2

carlos vargas

Salu2

Carlos Vargas

Desde Managua, Nicaragua (CA)
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: FWH new AutoHelp feature !!!
Posted: Mon Aug 07, 2023 05:46 AM

Estimado Carlos,

Si, tienes mucha razón, sería lo más simple

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion