Re: What subprogram? What parameters and keywords? [message #85675 is a reply to message #85673] |
Mon, 26 August 2013 06:46   |
Mats Löfdahl
Messages: 263 Registered: January 2012
|
Senior Member |
|
|
Den måndagen den 26:e augusti 2013 kl. 15:17:46 UTC+2 skrev Moritz Fischer:
> now that I tried it: when I compile
>
> PRO tmp
> help, scope_varfetch('self',LEVEL=-1)
> END
>
> and call it from inside a object method, it works fine, i.e. it calls
> the overloaded help method of my object.
When I try it, it doesn't. But then I don't have any overloaded help method. So maybe that is what I need to fix.
Hmmm. Following the example here: http://www.exelisvis.com/docs/Creating_Operator_Overlo.html, I put the following in a file red::_overloadHelp.pro (the name of my class is "red"):
FUNCTION red::_overloadHelp, Varname
class = OBJ_CLASS(self)
text = 'The '+Varname+' variable is an object of class '+class
RETURN, text
END
The result:
IDL> help,scope_varfetch('self',LEVEL=-1)
<No name> OBJREF = <ObjHeapVar1(RED)>
Did not seem to take any notice of my overloaded help method.
The following also does not work:
IDL> help, self, /obj, level = -1
SELF UNDEFINED = <Undefined>
So did my overloading not work?
> good luck with your logging,
> over and out ( as I am on holiday the moment I hit 'send')
Thanks, have a good holiday.
|
|
|