[Gambas-user] Question about Object.Size and object symbol enumeration

Jussi Lahtinen jussi.lahtinen at ...626...
Mon Jan 16 18:19:33 CET 2012


>
> i think, i'm not the man to answer your first question (maybe it is some
> alignment/padding thing).
>

No no it's about memory size...




> but for the second question: Class.Symbols and Class[sSymbol] will do it:
>
> DIM sSym AS String
> DIM hCls AS Class
>
> ' let hObj be the instance of your big exported class (btw, you don't
> ' need to have an instance for this, i think...)
> hCls = Object.Class(hObj)
>
> FOR EACH sSym IN Classes[hCls.Name].Symbols
>   IF hCls[sSym].Kind = Class.Constant THEN
>     PRINT "constant: "; sSym; " = "; hCls[sSym].Value
>   ENDIF
> NEXT
>

Looks like exactly what I need! Thanks!

Jussi



More information about the User mailing list