[Gambas-user] Action.Tooltip typo?

Tobias Boege tobiasboege01 at ...1601...
Mon Jul 30 21:12:32 CEST 2012


Hi,

Hans ran this function from me on his setup (don't know which revision) with
the following parameters "ToolTip" and "Tooltip". Note the second 't' in
lowercase. The first gave a lot of class names, the second argument only
gave the "Action" class. Could this be a typo?

Alas, below is a test version I just wrote to test this potential bug on
my system of choice where no graphical components are compiled so I cannot
test :-/ If somebody could quickly run this test in a graphical project
where the classes in question are present, I could report the results back
to Hans (if he just has to update his revision or check other things
instead).
If I remember correctly, the documentation is generated from the gambas
sources and thus it could be reliable enough to check for typos, right? I
cannot see any in the gb.qt4 component but Hans just re-reported this issue
to me...?

Here goes the code:

Public Sub Main()

  Print "ToolTip:"
  Print "", SearchClasses("ToolTip").Join("\n\t")
  Print
  Print "Tooltip:"
  Print "", SearchClasses("Tooltip").Join("\n\t")
  Print

End

Private Function SearchClasses(sProp As String) As String[]

  Dim hClass As Class
  Dim aNames As New String[]

  For Each hClass In Classes
    If hClass.Symbols.Exist(sProp) Then aNames.Add(hClass.Name)
  Next
  Return aNames

End

Regards,
Tobi




More information about the User mailing list