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.

Passing handle to Clicked event of TreeView object

3 posts in Objects Last posting was on 2007-07-25 09:44:14.0Z
Sreerama Ayachitula Posted on 2007-07-25 07:03:35.0Z
Sender: 6d40.46a6f3fa.1804289383@sybase.com
From: Sreerama Ayachitula
Newsgroups: sybase.public.powerbuilder.objects
Subject: Passing handle to Clicked event of TreeView object
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <46a6f5c7.6d60.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 25 Jul 2007 00:03:35 -0700
X-Trace: forums-1-dub 1185347015 10.22.241.41 (25 Jul 2007 00:03:35 -0700)
X-Original-Trace: 25 Jul 2007 00:03:35 -0700, 10.22.241.41
Lines: 15
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9389
Article PK: 736549

Hi,

Can someone let me know, how to pass newhandle from
SelectionChanged event of TreeView to Clicked event.

I tried the below syntax. But, in Clicked event the handle
becoming null.

object.TriggerEvent(Clicked!)

Is there a way to pass the handle as well to the Clicked
event.

Thanks...
Sreeram.


Chris Werner Posted on 2007-07-25 07:57:11.0Z
From: "Chris Werner" <cwAT{PleaseNoSpam}f-s.de>
Newsgroups: sybase.public.powerbuilder.objects
References: <46a6f5c7.6d60.1681692777@sybase.com>
Subject: Re: Passing handle to Clicked event of TreeView object
Lines: 44
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 62.8.156.42
X-Original-NNTP-Posting-Host: 62.8.156.42
Message-ID: <46a70257@forums-1-dub>
Date: 25 Jul 2007 00:57:11 -0700
X-Trace: forums-1-dub 1185350231 62.8.156.42 (25 Jul 2007 00:57:11 -0700)
X-Original-Trace: 25 Jul 2007 00:57:11 -0700, 62.8.156.42
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9390
Article PK: 736547

Hello,

at first let me say that it isn't good design to call an event
which is designed to be triggerd by the user interface. In
your case this may have several disadvantages. Without
testing that I assume the clicked event would be triggered
twice if the user clicks a treeview item to select it. Also it
may be difficult to understand for another programmer whats
going on there.
So you should reorganize your code to have the part
reacting on a selection change called in the SelectionChanged
event and not in the clicked event.

If that isn't conclusive enough code

this.event trigger static clicked(newHandle)

in the SelectionChanged event of the TreeView.

HTH

Chris Werner
f+s software gmbh


<Sreerama Ayachitula> schrieb im Newsbeitrag
news:46a6f5c7.6d60.1681692777@sybase.com...

> Hi,
>
> Can someone let me know, how to pass newhandle from
> SelectionChanged event of TreeView to Clicked event.
>
> I tried the below syntax. But, in Clicked event the handle
> becoming null.
>
> object.TriggerEvent(Clicked!)
>
> Is there a way to pass the handle as well to the Clicked
> event.
>
> Thanks...
> Sreeram.


Sreerama Posted on 2007-07-25 09:44:14.0Z
Sender: 6fde.46a712da.1804289383@sybase.com
From: Sreerama
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Passing handle to Clicked event of TreeView object
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <46a71b6e.709a.1681692777@sybase.com>
References: <46a70257@forums-1-dub>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 25 Jul 2007 02:44:14 -0700
X-Trace: forums-1-dub 1185356654 10.22.241.41 (25 Jul 2007 02:44:14 -0700)
X-Original-Trace: 25 Jul 2007 02:44:14 -0700, 10.22.241.41
Lines: 63
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9391
Article PK: 736550

Chris Werner,

Thanks for your valuable suggestion.

Actually, we have a problem where in the dependent
datawindow not getting refreshed according to the selection
of Tree view item.

It is working fine when the user clicks on an item. But not
when user selects TreeView item with Up/Down arrow keys.

I thought of giving a try executing Clicked event code from
SelectionChanged event.

Will check in different way.

~Sreeram.

> Hello,
>
> at first let me say that it isn't good design to call an
> event which is designed to be triggerd by the user
> interface. In your case this may have several
> disadvantages. Without testing that I assume the clicked
> event would be triggered twice if the user clicks a
> treeview item to select it. Also it may be difficult to
> understand for another programmer whats going on there.
> So you should reorganize your code to have the part
> reacting on a selection change called in the
> SelectionChanged event and not in the clicked event.
>
> If that isn't conclusive enough code
>
> this.event trigger static clicked(newHandle)
>
> in the SelectionChanged event of the TreeView.
>
> HTH
>
> Chris Werner
> f+s software gmbh
>
>
> <Sreerama Ayachitula> schrieb im Newsbeitrag
> news:46a6f5c7.6d60.1681692777@sybase.com...
> > Hi,
> >
> > Can someone let me know, how to pass newhandle from
> > SelectionChanged event of TreeView to Clicked event.
> >
> > I tried the below syntax. But, in Clicked event the
> > handle becoming null.
> >
> > object.TriggerEvent(Clicked!)
> >
> > Is there a way to pass the handle as well to the Clicked
> > event.
> >
> > Thanks...
> > Sreeram.
>
>