Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Line of code does not evaluate to an object
Message
From
04/06/2007 07:11:33
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01230157
Message ID:
01230167
Views:
29
This message has been marked as a message which has helped to the initial question of the thread.
>>>"Line of code does not evaluate to an object"
>>>
>>>on line:
>>>
>>> lcProjectName = UPPER( JUSTSTEM(_VFP.Projects(1).Name))
>>>
>>>Both in native VFP mode and the .exe I get this message. I ran the code in debug and the lcProjectName field correctly held the value "MPLAN" and it all worked fine, without incident.
>>
>>Terry,
>>
>>I think you need the project manager to be open for the next line to work
>>
>>_vfp.Projects(1).Name
>>
>
>Ah, I see. Yes you're right, Gregory. That was why debug allowed it - cos I had my project open. I'd assumed this _vfp.projects object would be carried through at compile time and "embedded" in the .exe.
>
>Any idea how I can get a similar effect to work without the project?
>
>Thanks
>
>Terry

I suppose you want it to work in the IDE as well as in the exe, which leaves out the name of the executable

Some possibilities
an atc('something', _vfp.caption)

if( File(imageName) ) && if the other image is not in the same project

keep the image name the same, but have the contents different in project A and project B

If the projects have a separate include file, you could #define the imagename independently
That is possible
projectA would have #include projectA.h
projectB would have #include projectB.h

ProjectA.h
#include 'CommonToAllProjects.h'
#define MyImageName 'something.ico'

ProjectB.h
#include 'CommonToAllProjects.h'
#define MyImageName 'somethingElse.ico'



Have a file included in projectA and projectB.  Same name but different location.
The file would have the project name in it
ProjectName = FileTostr('IncludedFileName')
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform