[Gambas-user] Chronic columnview Woes

Richard Terry rterry at ...1823...
Wed May 8 02:03:16 CEST 2013


Hi List,

Hoping someone, maybe Benoit can take the time to read this and comment.

I've been programming in gambas now for a number of years, and as the 
regulars on the list know Ian Haywood and I have been working on EasyGP, 
a medical records project.

For historical reasons I've done much of the work on my old 5 year 
laptop running an ancient version of kubuntu 9.0, though I have managed 
to keep gambas3 relatively up to date.  I've had various versions of 
kubuntu running on my office network running easygp, form 10-11-12 and 
had varying problems which I'll describe below with columnviews and 
using them.

More recently I put Linux Mint Nadia onto a newish laptop (i7 
quadcore/nvidia) and have been doing alot of development work on that 
because it is fast.

Now the problem.

Throughout my program to display data, I tend to use columnviews, the 
contents of which I load from an underlying collection (zero based 
collection members). Clicking on the list should give me the key to the 
columnview item and hence the collection member

e.g

Dim letter as collection

The subroutine would pull in all the letters from the backend as the 
letters collection and load them sequentially into the columnview say 
cvwLetters.

Now when the user clicks on a cvwLetters row you would expect this code:

letter = letters[cvwLetters.item.key] to give the appropriate member of 
the letters collection which it does.

However, lets say I want to popup a menu of the letters collection:

If I right mouse click on the list to bring up the menu the  
cvwLetters_Menu event triggers, but if one inspects the cvwLetters 
control itself in the IDE, the cvwLetters.item.key is null, however the 
cvwletters.selected[0] does contain the value one would expect to be in 
the cvwLetters.item.key.

I've tried doing e.g cvwLetters.movecurrent() before popping up the 
menu, this does not seem to make much difference.

Also I've a chronic problem trying to generate a columnview click event 
in code, with a similar outcome to the above - the item.key is not set

Anyone had problems with this, or could give me a simple explanation or 
example which does work?

Richard





More information about the User mailing list