Error when trying to recover items from Dbf, ComboSearchBox

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
jparada
Posts: 433
Joined: Fri Jan 23, 2009 5:18 pm

Error when trying to recover items from Dbf, ComboSearchBox

Post by jparada »

Hi,

I just test the sample ComboSearchBox, and try to do something like this:

Code: Select all

aCountries: = myList ()
Asort (aCountries)

FUNCTION myList ()
LOCAL aList: = ()

USE catpisa
// Go Top

WHILE! EOF ()
AADD (aList, catpisa-> name)
SKIP
ENDDO
RETURN ready
And the result is correct as you can see in the figure attached, please take a look, but ... when trying to select the item (double click or enter), displays the error that also attached a picture, please take a look too.

The question is if I'm doing something wrong, my little example of code needs to be changed?., If so, how?, please?, Can someone help me?.

BTW, when you choose a list item and the item is placed in the textbox, if you write anything (I mean, selected item + writing something else), does not display the list again (I mean not validated again ), And this may be a problem because then the element in the textbox, then does NOT exist in the list.

Please I await your comments.

Thanks

Best regards
Javier
Attachments
test_combo.png
test_combo.png (54.32 KiB) Viewed 2853 times
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Error when trying to recover items from Dbf, ComboSearch

Post by Rathinagiri »

I will check ASAP and revert back Javier. Thanks for reporting.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
jparada
Posts: 433
Joined: Fri Jan 23, 2009 5:18 pm

Re: Error when trying to recover items from Dbf, ComboSearch

Post by jparada »

Hi Rathinagiri,

Thanks.

Best regards
Javier
jparada
Posts: 433
Joined: Fri Jan 23, 2009 5:18 pm

Re: Error when trying to recover items from Dbf, ComboSearch

Post by jparada »

Hi,

Following this thread,

If I make a small change to the code:

Code: Select all

FUNCTION miLista()
	LOCAL aLista := {}
	
	USE catpisa
	//Go Top

	WHILE ! EOF()
		AAdd( aLista, catpisa->nombre + CRLF)  // Add CRLF
		SKIP
	ENDDO
RETURN aLista
So, there is no error that I mentioned before, but is not the desired behavior.

Can someone please provide some tips to improve this implementation.

Thanks

Best Regards
Javier
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Error when trying to recover items from Dbf, ComboSearch

Post by Rathinagiri »

Sorry Javier.

Can you please give a full working sample?
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
jparada
Posts: 433
Joined: Fri Jan 23, 2009 5:18 pm

Re: Error when trying to recover items from Dbf, ComboSearch

Post by jparada »

Hi,

The example provided is the same as ComboSearchBox example, only I have changed very little for my tests, please take a look.

Thanks

Best Regards
Javier
Attachments
test.zip
(921 Bytes) Downloaded 212 times
User avatar
Rathinagiri
Posts: 5482
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Error when trying to recover items from Dbf, ComboSearch

Post by Rathinagiri »

Hi Javier,

It is not related anyway with ComboSearchBox! It is related with the character type field value and the textbox on change event behaviour.

This can be seen with a simple sample here.

Let us wait for Roberto's answer.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
Post Reply