Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ilya Rabyy
  Where is Ilya Rabyy?
 Fountain Valley
 California - United States
 Ilya Rabyy
 To: Larry Bradley
  Where is Larry Bradley?
 Ottawa, ON
 Larry Bradley
Subject: RE: newobject getting wrong object
Thread ID: 289311 Message ID: 289317 # Views: 40 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Classes and Objects
Date: Thursday, December 30, 2010 5:34:49 PM         

> This is weird. I've been using the gpimage class (a program class, not a VCX) for quite some time.
> I need to extract some EXIF data from jpg's, and gpimage does not support that. But the _gdiplus.vcx does, and work's just fine.
> However, I need to use both of these in the same program. The framework I'm using (the old Codebook) does a SET CLASSLIB to _gdiplus.vcx and a SET PROCLIB TO gpimage.fxp.
> BOTH the libraries have an object "gpimage".
> Thus I do something like
> ox = newobject('gpimage','libs\gpimage.fxp')
> but ox ends up referring to the gpimage in the _gdiplus.vcx.
> Wierd! Any thoughts as to what is going on?
> There are ways around this, but I can't understand why VFP is getting the wrong object, when I specifically specify the library to use.
> Thanks
> Larry

My guess, colleague Larry, would be that NEWOBJECT() cannot find Libs\GPImage.FXP, or the \Libs subdir itself. Thus, it looks into VCX by default.

It's just my guess, but HTH.




newobject getting wrong object Posted by Larry Bradley @ 12/30/2010 3:23:49 PM
RE: newobject getting wrong object Posted by Ilya Rabyy @ 12/30/2010 5:34:49 PM