Parents and children Touch - event management

I have a container with some controls.

I want this is notecard to the container code to run only if no child control has handled the event onTouch.

Is this possible?

Thank you

Jamie

I solved it.

Here's how...

First of all, there are two touch events, I have now, I understand as follows:

'touchCapture' is received in a container before the spread of children take place.

'touch' is received in a container after the propagation takes place.

I've added a property to the container like this:

Boolean touchHandled property

I added handlers for the touchCapture and the touch, like this:

onTouchCapture: {}
touchHandled = false
}

Notecard: {}
If (! touchHandled) {}
Manage you like...
}
}

If a child control manages the key event, I the child touchHandled set to true. For example, in one of the children, I manage a TOP event. I have code like this (in children):

Notecard: {}
If (event.isUp ()) {}
Do all that...

touchHandled = true
}
}

Mission accomplished. Comments are welcome...

Jamie

Tags: BlackBerry Developers

Similar Questions

  • parents and children of the same table records

    I want to create a query that is a union such that 2nd resultset is based on the game of results 1. I have a table that has parent and child records in the same table.

    Table: EVENTS
    EVENT_ID
    PARENT_EVENT_ID
    CREATED_DATE
    (other columns)

    If PARENT_EVENT_ID is null, then this is a parent record, otherwise it is a book of the child. I want to select all parent records then union them with all the related child records... something like this:

    Select * from EVENTS where CREATED_DATE < sysdate - 90 and PARENT_EVENT_ID is null - all parents
    Union
    Select * event where PARENT_EVENT_ID in (select EVENT_ID of EVENTS where CREATED_DATE < sysdate - 90 and PARENT_EVENT_ID is null)-include all children selected from the top parent

    It works but it of kind of ugly, I want to avoid using the subselect in the 2nd because it is a repeat of the 1st statement, is there a way to alias the first statement and only refer to him in the 2nd query?

    Hello

    CONNECTION is very similar to a UNION on the same table. How is this:

    SELECT     *
    FROM     events
    WHERE     created_date     < SYSDATE - 90
    START WITH     parent_event_id     IS NULL
    CONNECT BY     parent_event_id     = PRIOR event_id
         AND     LEVEL          <= 2    -- Maybe
    ;
    

    ?

    To answer your question: Yes, you can still keep the result set of a query and the Treaty as if it were a table or vew, like this:

    WITH     roots     AS
    (
         SELECT     *
         FROM     events
         WHERE     created_date     < SYSDATE - 90
         AND     parent_event_id     IS NULL
    )
    SELECT     *
    FROM     roots
         --
    UNION ALL
            --
    SELECT     *
    FROM     events
    WHERE     created_date     < SYSDATE - 90
    AND     parent_event_id     IN (
                          SELECT  event_id
                          FROM    roots
                      )
    ;
    

    It's always a bit ugly, however. I would use CONNECT BY or from Oracle 11.2, a recursive WITH clause (which is explicitly a UNION), or, in any version, a self-join, like this:

    SELECT     c.*
    FROM          events  c
    LEFT OUTER JOIN     events     p  ON   p.event_id  = c.parent_event_id
    WHERE   p.parent_event_id  IS NULL
    ;
    

    I hope that answers your question.
    If not, post a small example of data (CREATE TABLE and only relevant columns, INSERT statements) for all of the tables involved and the results desired from these data.
    Report where the queriy above (the one you decide to use) is producingthe bad results and explain, using specific examples, how you get the right results from these data in these places.
    Always say what version of Oracle you are using (for example, 11.2.0.2.0).
    See the FAQ forum {message identifier: = 9360002}

  • Hierarchical query with several parents and children without parents

    Hi all,

    I have a problem of follow-up:

    1, parent_1,.

    2, child_1, 1

    3, child_2, 1

    4, grandchild_1, 2

    5, parent_2,.

    6, child_3, 5

    7, child_0,.

    In this case, I can have multiple parents, and I also have children who do not have parents. Can someone help me solve this problem

    Concerning

    Hello

    So, if a node has itself or 0 as its parent_id, it's the same as with the NULL value?

    In this case, include all these possibilities in the START WITH clause:

    SELECT DLI

    , LPAD (' ' ')

    , (LEVEL - 1) * 3

    , ' '

    ) || descr AS descr

    parent_id

    T

    START WITH NVL (parent_id, 0) (0, DLI)

    CONNECT BY parent_id = PRIOR DLI

    AND idd <> parent_id

    ;

  • Snapshots of parent and children.

    Hi all

    How stereotypes of children occur when changes are made to the parent?

    Original disc

    | -> Snapshot 1

    | -> Snapshot 2

    What happens to snapshot 2 after using ' go to ' / 'Come back' function and which dates back to 1 snapshot and make going to it?

    These changes to propagate to children?

    Thank you.

    I don't think that there is a best practice for how to manage your golden images (snapshots) for pools. Depends actually if patch 3 groups is much easier than coming back on "Common software", this patch and then re-create the 3 groups (i.e. reinstall additional software).

    André

  • Access to safety class for parents and children

    Dear Experts,

    If I give you access a parent to a user entity 'All', it also gives access to the children of the parent entity?

    Thank you very much.

    Kind regards

    Benoit

    Hi Benoit,.

    If you give access to a parent entity 'All', it means that the user will be able to read/write/promote an entity. If in the "Security node" attribute of application properties, you select 'Entity', access will be available only for the specific entity. If you have selected 'Parent', then specific access will be available for all children of that entity.

    Check the man page of admin 90.

    Kind regards

    Thanos

    A truth about...:... options calculation

  • Insert objects parents and children in the same request

    Hello.

    I use Web 2.0 CRM on demand Services create opportunities with Notes, but I'll have a few mistakes if I add a Note to the ListOfNotes of the opportunity.

    I use a windows forms application that is coded in c#.
    I wan't creat the opportunity and his notes in the same request (method OpportunityInsert).

    I fill the object [] OpportunityData with the data of opportunity and theOpportunityData. ListOfNote.Note [0] with the Note data. When I run my application, I get this message:

    "Operation on the 'Opportunity' integration component update failed because no record corresponding to the component 'led' with search specification" [name] = "XXXXX" ' could be found. "." (SBL-EAI-04403) »


    Why does say 'operation update' if I call the OpportunityInsert method?
    It seems he's trying to find an opportunity before creating it, I do not understand...

    Ins't it is possible to define in the parent (opportunity) all child objects (Notes, activities) and call the Insert and create all? How can I do this?

    Thank you.

    Edited by: 859863 may 18, 2011 18:24

    Hello

    I got your point. As I said most early to insert a new Note, you will need to use the method Execute of opportunity because InsertChild method is not supported in WS 2.0. Here is an example of XML code demonstrates how to use the Execute method to display several insert in a single SOAP request operation.


              
                   
                        
                             New
                             ABC
                             XYZ
                             XYZ
                             
                                  
                                  

                             

                        

                   

                   LIC
              

         

    If possible to share code you are using, and then I can fix your code. But first try to use the Execute method, then enter in this method
    operation = "insert".

    Thank you & best regards
    Sablok

  • How can we stop Member of "attribute" inheritance from parents to children?

    Dear all,

    Do you know how I can stop sharing the attribute member between parents and children?

    In the case, I need to change the currency of the parent (CAD $) entity, but I want children to keep the currency CAD.

    In my case, when I change the attribute of the entity, the children inherit the mother.

    For me, the legacy is applied automatically to all members of the sub of the parent.

    Thanks in advance for your support.

    Jean Daniel

    Hyperion Planning 11.1.2.3

    As described in the Administrator's Guide

    If a parent has several children, of whom only one child has a currency that is overridden, the mother inherits code currency overridden in Essbase (which is not displayed on the forms of data).

    I think that is what is happening with you... I guess nothing can be done to avoid this, as it is written in the bible of the oracle!

  • Question touch event for mutil - Manager on a screen

    Hi all

    I will say the case:

    I have a screen there is a main VerticaFieldManager that holds two VerticalFieldManager and a field

    the two children-VerticalFieldManagers hold some LabelField.

    When one of them is selected, it will be lit high.

    Then, extending from screen and override touchEvent() and shows a "Hit" said dialog and highlight the OK field.

    because the touchEvent is a shipped process, where the touchEvent occur, each field will receive this event.it never check what field is developed and send the event in this area, (if I'm wrong, please advice).

    Here's the question.

    When user getX and getY to get point touch, then the user getFieldAtLocation on crib, if X / is greater that the extensions Manager, RIM API returns the field expanded.

    This does not look good.

    Here is my source code:

    /*
     * VFMTester.java
     *
     * © , 2003-2008
     * Confidential and proprietary.
     */
    import net.rim.device.api.ui.component.*;
    import net.rim.device.api.ui.*;
    import net.rim.device.api.ui.container.MainScreen;
    import net.rim.device.api.ui.UiApplication;
    import net.rim.device.api.ui.component.*;
    import net.rim.device.api.system.*;
    import net.rim.device.api.servicebook.*;
    import net.rim.device.api.ui.container.*;
    
    /**
     *
     */
    public class VFMTester extends UiApplication{
        public static void main(String args[]){
            UiApplication app = new VFMTester();
            app.enterEventDispatcher();
        }
        VFMTester() {
            pushScreen(new AScreen());
        }
    
        class AScreen extends MainScreen
        {
            VerticalFieldManager vfm;
            public AScreen()
            {
                super();
                vfm = new VerticalFieldManager();
                vfm.add(new LabelField("Test",Field.FOCUSABLE));
                VerticalFieldManager v1 = new TouchVerticalFieldMananger1();
                for(int i=0;i<10;i++){
                    v1.add(new LabelField("F" + String.valueOf(i+1),Field.FOCUSABLE));
                }
                VerticalFieldManager v2 = new TouchVerticalFieldMananger2();
                for(int i=0;i<10;i++){
                    v2.add(new LabelField("S" + String.valueOf(i+1),Field.FOCUSABLE));
                }
                vfm.add(v1);
                vfm.add(v2);
                this.add(vfm);
            }
            public boolean trackwheelClick(int time, int status){
                Dialog.alert("click");
                return true;
            }
            protected boolean touchEvent(TouchEvent te){
                UiApplication.getUiApplication().invokeLater(new Runnable()
                {
                    public void run()
                    {
                        Dialog.alert("touched!");
                    }
                });
                return super.touchEvent(te);
            }
        }
    
        class TouchVerticalFieldMananger1 extends VerticalFieldManager
        {
            TouchVerticalFieldMananger1()
            {
                super();
            }
            public boolean touchEvent(TouchEvent te)
            {        if(!this.isFocus()) return true;            switch(te.getEvent())
                {
                    case TouchEvent.CANCEL:
                        System.out.println("CANCEL");
                    break;
                    case TouchEvent.CLICK:
                        System.out.println("CLICK");
                    break;
                    case TouchEvent.DOWN:
                        System.out.println("DOWN");
                    break;
                    case TouchEvent.GESTURE:
                        System.out.println("GESTURE");
                    break;
                    case TouchEvent.MOVE:
                        System.out.println("MOVE");
                    break;
                    case TouchEvent.UNCLICK:
                        System.out.println("UNCLICK");
                    break;
                    case TouchEvent.UP:
                        System.out.println("UP");
                    break;
                }
                if(!te.isValid()) return true;
                int x = te.getX(1);
                int y = te.getY(1);
                int index = this.getFieldAtLocation(x,y);
                if(index < 0 ) return true;
                Field f = getField(index);
                f.setFocus();
                this.invalidate();
                return true;
            }
        }
        class TouchVerticalFieldMananger2 extends VerticalFieldManager
        {
            TouchVerticalFieldMananger2()
            {
                super();
            }
            public boolean touchEvent(TouchEvent te)
            {
    
                if(!this.isFocus()) return true;            switch(te.getEvent())
                {
                    case TouchEvent.CANCEL:
                        System.out.println("CANCEL");
                    break;
                    case TouchEvent.CLICK:
                        System.out.println("CLICK");
                    break;
                    case TouchEvent.DOWN:
                        System.out.println("DOWN");
                    break;
                    case TouchEvent.GESTURE:
                        System.out.println("GESTURE");
                    break;
                    case TouchEvent.MOVE:
                        System.out.println("MOVE");
                    break;
                    case TouchEvent.UNCLICK:
                        System.out.println("UNCLICK");
                    break;
                    case TouchEvent.UP:
                        System.out.println("UP");
                    break;
                }
                if(!te.isValid()) return true;
                int x = te.getX(1);
                int y = te.getY(1);
                int index = this.getFieldAtLocation(x,y);
                if(index < 0 ) return true;
                Field f = getField(index);
                f.setFocus();
                this.invalidate();
                return true;
            }
        }
    }
    

    1:

    If the user has first select a field on one of them VerticalFieldManager, it will always be there and cannot be changed to the other domain.

    2:

    even if I check the field has focus or not, but it doesn't work anymore.

    Is there something wrong on my source code? or logical is false, or my understanding is wrong?

    Any advice pls.

    Thank you.

    We see this issue as well. Our workaround for this is to check the coordinates x, y of touch to make sure that they are within the scope of the current field, and then re - delegate the event so if x is outside the scope of the field.

  • Event management and other issues

    The story is this:

    I am very new to the BlackBerry development. I spent hours and hours of reading both the native and documentation stunts and I'm still very confused on the eventual implementation of certain elements that I need.

    The project I have been working on that is to create a couple of picture frames and arrange them in a model (a possible model is a two by two matrix). Managers must be arranged in such a way that each of them is resizable by dragging a custom border (space) between two consecutive images.

    Each image needs to load an image from a dialog box that lists the images in the default directory for the images. The framework should be able to pan and zoom (on an event of pinch). This of course cannot be done using ImageView, because it does not implement zoom or pan. I'll probably have to use ForeignWindow in order to use weaker functions (level C) in order to put in place the tools to zoom and pan.

    However, the following questions:

    -How to manage the events of touchscreen and/or gestures? Obviously, a button has an onClicked in QML method, but I need to know when the screen was touched, and what control was affected, in order to implement a resizable layout.

    -How to manage the events of a ForeignWindow? The documentation does that say how to create, not how to handle its events. Regarding an application of Cascades don't use a while loop to enter events, I do not understand how to manage these events?

    -How to improve lower level access to the data of the Image? Or if it is not possible, how do I make a link between a QImage and use in ImageView Image?

    All this has a clear solution in the native SDK, but I do not see how to incorporate the native with waterfalls. Any help would be welcome.

    Hello, welcome to the forums!

    I'll try to point you in the right direction. In order to check the touch events, you can access the VisualNode signals by following the approach outlined on this thread:

    http://supportforums.BlackBerry.com/T5/Cascades-development/managing-Cascades-events/TD-p/1739999

    You can also have a look at our API of cascades of events here:

    https://bdsc.webapps.BlackBerry.com/Cascades/reference/bb__cascades__Event.html

    Let me know if it helps!

    See you soon,.

    Martin

  • How to manage touch event in the field

    Hello

    I created field checkbox custom, when am touch event for her manipulation, emphasis is gettting inside, and when I try to click on any other components such as the box native, afer by unchecking the custom check box, the custom box is clicking again.

    How to handle this?

    Thank you

    Rakesh Shankar

    There are certain basics that one needs to understand to effectively manage key events:

    (1) touch events are sent to the field currently has focus and the enveloping managers, including the active screen.

    (2) default response of the system to the event down is to divert attention to the field to the position of touch If there is a focusable it. If there is no focusable point touch field, the field currently has focus is unchanged. There's no "unfocus everything ' method in BlackBerry (there might be, but it is not readily available - there is a protected method focusRemove, but it is supposed to be used in conjunction with a later focusAdd protected in cases where the field has changed its focus rectangle - a classic example is any input field or text such as EditField or RichTextField view)

    (3) the default action of TouchEvent.CLICK is to call trackwheelClick (which, by default, invokes navigationClick) which is a great way to ensure consistency between the 'clicks' and clicks touchpad screen. The same is true for unclicks finally managed by navigationUnclick.

    If you want to disable the click by default if the key is outside all focusable fields and will not disrupt the rest of the system, just return true if the event is to CLICK, but the contact details are outside the scopeand actions super.touchEvent otherwise. And keep your return true; on all UNCLICK events: it's a good idea if you don't want to see the context menu from appearing each time or field click reaction called twice.

    The example of Peter was written when I've heard most of it already, but now I realize that you can do a lot easier. See part highlighted the previos section.

    Good luck!

  • Edit event managed by this case in LabVIEW 2013 does not show the specifiers of the event, Event Sources and events on screen resolution 800 x 600

    Edit event managed by this case in LabVIEW 2013 shows not specifiers of the event, Event Sources and events on screen resolution 800 x 600.

    As far as I know, the list of supported resolutions is determined solely by the graphics card. It is possible that one used by the PC supports only 800 x 600 as maximum resolution, even if you plug an external monitor.

    Like Dennis suggested, the recommended option would probably be to develop on another PC and only deploy an executable for the industrial PC. That's what we do with our systems (although not because of this problem, but because it makes sense. There absolutely no need to have the IDE installed in most of our systems).

    Other options:

    1. See if you can get an update of the driver from the manufacturer to solve this problem.
    2. Plug a USB Monitor with its own driver.
    3. Try to hide the taskbar and make the smaller title bar in the hope that the bug manifests.
    4. Try remote access in the PC. I think that some remote access programs allow you to specify custom resolutions that are not affected by the original drivers. Remote Desktop seems to be a likely this option even if it has been awhile since I've used it.
    5. Check the BIOS. I saw at least one industrial PC where there was some settings in the BIOS to control the resolution, but I don't remember the details, and it was quite limited. I think that in this case, you can change the resolution, but then the image does not fill the entire screen.
  • OpenGL + MMR video playback and touch events.

    Hello BB forums natively,.

    We have an openGL application that renders the video using the window mmrenderer child. Surface OpenGL is transparent and makes some elements of overlay the video above. It seems that the touch events are only sent when it arrives on the non-transparent part of the surface of the OpenGL. Is there a way to catch all touch events in this scenario (perhaps of the child window)?

    Thank you!

    Ask yourself properly the events with "screen_request_events..." with the context of the correct screen?

    Did you look in the GoodCitizen OpenGL sample application? It shows how all the events are received and process across the entire screen with a very similar use case;

    Martin

  • multiple movieclips and mutiple event management.

    Hi all

    I have several movieclips (image sequence), which I want to add (click and drag), mouseevent event (left and right arrows) to the keyboard and the zoom event (mouse wheel).

    I have this function for one mc (image sequence).

    Now, if I use this function, I have some problem with the call of the function of the same frame.

    It's

    If click on an other mc in frame 3 say, click on another function, it should continue to frame 3 only, not from the first image again.


    Help, please.

    Thanks in advance.

    I guess that shows the part where you vortag home discovered in a 360-degree mode?

    If so, do a global var on your root timeline:

    var rotationframe:int = 1; at the beginning of the application, all dirffernt images are sitting on frame 1

    You can access this var to anywhere inside any function of your application by calling:

    root.rotationframe

    now in the service which manages the rotation (lets say its your keyboard function) at the end (after you have moved the playback cursor), you ensure that you always set

    root.rotationframe = garage.currentFrame;

    and in the service that manages switching between images write you sth. as

    gotoAndStop (root.rotationframe);

    Be aware, you cannot simply use this code without adapt it to your specific needs.

  • FullCalendar skillbuilders plugin and event management

    Hello
    I'm testing FullCalendar apex to APEX 4.1 skillbuilders.com plugin. I am able to create the new region with this calendar and show certain events in there. But I do not know how to implement another feature for example do drag and drop event drop, resize, event, go to the details of the event, create a new event after clik day etc...

    How should I handle JS calendar events in the APEX and call some pl/sql?

    Thank you

    I needed this feature so I decided to use the standalone FullCalendar and no plugin.
    Initializing fullCalendar I definiton for events (move, resize, click on...) and I'll call you "we demand" the application process (with AJAX call) to make measurements (updates to the DB).

  • Touch events in Cascades/QML

    Hello everyone

    I'm "new" in this kind of things of Cascades and a lot is different from that of QtQuick on Symbian, that's why I have one, well two small questions:

    (1) how can I manage touch events. For example I want to design an element as a button, but without using the predefined one. Basically, it's a container with color and a label in it. And I want to give a basic animation, I'm searching for equal to onPressed and onReleased, two methods to change the background color, when the user presses the button and make it back to the default color, when it releases.

    (2) is there any kind of Qt Assistant for Cascades? I couldn't find the reference to assistance in line/API here, but it is so messed up my opinion and lack features such as research. In the best cases, this documentation is fully downloadable and usable offline.

    Hopefully, you can help me...

    Best regards

    Sebastian

    I worked today on a similar question. You can query the key like this event type:

    onTouch: {
        if (event.touchType == TouchType.Down) {
          //doStuff
        }
    }
    

    I used this to make a whole one button container, regardless of its content.

Maybe you are looking for

  • ProBook 470 G3: Microphone does not work

    After updating HP built-in microphone (chip Conexant Audio) does not at all. How to go?

  • How can I change a jpg to PDF before sending it?

    I scan a document such as a jpg file and when I send an email, it must be a pdf file.

  • I can't open a pdf file

    I used to be able to download a file and read it, but now I've missed misserable

  • Dell Latitude D810

    Greetings, I was given a Latitude D810. I rebuilt the fort with a fresh install of XP and downloaded, video and network Sigmatel audio drivers on the Dell site and install them. I've also updated the memory to 1 GB. Everything seems to work with one

  • Cannot type 3 digit values in the Windows 7 color picker

    Hi - I can not enter any RGB or STL greater than 2 digits in any Windows color picker (x 64 Home Premium) even if a 3 digit value shows already in the area. All ideas, bugs? It's really, really frustrating to have to try to surf on the color picker t