Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: David Mustakim
  Where is David Mustakim?
 Jakarta
 Indonesia
 David Mustakim
 To: Sithu Kyaw
  Where is Sithu Kyaw?
 Yangon
 Myanmar
 Sithu Kyaw
 Tags
Subject: RE: Error instantiating class
Thread ID: 365148 Message ID: 365280 # Views: 26 # Ratings: 0
Version: Visual FoxPro 9 Category: Classes and Objects
Date: Sunday, December 23, 2012 6:44:38 PM         
   


Try:
- remove the class from the project
- remove all references of the class from anywhere in the project. Use GoFish4 or whatever method to ensure you got them all
- rebuild the project selecting "recompile all files" - make sure that all completed without any error
- add the class again to the project, best if location is still the same but ok if you want it from any different location since yes the class is not actually the same anymore as the previous (unedited) one. I'm sure it'll stop continuously asking for new path

David
..
.



> Ok. Let me explain what I'm doing.
>
> > use the same class again but now from another location
>
> Yes, this is what I'm doing
> Original location: mycontrols-1.0/mycontrols.vcx ( AS-IS)
> Another location: mycontrols-2.0/mycontrols.vcx (TO-BE)
>
> I got the dialog "Locate class". It was ok to relocate the class. It is now correctly pointing to the another location "mycontrols-2.0/mycontrols.vcx"
>
>
>
> But it is only valid for my current working session. Next time, when I reopen the project, it is still ok, but when I open a form, I still getting that dialog "Locate class".
> The project did not remember the last relocated class ( the updated location )
> It is OK the class path added in the project, but not for the objects of the class added in the forms.
>
> I tried to rebuild the project from Build options, but no success.
>
>
>
> If it is NOT POSSIBLE, I will give up.
>
> ----
> Rgds/Sithu
>
> > Maybe you simply forgot to mark "rebuilding all files" when rebuilding your project?. Either that or you have a number of lines in your coding that you manually created references to the class. The latter is what I meant when earlier I said you started using class rather wrongly/unusually. Normally a vcx is simply dropped on a form. VFP will take care of the path reference and inclusion into exe/app automatically.
> >
> > If what you claim to be a problem is in essence the same as saying that one cannot use a class then remove it and then, somehow out of a real necessity, either:
> > - use another class from somewhere/anywhere that happens to bear the same name as a removed class, or
> > - use the same class again but now from another location, edited or not.
> > That is PLAINLY IMPOSSIBLE with our dearly and outrageously beloved VFP!!!
> >
> > What actually are you trying to do? Let Rick and I and probably others warn you that no matter what you say no way in this small world ever that we will ever divorce our married-to-death VFP - lol
> >
> > David
> > ..
> > .

ENTIRE THREAD

Error instantiating class Posted by Sithu Kyaw @ 12/21/2012 4:15:28 PM
RE: Error instantiating class Posted by Rick Hodgin @ 12/21/2012 4:28:01 PM
RE: Error instantiating class Posted by Sithu Kyaw @ 12/21/2012 4:46:11 PM
RE: Error instantiating class Posted by David Mustakim @ 12/21/2012 4:50:38 PM
RE: Error instantiating class Posted by Rick Hodgin @ 12/21/2012 4:50:41 PM
RE: Error instantiating class Posted by Sithu Kyaw @ 12/21/2012 4:59:25 PM
RE: Error instantiating class Posted by David Mustakim @ 12/21/2012 5:08:58 PM
RE: Error instantiating class Posted by Sithu Kyaw @ 12/22/2012 5:31:59 AM
RE: Error instantiating class Posted by David Mustakim @ 12/22/2012 6:09:59 AM
RE: Error instantiating class Posted by Sithu Kyaw @ 12/22/2012 7:11:06 AM
RE: Error instantiating class Posted by David Mustakim @ 12/22/2012 7:43:49 AM
RE: Error instantiating class Posted by Sithu Kyaw @ 12/22/2012 10:40:17 AM
RE: Error instantiating class Posted by Rick Hodgin @ 12/22/2012 5:29:00 PM
RE: Error instantiating class Posted by Sithu Kyaw @ 12/23/2012 6:30:09 AM
RE: Error instantiating class Posted by David Mustakim @ 12/23/2012 10:46:05 AM
RE: Error instantiating class Posted by Sithu Kyaw @ 12/23/2012 11:37:37 AM
RE: Error instantiating class Posted by Samir H. @ 12/23/2012 1:31:38 PM
RE: Error instantiating class Posted by David Mustakim @ 12/23/2012 6:44:38 PM
RE: Error instantiating class Posted by David Mustakim @ 12/22/2012 6:25:48 AM
RE: Error instantiating class Posted by Tamar Granor @ 12/21/2012 11:01:38 PM
RE: Error instantiating class Posted by Sithu Kyaw @ 12/22/2012 5:13:38 AM
RE: Error instantiating class Posted by David Mustakim @ 12/21/2012 4:48:39 PM
RE: Error instantiating class Posted by Stefan Wuebbe @ 12/23/2012 11:02:32 AM