Basic4ppc - Windows Mobile Development  

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

Questions & Help Needed Post any question regarding Basic4ppc.


Table Trouble


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-14-2007, 11:53 PM
RandomCoder's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: UK
Posts: 485
Awards Showcase
Beta Tester 
Total Awards: 1
Question Table Trouble

I'm currently working on trying to improve my editable table to make it easier for others to integrate into their own code and also to add a couple of new features.

I'm doing this by adding the Table Column Info into a structured array for use later in the program.
This all worked fine until I decided to also include the Column type.

Below is my code....
Code:
Sub Globals
 Dim Type(ColType,Description,ColWidth) ColumnNumber(3)
 SelectedCol="" :SelectedRow=""
End Sub

Sub App_Start
 InitialiseTable
 Form1.Show
 TextBox1.Focus
End Sub

Sub InitialiseTable
 ColumnNumber(0).ColType="cString"
 ColumnNumber(0).Description="ID"
 ColumnNumber(0).ColWidth=30
 ColumnNumber(1).ColType="cString"
 ColumnNumber(1).Description="Description"
 ColumnNumber(1).ColWidth=120
 ColumnNumber(2).ColType="cString"
 ColumnNumber(2).Description="Date"
 ColumnNumber(2).ColWidth=60

 For Index=0 To ArrayLen(ColumnNumber())-1
 Table1.AddCol(cString,ColumnNumber(Index).Description,ColumnNumber(Index).ColWidth,False)
 'Table1.AddCol(ColumnNumber(Index).ColType,ColumnNumber(Index).Description,ColumnNumber(Index).ColWidth,False)
 Next

 For ID = 0 To 5
 Table1.AddRow(ID,"","")
 Next
End Sub
The red highlighted line works fine, but when I swap this with the commented line below I get a FormatException Error.
But as you can see I am setting the ColType variable to cString and so their should be no difference.
Any idea's as to why it won't allow me to do this

Regards,
RandomCoder
__________________
Desktop: Pentium D 920 (2.8GHz, 4MB L2 Cache, 800MHz FSB), 1024MB, 256MB Radeon X600, 250GB HD.
Device : Axim X51v XScale 624MHz, 3.7" VGA, 64MB SDRAM, 256MB Flash ROM + 1Gb SD.

"Defeat never comes to any man until he admits it."Josephus Daniels
Reply With Quote
  #2 (permalink)  
Old 07-15-2007, 05:28 AM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Greece
Posts: 353
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Quote:
ColumnNumber(0).ColType="cString"
Obviously this is an after hours work .
Change code above with ColumnNumber(0).ColType=cString
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #3 (permalink)  
Old 07-15-2007, 10:07 AM
RandomCoder's Avatar
Basic4ppc Veteran
 
Join Date: May 2007
Location: UK
Posts: 485
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Dzt, thank you.

It was getting late and I guess I just couldn't see the wood for the trees.

Regards,
RandomCoder
__________________
Desktop: Pentium D 920 (2.8GHz, 4MB L2 Cache, 800MHz FSB), 1024MB, 256MB Radeon X600, 250GB HD.
Device : Axim X51v XScale 624MHz, 3.7" VGA, 64MB SDRAM, 256MB Flash ROM + 1Gb SD.

"Defeat never comes to any man until he admits it."Josephus Daniels
Reply With Quote
Reply



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
Retrieve table filter from the filtered table? LineCutter Questions & Help Needed 1 09-08-2008 07:20 AM
Newbie having trouble with brush1.New1() mjcoon Questions & Help Needed 6 05-28-2008 08:11 PM
Table trouble Lasse Questions & Help Needed 1 01-15-2008 10:37 PM
Table trouble RandomCoder Questions & Help Needed 5 05-09-2007 07:31 AM
addimage trouble Cableguy Questions & Help Needed 5 05-08-2007 09:29 PM


All times are GMT. The time now is 01:24 PM.


Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0