Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Code Samples & Tips
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Code Samples & Tips Share your recent discoveries and ideas with other users.


Editable Table - Device & Desktop


Reply
 
LinkBack (1) Thread Tools Display Modes
  #21 (permalink)  
Old 12-28-2008, 10:24 PM
Junior Member
 
Join Date: Aug 2008
Posts: 31
Default

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.

Code:
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.
Reply With Quote
  #22 (permalink)  
Old 12-29-2008, 04:23 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 4,831
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Thanks.
In the meantime you can edit the following code:
Code:
Sub CalcRowSize 
    y = 1
    shouldRemoveLastRow = False
    If Control(TableName,Table).RowCount = 1 Then
        shouldRemoveLastRow = True
        Control(TableName,Table).AddRow()
    End If
Instead of adding an empty row you should add a row that matches the filter.
__________________
Basic4ppc reference list
Reply With Quote
  #23 (permalink)  
Old 07-26-2009, 02:04 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 4,831
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

V1.2 uploaded to the first post. This version adds support for AutoScale compilation.
__________________
Basic4ppc reference list
Reply With Quote
  #24 (permalink)  
Old 01-13-2010, 05:20 PM
Knows the basics
 
Join Date: Sep 2009
Location: Surrey, UK
Posts: 80
Default

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
__________________
Caravelle
I learn by my mistakes - so I learn a lot in a short time.

Last edited by Caravelle : 01-13-2010 at 05:23 PM. Reason: Couple of mis-types
Reply With Quote
  #25 (permalink)  
Old 01-15-2010, 05:29 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 4,831
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

The latest version of EditableTable requires Basic4ppc v6.80.
You can change lines 30 and 31 to:
Code:
        fixX = 1
        fixY = 1
__________________
Basic4ppc reference list
Reply With Quote
  #26 (permalink)  
Old 01-15-2010, 01:27 PM
Knows the basics
 
Join Date: Sep 2009
Location: Surrey, UK
Posts: 80
Default

Thanks Erel, but...

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

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:
Quote:
You can change lines 30 and 31 to:

Code:
fixX = 1
fixY = 1
Do you mean lines 40 and 41 of EditableTable.bas which are:
Code:
fixX = ReadValueFromThreadState("fixX")
fixY = ReadValueFromThreadState("fixY")
and are you saying I should change those lines? if so, why?

Cheers

Caravelle
__________________
Caravelle
I learn by my mistakes - so I learn a lot in a short time.
Reply With Quote
  #27 (permalink)  
Old 01-15-2010, 02:02 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 4,831
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

Quote:
are you saying I should change those lines? if so, why?
No. Only if you are using a version older than 6.80.
__________________
Basic4ppc reference list
Reply With Quote
  #28 (permalink)  
Old 01-15-2010, 10:42 PM
Knows the basics
 
Join Date: Sep 2009
Location: Surrey, UK
Posts: 80
Default

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.

Caravelle
__________________
Caravelle
I learn by my mistakes - so I learn a lot in a short time.
Reply With Quote
Reply



LinkBacks (?)
LinkBack to this Thread: http://www.basic4ppc.com/forum/code-samples-tips/2609-editable-table-device-desktop.html
Posted By For Type Date
Pocketinfo Dev-Challenge: Opdracht 3: Omrekenkoersen | Pocketinfo.nl » Blog This thread Refback 12-11-2008 08:42 PM
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Editable table davelew1s Questions & Help Needed 6 06-18-2008 03:06 PM
Using rapi from desktop to copy file from device to desktop sunnyboyj Questions & Help Needed 9 02-08-2008 11:40 AM
XYCalc -graphs an equation or editable table of figures in regular, bar or pie chart HarleyM Code Samples & Tips 2 11-24-2007 07:21 AM
Editable Table RandomCoder Code Samples & Tips 3 06-29-2007 10:17 PM
editable table ? giannimaione Questions & Help Needed 2 05-13-2007 10:34 AM


All times are GMT. The time now is 12:01 AM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0