http://sourceforge.net/tracker/index.php?func=detail&aid=1861888&group_id=681&atid=100681
The following program used to work 8 years ago (was is THAT long ago??) when I wrote the docs for the __objAddMethod() function: ---tt50.prg--- PROC main LOCAL oHappy oHappy := HBClass():New( "THappy" ) __objAddMethod( oHappy, "Smile", @MySmile() ) ? oHappy:Smile( 1 ) // :) ? oHappy:Smile( 2 ) // ;) ? oHappy:Smile( 3 ) // *SMILE* RETURN STATIC FUNCTION MySmile( nType ) LOCAL cSmile DO CASE CASE nType == 1 cSmile := ":)" CASE nType == 2 cSmile := ";)" CASE nType == 3 cSmile := "*SMILE*" ENDCASE RETURN cSmile -------------- bld_b32 tt50 /w/a/n tt50 And I get: Error BASE/3101 Argument error: __OBJADDMETHOD Called from __ERRRT_BASE(0) Called from __OBJADDMETHOD(189) Called from MAIN(4) This is because @MySmile() failed in the !ISNUMBER( nFuncPtr ) check in line 188 of source/rtl/objfunc.prg Chen. ********************************************************************************************** IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email in error, please notify the system manager or the sender immediately and do not disclose the contents to anyone or make copies thereof. *** eSafe scanned this email for viruses, vandals, and malicious content. *** ********************************************************************************************** _______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour