Download the free trial version
Basic4android Video
Features
Tutorials and manuals
Showcase
Screenshots

Go Back   Android Development Forum - Basic4android > Basic4ppc (Windows Mobile) > Questions (Windows Mobile)
Documentation Wiki Register Members List B4P Search Today's Posts Mark Forums Read

Questions (Windows Mobile) Post any question regarding Basic4ppc.

Encountered a confusing error message? Please post here

Reply
 
LinkBack Thread Tools Display Modes
  #11 (permalink)  
Old 10-10-2009, 06:35 PM
agraham's Avatar
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 5,953
Awards Showcase
Innovator medal Beta Tester Forum Contributer 
Total Awards: 3
Default

I haven't tested this in details but if I omit the "Then" keyword for a multiline "Else If" statement I get no error but the code does not execute properly.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Reply With Quote
  #12 (permalink)  
Old 10-10-2009, 09:55 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,313
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Yes, I have had this same behavior myself..
Anothor one is, in WinMo 6.6, if for any reason an exception is thrown, and, since I do not have the suplementary messages pack installed, I cannot press any other key, other than close the basic4ppc ide, If I try to re-launch the B4Ppc IDE it does Nothing, No error, No IDE, Nothing happens...
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France-Saumur
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)
B4PPC DLL Version Listing - B4Android DLL Version Listing
Reply With Quote
  #13 (permalink)  
Old 10-11-2009, 11:11 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,313
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Another Error that should NOT be happening...

If a Timer is created programatically, and we try to "clean" the code by setting all the props and linking the event, if the event sub is not codded yet it will error...

Code:

Sub Whatever
.......
For a = 1 to 3
x= 
"Timer" & x
AddTimer(x)
Control(x).Enabled = 
False
Control(x).Interval = 
500
AddEvent(x,Tick,x & 
"_Tick"
Next
........
End Sub

Sub Timer1_Tick '----> If this sub doesnt exist, an NullRef Exception is thrown
End Sub
Yes I know that eventually the event will be added as we will need it, but sometimes I run my code on a "Step-to-Step" basis, and I may have some of the added events still NOT present...
I think that this should not throw an error, but only some "Event missing" notification, as the error prevents all subsequent code from being processed.
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France-Saumur
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)
B4PPC DLL Version Listing - B4Android DLL Version Listing

Last edited by Cableguy : 10-11-2009 at 11:15 PM.
Reply With Quote
  #14 (permalink)  
Old 10-12-2009, 12:07 AM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,313
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

And another one...

Code:
For y=1 To 7
    
For x=0 To 5
        AddImageButton(
"Form1","IB"&x&y,15+(y*25),70+(x*25),24,24)
        Control(
"IB"&x&y,ImageButton).Transparent=True
    
Next x
Next y
This creates a 7x6 grid of ImageButtons, and throws NO erros on the IDE...
BUT, if I try to compile....Well, see the error message in the picture below.
Attached Images
File Type: jpg untitled.JPG (15.2 KB, 19 views)
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France-Saumur
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)
B4PPC DLL Version Listing - B4Android DLL Version Listing
Reply With Quote
  #15 (permalink)  
Old 10-12-2009, 01:37 PM
Basic4ppc Veteran
 
Join Date: May 2008
Location: Newcastle Upon Tyne - England
Posts: 269
Awards Showcase
Beta Tester 
Total Awards: 1
Default

Quote:
Originally Posted by Cableguy View Post
Code:
Sub Whatever
.......
For a = 1 to 3
<font color=
"Red">x= "Timer" & x</font>
AddTimer(x)
Control(x).Enabled = 
False
Control(x).Interval = 
500
AddEvent(x,Tick,x & 
"_Tick"
Next
........
End Sub

Sub Timer1_Tick '----> If this sub doesnt exist, an NullRef Exception is thrown
End Sub
Surely that should be;
x= "Timer" & a
Reply With Quote
  #16 (permalink)  
Old 10-12-2009, 01:55 PM
Cableguy's Avatar
Basic4ppc Expert
 
Join Date: Apr 2007
Location: N 41º11'30.30" W 8º39'46.60"
Posts: 2,313
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

That was just a misstype, as I didn't copy/paste the code...
the code works fine IF the tick sub is present, but I also found out that, standart events for each control do NOT HAVE TO BE ADDED with AddEvent, even if the control itself was added programatically...
__________________
Paulo Gomes - Porto, Portugal - Living/Working in France-Saumur
Mobile Device: Samsung Galaxy S, Android 2.3.4 CUstom ROM
Laptop: Toshiba NB100-130 (running on Win7Ultimate)
B4PPC DLL Version Listing - B4Android DLL Version Listing
Reply With Quote
  #17 (permalink)  
Old 10-14-2009, 05:19 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 13,162
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

You are missing the last parameter in AddImageButton. The Text parameter.
Code:
AddImageButton("Form1","IB"&x&y,15+(y*25),70+(x*25),24,24,"")
__________________
Basic4android documentation
Reply With Quote
  #18 (permalink)  
Old 10-18-2009, 07:35 PM
Junior Member
 
Join Date: Sep 2008
Posts: 23
Default Error Message using Control Keyword

Sub Globals
End Sub

Sub App_Start
Form1.Show
frm = "Form1"
Msgbox(Control(frm,Form).Height)
AddPanel(Control(frm,Form),"Panel1",1,1,237,300)
End Sub

The MsgBox returned 268 which is correct.

The AddPanel generated an error "Index Out Of Range"



Regards

Ed Sharp

NB: In the real world, I was trying to add a panel to the main form from a module
Reply With Quote
  #19 (permalink)  
Old 10-19-2009, 10:41 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 13,162
Awards Showcase
Basic4ppc Founder 
Total Awards: 1
Default

AddPanel expects the form name as the first parameter:
Code:
AddPanel(frm,"Panel1",1,1,237,300)
__________________
Basic4android documentation
Reply With Quote
  #20 (permalink)  
Old 11-06-2009, 06:07 PM
taximania's Avatar
Basic4ppc Expert
 
Join Date: May 2007
Location: Derbyshire. UK
Posts: 585
Awards Showcase
Beta Tester 
Total Awards: 1
Default error occurred on sub_main_killlabel

My code works in the desktop IDE
It compiles for desktop OK but throws this error every time the sub is called.

Quote:
Unable to cast object of type
'Dbasic.EnhancedControls.CEnhancedLabel' to type 'Dbasic.IText'.
Continue

Here's Sub killlabel
Code:
Sub killlabel(y)
Control(
"Label" & y).text=""
End Sub

I'm a bit confused.
It worked fine before V6.80
__________________
.
.
.
Don't ask, I'm fine, honest. !!
.
.
.
Just a little crazy at times



O2 XDA, GW Evo 2.1 UC WWE Rom, WM6.1
Radio Ver 03.34.90
With Basic4ppc V6.80


http://www.taximania.co.uk
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 Off
Pingbacks are Off
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help with error message skmobile Questions (Windows Mobile) 2 09-07-2008 08:07 PM
ERROR:Message cdeane Questions (Windows Mobile) 10 07-21-2008 07:59 PM
HTTP POST error message miataman Questions (Windows Mobile) 10 07-11-2008 11:28 AM
HTTP POST error Elrick Bug Reports 3 05-24-2008 03:06 PM
HTTP POST on Device - error message TWELVE Questions (Windows Mobile) 6 04-26-2008 10:35 AM


All times are GMT. The time now is 05:32 AM.


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