Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
Posts: 25
Registered: ‎03-24-2009
My Device: Not Specified
Accepted Solution

Popup Screen Listener

Hi,

I was wondering if it was possible to

 

1). Catch the event where focus is lost from MainScreen when popup screen is pushed

2). Catch the event when focus is returned to MainScreen when popup screen is closed.

 

I have looked at implementing

FocusChangeListener 

setFocusListener(this);

public void focusChanged(Field field, int eventType)

However my understanding is that this catches focus changed events from various Fields in MainScreen & focusChanged for is not triggered when popup screen is pushed to the stack.

Is this correct?

 

I am fairly new to BB JDE and I would be grateful for any assistance.

 

Regards,

Bob.

 

 

Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: Popup Screen Listener

Give a look at methods,

 

onExposed() and onObscured().

 


Use Search. "Accept Solution" If the problem is resolved.
Highlighted
Developer
Posts: 558
Registered: ‎11-25-2008
My Device: Not Specified

Re: Popup Screen Listener

Actually, the method OnFocusNotify is probably the function you want to look at.

 

-Donald

Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: Popup Screen Listener

I agree with webmasterpdx, OnFocusNotify will be more appropriate.

Use Search. "Accept Solution" If the problem is resolved.
Developer
Posts: 25
Registered: ‎03-24-2009
My Device: Not Specified

Re: Popup Screen Listener

Great stuff,

 

Works perfectly.

Thanks for the quick response.

Developer
Posts: 558
Registered: ‎11-25-2008
My Device: Not Specified

Re: Popup Screen Listener

You should give Kudos to the person you think solved it for you....not to yourself. Same with the solved button.
The more Kudos you get the higher rating you receive....it's kind of an incentive to help others. You don't win anything, but you get a higher rating.....eventually getting rated expert, etc, etc... it's a matter of pride :-)


Thx
-D
Developer
Posts: 1,477
Registered: ‎12-30-2008
My Device: Torch 9810

Re: Popup Screen Listener

Seems like a new contributor Smiley Tongue
--
Manimaran Selvan
Co-Founder, Tech Lead,
Equity Markets Research Group
Developer
Posts: 25
Registered: ‎03-24-2009
My Device: Not Specified

Re: Popup Screen Listener

Guilty as charged!

My first and last rookie mistake...Smiley Happy

Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: Popup Screen Listener

[ Edited ]
  I request you to click on the "webmasterpdx" post as solution and kudos to him.
Message Edited by BBDeveloper on 03-04-2009 05:38 PM

Use Search. "Accept Solution" If the problem is resolved.
Developer
Posts: 25
Registered: ‎03-24-2009
My Device: Not Specified

Re: Popup Screen Listener

durrrhhh...Smiley Surprised

My second and hopefully last rookie mistake!