(data grid) Can't get the text selected in the Edit Field When It Opens

Andre.Bisseret Andre.Bisseret at inria.fr
Wed Jul 21 08:08:26 EDT 2010


Le 20 juil. 10 à 17:35, Trevor DeVore a écrit :
>
> I just created a new data grid in 4.5, created a column, customized  
> it using the "+" button in the prop inspector, edited the behavior,  
> added your code and it worked.

Le 20 juil. 10 à 19:48, Trevor DeVore a écrit :

> I would check as to whether or not you are editing the script that  
> is assigned as the behavior for the column or the default column  
> behavior.

Bonjour Trevor,
Thanks for your reply.

I tried your recipe above on a new stack and it worked too.

Also, I tried on another new stack a datagrid without any template stack
  - copy group "DataGrid" of group "Templates" of stack  
"revDataGridLibrary" to this card
then created a button "My default column behavior
  set the script of btn "My default column behavior" to the script of  
button "Default Column" of stack "revDataGridLibrar
set the dgProps["default column behavior"] of group "MyDataGrid" to  
the long id of btn "My default column behavior
and added the line " set the dgTemplateFieldEditor["select text"] of  
the dgControl of me to true" in the command EditValue

  It works as expected. (the advantage is that it'is working for all  
columns)

Then, I tried on my real stack (a clone of it ;-) where I have 12 data  
grids on 12 cards without any template stack.
created a button "My default column behavior", edited the command  
"EditValue" and set the dgProp["default column behavior"] of the  
datagrid of this cd to the long id of the button

Now, that works on the first card I am doing that :-)))

But,
I tried to put "My default column behavior" button in the group which  
is shared by each card of my stack : then does not work

I tried to set the dgProp["default column behavior"] of the datagrid  
of another card to the log id of the behavior button of the first  
card : does not work

Currently, I am trying to copy/paste the button on each card,  
assigning it to the datagrid of the card :

result : works well on certain cards: the text of the edit field is  
selected when opened, and this for any columns

BUT doen't work on other cards!!!

Very strange! (all my card are identical (same layout, same objects,  
same scripts etc, only the content changes)

Any idea on what could make this difference between the dataGrids  
which are on the different cards?

Best regards

André







More information about the use-livecode mailing list