Home > Archive > Clarion > September 2005 > Class Reference incompatibility from C5.5 to C6
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Class Reference incompatibility from C5.5 to C6
|
|
| joe@e-bis.co.za 2005-09-08, 6:55 pm |
| Hi
Why does the the following run perfectly in C5.5 but gives a GPF if
compiled with C6, and how can this be fixed.
It seems as if C6 struggles to do a type conversion from the type any
to the class...
Regards
Code Sample:
Main PROCEDURE ! Declare Procedure
! [Priority 4000]
! Class
C1 Class, Type
Field1 String(20)
Field2 Long
Dummy Procedure()
End
C2 Class, Type
ProcessMethod Procedure(*? _Object), Byte
End
CODE ! Begin processed
code
! [Priority 5000]
Do StartProcedure
! [Priority 5000]
! StartProcedure
StartProcedure Routine
Data
class1 &C1
class2 &C2
Code
class1 &= new (C1)
class1.Field1 = 'My Name'
class1.Field2 = 15
class2 &= new (C2)
class2.ProcessMethod(class1)
! [Priority 5000]
! Class
C1.Dummy Procedure()
Code
Message(self.Field1, self.Field2)
Return
C2.ProcessMethod Procedure(*? _Object)
myClass C1
Code
myClass = _Object
myClass.Dummy()
Return True
| |
| Robert Peros 2005-09-13, 7:55 am |
| <joe@e-bis.co.za>
> Why does the the following run perfectly in C5.5 but gives a GPF if
> compiled with C6, and how can this be fixed.
Fix with changed protoypes LONG = ADDRESS(_Object)
ProcessMethod Procedure(LONG _Object)
myClass &C1,AUTO
Code
myClass &= (_Object)
myClass.Dummy()
<cut>
or ProcessMethod Procedure(? _Object)
with old code(with instance of myClass C1)....
R.
|
|
|
|
|