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

Posts: 2,268
Registered: ‎07-08-2009
My Device: various
My Carrier: various

Do non-FOCUSABLE fields receive touchEvent()'s?


I'm working on an application which does not use RIM's focusing mechanism, instead keeping track of "selected" fields on its own.  The focus is always on the Screen (or, strictly speaking, its delegate Manager - is that so?), which then propagates keypad and trackball / trackpad events to the managers within.


I've tried to add Storm support, but touchEvent()'s find their way to some totally unpredictable Managers (I have a whole hierarchy, dictated by an outside XML file).  I looked through some documentation, but it is not very informative.


So, my question to those who already had to wade through touchscreen interface:


If I have a Screen with a Manager, controlling other Managers, each of which in turn might control other such Managers, etc., and override touchEvent() in every one of them, which one will get the event?  And will getX / getY (or getGlobalX / getGlobalY) return absolute positions or relative to the receiving Field's extent?


Thanks in advance,


please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!