Android Question Typeface property

LucaMs

Expert
Licensed User
Longtime User
In a class I have this property:
B4X:
Public Sub setTypeFace1(TypeFace1 As Typeface)
    mTypeFace1 = TypeFace1
End Sub

but when I use:
MyInstance.TypeFace1 = Typeface.DEFAULT

I get an error at compile time (oddly enough, not when I use ALT + 2)
 

LucaMs

Expert
Licensed User
Longtime User
In the calling routine this works:
Dim tf = Typeface.DEFAULT As Typeface
mClass.Typeface1 = tf

Thank you for your interest, Klaus.

I have not figured out where that code works for you; in the project that I have attached the class is called MyClass.




The error message gives me the impression that Typeface is a Constant and not a Type.
upload_2014-10-1_15-52-47.png
 
Upvote 0
Top