UserControl Test Java ERROR inconvertible types found

CharlesIPTI

Active Member
Licensed User
Longtime User
inconvertible types found

inconvertible types found
found:::: ipti.rfpickcartandroid.uilogic._orderbinobj
required: android.view.View

In Erel's example LINKED ABOVE He didn't create temp views to assign to the control being passed back or to assign to instances of the custom type as they got created and filled he just used them directly.. I've tried both ways ....

Sub CreateBinControl(strPassed As String) As orderBinObj

Dim retValObj As orderBinObj

Dim tmpPan As Panel
Dim tmplbl As Label


retValObj.Initialize() 'object
'tmpPan.Initialize("ctrlPanEvent") 'panel
'tmplbl.Initialize("ctrlLblEvent") 'lable
'
'tmplbl.Text = strPassed
'tmplbl = SetlblFontOrderBins(tmplbl)

'retValObj.panelObj = tmpPan
'retValObj.lblObj = tmplbl
'
'retValObj.panelObj.AddView(tmplbl, 0dip, 10dip, 50dip, 50dip)
'


retValObj.panelObj.Initialize("ctrlPanEvent")
retValObj.lblObj.Initialize("ctrlLblEvent")
retValObj.lblObj.Text = strPassed

retValObj.lblObj = SetlblFontOrderBins(retValObj.lblObj)

retValObj.panelObj.AddView(retValObj.lblObj, 0dip, 10dip, 50dip, 50dip)


Return retValObj

End Sub

Sub SetlblFontOrderBins(objPassed As Label) As Label
Dim tmpLbl As Label
tmpLbl = objPassed
tmpLbl.TextColor = Colors.Black
tmpLbl.TextSize = 20
Return tmpLbl
End Sub
 
Last edited:
Upvote 0

CharlesIPTI

Active Member
Licensed User
Longtime User
Exceed

She exceeded the Zip limitation, thusly I just included the b4a and the realted bas module

"Your file of 586.4 KB bytes exceeds the forum's limit of 390.6 KB for this filetype."


Searching help now for how to remove module from the application interface
 
Upvote 0

CharlesIPTI

Active Member
Licensed User
Longtime User
cleaned

I had to go the windows file explorer and the modules are still listed in the module list ,,,!!! anyway

attached java error complete project
 

Attachments

  • re siped.zip
    26.9 KB · Views: 247
Upvote 0

CharlesIPTI

Active Member
Licensed User
Longtime User
Solved

back in the Activity (main) I needed to specify the sub View of the now newly constructed "Control' comprised of many views not attempt to just add the complex view itself

panOrderBinsBase.AddView(binCrtl.panelObj, 10,10,122,200)

VERSUS

panOrderBinsBase.AddView(binCrtl, 10,10,122,200)
binCtrl is a...
Type orderBinObj (panelObj As Panel, lblObj As Label)

I can only add its panel to my parent panel.. the fact that orderBinObj's panel houses other things is moot. You need to add the container thats IN your container to the addView method

Woah man !!! :BangHead: :signOops: Since were on this how does the linked example in my first post get its click event.. I didnt see any method name specified for either the panel or the label. I saw the Button m.b1.Initialize(ButtonEvent) No Quotes and I tested and it works but how did this buttonevent magically become m1_Click ??

Please & Thank you
 
Upvote 0

CharlesIPTI

Active Member
Licensed User
Longtime User
info

For all concerned parties ..

the example pasted in shows me not using percentage values or dip units to place the control whoops I mean the View... I was testing so device specific placement was o.k. for me in this little theory test..

Do use dip for production please.


Lastly I missed the fact that the string parameter bing passed into the method from my pasted link for the original example was bringing in the name of the event for the initialize method and that event was named m1
 
Upvote 0
Top