Re: Deprecated "Graphics" dropped

Emile SCHWARZ <[email protected]> Wed, 26 Dec 2018 13:22:57 +0100 (CET)
Newsgroups gmane.comp.lang.realbasic.user
Message-ID <642187062.1237136.1545826977247.JavaMail.open-xchange@opme11oxm21nd1.rouen.francetelecom.fr>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org=
/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns=3D"http://www.w3.org/1999/xhtml"><head>
    <meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3DUTF-8=
"/>
 </head><body style=3D"font-family: arial,helvetica,sans-serif; font-size: =
13pt"><p>Daniel,<br></p><p><br></p><p>First of all, make a global search fo=
r &#8220;.Graphics.&#8221;, then go to each and every occurence and modify =
the code.<br></p><p><br></p><p>Did you read the link I shared some days ago=
 ?<br></p><p>These holds the official answer from Xojo for your problem.<br=
></p><p><br></p><p>You have to check and modify each g or Graphics or&#8230=
; entries until (eventually, if no other errors) you will be able to run yo=
ur project. Yes, a boring operation.<br></p><p><br></p><p>You may eventuall=
y use Xojo 2018r3 to remove all other compilation errors, and once this is =
done, go back to 2014r4 to finish the job. Once done, this allows you to ha=
ve a situation before the graphics problem is resolved: run the project in =
the IDE and get a &#8220;preview&#8221; of what it will be with Xojo 2018r4=
. Then, you can take a day break and come back for the last part.<br></p><p=
><br></p><p>Remember to make backups of your project every now and then (in=
 case you add some error in the modernization process). At least, once a da=
y (more depending on the ellapsed time / amount of work done in the day).<b=
r></p><p><br></p><blockquote type=3D"cite"><p>envoy&#233; : 26 d&#233;cembr=
e 2018 &#224; 12:40<br>de : Daniel Drijard &#60;[email protected]&#62;=
<br>&#224; : Nug &#60;nug-Ktk10zIkF/Jvqtv/[email protected]&#62;<br>objet : Re: Deprecated &#3=
4;Graphics&#34; dropped<br><br><br>Jim, <br><br> I followed your propositio=
n and, indeed, some compilation errors disappeared. Some of them are, howev=
er, still present. In a Module ModWindow they protest to my code<br> &#34;M=
e.Graphics.clearRect Me.Left,Me.Top,MeWidth,Me.Height&#8221;<br> by<br> &#3=
4;This method extends class Canvas, but the base expression is class ModWin=
dow.ModWindow&#8221;<br> and to<br> &#34;Graphics.clearRect(0,0,1000,1000)&=
#8221;<br> by<br> &#8220;Static reference to instance method: call this on =
an instance of class Graphics.&#8221;<br><br> There are as well errors on o=
ther codes such as<br> &#34;Me.Graphics.drawstring(str1,430,65,200)&#8221;<=
br><br> These types of errors happen on multiple other Modules. What should=
 I do ?<br><br>Cordially, <br>Daniel<br><br></p><blockquote type=3D"cite"><=
p>On 23 12 2018, at 19:53, Jim McKay &#60;[email protected]&#62; wrote:<br><br>=
My solution is very simple. You add a module to your project (via the menu =
Insert-&#62;Module), call it &#8220;GraphicsBandaid&#8221; or whatever. Add=
 a single method. Now your old code works, unmodified. I&#39;m not understa=
nding how that is complex.<br><br>After you&#39;ve added the new method, ca=
lls to canvas1.graphics will simply be forwarded to canvas1.backdrop.graphi=
cs<br><br>The only real solution is to rewrite your code to only access the=
 graphics from inside the paint event.<br><br>On Dec 23, 2018, at 6:34 AM, =
Daniel Drijard &#60;[email protected]&#62; wrote:<br><br>I got later a=
 new answer from [email protected] who proposes something more complex to escap=
e the problem, without solving it.</p></blockquote><p>Daniel Drijard<br>Tho=
iry t&#233;l&#233;phone : <br> 04 50 41 22 75<br> international<br> +33/4 5=
0 41 22 75<br>Courriel :<br> [email protected]<br>Thoiry F-01710<br> 4=
8, rue des Savoies</p></blockquote></body></html>