Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Error 1733
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Titre:
Divers
Thread ID:
01668856
Message ID:
01668889
Vues:
53
Hugo,
Sorry I am not with you on this one.
Let me explain once more what the situation is:
I have a classlib with multiple classes. Amongst with there are classes 'cntMySelection', 'cntPictures', 'cntReceiver' all members of classlib 'MyClasses.vcx'
I have a file 'setClassLIb.prg' which loads all my classlibs ness for the pjx.
In a form I can instantiate the different classes by either drag and drop them on a form or instantiate them with
lo=newobject('cntSelection1', 'cntMySelection')
lo.Top = 10
etc
wortks fine and good.
Now I had this class 'cntPictures' and just and only for this class it errored with error 1733.
Than I found, that in my contatiner cntPictures which has several objects, textboxes a grid a.s.o. one of the objects had an error, if fact a text box called a cursor.field which was not available.
When I than changed the code for newobject wit 3 parameters into newobject('cntPicture1', 'cntPicture','myCLasses.vcx') the container was instantiated as such and errored on the text box. Correcting the textbox and called newobject without the 3rd parameter, all wen well.
This 3rd parameter is not listed in the Help file of NEWOBJECT() function
Sorry but setclasslib is very usefull and to my opinion advisable. I cant see any cons not to set classlib.
Regards,
Koen

>Here I go again against the grain... I think it is a mistake to use "set classlib"; and the whole purpose of newobject vs createobject is to handle this, in my opinion.
>So, you either use newobject (method or function) without "set classlib" (my preferred way, in fact the only way I use it) or you use createobject (function) with "set classlib" (I only use createobject for activex, even when I know I could use newobject for it too), but there is no point in using newobject with "set classlib". I know from past discussions that there is some consensus here that I am wrong and "set classlib" is useful, but I am also stubborn :)
>
>>Hi,
>>
>>I am facing error :
>>"Classdefinition fs_frmmaintenance is not found"
>>The code line causing this:
>>This.Newobject("fs_Maintenance1","fs_frmMaintenance")
>>The class is in the classlib which is set with set Classlib to and most curious is that a few lines above you will find:
>>
>>This.Newobject("fs_Actions1", "fs_Actions")
>>which executes normaly
>>Both fs_Actions and fs_frmMaintenance are in the same Classlib
>>
>>help file is not very helpfull in this respect, besides it states
>>" The class definition specified in a CREATEOBJECT( ) function cannot be located. " which is wrong as this is a Newobject and not createobject
>>
>>I am puzzled.
>>
>>Any advise is welcome
>>
>>Koen
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform