Re: Deprecated "Graphics" dropped

Jim Wagner <[email protected]> Sat, 22 Dec 2018 09:32:07 -0800
Newsgroups gmane.comp.lang.realbasic.user
Message-ID <[email protected]>
--Apple-Mail=_4ECC00CD-A825-458B-BDC5-349785153937
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=utf-8

Hello, Daniel -

I believe that graphics is only available in a paint event (for a canvas =
and such). I think that this restriction was enforced just in the =
previous release.

Jim

James Wagner
Oregon Research Electronics
http://www.orelectronics.net <http://www.orelectronics.net/>




> On Dec 22, 2018, at 8:31 AM, Daniel Drijard <[email protected]> =
wrote:
>=20
>   Dropping happened in version Xojo 2018 Release 3. I was not aware of =
the deprecation which happened a few years earlier. Now I would like to =
use version Xojo 2018 Release 4, but this imposes multiple modifications =
of my project.=20
>=20
>   My project spans a few thousands of lines of code. The =E2=80=9Cerrors=
=E2=80=9D generated by the new version of Xojo are very numerous (a few =
hundreds). Fortunately, I suspect they are only due to a small number of =
reasons, which I have not identified yet.=20
>=20
>   Here is a piece of code is refused, there are many other types of =
problem.=20
>   MouseDown is here part of the ColorButton of a Controls, itself part =
of a Window construct. The error mentioned is that =E2=80=9CType Canvas =
has no member named Graphics=E2=80=9D neither Width and Height.
>>>>>>>>>>>>>>>>=20
> MouseDown(X As Integer, Y As Integer) As Boolean
> Dim c as Color
> Dim b as Boolean
> c=3Drgb(255,255,255) //default color
> b=3DSelectColor(c,"Select a Text Color")
> If b then
> Me.Graphics.ForeColor=3Dc
> Me.Graphics.FillRect(1,1,Me.Graphics.Width-2, Me.Graphics.Height-2)=20
> TextField.SelTextColor=3Dc
> End if
> <<<<<<<<<<<<<<<
>=20
>    I am told to look into the Documentation of Release 3, page 825 =
and, separately, into Graphics and Multimedia a part of Example =
Projects. I did my best but this is not really helpful. I find there no =
hint on how this should be modified.=20
>=20
> Cordially,=20
> Daniel
>=20
>=20
> Daniel Drijard
> Thoiry t=C3=A9l=C3=A9phone :=20
>  04 50 41 22 75
>    international
>  +33/4 50 41 22 75
> Courriel :
>   [email protected]
> Thoiry F-01710
>   48, rue des Savoies
>=20


--Apple-Mail=_4ECC00CD-A825-458B-BDC5-349785153937
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html;
	charset=utf-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html =
charset=3Dutf-8"></head><body style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" =
class=3D"">Hello, Daniel -<div class=3D""><br class=3D""></div><div =
class=3D"">I believe that graphics is only available in a paint event =
(for a canvas and such). I think that this restriction was enforced just =
in the previous release.</div><div class=3D""><br class=3D""></div><div =
class=3D"">Jim</div><div class=3D""><br class=3D""><div class=3D"">
<span class=3D"Apple-style-span" style=3D"border-collapse: separate; =
color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; =
font-variant-ligatures: normal; font-variant-position: normal; =
font-variant-caps: normal; font-variant-numeric: normal; =
font-variant-alternates: normal; font-variant-east-asian: normal; =
font-weight: normal; letter-spacing: normal; line-height: normal; =
orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: =
none; white-space: normal; widows: 2; word-spacing: 0px; border-spacing: =
0px; -webkit-text-decorations-in-effect: none; =
-webkit-text-stroke-width: 0px;"><div style=3D"word-wrap: break-word; =
-webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" =
class=3D""><div class=3D"">James Wagner</div><div class=3D"">Oregon =
Research Electronics</div><div class=3D""><a =
href=3D"http://www.orelectronics.net" =
class=3D"">http://www.orelectronics.net</a></div><div class=3D""><br =
class=3D""></div></div></span><br class=3D"Apple-interchange-newline"><br =
class=3D"Apple-interchange-newline">
</div>
<br class=3D""><div><blockquote type=3D"cite" class=3D""><div =
class=3D"">On Dec 22, 2018, at 8:31 AM, Daniel Drijard &lt;<a =
href=3D"mailto:[email protected]" =
class=3D"">[email protected]</a>&gt; wrote:</div><br =
class=3D"Apple-interchange-newline"><div class=3D""><div class=3D""> =
&nbsp;&nbsp;Dropping happened in version Xojo 2018 Release 3. I was not =
aware of the deprecation which happened a few years earlier. Now I would =
like to use version Xojo 2018 Release 4, but this imposes multiple =
modifications of my project. <br class=3D""><br class=3D""> =
&nbsp;&nbsp;My project spans a few thousands of lines of code. The =
=E2=80=9Cerrors=E2=80=9D generated by the new version of Xojo are very =
numerous (a few hundreds). Fortunately, I suspect they are only due to a =
small number of reasons, which I have not identified yet. <br =
class=3D""><br class=3D""> &nbsp;&nbsp;Here is a piece of code is =
refused, there are many other types of problem. <br class=3D""> =
&nbsp;&nbsp;MouseDown is here part of the ColorButton of a Controls, =
itself part of a Window construct. The error mentioned is that =E2=80=9CTy=
pe Canvas has no member named Graphics=E2=80=9D neither Width and =
Height.<br class=3D""><blockquote type=3D"cite" class=3D""><blockquote =
type=3D"cite" class=3D""><blockquote type=3D"cite" class=3D""><blockquote =
type=3D"cite" class=3D""><blockquote type=3D"cite" class=3D""><blockquote =
type=3D"cite" class=3D""><blockquote type=3D"cite" class=3D""><blockquote =
type=3D"cite" class=3D""><blockquote type=3D"cite" class=3D""><blockquote =
type=3D"cite" class=3D""><blockquote type=3D"cite" class=3D""><blockquote =
type=3D"cite" class=3D""><blockquote type=3D"cite" class=3D""><blockquote =
type=3D"cite" class=3D""><blockquote type=3D"cite" class=3D""><br =
class=3D""></blockquote></blockquote></blockquote></blockquote></blockquot=
e></blockquote></blockquote></blockquote></blockquote></blockquote></block=
quote></blockquote></blockquote></blockquote></blockquote>MouseDown(X As =
Integer, Y As Integer) As Boolean<br class=3D"">Dim c as Color<br =
class=3D"">Dim b as Boolean<br class=3D"">c=3Drgb(255,255,255) //default =
color<br class=3D"">b=3DSelectColor(c,"Select a Text Color")<br =
class=3D"">If b then<br class=3D"">Me.Graphics.ForeColor=3Dc<br =
class=3D"">Me.Graphics.FillRect(1,1,Me.Graphics.Width-2, =
Me.Graphics.Height-2) <br class=3D"">TextField.SelTextColor=3Dc<br =
class=3D"">End if<br =
class=3D"">&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;&lt;<br=
 class=3D""><br class=3D""> &nbsp;&nbsp;&nbsp;I am told to look into the =
Documentation of Release 3, page 825 and, separately, into Graphics and =
Multimedia a part of Example Projects. I did my best but this is not =
really helpful. I find there no hint on how this should be modified. <br =
class=3D""><br class=3D"">Cordially, <br class=3D"">Daniel<br =
class=3D""><br class=3D""><br class=3D"">Daniel Drijard<br =
class=3D"">Thoiry t=C3=A9l=C3=A9phone : <br class=3D""> &nbsp;04 50 41 =
22 75<br class=3D""> &nbsp;&nbsp;&nbsp;international<br class=3D""> =
&nbsp;+33/4 50 41 22 75<br class=3D"">Courriel :<br class=3D""> =
&nbsp;&nbsp;<a href=3D"mailto:[email protected]" =
class=3D"">[email protected]</a><br class=3D"">Thoiry F-01710<br =
class=3D""> &nbsp;&nbsp;48, rue des Savoies<br class=3D""><br =
class=3D""></div></div></blockquote></div><br =
class=3D""></div></body></html>=

--Apple-Mail=_4ECC00CD-A825-458B-BDC5-349785153937--