BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 07-17-2010, 06:47 PM   #1 (permalink)
New Member
 
Join Date: Jul 2010
Model: 9630
PIN: N/A
Carrier: Verizon
Posts: 11
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default event propagation

Please Login to Remove!

Hi. What is the proper way to propagate an event to calling objects ? For example, I have a sub-classed button that's in a manager. On button click, I want to process the navClick event in the button itself and also raise it up to the manager to do some work there based on the click trigger.

I figured out that I can do it by either passing the manager reference to the button and invoking a manager method from the button. Or creating an interface that the manager would implement and calling it from the button event handler.

Is there a better way to do this ?

Thanks.
Offline  
Old 07-17-2010, 08:27 PM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Jan 2006
Model: LEZ10
OS: 10.0.10
Carrier: Rogers CA
Posts: 1,704
Post Thanks: 20
Thanked 77 Times in 68 Posts
Default

navigationClick returns true if the consumed the event, false otherwise. You could return false which would indicate to the system that it should find another target for the event. This may not be the object you want. Better? Perhaps, if it does what you want.
__________________
My other Blackberry is a PlayBook.
Offline  
Old 07-17-2010, 10:50 PM   #3 (permalink)
New Member
 
Join Date: Jul 2010
Model: 9630
PIN: N/A
Carrier: Verizon
Posts: 11
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you for the idea. It almost worked. The event bubles up to the manager. The problem is that now the manager navClick does the same thing as the button navClick, which I do not want. In other words, if I click anywhere in the manager, it does the same thing as if I clicked on the button inside the manager. I am not sure if it's possible to trace the originating control of the event. navClick has only status and time params.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LIA3420, This IC is found on Commodore Amiga 2000 board And is a Buster Chip
$11.0
LIA3420, This IC is found on Commodore Amiga 2000 board And is a Buster Chip  pictureMOS MPS 6520 Commodore Amiga Atari PIA 40-Pin PDIP Used
$10.0
MOS MPS 6520 Commodore Amiga Atari PIA 40-Pin PDIP Used  pictureGenuine Noches Latinas UR3 Amiga Parala La Palma Vagina Mastrubator + Cream Gift
$29.99
Genuine Noches Latinas UR3 Amiga Parala La Palma Vagina Mastrubator + Cream Gift pictureGenuine Noches Latinas UR3 Amiga Para La Palma Culo Mastrubator + Cream Gift
$29.99
Genuine Noches Latinas UR3 Amiga Para La Palma Culo Mastrubator + Cream Gift pictureCSG/AMIGA 391077-01 PLCC
$14.2
CSG/AMIGA 391077-01 PLCC picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.