Here is quoted the Larry's answer and the mail that I have sent to DataPro
support for
a problem that arise when I move my applications to CAVO 2.6, RP 3.3 and
ClassMate 2.04.
Hi Claudio,
There is something broke in VO 2.6. For some reason it does not work
correctly with default paramters. Change your drawText calls from:
self:oPrinter:DrawText(cText,,nColPos,self:oPrinter:PRow,self:aColWidths[nCo
l+1],nAvgCharHeight,_or(DT_EXPANDTABS,DT_NOPREFIX,DT_RIGHT,DT_WORDBREAK))
to:
self:oPrinter:DrawText(cText,-1,nColPos,self:oPrinter:PRow,self:aColWidths[n
Col+1],nAvgCharHeight,_or(DT_EXPANDTABS,DT_NOPREFIX,DT_RIGHT,DT_WORDBREAK))
(notice second parameter) and it should work OK. This probably breaks a
lot
of code...
Larry
-----Original Message-----
From: Claudio Di Nucci [mailto:cdn...@tin.it]
Sent: Saturday, November 02, 2002 8:08 AM
To: DataPro Support
Subject: CM Demo - ArrayBrowser: Preview Report doesn't work anymore on
ClassMate 2.04
Hi folks.
I downloaded and installed Classmate 2.04 and ReportPro 3.3.
After installation I run CM Demo - ArrayBrowser and when I have executed
the
report preview, the preview window report only the first row with some
title
and nothing else.
I use the same technique for preview the browser content in all my
applications.
Why does this happen ?
My developping environment is : Pentium III 600 Mhz with 256Mb and
Windows
2000 SP2 - CAVO 2.6 Classmate 2.04 and ReportPro 3.3
Thanks in advance and as Stan "The Man" Lee should say
EXCELSIOR :-)
Claudio Di Nucci
Putting -1(the default value) in the second parameter as Larry said all
works fine, but I have a lot of custom code that have this kind of problem
(I'll modify it) and I don't know if there are in the ReportPro dll.
Thus my new develops with VO 2.6 are stopped until this bug is fixed.
The problem seems related only with calling typed methods (and ClassMate
have typed methods) that have parameter with default value and not with
calling function that have parameter with default value.
The problem not affect VO 2.5x.
I have mailed this problem to bugsh...@cavo.com, but they answer nothing
until now.
My hope is that this bug will solve very soon with a 2.6a release and not in
three or four months with 2.7 release
Regards and as Stan "The Man" Lee should say
EXCELSIOR :-)
Claudio Di Nucci
This is not likely to be a fault with 2.6 but rather a fault within CM. The
method described is a CM method, not a VO one. VO'ers not using CM need not
be concerned.
Geoff
"Claudio Di Nucci" <cdn...@tin.it> wrote in message
news:suHB9.18871$744.6...@news1.tin.it...
The code Claudio showed was VO code. Larry is not quick to blame VO for things
CM does unless he KNOWS that VO behavior is responsible, so I trust his
assessment. I hope bugshunter has a report of it.
--
Ginny
"Geoff Schaller" <geof...@bigpond.net.au> wrote in message
news:oFJB9.7717$nK4....@news-server.bigpond.net.au...
In the following program, VO2.5 shows 'xyz' and -1
What does it show in 2.6?
class test
~"ONLYEARLY+"
declare method DoTest
~"ONLYEARLY-"
method Init() class Test
return self
method DoTest(cText as string, nChars := -1 as longint) as void pascal class test
~"ONLYEARLY+"
?cText
?nChars
pause()
return
~"ONLYEARLY-"
function start
local oTest as Test
~"ONLYEARLY+"
oTest := Test{}
oTest:DoTest('xyz')
return
~"ONLYEARLY-"
-Marc-
I get xyz and -1 in 2.6 also, so whatever is causing the problem Larry is seeing
isn't demonstrated here.
--
Ginny
"Marc" <Ma...@Fpss.Net> wrote in message news:3DD7D645...@Fpss.Net...
> The code Claudio showed was VO code. Larry is not quick to blame VO for things
> CM does unless he KNOWS that VO behavior is responsible, so I trust his
> assessment. I hope bugshunter has a report of it.
I like to add a warning: default parameters for methods were never
officially supported. They work for functions, because VO inserts the
default values in the calling code.
For method calls it will only work in situations where the method
calls is guaranteed to be early bound (so you should use the ONLYEARLY
pragma). And if you are not careful and have a late bound call the
results are unpredictable. You may get a NIL for a typed parameter
getting all kinds of weird results, including GPS's
--
Robert van der Hulst
AKA Mr. Data
Vo2Jet & Vo2Ado Support
www.sas-software.nl
mrd...@sas-software.com
--
Ginny
"Robert van der Hulst" <mrd...@sas-software.com> wrote in message
news:149888017390....@sas-software.nl...
> This is not likely to be a fault with 2.6 but rather a fault within CM.
The
> method described is a CM method, not a VO one. VO'ers not using CM need
not
> be concerned.
I think you wrong. I have the same constructions in MDReport. No warnings or
errors while compilation (I always use High warning level). And all works
fine in VO2.5b3.
In VO2.6 I found NIL where default method parameter was expected.
1. If some functionality/features are not allowed, compiler must reacts
appropriately.
2. It is a good practice - not to remove features available in previous
versions, but document them and include in next release.
3. I doubt that backward compatibility tests were done for VO2.6. Fully
correct code which works fine on VO2.5b3 is not working in VO2.6. In both
cases no warnings/messages from compiler.
I always sayd that quality of VO compiler is far from even 'good'. It is sad
that it continues and in version 2.6. Remember the childish error in numeric
conversion (Str...).
Denis.
"Ginny Caughey" <ginny....@wasteworks.com> wrote in message
news:ar8h3r$fne4b$1...@ID-144704.news.dfncis.de...
> 3. I doubt that backward compatibility tests were done for VO2.6. Fully
> correct code which works fine on VO2.5b3 is not working in VO2.6. In both
> cases no warnings/messages from compiler.
Yes, I've found something like that. But I'm still testing to be sure it was
not my mistake...
Johel
--
Ginny
"Geoff Schaller" <geof...@bigpond.net.au> wrote in message
news:iP4C9.13526$nK4....@news-server.bigpond.net.au...
FWIW, I've had seen flakyness with these inline defaults even with 2.5.
Maybe it was due to what Robert has stated or some other VO voodoo.
Officially supported or not, a lot of existing code uses this feature
and if it's worse in 2.6, then it may be a show stopper.
-Marc-
I think the main thing is that the compiler (in 2.7 anyway) should complain if
it encounters code like this that the runtime can't support. I've never run into
it myself with either version, but I don't use default parameters. I'm not sure
why it should be worse in 2.6, but it seems to be from what everybody is telling
me.
--
Ginny
"Marc" <Ma...@Fpss.Net> wrote in message news:3DD93020...@Fpss.Net...
Is there any issue at all using VO native Init() Methods (all Late Bound)
and use default parameters?
If so eveyones in real trouble.
Nathan
"Robert van der Hulst" <mrd...@sas-software.com> wrote in message
news:149888017390....@sas-software.nl...
> Is there any issue at all using VO native Init() Methods (all Late Bound)
> and use default parameters?
> If so eveyones in real trouble.
They don't work. Try the following sample:
CLASS TEST
EXPORT aa
EXPORT bb
METHOD Init (_aa := "" , _bb := 123 ) CLASS Test
SELF:aa := _aa
SELF:bb := _bb
FUNCTION start
LOCAL oTest AS Test
oTest := Test{}
? otest:aa, otest:bb
oTest := Test{,2}
? otest:aa, otest:bb
oTest := Test{'xx',}
? otest:aa, otest:bb
wait
You will see that for missing parameters always a NIL will be shown
I just love the way blame is sheeted around without proper explanation.
Geoff
"Ginny Caughey" <ginny....@wasteworks.com> wrote in message
news:aratov$grj90$1...@ID-144704.news.dfncis.de...
> I just love the way blame is sheeted around without proper explanation.
Huh? Only YOU incorrectly blamed CM.
Ginny
This is very worrisome.
What does the following modification (without early binding in start()) show?
class test
~"ONLYEARLY+"
declare method DoTest
~"ONLYEARLY-"
method Init() class Test
return self
method DoTest(cText as string, nChars := -1 as longint) as void pascal class test
~"ONLYEARLY+"
?cText
?nChars
pause()
return
~"ONLYEARLY-"
function start
local oTest as Test
//~"ONLYEARLY+"
oTest := Test{}
oTest:DoTest('xyz')
return
//~"ONLYEARLY-"
-Marc-
I havn't tried it but it should surely be a runtime error and compile
time warning?
I get xyz and -1 with 2.6. I assume that it takes a large amount of code to get
this to fail.
--
Ginny
"Marc" <Ma...@Fpss.Net> wrote in message news:3DDA65D6...@Fpss.Net...
> This is very worrisome.
> What does the following modification (without early binding in start()) show?
Your code returns what it is supposed to return. Now see the following
sample.
CLASS test
DECLARE METHOD DoTest
METHOD Init() CLASS Test
RETURN SELF
METHOD DoTest(cText AS STRING, nChars := -1 AS LONGINT) AS VOID PASCAL CLASS test
~"ONLYEARLY+"
?cText
?nChars
Pause()
RETURN
~"ONLYEARLY-"
FUNCTION start
LOCAL oTest AS USUAL
//~"ONLYEARLY+"
oTest := Test{}
oTest:DoTest('xyz')
RETURN
//~"ONLYEARLY-"
I removed the ONLYEARLY pragma in the class definition and
changed the AS TEST in START() to AS USUAL. Without the ONLYEARLY
pragmas in START() the code compiles fine, but fails at runtime. The
call to DoTest() is late bound and the default parameter is not used.
If you include the ONLYEARLY pragma in START() the compiler will warn
you that the call to DoTest is late bound, thus avoiding the runtime
error.
This is the point that I wanted to make: if you are making a late
bound call without knowing it, you can get problems.
It may look obvious in this example but what if I change Start to
this:
Function Start
MakeATestObject():DoTest('xyz')
Return
Function MakeATestObject AS TEST
return Test{}
In this case it is not so obvious that the result of MakeATestObject
is a usual (pointing to an object) and that the call is Latebound.
Adding the ONLYEARLY pragma in the Start() function will definitely
help here, and the code should be changed to the following to get the
correct results.
Function Start
local oTest as Test
oTest := MakeATestObject()
oTest:DoTest('xyz')
Return