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 “.Graphics.”, 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…=
; 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 “preview” 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é : 26 décembr=
e 2018 à 12:40<br>de : Daniel Drijard <[email protected]>=
<br>à : Nug <nug-Ktk10zIkF/Jvqtv/[email protected]><br>objet : Re: Deprecated =
4;Graphics" 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> "M=
e.Graphics.clearRect Me.Left,Me.Top,MeWidth,Me.Height”<br> by<br> =
4;This method extends class Canvas, but the base expression is class ModWin=
dow.ModWindow”<br> and to<br> "Graphics.clearRect(0,0,1000,1000)&=
#8221;<br> by<br> “Static reference to instance method: call this on =
an instance of class Graphics.”<br><br> There are as well errors on o=
ther codes such as<br> "Me.Graphics.drawstring(str1,430,65,200)”<=
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 <[email protected]> wrote:<br><br>=
My solution is very simple. You add a module to your project (via the menu =
Insert->Module), call it “GraphicsBandaid” or whatever. Add=
a single method. Now your old code works, unmodified. I'm not understa=
nding how that is complex.<br><br>After you'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 <[email protected]> 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élé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>