New topic: Referencing a Closed Window
<http://forums.realsoftware.com/viewtopic.php?t=47580> Page 1 of 1 [ 2 posts ] Previous topic | Next topic Author Message StephenD Post subject: Referencing a Closed WindowPosted: Fri Apr 12, 2013 3:25 pm Joined: Sat Sep 30, 2006 7:05 am Posts: 27 There's been various discussion in the past that referencing a closed window is Bad. Is this safe? If myMaybeClosedWindow <> nil and myMaybeClosedWindow.visible = false then myMaybeClosedWindow = new window End If Top Bob Keeney Post subject: Re: Referencing a Closed WindowPosted: Fri Apr 12, 2013 3:31 pm Joined: Fri Sep 30, 2005 11:48 am Posts: 3492 Location: Lenexa, KS Personally I like doing this: for i as integer = 0 to windowcount-1 if window(i) isa myMaybeClosedWindow then //have one open return end next //not open? create a new one. dim w as new myMaybeClosedWindow w.show I like to run with ImplicitInstance = false on my windows. It resolved a lot of issues like this. Of course this assumes that the name of your window is myMaybeClosedWindow. _________________ Bob K. Real Word Processing for your Real Studio Applications with Formatted Text Control http://www.bkeeney.com/formatted-text-control/ Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 2 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]
