Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RichText
Message
From
29/06/2006 16:17:11
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01132869
Message ID:
01132880
Views:
9
>I'm trying to get some code working that a programmer did for us some time ago. I'm wondering if the issue has to do with how my Development environment is setup (something missing) or maybe it is not working due to me moving the files to a new project location. Anyway, here is the issue. We have a text file that lists in it some RTF filenames. The code uses a Job# field to locate the line in the text file for that Job and gets the RTF filename and open that RTF file which may have formatting in the text, and strip the text of any formatting and save it in another location. The problem comes in just trying to get NEWOBJECT to work. The VCX that was created is called ocRich2.vcx and it is in the project. But when I run the compiled EXE I get an error saying "Class definition 'OC1' is not found" when this line of code tries to execute:
>
> oRich = thisform.NEWOBJECT('oRich','OC1','oCRich2.vcx')
>
>Here is the code (without all the file locating stuff to get the RTF files.
>
>
>SET CLASSLIB TO ocrich2 ADDITIVE
>
>oForm1=CREATEOBJECT("form1")	
>oForm1.activate
>oForm1.cmdAddRTFClass.Click
>
>DEFINE CLASS form1 AS form		
>           name = "form1"		
>           Visible = .f.		
>           WindowType = 0		
>           ADD OBJECT cmdAddRTFClass AS commandbutton WITH ;	
>            Top = 204, ;
>            Left = 130, ;
>            Height = 27, ;
>            Width = 136, ;
>            Caption = "Add RTF Subclass"
>
>     PROCEDURE cmdAddRTFClass.Click
>         oRich = thisform.NEWOBJECT('oRich','OC1','oCRich2.vcx')
>EndDefine
>
>
>I have no idea what OC1 is. When I try to look at the contents of ocrich2.vcx I can't seem to find any code or information.
>
>Any ideas?

Your class name might be "OC" in fact? Check classes in your vcx.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform