Bug? Wrong color in code

Discussion in 'Bugs & wishlist' started by cimperia, Jul 29, 2015.

  1. cimperia

    cimperia Active Member Licensed User

    I am using the BA4 IDE 5.02 (1), on windows7 with .NET > 5

    Code:
    Log(Miscellaneous.Sprintf($"UPDATE cards
                 SET  name = '%s'
              ,  short_name = '%s', WHERE  (id = '%s')"$
    Array As Object( m.name _
                                                                         , m.index _
                                                                         , m.symbol)))
    But the colors are not right. They are correct in the code posted here, but in the IDE this bit: Array As Object( m.name _ is green, as if it were a comment.

    You can find the Sprintf module here: http://www.b4x.com/android/forum/threads/sprintf.10860/#content.
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    It is a known issue. Note that you don't need sprintf.

    You can instead use:
    Code:
    Log($"UPDATE cards
                 SET  name = ${
    m.name}
              ,  short_name = ${
    m.index}, WHERE  (id = ${m.symbol})"$)
    See the tutorial: http://www.b4x.com/android/forum/threads/50135/#content
     
  3. cimperia

    cimperia Active Member Licensed User

    Neater code. Thank you.
     
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