Page 3 of 4
Re: HFCL-ComboSearchBox- BugFix & New Features
Posted: Tue Jun 10, 2014 8:05 pm
by tonton2
Bonjour,
Je ne comprends pas pourquoi en changeant Country.list par une base de donnée CONSTART.dbf et en creant un tableau acountries ,ça ne veut pas marcher et me donne l'erreur suivante.Grand
Merci a vous tous
Hello,
I do not understand why changing Country.list a database by creating a CONSTART.dbf and acountries array, it does not want to walk and gives me the following error.
Thank for you
HFCL-ComboSearchBox- BugFix & New Features
Posted: Tue Jun 10, 2014 8:17 pm
by Pablo César
Hi Youcef,
I did not see your code, but I guess your problem (by what I see of error in display) when there is already another window MODAL type, that probably you tonton2 are using also in you own code.
Because is not allowed 2 modal windows. If is this, Mr. Rathi will confirm, then in HFCL-ComboSearchBox must treat it all modal window like as is doing in HMG_Preview. i.e. to disable for a while all modal windows before executing HFCL-ComboSearchBox. That's it !!
Dear Rathi, have you understood what I mean ?
Re: HFCL-ComboSearchBox- BugFix & New Features
Posted: Tue Jun 10, 2014 9:15 pm
by tonton2
le code est dans le fichier .rar "DOES_NOT_WORK" // the code is in the file. rar "DOES_NOT_WORK"
voila le code
Code: Select all
/*
CSBox ( Combined Search Box ) try
*/
#include "hmg.ch"
*!!!!!!!!!!!!!!!!!!!!!!
#include "hfcl.ch"
*!!!!!!!!!!!!!!!!!!!!!!
Static Acountries := {}
PROC Main()
*~~~~~~~~~~~~~~~~~~Ajout~~~~~~~~~~~~~~~~~~~~~~~~~~*
Use CONSTART
index on HMG_UPPER(REFERENCE) tag REFERENCE
do while !eof()
aadd(aCountries, CONSTART->REFERENCE)
skip
enddo
*~~~~~~~~~~~~~~~~~~Fin~Ajout~~~~~~~~~~~~~~~~~~~~~~~~~~*
// aCountries := HB_ATOKENS( MEMOREAD( "Countries.lst" ), CRLF )
// ASORT( aCountries ) // This Array MUST be sorted
DEFINE WINDOW frmCSBTest ;
AT 0,0 ;
WIDTH 550 ;
HEIGHT 300;
TITLE 'CSBox ( Combined Search Box ) Test' ;
MAIN
ON KEY ESCAPE ACTION frmCSBTest.Release
define label countries
row 25
col 100
width 100
value "Countries"
end label
define combosearchbox s1
row 25
col 190
width 200
fontname "Courier"
fontitalic .t.
fontbold .t.
fontcolor {255,255,255}
backcolor {0,0,255}
items acountries
on enter msginfo(frmcsbtest.s1.value)
anywheresearch .t.
// dropheight 50
additive .t.
rowoffset 50
coloffset 0
end combosearchbox
END WINDOW // frmCSBTest
frmCSBTest.Center
* !!!!!!
* CombosearchBox already inherits all properties events
* and methods from TextBox!!!
* Test it uncommenting the following:
*
* frmCSBTest.s1.Value := '*'
*
* !!!!!!
frmCSBTest.Activate
RETU // Main()
HFCL-ComboSearchBox- BugFix & New Features
Posted: Tue Jun 10, 2014 9:27 pm
by Pablo César
Youcef en tu código no hay nada sobre
frms1 como muestra tu imagen de error...

Re: HFCL-ComboSearchBox- BugFix & New Features
Posted: Tue Jun 10, 2014 10:39 pm
by danielmaximiliano
Pablo César wrote:Youcef en tu código no hay nada sobre
frms1 como muestra tu imagen de error...

Pablo : el error del ejemplo 3 es este
Date:06/10/14 Time: 21:41:32
Error: HMG 3.3.0 Stable (32 bits)
Window: frms1 already defined. Program Terminated
Called from _DEFINEMODALWINDOW(4277)
Called from CREATECSBOX(200)
Called from (b)_DEFINECOMBOSEARCHBOX(109)
Called from _DOCONTROLEVENTPROCEDURE(5661)
Called from EVENTS(1733)
Called from SETWINDOWTEXT(0)
Called from _SETVALUE(505)
Called from SETPROPERTY(6973)
Called from _CSITEMSELECTED(306)
Called from (b)CREATECSBOX(220)
Called from _DOCONTROLEVENTPROCEDURE(5661)
Called from EVENTS(2111)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5329)
Called from CREATECSBOX(238)
Called from (b)_DEFINECOMBOSEARCHBOX(109)
Called from _DOCONTROLEVENTPROCEDURE(5661)
Called from EVENTS(1733)
Called from DOMESSAGELOOP(0)
Called from _ACTIVATEWINDOW(5329)
Called from DOMETHOD(7984)
Called from MAIN(81)
la ventana esta ya definida. modifico el ejemplo que usa "Country.lst" y uso una tabla, pero cuando selecciona "PRC_TRANSPARENT" o/u otro dentro del Combosearch tira el error.
el DEMO2 que utiliza "Country.lst" funciona perfecto con el ComboSearch.
el DEMO3 que utiliza una tabla da el error que puse arriba.
s
HFCL-ComboSearchBox- BugFix & New Features
Posted: Wed Jun 11, 2014 12:11 am
by Pablo César

- Screen6.PNG (11.27 KiB) Viewed 5499 times
Yo solo queria entender de donde habia salido "
frms1"
Ahora me fijé mejor e pude notar que fué formada de una variable componiendo el nombre del form:

- Screen1.PNG (22.6 KiB) Viewed 5499 times
Dejo que Rathinagiri responda entonces.
Re: HFCL-ComboSearchBox- BugFix & New Features
Posted: Wed Jun 11, 2014 12:33 am
by danielmaximiliano
Hi :
I made an example containing the error ComboSearch
This example works correctly with the arrary acountry from Country.lst
does not work correctly from that list of countries that are in a table and loaded into an array called aArray
Bug ?
Re: HFCL-ComboSearchBox- BugFix & New Features
Posted: Wed Jun 11, 2014 12:58 am
by danielmaximiliano
Hi Youcef :
One solution to this problem is to create a text file with the data in your table using the command
COPY [FIELDS <idField list>] TO <xcFile>
[<scope>] [WHILE <lCondition>] [FOR <lCondition>]
[SDF | DELIMITED [WITH BLANK | <xcDelimiter>] |
[VIA <xcDriver>]]
Use the example of the Array "acountry" (Demo_2)
Re: HFCL-ComboSearchBox- BugFix & New Features
Posted: Wed Jun 11, 2014 3:22 am
by Rathinagiri
Hi
Change the following line
Code: Select all
aadd(aCountries, CONSTART->REFERENCE)
to
Code: Select all
aadd(aCountries, alltrim( CONSTART->REFERENCE ) )
This is to be done because the space in the right side of the field text is omitted somewhere in the process of adding to the listbox (not inside ComboSearchBox). It is better to save to the database after trimming.
Re: HFCL-ComboSearchBox- BugFix & New Features
Posted: Wed Jun 11, 2014 3:23 am
by Rathinagiri
Pablo César wrote:Hi Youcef,
I did not see your code, but I guess your problem (by what I see of error in display) when there is already another window MODAL type, that probably you tonton2 are using also in you own code.
Because is not allowed 2 modal windows. If is this, Mr. Rathi will confirm, then in HFCL-ComboSearchBox must treat it all modal window like as is doing in HMG_Preview. i.e. to disable for a while all modal windows before executing HFCL-ComboSearchBox. That's it !!
Dear Rathi, have you understood what I mean ?
I don't think so Pablo. Because, the control flow of the program is always within the combosearchbox procedure. However, we can put some checkpoints that this doesn't happen.