Even better is not to use a global property for such a thing. Charles Yeomans
On May 2, 2007, at 8:24 PM, William Squires wrote: > But only at the time you make the assignment. (i.e. anyone using > the global String variable will get a cached copy, with no way of > knowing if the value changed since the assignment was made.) > Better would be to make the global variable a <reference-to- > RadioButton>, then - in the control's Open() event - set > App.MyInterestingRadioButton = Me. Now anyone can query the radio > button through this reference to get an up-to-date copy of its .Text > value! > Better still would be to make a controller class to mediate the > interactions of interest in a more OO (read, Cocoa) way. > > On May 2, 2007, at 1:25 PM, Jim Payne wrote: > >> Charles Yeomans wrote: >>> On May 2, 2007, at 1:34 PM, Jim Payne wrote: >>> >>> >>>> The original poster wrote: >>>> >>>>> At 12:30 PM 5/1/2007, you wrote: >>>>> >>>>> >>>>> >>>>>>> How do you pass Control Arrays to a external function? >>>>>>> >>>>>>> I am dealing with the classic simple task of finding which Radio >>>>>>> Button is selected, and wrapping that up in a function. >>>>>>> >>>>>>> >>>> There were several suggestions, but wouldn't it be easier to >>>> subclass >>>> radio button? First define a global variable to hold a string , >>>> say >>>> App.RadButTxt as string, and in the action event of the subclassed >>>> radio button say: App.RadButTxt = me.Text >>>> >>>> Now there is no need to search for which button is hit. >>>> >>> >>> Instead you have to handle the problems that such a design >>> introduces. For example, suppose you change the text of the button >>> at some point in development. Then you have to remember to change >>> the code that depends on this value. And you should wonder whether >>> the value was accidentally changed by another object. >>> >>> Charles Yeomans >> No, no Charles. me.text will return the current actual text of >> the button. >> >> Jim Payne >> _______________________________________________ >> Unsubscribe or switch delivery mode: >> <http://www.realsoftware.com/support/listmanager/> >> >> Search the archives: >> <http://support.realsoftware.com/listarchives/lists.html> > > _______________________________________________ > Unsubscribe or switch delivery mode: > <http://www.realsoftware.com/support/listmanager/> > > Search the archives: > <http://support.realsoftware.com/listarchives/lists.html> _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives: <http://support.realsoftware.com/listarchives/lists.html>
