Editable Table - Device & Desktop

pochero

Member
Licensed User
I have found a problem. When the table have only one row and have a filter if i click on the table, an exception occurr.
You can see the problem if you modify only 2 lines of de example code.

B4X:
Sub App_Start
   Form1.Show
............
   For i = 1 To 1 ' ************* ONLY ONE ROW *************
      table1.AddRow(i,i,i) 
   Next
.............
   EditableTable.SetEdit("Main.Table1","Main.Validate","") 
.............
   Main.Table1.Filter("c1='1'") ' ****** FILTER TABLE ******

In sub CalcRowSize.........
If Control(TableName,Table).RowCount = 1 Then
shouldRemoveLastRow = True
Control(TableName,Table).AddRow()
End If
After AddRow, RowCount remains with value 1. It is a problem.

Thank you.
 

Caravelle

Active Member
Licensed User
Longtime User
Hi Erel

Can you help please? I just tried this for the first time. When I run EditableTable.sbp I get the error message:

"An error occurred on sub editabletable.readvaluefromthreadstate
Line number: 176
obj1.CreateNew("System.Threading.Thread" & obj1.System_Mscorlib)
Error description: Invalid property.
Continue?"

If I press Yes, I get:

""An error occurred on sub edittabletable.readvaluefromthreadstate
Line number: 171
AddObject("obj1", "Object")
Error description: Item has already been added. Key in dictionary: '_editabletable_obj1' Key being added: '_editabletable_obj1'
Continue?"

At that point I gave up. I'm trying to use a small editable table as a neat manual input method for a database.

Thanks

Caravelle
 
Last edited:

Caravelle

Active Member
Licensed User
Longtime User
Thanks Erel, but...

I have never used any version of B4PPC other than 6.80, so that could not have been the problem. :confused:

However, the example program has started working since I just downloaded v 1.2 of the Door Library. I thought I had this already, but the file date seems to be more recent than the one I had.

You wrote:
You can change lines 30 and 31 to:

B4X:
fixX = 1
fixY = 1

Do you mean lines 40 and 41 of EditableTable.bas which are:
B4X:
fixX = ReadValueFromThreadState("fixX")
fixY = ReadValueFromThreadState("fixY")

and are you saying I should change those lines? if so, why?

Cheers

Caravelle
 

Caravelle

Active Member
Licensed User
Longtime User
I sent quite a long reply to this earlier, with information for beginners about how to get the enhanced component working, but it's got either stuck or lost. :sign0148:

Caravelle
 
Top