B4J Question Logcolor in WebApp or Non-UI app.

hatzisn

Well-Known Member
Licensed User
Longtime User
How can I do this since there is no fx object or xui object?

( i.e. for UI apps it is LogColor("Something here", xui.Color_Red) )
 

hatzisn

Well-Known Member
Licensed User
Longtime User
I tried with this but with no luck:

B4X:
Dim jocolor As JavaObject
LogColor("> > > >  DEVELOPMENT  < < < <", jocolor.InitializeStatic("java.awt.Color").GetField("RED"))
 
Upvote 0

hatzisn

Well-Known Member
Licensed User
Longtime User
Try this
B4X:
logerror("This is red highlighted error")

Thank you. Very much. It is kind of a solution since I can get red display of message but I cannot get green if it is production compilation.
 
Upvote 0

kimstudio

Active Member
Licensed User
Longtime User
xui.color is just a constant Int number, 4 bytes in ARGB order, so:
B4X:
LogColor("color", 0xFFFF0000) ' red
 
Upvote 1
Solution

hatzisn

Well-Known Member
Licensed User
Longtime User
xui.color is just a constant Int number, 4 bytes in ARGB order, so:
B4X:
LogColor("color", 0xFFFF0000) ' red

Thank you very much @kimstudio. It is the solution I 've been searching for.
 
Upvote 0
Top