Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
EXECSCRIPT and classes
Message
De
27/04/2006 11:43:46
Mike Yearwood
Toronto, Ontario, Canada
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01116690
Message ID:
01117140
Vues:
25
>>Hi Paul
>>
>>You can SET CLASSLIB TO CLASSLIB.VCX IN FILE.EXE ADDITIVE.
>>
>>>I've got a VFP 9 app. that has some hook points in it to let me override existing behavior via an EXECSCRIPT call on a memo field. The problem I've run into is when I want to call an existing class library (that is built into the EXE and has SET CLASSLIB set) from within the EXECSCRIPT code. VFP fails saying it can't find the class. I modified the syntax to use NEWOBJECT() instead, e.g. NEWOBJECT("MyClass", "MyLibrary", "MyExe.EXE"). That fails with an "Invalid file descriptor". I've checked to make sure that the SET CLASSLIB is set (which it is), but still no luck.
>>>
>>>Any ideas?
>
>Yeah, you'd think that would work, wouldn't you?
>
>You get a "Alias is already in use error".

The "alias is already in use" error only happens when you SET CLASSLIB TO ADDITIVE inside the script.

If you leave off the additive it works. Looks like a bug to me. If you try to add the ALIAS you get a syntax error.

We had an issue like that in VFP7 (i think). MaxFrame has a UDF to conditionally set classlib. X8SetCls("somevcx"). It was modifed to look for the main calling EXE so that in a script we could call the udf in the same way as non-script code. It worked then. That doesn't work now.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform