![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Erel,
My programm used to work on version 4. I found it slow, may be because of SQLite, so I tried version 5. Now I get an "Index was out of range error" on the call of a sub named Show1. If I make comment of this call then message is given on the next line Show2. This error occurs in a sub "Table1_SelectionChanged (ColName, Row)". At the start of the test I have struggled somewhat with suddenly missing ')' 's and inserted extra '.' 's. Any idea? Harry |
|
|||
|
Erel,
Some code: Sub Show1 bmpsrc1.Dispose AddObject("bmpsrc1","Bitmap") bmpsrc1.New1(PhotoPath & Photo1) drawer1.DrawImage1(bmpsrc1.Value,rectsrc1.Value,re ctdes1.Value,true) drawer1.Refresh2(rectdes1.Value) End sub Sub Show2 bmpsrc2.Dispose AddObject("bmpsrc2","Bitmap") bmpsrc2.New1(PhotoPath & Photo2) drawer2.DrawImage1(bmpsrc2.Value,rectsrc2.Value,re ctdes2.Value,true) drawer2.Refresh2(rectdes2.Value) End sub Sub Table1_SelectionChanged (ColName, Row) If ShowMode=true then Photo1=Table1.Cell("Photo1",Row)& ".bmp" Photo2=Table1.Cell("Photo2",Row)& ".bmp" Photo3=Table1.Cell("Photo3",Row)& ".bmp" If Photo1 = ".bmp" Then Photo1=dummy end if If Photo2 = ".bmp" Then Photo2=dummy end if If Photo3 = ".bmp" Then Photo3=dummy end if Show1 Show2 Show3 else If Ignore=false then TextBox1.Text= Table1.Cell("Photo1",Row) TextBox2.Text= Table1.Cell("Photo2",Row) TextBox3.Text= Table1.Cell("Photo3",Row) end if ResetColors PhotoSeq=0 end if The underlined line causes the problem. Photo1, Photo2 and Photo3 are declared globals. If you need I can also send you the complete application with the data base and some other stuff. Harry |
|
|||
|
Erel,
Attached the application, the data base and a few images. Create a map named POI_PHOTOS in the path indicated in the program; put the two Aimée Porcher images and the dummy2 image in that map. Start the program and click on the name Aimee Porcher in the campings table. Then the error should occur. Harry |
|
|||
|
Erel,
Thanks again for your help. Three backspaces and spaces on the keyboard were enough to solve the problem. In fact, I have done it too fast. I had better investigate myself those strange characters; may be that I could have found the origin. What surprises me is that those strange characters are not printed. In a VB program I wrote myself unprintable characters are 'printed' as black squares. I do not know whether that is a function of VB or of Windows. If they were printed, I could possibly have solved the problem without bothering you. Anyhow, thanks. Harry |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Error with new version | micro | Questions & Help Needed | 5 | 10-16-2008 08:13 PM |
| CASE - checking for a range ? | TWELVE | Questions & Help Needed | 2 | 06-21-2008 10:21 PM |
| Version 6.01 compiling error | Gerd | Bug Reports | 2 | 01-04-2008 09:56 AM |
| SQLite error with version 5 | HARRY | Questions & Help Needed | 3 | 05-21-2007 10:43 AM |
| Undeclared array error with version 5 | mwaite | Questions & Help Needed | 6 | 05-19-2007 11:39 AM |