Same problem with 1.90 I use.I notice you say that it works in 2.00 for you. For me I get an UnsupportedOperationException in 2.00- I haven't bothered installing 2.02.
I don't see why you would need that.I use the 0 + MyEdit.Text in a lot of code
Exactly. As it is a direct compiled call the compiler can do the coercion if necessary as it knows the types of the parameters.it works but it is subs in a code module not the CallSub.
Look in the filtered log to see if there is an "ignoring event: " entry. If it is in Activity_Resume I would have expected it to work but without seeing the actual structure of your code I am guessing.It's like the CallSub does not happen the first time. It does however, work each time after the first load of the app.
Any idea?
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("DataSampledb2")
Activity.AddMenuItem("Start Activity", "another")
If db.Exist(db.FilePath_ & db.FileName_) Then
db.FirstRecord
Else
SetupNewDB
End If
End Sub
Sub FirstRecord
If Exist(FilePath & FileName) Then
Dim FileData As List
FileData = File.ReadList(FilePath, FileName)
RecordCount = FileData.Size
If FileData.Size > 0 Then
Pointer = 0
UpdatePointers
GetRecord
End If
Else
Msgbox("File Not Found Or No Records", "NOTICE")
End If
End Sub
Sub GetRecord
If Exist(FilePath & FileName) Then
Dim FileData As List
FileData = File.ReadList(FilePath, FileName)
RecordCount = FileData.Size
If FileData.Size < 1 Then
FileData.Clear
Return
End If
If Pointer > -1 AND Pointer <= RecordCount -1 Then
Dim AF As String
AF = FileData.Get(Pointer)
Dim af2(N_Of_F(WorkArea)) As String
af2 = Regex.Split(SC, AF)
For l = 0 To N_Of_F(WorkArea)
If (af2.Length -1) > = l Then
Field(l) = af2(l)
If Left(FieldN(l),1) = ">" Then
Field(l) = Field(l).Replace(Chr(245), CRLF)
End If
Else
Field(l) = ""
End If
Next
FileData.Clear
UpdatePointers
CallSub(Main, "GetFields_" & WorkArea) 'Does not work in 2.02 first time works in 2.0
End If
Else
Msgbox("File Not Found Or No Records", "NOTICE")
CallSub(Main, "ClearFields_" & WorkArea)
End If
End Sub
Sub GetFields_0
name.Text = db.GetField("name")
address.Text = db.GetField("address")
city.Text = db.GetField("city")
state.Text = db.GetField("state")
zip.Text = db.GetField("zip")
Phone.Text = db.GetField("phone")
CurrentView
End Sub
httpjob_getbitmap (B4A line: 122)
b = LoadBitmap(HttpUtils2Service.TempFolder, taskId)
java.lang.RuntimeException: Error loading bitmap.
at anywheresoftware.b4a.objects.drawable.CanvasWrapper$BitmapWrapper.Initialize2(CanvasWrapper.java:500)
at anywheresoftware.b4a.objects.drawable.CanvasWrapper$BitmapWrapper.Initialize(CanvasWrapper.java:491)
at anywheresoftware.b4a.keywords.Common.LoadBitmap(Common.java:1024)
at com.jaminben.mediamanager.httpjob._getbitmap(httpjob.java:199)
at com.jaminben.mediamanager.moviemediadetails._jobdone(moviemediadetails.java:1562)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:170)
at anywheresoftware.b4a.keywords.Common$4.run(Common.java:881)
at android.os.Handler.handleCallback(Handler.java:605)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4514)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:993)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:760)
at dalvik.system.NativeStart.main(Native Method)
java.lang.RuntimeException: Error loading bitmap.
Why haven't I received an upgrade link yet?
For some reason you appear as an unlicensed user in the forum. Please contact support@basic4ppc.com in order to fix it.
I don't know, I would have expected 2.0 to ignore it as well if it was called in the scope of Activity_Create. I would expect it to work OK if you move it to Activity_Resume. If it doesn't then Erel would need to explain it.So, why does 2.0 run this code but the CallSub gets Ignored in 2.02?
Basic4android v2.00 is now available. This upgrade is probably the most significant upgrade since v1.00.
The major new feature is support for class modules. With support for classes Basic4android now allows you to write both procedural code and object oriented code.
Object oriented code makes it easier to write and maintain large projects.
Basic4android v2.00 improvements:
- Classes
- Public and Private access modifiers
- Built-in documentation
- Better handling of tasks in the internal thread pool
- CallSubDelayed keywords - These keywords significantly simplify the interaction between services and activities.
- Building process improved and it now supports libraries with embedded resources (such as PayPal, Zooz, Samsung Pen and others).
- Bug fixes and other minor improvements.
Note that B4A.xml was modified in this version. The highlighting styles section was not modified.
The Reflection library was updated to support the new version internal changes.
V2.02 is now available. You should use the same link as the link to v2.00.
This version fixes several issues related to CallSub and CallSubDelayed keywords.
You should use the same link as the link to v2.00.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?