Bug? new smart string and logcolor

Discussion in 'Bugs & wishlist' started by Cableguy, Feb 4, 2015.

  1. Cableguy

    Cableguy Expert Licensed User

    Hi EREL

    The following code :
    Code:
    LogColor($"Connected as ${Connection}"$,Colors.Green)
    returns as result:
    Code:
    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:

    Code:
    LogColor($"Board initialized :${LCDBoard.IsInitialized}"$,Colors.Red)
    Does work as expected
     
    Last edited: Feb 4, 2015
  2. Erel

    Erel Administrator Staff Member Licensed User

    Have you tested it in the IDE (the colors will only appear in the IDE logs)? I'm unable to reproduce it.
     
  3. Cableguy

    Cableguy Expert Licensed User

    Later in the day I will take a deeper look at it.
    'Connection' is passed as an argument to the sub
     
  4. Cableguy

    Cableguy Expert Licensed 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: Feb 5, 2015
  5. Cableguy

    Cableguy Expert Licensed User

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

    Attached Files:

  6. Erel

    Erel Administrator Staff Member Licensed User

    This is what I get:
    [​IMG]
     
  7. klaus

    klaus Expert Licensed User

    I get the same as Erel !
     
  8. Cableguy

    Cableguy Expert Licensed User

    [​IMG]

    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.

    [​IMG]
     
    Last edited: Feb 8, 2015
  9. Erel

    Erel Administrator Staff Member Licensed User

    The issue you are seeing is not related to the new smart strings feature. For some reason there is an additional character in the logs which prevents the logs parser to work properly.
     
    Cableguy likes this.
  10. Cableguy

    Cableguy Expert Licensed User

    so I am NOT Crazy!!!!??? Dahm!
     
    RandomCoder and lemonisdead like this.
  11. Erel

    Erel Administrator Staff Member Licensed User

    I was able to reproduce it. It will be fixed for the stable version.
     
    lemonisdead and Cableguy like this.
  12. Troberg

    Troberg Well-Known Member Licensed User

    Well, not in this specific case. In a more general sense, well... :)
     
    lemonisdead, RandomCoder and Cableguy like this.
  13. Cableguy

    Cableguy Expert Licensed User

    That's great news!!! (No, I'm not quoting the wrong person!)
     
    lemonisdead, RandomCoder and Erel like this.
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice