Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

how to traverse all items in menu

4 posts in Objects Last posting was on 2005-08-31 19:41:00.0Z
Ben Posted on 2005-08-24 08:02:21.0Z
Sender: 16be.430c27f9.1804289383@sybase.com
From: ben
Newsgroups: sybase.public.powerbuilder.objects
Subject: how to traverse all items in menu
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <430c2989.16ce.1681692777@sybase.com>
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 24 Aug 2005 01:02:17 -0700, 10.22.241.42
Lines: 17
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 24 Aug 2005 01:02:18 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 24 Aug 2005 01:02:21 -0700
X-Trace: forums-1-dub 1124870541 10.22.108.75 (24 Aug 2005 01:02:21 -0700)
X-Original-Trace: 24 Aug 2005 01:02:21 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:8540
Article PK: 735766

dose anyone to know how to traverse all items in menu.

i try to write the code as below statements, but only got
the first level of menu items.

li_cnt = UpperBound(am_menu.item)
For i = 1 to li_cnt
ls_MenuItemText = Trim(am_menu.Item[i].Text)
messagebox("test",ls_MenuItemText)
Next

could you show me how to got the detail items in the menu.

besides, i am using pb8.0.

thanks,


Bede <bede_nosp Posted on 2005-08-24 11:57:48.0Z
From: Bede <bede_nosp@m_sofico.be>
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: how to traverse all items in menu
Message-ID: <MPG.1d767f2566b8965298974b@forums.sybase.com>
References: <430c2989.16ce.1681692777@sybase.com>
Organization: Sofico
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-15"
Content-Transfer-Encoding: 7bit
User-Agent: MicroPlanet-Gravity/2.70.2067
NNTP-Posting-Host: uu194-7-38-226.unknown.uunet.be
X-Original-NNTP-Posting-Host: uu194-7-38-226.unknown.uunet.be
Date: 24 Aug 2005 04:57:48 -0700
X-Trace: forums-1-dub 1124884668 194.7.38.226 (24 Aug 2005 04:57:48 -0700)
X-Original-Trace: 24 Aug 2005 04:57:48 -0700, uu194-7-38-226.unknown.uunet.be
Lines: 22
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:8541
Article PK: 735762

your question has been aswered in another group, besides, there's really
no need to cross-post.

In article <430c2989.16ce.1681692777@sybase.com>, ben says...

>
> dose anyone to know how to traverse all items in menu.
>
> i try to write the code as below statements, but only got
> the first level of menu items.
>
> li_cnt = UpperBound(am_menu.item)
> For i = 1 to li_cnt
> ls_MenuItemText = Trim(am_menu.Item[i].Text)
> messagebox("test",ls_MenuItemText)
> Next
>
> could you show me how to got the detail items in the menu.
>
> besides, i am using pb8.0.
>
> thanks,
>


Chris Pollach Posted on 2005-08-31 14:07:07.0Z
From: "Chris Pollach" <cpollach@travel-net.dot.com>
Newsgroups: sybase.public.powerbuilder.objects
References: <430c2989.16ce.1681692777@sybase.com>
Subject: Re: how to traverse all items in menu
Lines: 27
Organization: STD Inc.
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4927.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4927.1200
X-Original-NNTP-Posting-Host: stealth.nserc.ca
Message-ID: <4315b987@forums-2-dub>
X-Original-Trace: 31 Aug 2005 07:07:03 -0700, stealth.nserc.ca
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 31 Aug 2005 07:07:04 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 31 Aug 2005 07:07:07 -0700
X-Trace: forums-1-dub 1125497227 10.22.108.75 (31 Aug 2005 07:07:07 -0700)
X-Original-Trace: 31 Aug 2005 07:07:07 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:8565
Article PK: 735786

Ben;

Each Item in the Item Array can point to a subordinate Item Array!

Chris

<ben> wrote in message news:430c2989.16ce.1681692777@sybase.com...
>
> dose anyone to know how to traverse all items in menu.
>
> i try to write the code as below statements, but only got
> the first level of menu items.
>
> li_cnt = UpperBound(am_menu.item)
> For i = 1 to li_cnt
> ls_MenuItemText = Trim(am_menu.Item[i].Text)
> messagebox("test",ls_MenuItemText)
> Next
>
> could you show me how to got the detail items in the menu.
>
> besides, i am using pb8.0.
>
> thanks,


Mike Tirrell Posted on 2005-08-31 19:41:00.0Z
Sender: 77e8.43160345.1804289383@sybase.com
From: Mike Tirrell
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: how to traverse all items in menu
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <431607c6.782c.1681692777@sybase.com>
References: <4315b987@forums-2-dub>
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 31 Aug 2005 12:40:54 -0700, 10.22.241.42
Lines: 35
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 31 Aug 2005 12:40:56 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 31 Aug 2005 12:41:00 -0700
X-Trace: forums-1-dub 1125517260 10.22.108.75 (31 Aug 2005 12:41:00 -0700)
X-Original-Trace: 31 Aug 2005 12:41:00 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:8568
Article PK: 735791

Exactly, so in your example below, you can test for
subordinate menu items by checking:

Upperbound( am_menu.Item[i].Item[] )

and then looping through that Item array as well.

> Ben;
>
> Each Item in the Item Array can point to a subordinate
> Item Array!
>
> Chris
>
>
> <ben> wrote in message
> news:430c2989.16ce.1681692777@sybase.com... >
> > dose anyone to know how to traverse all items in menu.
> >
> > i try to write the code as below statements, but only
> > got the first level of menu items.
> >
> > li_cnt = UpperBound(am_menu.item)
> > For i = 1 to li_cnt
> > ls_MenuItemText = Trim(am_menu.Item[i].Text)
> > messagebox("test",ls_MenuItemText)
> > Next
> >
> > could you show me how to got the detail items in the
> menu. >
> > besides, i am using pb8.0.
> >
> > thanks,
>
>