Fire an event of a window from a control of another window.

Good afternoon everyone,

Is it possible to fire an control's event of a window from another
different window's control.
i.e. I have window A and window B.  Window A has a Save button and
window B has a Find button.  What I want to do is When I hit Save button
in Window A, this action should fire the clicked event in the Find
button of the other Window.  Any comment is appreciated.  Thank you in
advance.

Sonny

0
Sonny
1/27/1999 8:36:42 PM
sybase.powerscript 7704 articles. 0 followers. Follow

4 Replies
490 Views

Similar Articles

[PageSpeed] 6

In article <36AF78DA.655628C1@erols.com>, sonnydo@erols.com says...
> Good afternoon everyone,
> 
> Is it possible to fire an control's event of a window from another
> different window's control.
> i.e. I have window A and window B.  Window A has a Save button and
> window B has a Find button.  What I want to do is When I hit Save button
> in Window A, this action should fire the clicked event in the Find
> button of the other Window.  Any comment is appreciated.  Thank you in
> advance.
> 
> Sonny
> 
> 

This does not pursue the OO technique of encapsulation,
but it is possible.

From Window A Save button clicked event:
IF IsValid ( windowb ) THEN 
   windowb.cb_find.event clicked()
END IF
-- 
John Strano 
[TeamPS] 
0
nichtspam_jstrano
1/27/1999 10:14:39 PM
It's better to create a window event ue_find in window B, the script for
which is called from the Find button.
Then in  the Save event for window A, code
window_b    lw_window
lw_window.Event ue_Find()

This way, if window B changes, say you get rid of the Find button and
trigger the event from the menu instead, then you won't have to change
window A.

HTH

Simon

Sonny Do wrote in message <36AF78DA.655628C1@erols.com>...
>Good afternoon everyone,
>
>Is it possible to fire an control's event of a window from another
>different window's control.
>i.e. I have window A and window B.  Window A has a Save button and
>window B has a Find button.  What I want to do is When I hit Save button
>in Window A, this action should fire the clicked event in the Find
>button of the other Window.  Any comment is appreciated.  Thank you in
>advance.
>
>Sonny
>


0
Simon
1/28/1999 10:07:37 AM
>In article <36AF78DA.655628C1@erols.com>, sonnydo@erols.com says...
>> What I want to do is When I hit Save button in Window A, this
>> action should fire the clicked event in the Find button of the
>> other Window

John Strano [TeamPS] wrote in message ...
>This does not pursue the OO technique of encapsulation,

John, that depends on how granular you take your definition of
encapsulation.  Are you treating the window as the object or the button as
the object.  A very subjective delineation, best left to the individual
developer to decide.

Tim



0
Tim
1/28/1999 9:17:37 PM
In article <LUYsYNwS#GA.209@forums.powersoft.com>, 
timwallace@nospamezonline.com says...
> >In article <36AF78DA.655628C1@erols.com>, sonnydo@erols.com says...
> >> What I want to do is When I hit Save button in Window A, this
> >> action should fire the clicked event in the Find button of the
> >> other Window
> 
> John Strano [TeamPS] wrote in message ...
> >This does not pursue the OO technique of encapsulation,
> 
> John, that depends on how granular you take your definition of
> encapsulation.  Are you treating the window as the object or the button as
> the object.  A very subjective delineation, best left to the individual
> developer to decide.

Good point. What works, works.

In trying to lead folks toward partitioning their
business logic away from the user interface
(which leads to easier migration to objects
which may be implemented in an n-tier architecture),
my bias in my suggestions certainly does lean
toward a parent object level.
Its a simpler step from methods called at the window level,
to methods called at the nvo level.

Moreover if the Sonny calls a published method of
Window B(which in turn calls an internal method), 
moving an internal method from a command button
to a dw control does not require the code
on Window A to be modified in subsequent releases.

However if your application, 
will never be modified
in a subsequent release by other developers who 
expect something closer to current industry techniques, 
will never need to have its
logic partitioned to enable n-tier architecture,
or you simply just need to get it delivered yesterday,
then it is certainly best left to the individual developer to decide.

What works, works.

-- 
John Strano 
[TeamPS] 
0
nichtspam_jstrano
1/29/1999 3:21:09 PM
Reply:

Similar Artilces:

triggering events of a window control from another window
Hi, I'm trying to trigger the "clicked" event of a command button on a window from another window. I made it by using a child window with this script in its close event: parentwindow().control[2].triggerevent("clicked") This works but I must know the index (in this case 2) of the control[] array in the first window associated with the command button. I would like to know how to obtain this index at runtime, or if there is another way to do the same without using a child window with the "parentwindow().control[]" notation. Thanks To ...

superreview granted: [Bug 297927] Extra MSAA focus event fired on top level window : [Attachment 186490] Don't fire MSAA events for top level window, because they are automatically handled by MSAA
T Rowley (IBM) <tor@acm.org> has granted Aaron Leventhal <aaronleventhal@moonset.net>'s request for superreview: Bug 297927: Extra MSAA focus event fired on top level window https://bugzilla.mozilla.org/show_bug.cgi?id=297927 Attachment 186490: Don't fire MSAA events for top level window, because they are automatically handled by MSAA https://bugzilla.mozilla.org/attachment.cgi?id=186490&action=edit ...

superreview requested: [Bug 297927] Extra MSAA focus event fired on top level window : [Attachment 186490] Don't fire MSAA events for top level window, because they are automatically handled by MSAA #3
Aaron Leventhal <aaronleventhal@moonset.net> has asked T Rowley (IBM) <tor@acm.org> for superreview: Bug 297927: Extra MSAA focus event fired on top level window https://bugzilla.mozilla.org/show_bug.cgi?id=297927 Attachment 186490: Don't fire MSAA events for top level window, because they are automatically handled by MSAA https://bugzilla.mozilla.org/attachment.cgi?id=186490&action=edit ...

superreview requested: [Bug 297927] Extra MSAA focus event fired on top level window : [Attachment 186490] Don't fire MSAA events for top level window, because they are automatically handled by MSAA #2
Aaron Leventhal <aaronleventhal@moonset.net> has asked Boris Zbarsky (gone June 3 -- June 30) <bzbarsky@mit.edu> for superreview: Bug 297927: Extra MSAA focus event fired on top level window https://bugzilla.mozilla.org/show_bug.cgi?id=297927 Attachment 186490: Don't fire MSAA events for top level window, because they are automatically handled by MSAA https://bugzilla.mozilla.org/attachment.cgi?id=186490&action=edit ...

How to Control a Window from other Window
Hi, I have a window with a complex customer datawindow report (wr_report.dw_report)... Now, I need to automatize the printing of these reports. I will try explain in a simply way.... I've created a "controler window" with a reference to the "report window" w_report wr wr = create w_report I assing values from the "controler window" to the "report window". wr.t_from = x wr.t_ultil = y wr.t_customer = z wr.load_data() wr.print_data() On Debug I can see the parameters are right...

design probelm
Dear All, I'm facing a design problem on a project I'm doing and was wondering if someone has some ideas on whether it is possible to implement the following in ASP.NET using VB.It is regarding the transfer of data between a webpage in a window to another webpage in another window, both originating from the same server witihn the same ASP app.Never done this before and have no idea how to do it and by now I'm questioning if it can be done the way I have in mind. I have a page named search.aspx (window 1) where I want the result set to appear. I have three options to look f...

Firing events at the window vs. firing them at the chrome event handler
If an event is dispatched from C++ using nsContentUtils::DispatchTrustedEvent with both the 'bubbles' and 'cancelable' flags set false, what precisely is the difference between targeting it at a document's window and targeting it at the document's window's chrome event handler? In particular, if such an event is targeted at the window, is there any circumstance in which a handler registered from chrome JS on gBrowser will *not* get a crack at it? zw On 3/3/13 10:12 PM, Zack Weinberg wrote: > If an event is dispatched from C++ using > nsCont...

Having one Window over another window?
Hi Everybody, I was wondering, how do I make a Window appear on top of another window? Joe That question is a little vague, could you be more specific about what you are trying to do? John On Tue, 3 Jul 2001 16:14:22 -0700, in powersoft.public.powerbuilder.general Joe Munoz <joemunoz@idealease.com> wrote: >Hi Everybody, > >I was wondering, how do I make a Window appear on top of another window? > > ---== Posted via the PFCGuide Web Newsreader ==--- http://www.pfcguide.com/_newsgroups/group_list.asp Joe Assuming that your popup window is already...

Datagrid: delete event getting fired on parent window when reloading parent from child window
Hi, I have a web form with a Add button and a datagrid with a delete column. On click of Add button I open a popup enter values on form and submit… on submit I reload the parent window. Now suppose I added a date 2/2/06 from popup, this date gets displayed in the datagrid. Now I delete this date using the Delete from the datagrid. Now I again click on add and try to add 2/2/06, what happens is the date gets added on submit but when the parent window reloads the date gets removed.  I have no idea how the delete is again getting fired on reload.  Thanks in advance. Dharmendra ...

superreview granted: [Bug 380618] The function assigned to window. ononline gets called when the online event is fired (same for window. onoffline)
Jonas Sicking <jonas@sicking.cc> has granted Johnny Stenback <jst@mozilla.org>'s request for superreview: Bug 380618: The function assigned to window.ononline gets called when the online event is fired (same for window.onoffline) https://bugzilla.mozilla.org/show_bug.cgi?id=380618 Attachment 270792: Fix, remove support for window.on{on|off}line https://bugzilla.mozilla.org/attachment.cgi?id=270792&action=edit ...

superreview requested: [Bug 380618] The function assigned to window. ononline gets called when the online event is fired (same for window. onoffline)
Johnny Stenback <jst@mozilla.org> has asked Jonas Sicking <jonas@sicking.cc> for superreview: Bug 380618: The function assigned to window.ononline gets called when the online event is fired (same for window.onoffline) https://bugzilla.mozilla.org/show_bug.cgi?id=380618 Attachment 270792: Fix, remove support for window.on{on|off}line https://bugzilla.mozilla.org/attachment.cgi?id=270792&action=edit ...

Wish: Event windows minimizable (in Windows)
Hi there, I'm using Lightning 1.8 (inside TB 16.0.2) under Windows 7. I found that event dialog has no "minimum" button. Then I did a little test with several older versions as well as inside Linux and I found that: * in Debian 6 and Kubuntu 11, the "minimum" button is available in all recent Lightning versions; * in Windows (XP & Win7), however, the minimum button is not present in all recent versions up to 1.0b2. Personally, I find this minimum button very useful and convenient. And since we have it in Linux, for uniformity across platfor...

Child windows open under window controls
We are converting a pb7 app to pb10. I notice that child windows now open under any existing controls on the window. I.e. datawindows, etc... This is different than pb7 behavior, and is a pain. Anybody know of a fix for this? I can work around the problem by putting a BringToTop=True in the open event of the windows, but it sure seems like strange behavior. thx its fixed in 10.0.1 [Change Request#: 360192] Thanks for the info. Upgraded to 10.2 and the problem is fixed. > its fixed in 10.0.1 [Change Request#: 360192] ...

Control parent window from Popup window
Hi I open a popup window by clicking a button in a form. I want that, as soon as the popup window is closed the parent window should navigate to a another page. Be nice to geeks, you might end up working for onePlease hit "MARK AS ANSWER" if I made you smile today ;) To access the parent you can use "opener". opener.document.location.href = 'http://www.asp.net';Shane BauerMCP - ASP.NET hi, the parent window:   <asp:Button ID="Button1" runat="server" Text="Button" OnClientClick ="PopupWindow()"/>  <script type ="text/javascript" >   ...

Web resources about - Fire an event of a window from a control of another window. - sybase.powerscript

Control - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

TERROR IN JAKARTA: 'Situation under control' after explosions, gunfire erupt in Indonesian capital
At least six people are dead, including three police officers, after several explosions at the Sarinah shopping mall in an apparent multi-site ...

DFES downgrades bushfire in Dunsborough as it is contained, but not under control
A BUSHFIRE south of Dunsborough has been contained but is not yet under control.

WA fires: threatening Jindalee blaze brought under control
A fire that was at one stage a threat to lives on homes in Jindalee on Thursday has been brought under control.

Queensland police shut down out-of-control party in Berserker, Rockhampton
Police shut down a party of 150 young people who had gathered at a house in Berserker, Rockhampton on Friday night.

ESI cost control and networks
There is an interesting discussion thread on Twitter about how the way Medicare for All saves money is by significantly reducing provider, device, ...

While No One Was Watching, Obama Took Control of the Courts
... and President Obama’s legacy.” It didn’t favor conservatives but there was a dramatic shift to the far left. The appellate is under the control ...

Sanders Backs Gun Control Legislation Ahead of Democratic Debate
Hillary Clinton's campaign calls her rival's move a "debate-eve conversion."

Apple has landed a very rare sponsorship deal to ensure it has control of the hottest ticket in San Francisco ...
Apple has signed up for the first time to become a sponsor of the Super Bowl Host Committee, Daniel Roberts at Yahoo Finance reported. It's ...

Leonardo DiCaprio: The Oscar stuff is ‘completely beyond my control at this point’
... last night’s London premiere of The Revenant . Leo is looking pretty good these days. He’s de-bloated, his facial hair is very much under control, ...

Resources last updated: 1/17/2016 9:15:21 AM