comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » [Object IDL] self-documenting objects ...
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: [Object IDL] self-documenting objects ... [message #12445 is a reply to message #12389] Wed, 05 August 1998 00:00 Go to previous messageGo to previous message
darran is currently offline  darran
Messages: 3
Registered: August 1998
Junior Member
Here is the germ of a method to include with your object
definitions:

pro myclass::help, extra=_ex
r = routine_info('MYCLASS__DEFINE', /source)
openr, source, r.path, /get_lun
s = ''
repeat begin
print, strmid(s,1)
readf, source, s
endrep until strmid(s,0,1) ne ';' or eof(source)
free_lun, source
end


Ensure that your object source files begin with
a semicolon. Calling the help method should
dump the source header (minus the leading semicolon)
to your screen.

It will serve my purposes for now although I can
immediately think of some issues/improvements:

- all objects should be callable with only the
object name. With req'd parameters, you need
to know the usage before you can access the help
method - catch22.

- "help" should likely be its own object, taking
a MYOBJ__DEFINE string as a keyword parameter.

Comments?

Darran.

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: matlab/pv-wave conversion?
Next Topic: How to specify Y-axis label in LIVE_PLOT?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 10:32:24 PDT 2025

Total time taken to generate the page: 0.63865 seconds