PC SOFT

PROFESSIONAL NEWSGROUPS
WINDEVWEBDEV and WINDEV Mobile

Home → WINDEV 2024 → Example with strange behaviour (bug?)
Example with strange behaviour (bug?)
Started by Frans, Oct., 23 2004 3:39 PM - 7 replies
Posted on October, 23 2004 - 3:39 PM
Hello to you all,

The users off an application have the possibility to fill the comboboxes via a file.
It works like this. With right click on the combobox the user opens the part off the file (filter on a file) that is meant for that specific combobox. It can ad or delete the lines off the combobox and they can also change the order off appearance. With a right click on a line off that second window (Table_F_vrij) they also can select the highlighted line and place it in the combobox immediatly.
The advantage off this system is that you only have one file for all the pre-filled comboboxes and only one window for filling, deleting and editing.
But truy this!
Click on a combobox and select an item. Then click in the blank edit-control (it says click here)
This all works fine.
But now... Click again in the combobox and hoover over the choises you can make.
They all disappear??!
Who has the answer?
I think this is a nice example off a possible way to pre-fil the comboboxes.
I have a little example off these windows. You can download and use them but be so kind to give me some suggestions to make it better and to explain the disappearing choises.
Download at: http://home.tiscali.nl/t953861/test.wdz
or ?
Regards Frans
Posted on October, 23 2004 - 4:31 PM
G'day Frans
Your example refers to Query Q_vrij which is missing from your example
Regards
Al
Posted on October, 23 2004 - 6:42 PM
Hello al,
When I restore the file I had to point at it and yhen it worked.
But I also emailed the query to you.
Regards frans
G'day Frans
Your example refers to Query Q_vrij which is missing from your example
Regards
Al
Posted on October, 23 2004 - 7:10 PM
Hello to you all,
I just placed a new test.wdz which places the Q_vrij query in the project map.
Download at: http://home.tiscali.nl/t953861/test.wdz
Regards Frans
Posted on October, 24 2004 - 1:48 AM
G'day Frans
The problem is that you are using the same query to supply data to all three combo boxes. This means that after the main window initializes, and you click on combo box1 the data in the query file at the moment is actually the data for the filter on combobox3 and it is refreshed back to filter1 by the on entry of combobox1 to a new filter. I suspect that the comboboxes cannot cope with the constant changes to the underlying data from an on entry point.
As an experiment, if you comment out the init and on entry codes of vrij_02 and vrij_03 and just use one combo box it all works fine. I haven't tried it but I imagine that if you set up three separate queries, to provide a separate query file for each combobox it would all work ok
Regards
Al
Posted on October, 24 2004 - 2:41 AM
Hello All,
Thank you for your reaction.
That was my idea to; but it should work. Perhaps a little bug??
Yes, the workaround is to make more queries but the one query is the strenghts of the whole idea.
How can I get it to work with one query. Do I have to report it to Pcsoft?
Regards Frans
Posted on October, 24 2004 - 2:47 AM
G'day All,
As a test I have deleted combobox 2 and 3.
After a click on the editcontrol a hoover over the combobox has the same effect.
The items disappear??!
Now ther is only one combobox.
This is not a normal behaviour.

Regards Frans
Posted on October, 24 2004 - 9:10 AM
G'day Frans
The problem is caused by trying to refresh the values in the combobox by re-executing the query to take into account any changes in the data file.
The Query is after all just a memory table and the combobox is linked to it in memory so the re-execution of the query destroys those links
If you take out the cascading input in the table_f_vrij and program the record additions/modifications into the file, you can then programatically add the new record or modify an existing one in the query with hadd() or hmodify()
If you adjust the query in this manner it will work properly in the combo box.
Regards
Al