[DGD] call_other() and static functions

Noah Gibbs noah_gibbs at yahoo.com
Mon Nov 28 21:42:01 CET 2005


  The static-ness of the function might be the problem.  I know you can't
call_other() static functions on other objects.  I don't remember if you can on
yourself.

--- Petter Nyström <md1pette at mdstud.chalmers.se> wrote:

> Hello!
> 
> I sit a bit puzzled here, supposing I am missing something but can't 
> figure out what. The problem I have is that a call on the form:
> 
>  	call_other(this_object(), "trim", " foo ");
> 
> is returning nil. (It never gets called). I make this call from my auto 
> program, and the trim() function is defined as:
> 
>  	static nomask string trim (string str) { ... }
> 
> also in the auto program. Reading the documentation I don't see why this 
> shouldn't work. Am I misunderstanding something? Or must perhaps something 
> else I do be wrong? Removing the static modifier from the trim() function 
> solves the problem, but I rather liked having most functions in the auto 
> object being static.
> 
> If anyone's got a clue, please let me know. I might be missing something 
> obvious.
> 
> Cheers,
> 
> Jimorie
> __________________________________________
> http://mail.dworkin.nl/mailman/listinfo/dgd
> 





	
		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com



More information about the DGD mailing list