How do you get the names of shared methods from a component?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How do you get the names of shared methods from a component?

4D Tech mailing list
I just notice that METHOD GET NAMES doesn't return the names of methods
from components shared from the host.

Put another way, I'm calling METHOD GET NAMES from  a host database and the
command is blind to methods in components.

Is there a workaround?
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: How do you get the names of shared methods from a component?

4D Tech mailing list
David,

I'd create an "info" method in your component:

MessageHub_Info ("Methods")  ->  Object
or
MessageHub_Info (OB New("Request";"Methods")  ->  Object

Or similar

Then return in the object an array of method names.

Then you could extend the _Info method for other functions:

MessageHub_Info ("Version")

etc etc

Of course, you need to be the one that writes the method for this to work…



Regards,

Wayne


[image: --]
Wayne Stewart
[image: http://]about.me/waynestewart
<http://about.me/waynestewart>


On 5 June 2017 at 20:25, David Adams via 4D_Tech <[hidden email]>
wrote:

> I just notice that METHOD GET NAMES doesn't return the names of methods
> from components shared from the host.
>
> Put another way, I'm calling METHOD GET NAMES from  a host database and the
> command is blind to methods in components.
>
> Is there a workaround?
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[hidden email]
> **********************************************************************
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: How do you get the names of shared methods from a component?

4D Tech mailing list
Thanks Wayne! That should do the trick. It's not for MessageHub, that's so
last month ;-) But it's for components where you control the deployment.
Building in a required/expected get info sort of a call is perfectly
reasonable.

All the same, it would be nice if 4D had an option for getting component
method names with GET METHOD NAMES. Do you know if this is an old feature
request that never went anywhere or if it just hasn't come up very often?
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************