Re: which is more efficient?

new topic     » goto parent     » topic index » view thread      » older message » newer message

----- 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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu