Pritpal Bedi wrote:
>
> The following code which was working perfect till 15Mar2010
> got weired after 04Apr2010, I have two distros so cannot pinpoint
> exact dates.
>
> CLASS Abc
> DATA oActiveX
>
> ACCESS BackColor INLINE ::oActiveX:BackColor
> ASSIGN BackColor( nRGB ) INLINE ::oActiveX:BackColor := nRgb
>
> ACCESS LabelWidth INLINE ::oActiveX:Label:Width
> ASSIGN LabelWidth ( nVal ) INLINE ::oActiveX:Label:Width := nVal
>
> ENDCLASS
>
> METHOD Abc:New()
>
> ::oActiveX := MyActiveX():new(...)
>
> RETURN Self
>
> FUNCTION Main()
> Local oLbl
>
> oLbl := Abc():new()
> #if 0 /* ORIGINAL CODE - Now GPFs
> */
> oLbl:BackColor := fwn_RGB( 255, 0, 192 )
> #else /* WORK OK */
> oLbl:oActiveX:BackColor := fwn_RGB( 255, 0, 192 )
> #endif
>
CLASS Abc
DATA oActiveX
METHOD BckColor SETGET
METHOD LabelWidth SETGET
ENDCLASS
METHOD Abc:New()
::oActiveX := MyActiveX():new(...)
RETURN Self
METHOD Abc:backColor( nRGB )
if hb_isNumeric( nColor )
::oActiveX:BackColor := nRGB
endif
RETURN ::oActiveX:BackColor
METHOD Abc:labelWidth( nVal )
if hb_isNumeric( nColor )
::oActiveX:Label:Width := nVal
endif
RETURN ::oActiveX:Label:Width
This code works.
So the issue is shortlisted to INLINE keyword.
Przemek, are you around to set me right ?
If I have to change my sources like above, it will be a huge task.
-----
enjoy hbIDEing...
Pritpal Bedi
http://hbide.vouch.info/
--
View this message in context:
http://harbour-devel.1590103.n2.nabble.com/CLASSES-Instance-Variable-as-Object-Access-Assign-Elsewhere-tp4941404p4943135.html
Sent from the harbour-devel mailing list archive at Nabble.com.
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour