define class YouWouldNotBelieveThis as custom PROCEDURE GetHandle(toPicture as Object) as integer return toPicture.Handle ENDPROC enddefineNow with this, the following happens:
lparameters tcSourceFile, tcBitmapLarge, tcBitmapSmall LOCAL lnRetVal, loLarge, loSmall, lnX, lnIcons, loIB lnRetVal = -1 .... loLarge = null loSmall = null *-- now get the Icon-Objects and keep the handles lnIcons = this.GetAssocIconPairObjects(tcSourceFile, @loLarge, @loSmall, .T.) if lnIcons <= 0 this.cErrorText = IconBuddyErr_NoIconsFound return lnRetVal endif loJunk = NewObject("YouWouldNotBelieveThis", "PROGRAM\TEST_SAVE4.PRG") ? loJunk.GetHandle( loLarge ) <--- This WORKS !!! ? loLarge.Handle <--- And this next line produces an error ....funnily this *only* does work if the class is in another PRG. If I put it below this progam in the same file Njet, nada, njente.