Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Pbm_custom events in inherits objects

130 views
Skip to first unread message

antonio_moreno

unread,
Apr 15, 2004, 6:09:02 AM4/15/04
to
Hey
I have a window with some pbm_customs events mapped to
Events Id, pbm_custom01, pbm_custom02.
I inherit from this window another window and I want to
insert
some other events mapped to Events ID too. The list in
Events Id
in this second window show me pbm_custom01,
pbm_custoom02.... and so on until pbm_custom75.
The question is : if pbm_custom01 has been used in the first
window why is it showed in the second window?

I have tested that using SEND function with 1024 event, it
triggers the event in the first window even the handle were
of the inherit window


TIA A. Moreno

Bruce Armstrong [TeamSybase]

unread,
Apr 15, 2004, 10:14:25 AM4/15/04
to
What version of PB are you using? Unless you are calling those events
from outside of PB, you shouldn't need to map to custom events at all.

Bruce Armstrong [TeamSybase]
http://www.teamsybase.com

Sixth Annual Sybase Tools Seminar - April 19 - Minneapolis, MN
http://www.powerobjects.com/seminar/?source=newsgroups

Two new books on developing with PowerBuilder
http://www.pb9books.com?source=newsgroups

Need code sample? Check out CodeXchange:
http://www.codexchange.sybase.com

ISUG Enhancement Requests
http://www.isug.com/cgi-bin/ISUG2/submit_enhancement

Preach the gospel at all times. If necessary, use words. - Francis of Assisi
http://www.needhim.org

Larry Molter

unread,
Apr 15, 2004, 8:04:56 PM4/15/04
to
Hey back,

The reason you see the events again in descendants is that the events
cascade through the hierarchy downward. Example: You've coded
pmb_custom01 in an ancestor. You then inherit from this ancestor to
create a descendant object. If you look in the event list, you'll see
a pink square next to pbm_custom01. The pink color indicates that
there is code in the ancestor object for this event. When the event
is triggered on a descendant, the ancestor code will be executed first
and then any descendant script will be executed. In might be to your
benefit to read about event propgation and custom user events in the
help file or the online books. Bruce made a good point, too. Those
pbm_customXX events are archaic now. They're only there for backwards
compatibility. Please read about unmapped events in the help
materials or a PB book.

Larry

On 15 Apr 2004 02:09:02 -0800, Antonio Moreno wrote:

antonio_moreno

unread,
Apr 16, 2004, 4:53:48 AM4/16/04
to
Yes, I have read that mapping an event to pbm_customxx is
obsolete, but it is the only way for trigger an event with
the
SEND function. How do you trigger a event of a window from
another window?. My method is in this second window using
the
SEND function with the handle of the first window and 1024 +
pbm_customxx. Do you have any other method as less cost as
this one?

Thank you for your interest
A. Moreno
I am using pb 8.04

Terry Voth

unread,
Apr 16, 2004, 9:16:44 AM4/16/04
to
A couple of methods:

lw_WindowReference.TriggerEvent ("EventName")
lw_WindowReference EVENT EventName (parm_list)

Good luck,

Terry [TeamSybase] and Sequel the techno-kitten


Sequel's Sandbox: http://www.techno-kitten.com
Home of PBL Peeper, a free PowerBuilder Developer's Toolkit.
Version 2.2.06 now available at the Sandbox
See the PB Troubleshooting Guide at the Sandbox
^ ^
o o
=*=

antonio_m_oreno

unread,
Apr 16, 2004, 2:17:48 PM4/16/04
to
Yes I now that methods but I need a window's reference to
aply them.
how can I got the window's reference in the second window?


TIA
A. moreno

Terry Voth

unread,
Apr 16, 2004, 2:30:32 PM4/16/04
to
How did you get the handle for the Send() function? The Open()
function is what gets you the window reference. You'll have to
maintain it until you need it.

Good luck,

Terry [TeamSybase] and Sequel the techno-kitten

0 new messages