Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
What the f... is this now
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01048571
Message ID:
01048832
Views:
31
Without yet trying it: did you try to change the name of the property, e.g. instead of Handle use iHandle. Would it solve the problem?

>OK nothing in the code BUT! I added gpImage to my testprog and the call to gpImage succeeds (it actually uses the handle from the Picture object). And after that I get my error. So this is what I have done now:
>
>And one of You pleeeease tell me What the f.... this is:
>
>I created a small class in PRG with only one Method
>
>define class YouWouldNotBelieveThis as custom
>   PROCEDURE GetHandle(toPicture as Object) as integer
>       return toPicture.Handle
>   ENDPROC
>enddefine
>
>
>Now 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.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform