This Code
The code looks fine and works GR8 under B4A
Also did not like this until I moved the string to a int
B4X:
Type TPDFPrint_PageSize(Width As Float, Height As Float)
Type TPDFPrint_PageMargins(Left As Float, Top As Float, Right As Float, Bottom As Float, TopOfPage As Float, EndOfPage As Float)
Private mPageSize As TPDFPrint_PageSize
Private mMargins As TPDFPrint_PageMargins
#Region PDFDrawRectangle
Public Sub PDFDrawRectangle(RectToDraw As Rect, Color As Int, Filled As Boolean, Stroke As Int, FillColor As Int) As Rect
Dim RealDraw As Rect
RealDraw.Initialize(RectToDraw.Left, RectToDraw.Top, RectToDraw.Right, RectToDraw.Bottom)
If RealDraw.Right = -1 Then
RealDraw.Right = (mPageSize.Width - (mMargins.Right + RealDraw.Left))
End If
If RealDraw.Bottom = -1 Then
RealDraw.Height = (mPageSize.Height - (mMargins.Bottom + RealDraw.Top)) ' this is line 592
End If
RealDraw.Left = RealDraw.Left + mMargins.Left
RealDraw.Top = RealDraw.Top + mMargins.Top
mPDF.DrawRect(RealDraw, Color, False, Stroke)
If Filled Then
mPDF.DrawRect(RealDraw, FillColor, True, Stroke)
End If
Return RealDraw
End Sub
#end Region
Compiling debugger engine code. Error
B4i line: 592
RealDraw.Height = (mPageSize.Height - (mMargin
shell\src\com\BOBs\BBs\b4i_creports_subs_0.java:1379: error: unexpected type
_realdraw.runMethod(true,"Height") = BA.numberCast(float.class, (RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_mpagesize" /*RemoteObject*/ ).getField(true,"Height" /*RemoteObject*/ ),(RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_mmargins" /*RemoteObject*/ ).getField(true,"Bottom" /*RemoteObject*/ ),_realdraw.runMethod(true,"Top")}, "+",1, 0))}, "-",1, 0)));Debug.locals.put("RealDraw", _realdraw); ^
required: variable
found: value
1 error
B4i line: 592
RealDraw.Height = (mPageSize.Height - (mMargin
shell\src\com\BOBs\BBs\b4i_creports_subs_0.java:1379: error: unexpected type
_realdraw.runMethod(true,"Height") = BA.numberCast(float.class, (RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_mpagesize" /*RemoteObject*/ ).getField(true,"Height" /*RemoteObject*/ ),(RemoteObject.solve(new RemoteObject[] {__ref.getField(false,"_mmargins" /*RemoteObject*/ ).getField(true,"Bottom" /*RemoteObject*/ ),_realdraw.runMethod(true,"Top")}, "+",1, 0))}, "-",1, 0)));Debug.locals.put("RealDraw", _realdraw); ^
required: variable
found: value
1 error
The code looks fine and works GR8 under B4A
Also did not like this until I moved the string to a int
B4X:
Dim SortedMatchup As String = SortedMatchups.Get(SortedMatchupsLoop)
Dim SortedParsed() As String = Regex.Split("~", SortedMatchup)
If SortedParsed.Length <> 3 Or IsNumber(SortedParsed(2)) = False Then
Continue
End If
#if B4A
MatchupsLoop = SortedParsed(2)
#else if B4i
Dim x As Int = SortedParsed(2)
MatchupsLoop = x
#end if
Compiling debugger engine code. Error
B4i line: 1416
MatchupsLoop = SortedParsed(2)
shell\src\com\BOBs\BBs\b4i_cstandings_subs_0.java:602: error: > expected
_matchupsloop = BA.ObjectToNumber(_sortedparsed.runMethod(true,"getObjectFast:", BA.numberCast(int.class, 2)).<NSString*>get()).intValue;Debug.locals.put("MatchupsLoop", _matchupsloop); ^
1 error
B4i line: 1416
MatchupsLoop = SortedParsed(2)
shell\src\com\BOBs\BBs\b4i_cstandings_subs_0.java:602: error: > expected
_matchupsloop = BA.ObjectToNumber(_sortedparsed.runMethod(true,"getObjectFast:", BA.numberCast(int.class, 2)).<NSString*>get()).intValue;Debug.locals.put("MatchupsLoop", _matchupsloop); ^
1 error