I am trying to work out whether a .Symbol as returned by Class.Symbols (or more 
correctly Classes["someclass"].["somesymbolname"]) is local, inherited or 
overridden.
(Don't ask, "Why?".)

In my naive days back in Gambas 2 I had the following routine that seemed to go 
a far way there:
Public Sub btnCopyOwnProps_Click()

  Dim sList As New String[]
  Dim symName As String

  For Each symName In $currControl.Symbols
    If $currControl[symName].kind = Class.Property Then
      Try IsNull($currParent[symName])
      If Error Then
        sList.Add(MakeProp(symName))
      Endif
    Endif
  Next
  sList.Sort
  Clipboard.Copy(sList.Join("\n"))

End

This was, as far as I can recall, supposed to copy the names of property 
symbols declared in the subject $currControl class onto the clipboard that are 
not declared in the $currControl's parent class($currParent), i.e. they are 
local properties.  This still appears to work for detecting whether a property 
is local or inherited.  However, what is driving me mad is trying to detect 
whether the current class actually overrides the inherited property......

Is there any way to detect this? The IDE help browser "seems" to do so somehow, 
but I think it is doing it some other way.



(If you     r e a l l y     want to know why, it's for a custom control code 
generator.  ... ... ... I didn't think so...)

tia
Bruce

-- 
B Bruen <adamn...@gmail.com or whatever>

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to