For Programmers: Free Programming Magazines  


Home > Archive > Tcl > July 2005 > More info on how to introspect on ITcl classes?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author More info on how to introspect on ITcl classes?
Helmut Giese

2005-07-28, 5:03 pm

Hello out there,
given an ITcl object saying
$myObj info
gives the following result:

wrong # args: should be one of...
info args procname
info body procname
info class
info function ?name? ?-protection? ?-type? ?-name? ?-args? ?-body?
info heritage
info inherit
info variable ?name? ?-protection? ?-type? ?-name? ?-init? ?-value?
?-config?
...and others described on the man page

'described on the man page': which man page? The page(s) to ITcl don't
say anything to 'info' and of course [info]s page doesn't say anything
about ITcl's internal introspection capabilities.

Any link will be greatly appreciated.
Best regards
Helmut Giese
dbariod@norspam.com

2005-07-29, 4:02 am



On Thu, 28 Jul 2005, Helmut Giese wrote:

> Hello out there,
> given an ITcl object saying
> $myObj info
> gives the following result:
>
> wrong # args: should be one of...
> info args procname
> info body procname
> info class
> info function ?name? ?-protection? ?-type? ?-name? ?-args? ?-body?
> info heritage
> info inherit
> info variable ?name? ?-protection? ?-type? ?-name? ?-init? ?-value?
> ?-config?
> ..and others described on the man page
>
> 'described on the man page': which man page? The page(s) to ITcl don't
> say anything to 'info' and of course [info]s page doesn't say anything
> about ITcl's internal introspection capabilities.
>


Look at the class.n man page, in the section "BUILT-IN METHODS".
It describes several common methods binds to any object of any class.

------------------------------
David Bariod
For email replace spam by tel
Juan C. Gil

2005-07-29, 4:02 am

The [info] method seems to be Tcl's [info] plus five or so extra
subcommands added by [incr Tcl] and described in the [class]
manual page. Somewhat confusing.

Try
$myObj info foo

Juan Carlos---

Helmut Giese

2005-07-29, 9:05 am

The 'class' man page - I would never have thought at looking there.
Thanks to you both and best regards
Helmut Giese
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com