Re: which is more efficient?
- Posted by Derek Parnell <ddparnell at bigpond.com> Mar 08, 2003
- 503 views
----- Original Message ----- From: "Judith Evans" <camping at txcyber.com> To: "EUforum" <EUforum at topica.com> Subject: which is more efficient? > > I have to change text on many controls on more than one window. I know when > I need to make the text change in another window, WindowN. Which is the > better approach: to have global ids and use setText() as needed from a > routine in WindowN or ids not global but have a global routine in each > affected window that does the setText() which are referenced from WindowN? As a rule-of-thumb, have as few globally scoped identifiers as possible. This will ease maintenance of code as it becomes easier to control what identifiers are used, where. From a performance point of view, it shouldn't matter. > Also how do I change the text of a top level menu? setText() does not work > unless there is something I need to do after that statement. I've tried > repaintWindow. There doesn't seem to be any way to change the text of a top-level menu. The only thing I can think of is to create a new menu and somehow attach the old menuitems to it. I'll play around with a few ideas. ---------------- cheers, Derek Parnell