Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #13096

Re: Is it possible to get the signature of method in VO through reflection?

Newsgroups comp.lang.clipper.visual-objects
Date 2020-10-03 05:12 -0700
References <0d394226-f399-40ea-80fa-3cb4d53c86cfn@googlegroups.com> <htmatiFhem7U1@mid.individual.net> <0bdfb3fd-7599-4016-a77f-96917a44893co@googlegroups.com>
Message-ID <aa98661d-8d50-4c25-8034-3ca3429e00a2n@googlegroups.com> (permalink)
Subject Re: Is it possible to get the signature of method in VO through reflection?
From Robert van der Hulst <rjvanderhulst@gmail.com>

Show all headers | View raw


Guys,

Certain things that you want are available at runtime, others are not.
The System Library contains a module called Runtime. In this module will find the memory structure of class descriptors, ivar descriptors, method descriptors etc.
The runtime function __GetClassPtr() returns the class structure for a type. The _VO_RTCLASS structure describes this. From this structure you can access the list of ivars and methods. There are also pointers to the class descriptors of superclass and subclasses.
The methods in this tabel are descriptors of untyped methods. 
If a method is typed and you have used the onlyearly pragma then this method is NOT included in the list of methods.
Names are represented with symbols and are always in upper case.
There are two functions supplied in source code: __ReplaceIVar() and __ReplaceMethod(). These functions show how you can use the structures.
Parameter names are NOT available at runtime.
All of the structures have a cargo slot that you can (ab)use to store your own information with the class/method/ivar.

If you want to generate code that uses this kind of information, then you need to use a tool that accesses the source code in the repository.



Robert


Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Is it possible to get the signature of method in VO through reflection? Jafar <jafar@marti-orbak.nl> - 2020-10-01 02:39 -0700
  Re: Is it possible to get the signature of method in VO through reflection? "Wolfgang Riedmann" <wriedmann@gmail.com> - 2020-10-01 17:28 +0200
    Re: Is it possible to get the signature of method in VO through reflection? Robert Pope <cooeee@gmail.com> - 2020-10-03 02:56 -0700
      Re: Is it possible to get the signature of method in VO through reflection? Robert van der Hulst <rjvanderhulst@gmail.com> - 2020-10-03 05:12 -0700
  Re: Is it possible to get the signature of method in VO through reflection? JohnMartens <martens@tennishulp.info> - 2020-10-01 17:38 +0200
    Re: Is it possible to get the signature of method in VO through reflection? Jafar <jafar@marti-orbak.nl> - 2020-10-01 08:47 -0700

csiph-web