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.

GetActiveSheet() and TriggerEvent()

2 posts in Appeon (partner product) Last posting was on 2005-07-19 07:35:47.0Z
Marco Meoni Posted on 2005-07-18 13:27:20.0Z
From: "Marco Meoni" <marco.meoni@cern.ch>
Newsgroups: sybase.public.appeon
Subject: GetActiveSheet() and TriggerEvent()
Lines: 18
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
X-Original-NNTP-Posting-Host: 159.213.37.151
Message-ID: <42dbae33$1@forums-2-dub>
X-Original-Trace: 18 Jul 2005 06:27:15 -0700, 159.213.37.151
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 18 Jul 2005 06:27:17 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 18 Jul 2005 06:27:20 -0700
X-Trace: forums-1-dub 1121693240 10.22.108.75 (18 Jul 2005 06:27:20 -0700)
X-Original-Trace: 18 Jul 2005 06:27:20 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.appeon:976
Article PK: 20977

I'm using PB9, Appeon 2.8 and EAS 5.2. I have a MDI window with a menu. From
a menu's item i'd like to execute:

- ParentWindow.GetActiveSheet().TriggerEvent("my_event")

This code doesn't work, the return value is 0, but
ParentWindow.GetActiveSheet() gets back the right ClassName.
On the other hand, if I directly specifies the window's name:

- w_my_sheet.TriggerEvent("my_event")

it WORKS!

Why?

Marco


Julie Jiang Posted on 2005-07-19 07:35:47.0Z
From: "Julie Jiang" <julie.jiang@appeon.net>
Newsgroups: sybase.public.appeon
References: <42dbae33$1@forums-2-dub>
Subject: Re: GetActiveSheet() and TriggerEvent()
Lines: 115
MIME-Version: 1.0
Content-Type: multipart/alternative; boundary="----=_NextPart_000_0149_01C58C77.75F0F650"
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 210.21.221.178
X-Original-NNTP-Posting-Host: 210.21.221.178
Message-ID: <42dcad53@forums-1-dub>
Date: 19 Jul 2005 00:35:47 -0700
X-Trace: forums-1-dub 1121758547 210.21.221.178 (19 Jul 2005 00:35:47 -0700)
X-Original-Trace: 19 Jul 2005 00:35:47 -0700, 210.21.221.178
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.appeon:977
Article PK: 20983

Hi Marco,
 
In Appeon 2.8 Help | PowerScript Topics | Calling functions or events, we have described that "it is unsupported to use cascaded calling and return values, where the return value of the function or event becomes the object for the following call, for example: func1returnsobject( ).func2returnsobject( ).func3returnsanything( )".  What you noticed should be caused by this unsupported feature. 
 
You can rewrite the script "ParentWindow.GetActiveSheet().TriggerEvent("my_event") to the following:
 
Window l_sheet
l_sheet = ParentWindow.GetActiveSheet()
l_sheet.TriggerEvent("my_event").
 
Regards,
Julie
 
 
 
"Marco Meoni" <marco.meoni@cern.ch> wrote in message news:42dbae33$1@forums-2-dub...
I'm using PB9, Appeon 2.8 and EAS 5.2. I have a MDI window with a menu. From
a menu's item i'd like to execute:

- ParentWindow.GetActiveSheet().TriggerEvent("my_event")

This code doesn't work, the return value is 0, but
ParentWindow.GetActiveSheet() gets back the right ClassName.
On the other hand, if I directly specifies the window's name:

- w_my_sheet.TriggerEvent("my_event")

it WORKS!

Why?

Marco