>define class YouWouldNotBelieveThis as custom > PROCEDURE GetHandle(toPicture as Object) as integer > return toPicture.Handle > ENDPROC >enddefine >>
>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 > >.... >>