[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

1113.0. "Alternate Translations for Dialog Box?" by DEMON::BURLEIGH () Sat Jul 15 1989 00:14

    I seem to be fighting a losing battle with the Dialog Box...
    I provide an alternate translation table for the tab key
    via the resource "grabMergeTranslations" (or whatever), but
    it doesn't take effect. That is, my action routine is not
    called. However, if I change the action routine name to
    a bogus name, I get a warning that the action routi can't
    be found. So it seems that the widget is doing something with
    my translation table, but what?
    
    Has anyone else been successful in providing different 
    translations for the tab and shift-tab keys?
    
    Dave

T.RTitleUserPersonal
Name
DateLines
1113.1AITG::DERAMODaniel V. {AITG,ZFC}:: D'EramoSat Jul 15 1989 00:3011
        Welcome back.
        
        I had a window widget with a translation for the tab key,
        but the parent dialog box prevented the window widget
        from seeing the tab key press.  I asked how to get around
        this in CLT::DECWTOOLKIT 197.4 and Leo answered in 197.5.
        With that UIL change to the dialog box the window widget
        got the event and its translation worked.
        
        Dan

1113.2LEOVAX::TREGGIARISat Jul 15 1989 14:105
    Why don't you post your alternate translation table here so we
    can look at it.
    
    Leo

1113.3Voila!DEMON::BURLEIGHTue Jul 18 1989 01:5522
    The translation table, specified in the UIL file, is:
    
    	translation_table('~Shift<KeyPress>0xff09: NextField()',
                          'Shift<KeyPress>0xff09: PreviousField()');
    
    The action table, in the C program, is:
    
    	static XtActionsRec actions[] = {
    	   {"PreviousField", PreviousField},
           {"NextField",     NextField}
        };
    
    The action routines do not get called when I press tab or shift-tab
    in a text widget contained in the dialog box. However, if I change
    the action table to contain "Foo" in place of "PreviousField", for
    example, then I get a message at run time to the effect that the
    action routine can't be found...
    
    Dave
    
    

1113.4LEOVAX::TREGGIARITue Jul 18 1989 08:4412
    Looks OK to me.  Two things I can think of:
    
    1.  You haven't changed the DwtNgrabKeysyms argument from its
    	default value have you? (the default value "grabs" for Tab...)
    
    2.  Does this dialog box have a dialog box ancestor?  If so, you
        need to keep the ancestor from grabbing for Tab (by setting
        DwtNgrabKeysyms to NULL) because the server searches for 
        grabs from the root window down.
    
    Leo

1113.5Oui!DEMON::BURLEIGHTue Jul 18 1989 22:334
    That was it! Thanks!
    
    Dave