lots of widgets

I have a window with 60 + widgets (button) that I have to update every
1/2 sec., changing some pictures in them. The problem is that I can’t
find any function in Phtk Libs that I can pass the names of the widgets
in a loop… They’re called 201, 202, 203 … 289. If i pass a string
or pointer to ApGetWidgetPtr containing ABN_201 the linker doesn’t seem
to understand it. I’ve seen on the PHCD example source code that you
can do it with pictures, since ApGetImageRes accepts *char as the
second parameter, so i pass “ABN_201” but ApGetWidgetPtr wants the INT
value of ABN_xxx and not the name… What can I do? I can’t pass name
by name with if ( ApGetName (widget) == xxx )… How can i loop this
operations???

Thanx,

\

-=[ .caco. ]=-


Sent via Deja.com http://www.deja.com/
Before you buy.

What I did when I had to access many (and possibly a variable number of)
widgets repeatedly on my screen was to create them manually and store the
widget address in an array for easy access. I created the widgets in a
widget library and then used ApCreateWidget to create them on the screen
storing the return value in the array. It makes for easy looping through
the whole group of widgets.

Hope this helps.

Jim

“Ricardo Baibich” <caco@netafim.com> wrote in message
news:8nqi9v$f2a$1@nnrp1.deja.com

I have a window with 60 + widgets (button) that I have to update every
1/2 sec., changing some pictures in them. The problem is that I can’t
find any function in Phtk Libs that I can pass the names of the widgets
in a loop… They’re called 201, 202, 203 … 289. If i pass a string
or pointer to ApGetWidgetPtr containing ABN_201 the linker doesn’t seem
to understand it. I’ve seen on the PHCD example source code that you
can do it with pictures, since ApGetImageRes accepts *char as the
second parameter, so i pass “ABN_201” but ApGetWidgetPtr wants the INT
value of ABN_xxx and not the name… What can I do? I can’t pass name
by name with if ( ApGetName (widget) == xxx )… How can i loop this
operations???

Thanx,

\

-=[ .caco. ]=-


Sent via Deja.com > http://www.deja.com/
Before you buy.

I’ve done it the same way and works great

Jim Lambert <jlambert@eftsolutions.com> wrote in message
news:8nu6n3$pdv$1@inn.qnx.com

What I did when I had to access many (and possibly a variable number of)
widgets repeatedly on my screen was to create them manually and store the
widget address in an array for easy access. I created the widgets in a
widget library and then used ApCreateWidget to create them on the screen
storing the return value in the array. It makes for easy looping through
the whole group of widgets.

Hope this helps.

Jim

“Ricardo Baibich” <> caco@netafim.com> > wrote in message
news:8nqi9v$f2a$> 1@nnrp1.deja.com> …


I have a window with 60 + widgets (button) that I have to update every
1/2 sec., changing some pictures in them. The problem is that I can’t
find any function in Phtk Libs that I can pass the names of the widgets
in a loop… They’re called 201, 202, 203 … 289. If i pass a string
or pointer to ApGetWidgetPtr containing ABN_201 the linker doesn’t seem
to understand it. I’ve seen on the PHCD example source code that you
can do it with pictures, since ApGetImageRes accepts *char as the
second parameter, so i pass “ABN_201” but ApGetWidgetPtr wants the INT
value of ABN_xxx and not the name… What can I do? I can’t pass name
by name with if ( ApGetName (widget) == xxx )… How can i loop this
operations???

Thanx,

\

-=[ .caco. ]=-


Sent via Deja.com > http://www.deja.com/
Before you buy.