New topic: Design pattern guidance
<http://forums.realsoftware.com/viewtopic.php?t=39790> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message jm5464 Post subject: Design pattern guidancePosted: Mon Jul 11, 2011 11:49 am Joined: Sun Dec 26, 2010 7:29 pm Posts: 31 Now that I've given myself a pretty good crash course on RB, I'm looking for some guidance on how to do things properly. I'm currently struggling with how to store the values of controls and load them upon next start, which seems like it should be basic until you realize the proper way to do it is not. Given the basic scenario of an app with two windows: Window1 contains ContainerControl1 contains TextFieldAWindow2 contains ContainerControl2 contains TextFieldB If I want to store the values of the two textfields for later use, do I: Code the TextField Actions to update a global module property whenever the text changes, and have an app closing method write the properties to disk. (This is what I currently do and although easy, seems like a bad way of doing it)Code the TextField Actions to raise an event that bubbles up to the window level which will interact with a similar global module as above.Apply an interface at some level with a method that gets the TextField value, then create an app closing method that iterates through all the instances of that interface, executing the value getting method and stores to disk. (I tried doing this at the ContainerControl level but ran into some issues)Insert your method here This is my first venture into GUI programming so any design pattern help would be appreciated. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- 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]
