Discussion:
Size limit for CC's?
(too old to reply)
Jan Hoelterling
2008-10-19 03:14:45 UTC
Permalink
I have a single CC called XPControls.CC containing custom classes for every
stock form object class. Each of these classes may have additional methods,
for example, I added an "enable" and "disable" method to every object
(rather than setting enabled = true/false). My main purpose is to control
visual behaviour in one place

When adding a single line today, I started getting unexplicable "variable
THIS not defined" pointing to:
CLASS XPToolbtn(oParent) of XPImage(oParent) custom
needless to say, oParent is a valid object reference.

As soon as I remove the line, everything works ok again. The offending line
is in my "enable" method for a grid:
function enable
this.enabled = true
this.colornormal = "WindowText/Window"
this.colorhighlight = "Windowtext/0xFFFFCC" ** This line causes the
problem
return

I then tried to remove a rarely used class (XPShape) from this CC, and I was
able to add the line
this.colorhighlight = "Windowtext/0xFFFFCC"
again, without any problems.

So, it seems to me that I must have somehow exceeded some size limit within
this CC. Why doesn't the compiler produce some error message rather than
causing problems in the execution later, with the error pointing to another
piece of code? For the compiler to produce code that looses "THIS" seems
pretty crucial.

Thanks in advance for your help.

Jan
Bruce Beacham
2008-10-19 07:34:50 UTC
Permalink
Post by Jan Hoelterling
So, it seems to me that I must have somehow exceeded some size limit within
this CC.
Just wondering how big this file is - how many bytes, how many lines?


Bruce Beacham
Jan Hoelterling
2008-10-19 22:45:18 UTC
Permalink
The file is 73340 bytes, which includes ample comments.

Including all comments, there are 2498 lines (which doesn't seem that much,
I definitely have files larger than that)

Executable lines (from the compiler) are 1827

Jan
Geoff Wass [dBVIPS]
2008-10-20 03:56:51 UTC
Permalink
Post by Jan Hoelterling
The file is 73340 bytes, which includes ample comments.
Including all comments, there are 2498 lines (which doesn't seem that much,
I definitely have files larger than that)
Executable lines (from the compiler) are 1827
Jan
Jan,

How many classes and how many methods do they have?
--
Geoff Wass [dBVIPS]
Montréal, Québec, Canada

.|.|.| dBASE info at http://geocities.com/geoff_wass |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
.|.|.| IT Consultant http://Geoff_Wass.com |.|.|.
Jan Hoelterling
2008-10-20 21:12:15 UTC
Permalink
The file has 53 classes and 97 functions (accross all classes).

Jan
Geoff Wass [dBVIPS]
2008-10-22 03:41:45 UTC
Permalink
Post by Jan Hoelterling
The file has 53 classes and 97 functions (accross all classes).
Jan
Jan,

OK, that's not a terribly large number.
--
Geoff Wass [dBVIPS]
Montréal, Québec, Canada

.|.|.| dBASE info at http://geocities.com/geoff_wass |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
.|.|.| IT Consultant http://Geoff_Wass.com |.|.|.
Jan Hoelterling
2008-10-21 12:49:48 UTC
Permalink
The max line length is 1024, if I am not mistaken - and I am nowhere near
that anywhere.

Thanks for the suggestion, though.

Jan
Robert Bravery
2008-10-21 05:50:18 UTC
Permalink
HI Jan,

Sounds like there is a line some where that exceeds the max line. Check to
see if you do not have extremely long lines, especially those with the
continuation character. Cant remember what the limit is for a line in dbase

Robert
Post by Jan Hoelterling
The file is 73340 bytes, which includes ample comments.
Including all comments, there are 2498 lines (which doesn't seem that
much, I definitely have files larger than that)
Executable lines (from the compiler) are 1827
Jan
---
avast! Antivirus: Inbound message clean.
Virus Database (VPS): 081020-0, 20/10/2008
Tested on: 21/10/2008 07:47:34 AM
avast! - copyright (c) 1988-2008 ALWIL Software.
http://www.avast.com
--
Web Development, Hosting, Design and Content Management Systems
http://www.integralwebsolutions.co.za



---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 081020-0, 20/10/2008
Tested on: 21/10/2008 07:50:20 AM
avast! - copyright (c) 1988-2008 ALWIL Software.
http://www.avast.com
Ronnie MacGregor
2008-10-19 18:45:37 UTC
Permalink
On Sat, 18 Oct 2008 22:14:45 -0500
Post by Jan Hoelterling
When adding a single line today, I started getting unexplicable "variable
CLASS XPToolbtn(oParent) of XPImage(oParent) custom
Why doesn't the compiler produce some error message rather than
causing problems in the execution later, with the error pointing to another
piece of code? For the compiler to produce code that looses "THIS" seems
pretty crucial.
Can you simulate this error by removing your endclass statement ?

If, as I suspect, the answer is yes then the string passed for compiling is
being truncated at some stage

..... as you suspected.
--
Ronnie MacGregor
Scotland

Ronnie at
dBASEdeveloper
dot co dot uk

www.dBASEdeveloper.co.uk
Jan Hoelterling
2008-10-19 22:45:55 UTC
Permalink
Post by Ronnie MacGregor
Can you simulate this error by removing your endclass statement ?
If, as I suspect, the answer is yes then the string passed for compiling is
being truncated at some stage
..... as you suspected.
I will give that a try

Jan
Robert Bravery
2008-10-19 19:12:16 UTC
Permalink
Without knowing the size of your file. its difficult to say. Once sure way
of testing this theory is to remove anotherline or two rather than a whole
class somewhere else in the cc. Most of the times this error is indicative
of a line size limitation.

Robert
Post by Jan Hoelterling
I have a single CC called XPControls.CC containing custom classes for every
stock form object class. Each of these classes may have additional methods,
for example, I added an "enable" and "disable" method to every object
(rather than setting enabled = true/false). My main purpose is to control
visual behaviour in one place
When adding a single line today, I started getting unexplicable "variable
CLASS XPToolbtn(oParent) of XPImage(oParent) custom
needless to say, oParent is a valid object reference.
As soon as I remove the line, everything works ok again. The offending
function enable
this.enabled = true
this.colornormal = "WindowText/Window"
this.colorhighlight = "Windowtext/0xFFFFCC" ** This line causes the
problem
return
I then tried to remove a rarely used class (XPShape) from this CC, and I
was able to add the line
this.colorhighlight = "Windowtext/0xFFFFCC"
again, without any problems.
So, it seems to me that I must have somehow exceeded some size limit
within this CC. Why doesn't the compiler produce some error message rather
than causing problems in the execution later, with the error pointing to
another piece of code? For the compiler to produce code that looses "THIS"
seems pretty crucial.
Thanks in advance for your help.
Jan
---
avast! Antivirus: Inbound message clean.
Virus Database (VPS): 081018-0, 18/10/2008
Tested on: 19/10/2008 09:06:39 PM
avast! - copyright (c) 1988-2008 ALWIL Software.
http://www.avast.com
--
Web Development, Hosting, Design and Content Management Systems
http://www.integralwebsolutions.co.za



---
avast! Antivirus: Outbound message clean.
Virus Database (VPS): 081018-0, 18/10/2008
Tested on: 19/10/2008 09:12:21 PM
avast! - copyright (c) 1988-2008 ALWIL Software.
http://www.avast.com
Jan Hoelterling
2008-10-19 22:46:32 UTC
Permalink
Please see my reply to Bruce - the file really isn't that big.

Jan
Bruce Beacham
2008-10-19 22:54:32 UTC
Permalink
Post by Jan Hoelterling
When adding a single line today, I started getting unexplicable "variable
CLASS XPToolbtn(oParent) of XPImage(oParent) custom
needless to say, oParent is a valid object reference.
As soon as I remove the line, everything works ok again. The offending line
function enable
this.enabled = true
this.colornormal = "WindowText/Window"
this.colorhighlight = "Windowtext/0xFFFFCC" ** This line causes the
problem
return
I then tried to remove a rarely used class (XPShape) from this CC, and I was
able to add the line
this.colorhighlight = "Windowtext/0xFFFFCC"
again, without any problems.
Have you tried a different piece of code in this line position? Perhaps
this.gridLineWidth = 2
How about a different colour, like "white/red"?

Are there any LOOP statements in your code that control passes through
when you run the offending process?


Bruce
Loading...