Forum Discussion

vex's avatar
vex
Contributor
13 years ago

Minor bug report around logparams

Not sure if this has been pointed out, but did cause me a little confusion till I realized there is a TestComplete or documentation bug.



http://smartbear.com/support/viewarticle/14205/



In this article, it says you can apply LogParams.FontStyle using constants as shown.



For example, in the example posted in the article:







Sub EventControl1_OnUnexpectedWindow(Sender, Window, LogParams)



  LogParams.Str = "An unexpected window has appeared."

  ' Specifies the string that will be posted to the Additional Information panel


  LogParams.StrEx = "The " & Window.Name & " window has appeared."

  ' ...


  LogParams.Priority = pmHighest

  LogParams.FontStyle = fmBold

  ' ...


  ' Specifies the color settings


  LogParams.FontColor = clSilver

  LogParams.Color = clFuchsia

  

End Sub


This will not work as it should -- the fmBold constant doesn't actually cause anything to be bolded.  Instead, I had to just specify 1 and then it started bolding.


1 Reply

  • HKosova's avatar
    HKosova
    SmartBear Alumni (Retired)
    Hi Vince,



    It's a documentation bug; you need to use numeric values instead of named constants indeed.

    I've fixed the linked article, so it'll no longer cause confusion.

    Thanks for pointing this out!