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.
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
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 = 1to3 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
For y=1To7 For x=0To5 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.
__________________
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
Sub Whatever ....... For a = 1to3 <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
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