[Gambas-user] Help with charset

Bruce Bruen bbruen at ...2308...
Sun Aug 28 12:10:42 CEST 2011


On Sun, 2011-08-28 at 04:24 -0500, xOChilpili wrote:

> Bruce:
> 
> Yes, but ... I think that my english is too bad :( sorry...
> 
> here is my tableview
> ______________________
> |___|_Col1_|_Col2_|_Col3_|
> |_1_|_____ |_____ |______|
> |_2_|_____ |_____ |______|
> |_3....
>    ^ <- user clicks here. And in method tableView_Click i have
> tableView.edit()
> So, i have two troubles right now:
> 
> 1.- How to get this selected Row --Clicked on the header Row Column--
> 2.- Once edited the cell, gambas crash when i try to return to browse mode
> using tableView.Cancel. I have no idea how to disable "edit" mode and back
> since i never clicked the tableView.
> 
> Thanks...
> 
> 
> xOCh
> 
> 

xOChilpili,

I am going to go through this very slowly, please don't take anything
the wrong way.

I think you are a relatively new user of gambas.  If not, then I
apologise for what is going to follow. But if you are, then..

The gambas help is very well constructed.  However, there is  a need for
you to read everything that is on a help page, and I really mean
everything.  This is because there is a wealth of information there but
the style is very succinct (maybe this is the wrong word? concise may be
better)

I only say this because it is a necessary part of becoming a good gambas
developer. Even after several years of using gambas, I still have to
remind myself occasionally to "Read ALL the help page!"

On the tableview help page the answer that I think you need is at the
top of the page, above the Symbols box.

"Use the Edit method to start editing a cell. For example, during a
click event."

Now, I'm going to re-paste that line with a bit of my own highlighting:

"Use the Edit method to start editing a cell. For example, during a
click event."

So the click event is only one way to start an edit. The event I think
you are needing is the "RowClick" event, down there in the Events part
of the Symbols box.
But wait, lets look at the Edit method! This time underneath the box I
see:

"Starts editing the current cell."

But the user has clicked on a row, not a cell!  Now you, x0Chilpili,
have a problem here.  Which cell are they trying to edit?




Now when you have solved that, read the help on tableview.Save and
tableview.Cancel and then come right back with more questions.

I really hope this helps as I think gambas is one of the most marvellous
things I have found in over 35 years in the software industry.
Bruce



More information about the User mailing list