Bug? new smart string and logcolor

Cableguy

Expert
Licensed User
Longtime User
Hi EREL

The following code :
B4X:
LogColor($"Connected as ${Connection}"$,Colors.Green)

returns as result:
B4X:
Installing file.
~i:** Activity (main) Pause, UserClosed = false **
PackageAdded: package:b4a.example
~i:** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
~c-16711936:Connected as BLT

So, no color is being aplied, thou I figure the c-16711936 is the color code

EDIT:

B4X:
  LogColor($"Board initialized :${LCDBoard.IsInitialized}"$,Colors.Red)
Does work as expected
 
Last edited:

Cableguy

Expert
Licensed User
Longtime User
Later in the day I will take a deeper look at it.
'Connection' is passed as an argument to the sub
 

Cableguy

Expert
Licensed User
Longtime User
Strangely enough I can't reproduce it either... maybe some bizarre interaction with my lib fire event is causing the color to not show...
Anyway, not a big deal.

[EDIT]
Confirmed, it's due to some bizarre interaction within a module I created and then compiled to LIB... I will try to figure it out... but since it's a private LIB, Its no biggie
 
Last edited:

Cableguy

Expert
Licensed User
Longtime User
So, by a fluke, I managed to reproduce the behaviour I mentioned as bug, see attached zip.
 

Attachments

  • smartstringlogtest.zip
    94.5 KB · Views: 215

Erel

B4X founder
Staff member
Licensed User
Longtime User
This is what I get:
SS-2015-02-08_08.27.42.png
 

Cableguy

Expert
Licensed User
Longtime User
Screenshot 2015-02-08 12.10.28.png


Am I crazy??

I changed the position of my second logcolor statement, but found that refreshing the execution while in rapid debug does make a difference.
ie, clean run into debug mode, logcolors show correctly, restarting (the red arrow next to the green stop square) without stopping the debugger can sometimes give the color integer and not apply the color to the log statement as shown in the screenshot. disabling and re-enabling log filters also reproduce the behaviour change.

Screenshot 2015-02-08 12.32.19.png
 
Last edited:
Top