New topic: DrawObject method does not exist ...
<http://forums.realsoftware.com/viewtopic.php?t=45697> Page 1 of 1 [ 6 posts ] Previous topic | Next topic Author Message Primoz128 Post subject: DrawObject method does not exist ...Posted: Wed Oct 24, 2012 10:39 am Joined: Sun Oct 21, 2012 10:47 am Posts: 19 Umm i copied the example from language reference and RS says it doesn't exist... now i don't know what function/method was made to replace it... Dim r as New RectShape r.width=75 r.height=75 r.border=100 r.bordercolor=RGB(0,0,0) //black r.fillcolor=RGB(0,127,127) // teal r.borderwidth=2.5 r.rotation=-.78 g.DrawObject r,100,100 Who made g a shortuct of Graphics in the manual... this is not friendly... Top markwalsh Post subject: Re: DrawObject method does not exist ...Posted: Wed Oct 24, 2012 11:00 am Joined: Wed May 20, 2009 4:43 pm Posts: 897 Primoz128 wrote:Umm i copied the example from language reference and RS says it doesn't exist... now i don't know what function/method was made to replace it... Dim r as New RectShape r.width=75 r.height=75 r.border=100 r.bordercolor=RGB(0,0,0) //black r.fillcolor=RGB(0,127,127) // teal r.borderwidth=2.5 r.rotation=-.78 g.DrawObject r,100,100 Who made g a shortuct of Graphics in the manual... this is not friendly... edit: my mistake; the LR is correct. _________________ RB 2009r4 Windows XP Last edited by markwalsh on Wed Oct 24, 2012 11:26 am, edited 2 times in total. Top Primoz128 Post subject: Re: DrawObject method does not exist ...Posted: Wed Oct 24, 2012 11:02 am Joined: Sun Oct 21, 2012 10:47 am Posts: 19 markwalsh wrote:Primoz128 wrote:Umm i copied the example from language reference and RS says it doesn't exist... now i don't know what function/method was made to replace it... Dim r as New RectShape r.width=75 r.height=75 r.border=100 r.bordercolor=RGB(0,0,0) //black r.fillcolor=RGB(0,127,127) // teal r.borderwidth=2.5 r.rotation=-.78 g.DrawObject r,100,100 Who made g a shortuct of Graphics in the manual... this is not friendly... That probably need to be updated in the RectShape entry in the LR. I guess they either left out a line where they dimmed g as self.graphics, or meant to use 'self.graphics' instead of 'g'. This works: self.Graphics.DrawObject r,100,100 No it does not work... self.Graphics is both highlighted as this method or property does not exist. Top markwalsh Post subject: Re: DrawObject method does not exist ...Posted: Wed Oct 24, 2012 11:23 am Joined: Wed May 20, 2009 4:43 pm Posts: 897 Primoz128 wrote:markwalsh wrote:Primoz128 wrote:Umm i copied the example from language reference and RS says it doesn't exist... now i don't know what function/method was made to replace it... Dim r as New RectShape r.width=75 r.height=75 r.border=100 r.bordercolor=RGB(0,0,0) //black r.fillcolor=RGB(0,127,127) // teal r.borderwidth=2.5 r.rotation=-.78 g.DrawObject r,100,100 Who made g a shortuct of Graphics in the manual... this is not friendly... That probably need to be updated in the RectShape entry in the LR. I guess they either left out a line where they dimmed g as self.graphics, or meant to use 'self.graphics' instead of 'g'. This works: self.Graphics.DrawObject r,100,100 No it does not work... self.Graphics is both highlighted as this method or property does not exist. Are you using it in the Paint event of the window? My mistake, I misread what you were saying; 'g' is defined in the Paint event, so it should work as listed in the LR. If you are using it in a different event or method, you need to tell it which graphics object to paint into. _________________ RB 2009r4 Windows XP Last edited by markwalsh on Wed Oct 24, 2012 11:24 am, edited 1 time in total. Top ktekinay Post subject: Re: DrawObject method does not exist ...Posted: Wed Oct 24, 2012 11:24 am Joined: Mon Feb 05, 2007 5:21 pm Posts: 212 Location: New York, NY In which Event have you placed this code? All drawing must happen in the Paint event. _________________ Kem Tekinay MacTechnologies Consulting http://www.mactechnologies.com/ Need to develop, test, and refine regular expressions? Try RegExRX. Top Primoz128 Post subject: Re: DrawObject method does not exist ...Posted: Wed Oct 24, 2012 11:29 am Joined: Sun Oct 21, 2012 10:47 am Posts: 19 It works now. I also found this in OpenGL Liquid example and it has a problem: Window1.OpenGLSurface.Render ---> Window1 is highlighted and this method or property does not exist is the problem. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 6 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
