Other Compiler problem

Robert Valentino

Well-Known Member
Licensed User
Longtime User
The compiler complains when I try to compile this code
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 598        
            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

B4i line: 598
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

Also does not like this
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
                 
                MatchupsLoop = SortedParsed(2)   ' this is line 1416

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);

Now this error I can get away with by doing this
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
'    FixMe
                Dim x As Int = SortedParsed(2)
                
                MatchupsLoop = x
'#end if


Any idea why these are happening?
 
Top