Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
What the f... is this now
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01048571
Message ID:
01048832
Vues:
27
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform