Do not get key events when HContainer object is added to HScene

Experts,
Please help, I am missing something simple.
I am creating an container (mCurrentContainer) with some buttons in them as follows,
          mRecListButton = new HTextButton("List", curX, curY);
          add(mRecListButton);
          // Setup a recording
          curY += V3Button.mHeight + gap;
          mRecButton = new HTextButton("Record", curX , curY);
          add(mRecButton);
          // Shows the list of scheduled recordings
          curY += V3Button.mHeight + gap;
          mScheduleRecButton = new HTextButton("Schedule", curX , curY);
          add(mScheduleRecButton);
          // Shows the list of Series Recordings
          curY += V3Button.mHeight + gap;
          mSeriesRecButton = new HTextButton("Series", curX, curY);
          add(mSeriesRecButton);
          mCurrentSelectedButton = LISTVALUE;
          mRecListButton.setFocus();
Then I am creating a scene,
          HSceneFactory factory = HSceneFactory.getInstance();
          HSceneTemplate sceneTemplate = new HSceneTemplate();
          sceneTemplate.setPreference(HSceneTemplate.
                         SCENE_PIXEL_DIMENSION,
                         new Dimension(640, 400),
                         HSceneTemplate.REQUIRED);
          sceneTemplate.setPreference(HSceneTemplate.
                         SCENE_SCREEN_LOCATION,
                         new HScreenPoint((float)0,(float)0),
                         HSceneTemplate.REQUIRED);
          mScene = factory.getBestScene(sceneTemplate);
          mScene.requestFocus();
          mScene.addFocusListener(this);
Then, I add the above container to the mscene as follows,
mCurrentContainer = myContainer;
mScene.add(mCurrentContainer); // Keys Presses do not work if left uncommented
mScene.setVisible(true);
mScene.requestFocus();
mScene.addKeyListener( mCurrentContainer);
mCurrentContainer.setVisible(true);
mCurrentContainer.requestFocus();
I see the buttons correctly and the "List" button is highlighted correctly. However, I do not get any key presses.
Now, if I comment out "mScene.add()" as follows,
mCurrentContainer = myContainer;
// mScene.add(mCurrentContainer); // Now the key presses works correctly.
mScene.setVisible(true);
mScene.requestFocus();
mScene.addKeyListener( mCurrentContainer);
mCurrentContainer.setVisible(true);
mCurrentContainer.requestFocus();
The key presses works correctly. However, the buttons are not displayed now.
What am I missing?
Thanks!

I have not tried the above suggestions but the problem is solved. The issue was - I had the requirement of creating a a default child record when the parent record is created. I was creating the child record using insert statement in Prepared Statement in the doDML of parent EOImpl. So it is not creating a row in the EO and when I add the second record through the application and save, the getRowCount returns 1 which is new record that created through application. Sorry for not providing this info earlier and Thank You all.
Regards, Pradeep

Similar Messages

  • Not getting key events.

    Okay have a really odd issue. I have a frame that contains a custom panel that contains a custom canvas. I it setting the focus to the canvas when it opens but I don't seem to be getting key strokes!
    When you change the focus from the frame to another window and click back again you do get the keystrokes but the request focus call seems to only sort of work!
    Any suggestions?

    lwatcdr wrote:
    Already did that and not joy.
    The odd thing is that it used to work and I can not figure out for the life of me why it stopped!
    I have started to move the application over to Swing so some of the dialogs are now Swing with the main window still in AWT. I am working on porting that part to Swing but it is a big dynamic custom document so it is taking a while.Let's just quit with the guessing then, post your code.

  • Problem with TextLine not getting mouse events when expected

    Hi All,
    I am cross-posting the discussion I put on the TLF forum here (sample code is in that post)
    http://forums.adobe.com/message/3768763#3768763
    The issue is to do with non/slow response when clicking to edit multiple TLF text elements on a base group. Thanks to some extra work by Jin-Huang the problem is apparently that when the edit functionality is set (by setting the interactionManager), the TLF class cannot receive any more events until the mouse leaves and re-enters the TextLine you are supposed to be editing. This sounds like a Flex bug.
    I guess my questions are (1) is this actually a Flex bug? and (2) does anyone know a workaround so the thing can start accepting input immediately without further mouse actions?
    Thanks,
    Darryl.

    What happens if you use two RichEditableText controls or two TextAreas
    instead?  By trying to install your own editing controls, you might have to
    fully conform to the IFocusManagerComponent interface for focusable
    components otherwise you might run into issues like this.

  • I am getting a error IO when trying to upload multiple images within wordpress using the flash uploader. I do not get the error when uploading using explorer. The error only appears if I try uploading using firefox....any ideas?

    I am getting a error IO when trying to upload multiple images within wordpress using the flash uploader. I do not get the error when uploading using explorer. The error only appears if I try uploading using firefox....any ideas?

    Logged the call with SAP who directed me to 'Define settings for attachments' in IMG and setting the 'Deactivate Java Applet' & 'Deactivate Attachment versioning' checkboxes - problem solved.

  • My iphone 4 does not register calls made to it. if i make a call from another phone, i can hear it ringing, but it does not register on the iphone. also, i do not get any messages when this happens. then after a day or two it decides to start working.

    My iphone 4 does not register calls made to it. if i make a call from another phone, i can hear it ringing, but it does not register on the iphone. also, i do not get any messages when this happens. then after a day or two it decides to start working.

    Clean iPhone charging port with clean dry toothbrush. See if better. If still problem clean charging port again with toothbrush and small amount of Isopropyl Alcohol.

  • Same thing is happening to me. Adobe has not responded to anyone about this error. It appears that Abobe XI is not compatible with IE 11.  I do not get this error when I use Chrome or Firefox. Only IE 11 does this. I have tried clearing cache and cookies.

    Same thing is happening to me. Adobe has not responded to anyone about this error. It appears that Abobe XI is not compatible with IE 11.  I do not get this error when I use Chrome or Firefox. Only IE 11 does this. I have tried clearing cache and cookies. I even uninstalled and re-installed IE 11. It is still doing it.  I am surprized that a company like Adobe would just ignore our posts and leave us hanging this this.
    Error message is FAILED TO GET DISPATCH FROM IBRWSR2.  Then when you click on it the next error message says:  PHTML IS NULL. You have to click this error message twice and then the PDF finally loads. Happened every time
    Does anyone have a solution since Adobe will not respond?
    As a last resort I will try uninstalling the Adobe Reader XI and install Adobe Reader 10 instead. It seems to work ok. But when I try to install version 10 the Adobe site tries to install XI.  Any ideas?
    JimP08758

    It worked just fine for me.
    Many site issues can be caused by corrupt cookies or cache.
    * Clear the Cache and
    * Remove Cookies '''''Warning ! ! '' This will log you out of sites you're logged in to.'''
    Type '''about:preferences'''<Enter> in the address bar.
    * '''Cookies;''' Select '''Privacy.''' Under '''History,''' select Firefox will '''Use Custom Settings.''' Press the button on the right side called '''Show Cookies.''' Use the search bar to look for the site. Note; There may be more than one entry. Remove '''All''' of them.
    * '''Cache;''' Select '''Advanced > Network.''' Across from '''Cached Web Content,''' Press '''Clear Now.'''
    If there is still a problem,
    '''[https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode Start Firefox in Safe Mode]''' {web link}
    While you are in safe mode;
    Type '''about:preferences#advanced'''<Enter> in the address bar.
    Under '''Advanced,''' Select '''General.'''
    Look for and turn off '''Use Hardware Acceleration'''.
    Poke around safe web sites. Are there any problems?
    Then restart.

  • I want to delete a few contacts, apps, pics etc from my iphone, but when I delete and connect to my laptop they sync and come back again. How can I delete those items and not get them back when I connect my iphone to my laptop?

    I want to delete a few contacts, apps, pics etc from my iphone, but when I delete and connect to my laptop they sync and come back again. How can I delete those items and not get them back when I connect my iphone to my laptop?
    Also where exactly on the laptop is teh data stored.
    Thank you!!

    go to 'Edit' in the menu bar. Then choose 'Preferences'.
    you'll see a pop-up and there's a tab called 'Devices' there. If you click that, you will be able to check a box that says 'prevent automatic syncing for iPods, iPads and iPhones' or something like that.
    Hope this helps
    NB: if you don't even see the menu bar that has options like 'File, Edit, View, etc', first click the black/white square button on the top left of your screen, and then click 'show menu bar'. It should pop right up.
    Good luck

  • Getting key events without a jcomponent...

    Is it possible to get key events without adding a keylistener to a jpanel? I want a class of mine to manage input of it's own, but it has no reference to a jpanel. They don't necessarily have to be KeyEvents, but just some way to detect if a key has been pressed (like the arrow keys). How can I do this? Thanks.

    Lots of components can listen for key events.
    What does your class subclass?It doesn't subclass anything. I am creating a custom menu system for my game using images I have made for the tileset. I would like it to handle some keyboard events of its own. (Like if the down arrow is pressed, it will move the focus down to the next component on its own). Right now I am currently passing the key events from my fullscreen jpanel to the menu class and it is handling them that way. Thanks.

  • Error "enter a numeric value"  I am not getting this error when i directly

    We are using BAPI "BAPI_ROUTING_CREATE". I am using an excel file for input. I am getting errors against Standard Values and Unit of measure of Standard Values while running the BAPI through an ABAP program.
    The errors are:
    1. enter a numeric value
    2. Enter a unit of dimension time for standard value
    I am not getting this error when i directly run BAPI_ROUTING_CREATE through SE37.
    Kindly help

    Hi, I had the same problem. Solution for me:
    OPERATION-ACTIVITY = <T>-ACTIVITY.   " activity for example "5"  ---> problem error "Enter a numeric value"
    OPERATION-ACTIVITY = <T>-ACTIVITY.   " activity for example "0005"  ---> no problem --> include leading 0
    so I chanded <t>-activity field type to N(4) and no problem...
    Bye, B.

  • I'm not getting any sound when i play a video; HP pavilion dv7 Windows 7

    I'm not getting any audio when I try to play a video, such as youtube; I have an HP pavilion dv7....op sys is Windows 7;  Funny thing is that when my brother signs in under his User ID, he gets audio, but I don't when I'm the user.  I've checked all of the on/off audio mute buttons that I know of.
    what can you suggest?

    Is it just sites like YouTube? Can you play music files-mp3/cd ,hear Windows system sounds,etc?
    ******Clicking the Thumbs-Up button is a way to say -Thanks!.******
    **Click Accept as Solution on a Reply that solves your issue to help others**

  • Im not getting any sound when i select a track and put it in the arrange area

    Im new to pro logic,, when i select a track and put it in the arrange area,, im not getting any sound when it plays.. I can hear it play in the list of samples, but not when its in the arrange area,,, help meeeeee

    Are you putting the file on an instrument channel rather than an audio channel? That's one possibility. The track could be muted is another.

  • Not getting any sound when connecting my hdmi on the tv only on the laptop, no option in sound settings for altering hdmi

    not getting any sound when connecting my hdmi on the tv only on the laptop, no option in sound settings for altering hdmi

    Solution may be found if you search in the "More Like This" section over in the right column. 

  • After ios5 update, I am not getting any sound when I play music.

    After ios5 update, I am not getting any sound when I play music (iphone  speakers or headphones).  I get sound from games, previewing songs in iTunes, etc.  Any idea why?  I've resynced and shut down my phone and that didnt help.
    iPhone 4

    Beer,
    is that when you want to play music over the air (airplay) like BT headset or something?
    because i am facing the below issue in my car.
    the phone minimizes the volume of airplay and the ringing to 0 when connecting to a device (BT headset or car kit)
    upon disconnecting, the ringing tone remains 0 and i miss all or most of my calls.

  • I am not getting any notifications when I use my card

    I'm not getting any notifications when I make purchases with my primary card

    Select the card under Settings > Passbook & Apple Pay and ensure that Card Notifications is on.  This option is not present for Debit Cards.

  • Not getting planning Applications when Log on Work space

    Hi Dear Experts,
    when log on Workspace to access Planning:
    its show showing
    Navigate ->Administration->User management
    instead if Select Navigate > Applications > Planning
    and iam not getting planning Applications when Log on Work space
    I have Just Installed Essbase and Planning into my machine .. and i have opened work space area and
    and i tried to create first application by using the following URL
    http://localhost:8300/HyperionPlanning/AppWizard.jsp
    iam getting not able create first application..
    can you please guide me how can i work with planing applications..
    thanks in advance
    Kishore

    Hi Kishore.
    From config utility, did you create an instance before trying to access.
    I mean "product instance registration" and "data source configuration"
    You can find it in the installation doc
    Sandeep Reddy Enti
    HCC
    http://analytiks.blogspot.com

Maybe you are looking for