1. 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?

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

new topic     » topic index » view message » categorize

2. Re: which is more efficient?

On Fri, 7 Mar 2003 05:37:50 -0600, Judith Evans <camping at txcyber.com>
wrote:

Just my thoughts; I hope you get several; pick & choose the best;)

>I have to change text on many controls on more than one window.
OK, done that by hand many times..
> I know when
>I need to make the text change in another window, WindowN.
Lets clarify; not the code you write to make the IDE but the code the
IDE generates is the issue here? (latter assumed)
> 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?
Clearly the *ONLY* problem with too many globals is the cluttering of
the global namespace; accidentally re-using, clashes with 3rd party
include files, etc. But I assume all these global names are strictly
under your control. Replacing <var> with <proc> just adds code?
So I would suggest sticking with global vars, unless you have a scheme
to reduce the number of globals needing to have a name, somehow...

>Also=20
<snip>; sorry, no idea.

Pete

new topic     » goto parent     » topic index » view message » categorize

3. Re: which is more efficient?

--part1_1e1.3ef4aae.2b9b79f3_boundary

I am sorry that I cant help.  Just beginning.




--part1_1e1.3ef4aae.2b9b79f3_boundary

<HTML><FONT FACE=3Darial,helvetica><FONT  SIZE=3D2 FAMILY=3D"SANSSERIF" FACE=
=3D"Arial" LANG=3D"0">I am sorry that I cant help.&nbsp; Just beginning.<BR>
<BR>
<P ALIGN=3DRIGHT><BR>
<BR>
--part1_1e1.3ef4aae.2b9b79f3_boundary--

new topic     » goto parent     » topic index » view message » categorize

4. Re: which is more efficient?

----- 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 message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu