Hi,
in a tool I'm building, I have a problem with checkbox.
In a for next boucle, I create checkbox using a counter named rg
for each checkbox, I give an ID it's value is rg+1000
For each checkbox, I use ON CLICK
It's in this part I have a problem
My goal is to modify a value in an array, and to modify a global counter.
The problem is, when clicking to make it, as I haven't success to retreve the good value to process array and counter.
I join the compressed source folder, and the compressed data folder. data folder has to be uncompressed in $HOME, and source folder where you want ($HOME/Desktop for example)
You have then just to modify this line in tuxmore.ini (in data path):
progpath=/opt/TuxMore
to adapt it to yor config.
Thanks for your help
A+
Hi,
instead of creating checkbox using the step of the for next, like this
where I had a problem with the value of rg, I create now, always in a for next, but no more using the step for the checkbox, like this :
This solves my problem, but it needs a lot of lines more ...
If somebody has a solution ...
I have now another problem :
I have a variable with an original value of O which is displayed in a tab, and which is modified by the number of checkbox checked in other tabs.
I'm don't know how to update it.
Here is what I done :
How to refresh the display in the tab ?
Thanks
A+
Last edit: Aupeix Alain 2022-06-29
Hello Alain,
sorry, i am very busy with preparation of vacation.
I'll be absent at middle of next week and will be back last week of July.
Please do me a favor:
Can you send me a "makefile" (*.hbp) so i can compile your application to track the bug ?
I hope that i can help until beginning of my vacation.
With regards,
MNI TNX, 73 es 55 de
DF7BE, Wilfried
Hi,
Thanks for your answer ...
Here is the hbp file.
You have just to update the hbc folders
I join the last version
A+
Last edit: Aupeix Alain 2022-06-30
Hello Alain,
can not find the file "hbversion.ch"
on my system.
cltest@afu-DA320-Series:~/TuxMore/source$ hbmk2 TuxMore.hbp
hbmk2: Processing environment options: -comp=gcc
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
TuxMore.prg(12) Error F0029 Can't open #include file 'hbversion.ch'
hbmk2[TuxMore]: Error: Running Harbour compiler (built-in). 1
('/home/cltest/Harbour/core-master/bin/linux/gcc/harbour') -n2 TuxMore.prg colors.prg initools.prg execute.prg keyboard.prg folders.prg docs.prg printer.prg SiteWeb.prg -w3 -q -m -n -es2 -DHBMK_HAS_HWGUI=1 -DHBMK_HAS_HBCT=1 -o/tmp/hbmk_r7csor.dir/ -i/home/cltest/Harbour/core-master/include -i/home/cltest/svnwork/hwgui-code/hwgui/include -i/home/cltest/Harbour/core-master/contrib/hbct
I used a code snapshot of Harbour from 19th may 2022.
I attached my hbp file.
With regards,
MNI TNX, 73 es 55 de
DF7BE, Wilfried
hi,
Sorry, I miss it.
To bypass this, just add this before memvar:
This #define are to complete harbour and hwgui version (these give revisions).
They are made during my script to update source, and build harbour and hwgui.
I thought, and now too, that the precise version used during applications builds is very important to know if a new bug can be introduced by a new version of hb or hw.
They are built by jharbour using hbv1, hbv1, hbit1, hbit2
A+
The last version
Another new version:
- some typos corrected
- Function Installer() is quite finished now
To do :
- add/Remove a package
- logfile
+ some other things.
A+
Hello Alain,
Following trouble compiling your new revision:
Added in TuxMore.hbp to find hcedit.ch:
-I/home/cltest/svnwork/hwgui-code/hwgui/utils/editor
Missing file on my sytem:
letters.ch
But the old version is running.
At the first start i got the message:
sh: 1: splash: not found
So i installed "splash" by
sudo apt-get install splash.
After start, splash requests a response, see snapshots.
What should i do ?
The installation of TuxMore seems to be confusing.
I recommend, to extract a sample of your application only
demonstrating your problem.
I think, this is the easiest way to fix the bug.
An advice:
METHOD Value( lValue ) CLASS HCheckButton
should set the value of a check button.
With regards,
MNI TNX, 73 es 55 de
DF7BE, Wilfried
Hi, no the installation is not confusing, but I miss some details ...
A+
Last edit: Aupeix Alain 2022-07-16
Hello Alain,
i hope, the commit r3094 is some part of your fix.
I'll continue the work today evening.
With regards,
MNI TNX, 73 es 55 de
DF7BE, Wilfried
Hello Alain,
I have seen a problem, that you can not modify the values
of the checkboxes in the tab's (Button "Tout" = "All" and "Erracer" = "Delete").
I hope, the new sample helps you to fix this problem
(commit r3096).
Now i'll be absent until last week of july.
Please be patient, then i will continue my work with HWGUI and CLLOG.
With regards,
MNI TNX, 73 es 55 de
DF7BE, Wilfried
Hi,
As I said, I found value() function, and I use it now.
Your example is nice , but you can add a function invert(). It's nice when there are a lot of checkboxes, and you just want to check all except some. You have just to check the ones you don't want to check, and invert().
But the problem I had was when initializing checkboxes in a for next boucle, and using the counter in ON CLICK because the counter was modified, and no more in accordance with the checkbox.
For now, I don't initialize it using the counter, but it needs more and more code lines ... :(
I'm not sure there is a solution ...
Thanks
A+
Last edit: Aupeix Alain 2022-07-16
Some modifications:
- structure of tuxmore.dbf to allow comments, and improvement of the data
- added comments button
- install is now depending of a checbox which allow to simulate or launch the installation.
- some typos removed.
To do :
- add a program
- remove a program
- help
- localization ??
A+
Hello Alain,
concerning your request i added the Invert() method
to the HCheckButton class with commit r3098.
I hope, this helps you.
I think, you should create a new project "TuxMore"
on sourceforge.net.
On next monday, i'll continue my work and
check the last revision of TuxMore.
Have a nice weekend.
With regards,
MNI TNX, 73 es 55 de
DF7BE, Wilfried
Hi,
Nice, it remove the need of a test:
But my fisrt problem was to create checkbox in a for ... next.
The creation works nicely, but the ON CLICK doesn't work, as the numeric variable used as counter of for next changes, and the macro used to select the array is wrong.
I found a way which works, but uses a lot of code.
I'm aware that there is probably no other solution that using more code ...
Thanks
A+
Hi,
When testing invert(), I found a typo in tuxmore.dbf (missing filename).
wget -O sagasu2.0.12-5amd64.deb https://www.dropbox.com/s/1b25tzch1h1kiju/sagasu_2.0.12-5_amd64.deb?dl=1 ;dpkg -i sagasu_2.0.12-5_amd64.deb
Also, I found a bug in execute.prg, when there is one of these characters ( \ < >) in the field 'command'. These characters have to be escaped for a simulation.
To do :
- update of tuxmore.dbf
- add a program
- remove a program
- modify a program
A+
Last edit: Aupeix Alain 2022-07-24
Hi Wilfried,
Here is a test for my problems with checkbox creation in a for next.
I think that I have found the solution. The way seems to create variables with are depending of the counter, and in checkbox, use macros.
I notice that if I declare lcheck, I have an error, else, just :
What is your advice ?
Thanks
A+
Last edit: Aupeix Alain 2022-08-17
Hello Alain,
remove the "&" from line 129:
&lcheck=tabAccess[nnum+1,3]
that seems to be the error.
With regards,
MNI TNX, 73 es 55 de
DF7BE, Wilfried
Hi Wilfried,
Here is the concerned part of code:
If I comment the local declaration, it works, just these warnings :
If I uncomment the local declaration, it fails when compiling :
If I remove the & with local uncommented, it fails when compiling:
If I remove the & (on line 132) with local uncommented, no error, no warning.
but in this case, all the checkbox will share the same value ...
I have modified the prg (added some qout(), to comment the problem, so it must be run from a terminal.
A+
Last edit: Aupeix Alain 2022-09-22
Hello Alain,
i tested the Program "Test_for_check.prg" from
the last posted archive " test-for-check(2).tar.bz2" and it is running
with no trouble.
The only modification was:
qout("here is now the value of lchyeck :")
Add a ")" at the end of the line 129.
I added the include directory from hwmake and
used the posted hbp file for compiling.
The output was:
ltest@afu-DA320-Series:~/T2/test-for-check$ hbmk2 Test_for_check.hbp
hbmk2: Processing environment options: -comp=gcc
Harbour 3.2.0dev (r2104281802)
Copyright (c) 1999-2021, https://harbour.github.io/
cltest@afu-DA320-Series:~/T2/test-for-check$ ./Test_for_check
But the qout() outputs are not visible.
What must i now do to provcate the bug ?
With regards,
MNI TNX, 73 es 55 de
DF7BE, Wilfried
Hi Wilfried,
I made a new version, but didn't test it before sending it. And there was a bug, and an incomplete demonstration of the problem.
I send again a new debugged and improved version, but without removing the bad version. I thought the change was done, but it was not.
Now, I send the good test with explanations. You must run it from a terminal
./Tast_tab
ok ?
Thanks
A+
Last edit: Aupeix Alain 2022-09-23
Hello Alain:
I modified x,y CHECKBOX .. to x,y GET CHECKBOX VAR lcheck ...
also ini lcheck with .F.
I hope, that is what you decide.
Now the value of lcheck toggled between .F. and .T..
Output in Terminal:
so the same value is shared by all the checkbox, which is bad
.T.
.T.
.F.
.F.
.T.
.T.
.F.
.F.
.T.
With regards,
MNI TNX, 73 es 55 de
DF7BE, Wilfried
Hi Wilfried,
Yes, now it works without problem.
I have just clean the prg, and add some qout() to demonstrate that it works correctly ...
I just had to invert in ON CLICK nbInstall-- and nbinstall++, as when ON CLICK is called the value of lcheck has already changed.
I think you can close ... I just have to modify TuxMore to apply these modifications.
Thanks
A+
Last edit: Aupeix Alain 2022-09-23