Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
S*O*S !!! -- CreateObject() = Syntax Error
Message
From
07/07/1999 07:50:46
Kenneth Downs
Secure Data Software, Inc.
New York, United States
 
 
To
06/07/1999 11:53:34
Len Wooden
Statistical Resources, Inc
Baton Rouge, Louisiana, United States
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00237700
Message ID:
00238184
Views:
14
Len,

Well, let's get the silly "did you plug it in" questions out of the way. While debugging you did confirm that the "l_ccreateobj" text is valid? I'm assuming yes because it does not crash at that point.

When faced with stuff like this, I usually proceed as follows. I first test as thoroughly as possible the idea that I've made some mistake. Once I'm convinced that I'm OK, I assume I've found a bug in VFP and try to work around it.

Starting with the first test, that there really is a syntax error, there follows some more "Did you plug it in" questions. When stepping through the code, you've checked the d_nobjectcol variable? Since you can step through the code OK, you have to run a simplified form of the code from the command window. Can you instantiate the "this" object from the command window and call the routine from the command window, having it first create only one object, then more, then more?

Also look for strange things you wouldn't expect, such as the use of syntax in "l_ccreateobj." I ran into trouble a couple of days ago with the command MyString = STRTRAN("&&","otherstring"...) The program compiled OK but crashed on the double ampersands, I had to change it to STRTRAN("&"+"&"....) Could it be you've got some similar "stealth code" sneaking into "l_ccreateobj" ?

Well, that's my first pass, this would be quite satisfying to figure out. Let us know if you can get any closer to the problem.


> This.r_aregis[1, d_nobjectcol] = createobject(&l_ccreateobj)
> ENDIF
>
>where d_nfirstinit = 5, d_nobjectcol = 2 and in the example that created the syntax error l_nqtyparms = 6 , p_cclasslib = "SRI_reps", p_cclassname = "REP_FILTERS", p_xparm1 = "REPORT BILLING REPORT", p_xparm2 = "", and this results in
>l_ccreateobj = ""SRI_reps.REP_FILTERS", p_xparm1, p_xparm2" && quotes shown as they appear in the debug window
>
>and remember, the code works 99% of the time.
>
>-- Len
Previous
Reply
Map
View

Click here to load this message in the networking platform