NavigationMovement problem of strom.

Hello

protected boolean navigationMovement(int dx,                                     int dy,                                     int status,                                     int time)

I use this method in strom to run operation, but when I m debugging this method with strom device, it is not invoke.

I want to execute an operation to move item on which I selected. Is there another method I can use to perform the operation on the move.

Thank you

Kind regards

Neev...

Take a look at the touchEvent() method in the classes of the screen, as well as the TouchEvent class.

Tags: BlackBerry Developers

Similar Questions

  • Error message C00D11B1 with video file Windows media player problems

    I have problems in using Windows Media Player version 11.0.6002.18311 on Vista business.
    I tried to check for any problems with the update of the records, but they look the same to date.
    This problem is only with video files, while with audio files this medication works very well.
    Any help to solve the problem is welcome!
    Thank you

    Agnese

    The following links may be worth a visit:

    (935336) Windows Media Player 11 cannot
    read content protected by DRM on Windows Vista
    http://support.Microsoft.com/kb/935336

    (925705) when you try to use Windows Media
    Player 11 to play a digital rights management
    (DRM) - protected media file media cannot play
    http://support.Microsoft.com/kb/925705

    The security component upgrade
    http://drmlicense.one.Microsoft.com/Indivsite/en/indivit.asp

    Windows Media Player: Mini WMP FAQ
    http://zachd.com/PSS/PSS.html
    (scroll down a bit to the 3rd entry that said: Vista only)

    Windows Media Player error c00d11b1 resolved
    http://Strom.WordPress.com/2007/04/06/Windows-Media-Player-error-C00D11B1-solved/
    (it's a long discussion on the error 0XC00D11B1)

  • Move the focus from the listfiled to the particular label (horizontal scrolling problem)

    Hello

    In my application, I have some labels (which are focusable) at the top of the screen that I put in the manager (hfm_lbl) horizontal field with horizontal scrolling.

    After hfm_lbl, I have a listfiled.

    Now when I scroll to the top of the listfiled (i.e.from from bottom to top), the focus moves to top but sets the last menu of the hfm_lbl.

    I want the focus to specify the label of perticular.

    Any help is appreciated...

    Thank you...

    drawFocus won't help with this.

    The problem is only a HFM, when focus activates it by underneath, will automatically set the focus to the last item in the list.  Therefore, substitute this transformation.

    There are actually two options, depending on whether you want to override the onFocus method, or use a FocusChangeListener. I know that some people have had problems with the onFocus() substitution, so recommend the listener. But I never have, so after you will find a sample of the code that I use in this circumstance.

    The thing is that the treatment in the HFM should remember the lastFocusField (one of your labels) when the focus is moved there.  This challenge, I'll leave with you.  Still, he has a variety of options and not better.  So whatever you think probably will work fine.  One option is to set the HFM as a FocusChangeListener for all the domains that are added and then remember the last one, who won the point - then the treatment is autonomous in the HFM.

    The following codes assume that lastFocusField is a field in the HFM, one user had developed on before the ListField moved t.  This method overrides onFocus() in the HFM.

    protected void onFocus (int direction) {}
    super.onFocus (branch);
    If (direction! = 0 & lastFocusField! = null) {}
    UiApplication.getUiApplication () .invokeLater (new Runnable() {}
    public void run() {}
    lastFocusField.setFocus ();
    }
    });
    }
    }

    Edit: I think that Simon and I had to answer at the same time.  Just to say, in my experience in this case, you might be able to do it with moveFocus(), or navigationMovement(), but not as easily as onFocus().

  • Problem with PopupScreen.updateLayout)

    Hello guys '

    I have a problem with PopupScreen. I'm doing the cursor on the PopupScreen. This popupScreen includes BitmapField with transparent image. And the main screen is BitmapField larger than the size of the screen. I want to move the cursor (PopupScreen) on the BitmapField.

    You see what I'm doing here. And I found the solution how to move PopupScreen since the last post. Now, I am facing the problem when the cursor (PopupScreen) on the left. In other words, when I move the slider to the left, it is not clear previous position. I don't know why.

    It works fine when moves right.

    And it is not clear the previous, when position moves to the left.

    So, you can see the code that I use.

    import net.rim.device.api.ui.component.*;import net.rim.device.api.ui.container.*;import net.rim.device.api.ui.*;import net.rim.device.api.system.Bitmap;import net.rim.device.api.system.KeyListener;
    
    public class CursorField extends UiApplication {
    
      private InfoPopupScreen progressPopup;    int x = 180;  int y = 120;  ManagedScreen managedScreen;  Bitmap _bitmap1;  Bitmap _bitmap2;  Bitmap _bitmap;   int [] fillTrans = new int[100];
    
      public CursorField() {
    
          _bitmap = Bitmap.getBitmapResource("cursor1.png");        _bitmap1 = Bitmap.getBitmapResource("cursor1.png");       _bitmap2 = Bitmap.getBitmapResource("cursor2.png");
    
          for(int i = 0; i < 100; i++) {         fillTrans[i] = 0xFFFFFF;      }
    
          managedScreen = new ManagedScreen();      pushScreen(managedScreen);    }
    
      private class InfoPopupScreen extends PopupScreen implements KeyListener {
    
          protected void applyTheme() {         //Nothing     }
    
          public boolean keyStatus(int keycode, int time) {         return false;     }
    
          public boolean keyRepeat(int keycode, int time) {         return false;     }
    
          public boolean keyUp(int keycode, int time) {         return false;     }
    
          public InfoPopupScreen(Manager manager){          super(manager);       }
    
          protected boolean navigationMovement(int dx, int dy, int status, int time) {
    
              return true;      }
    
          protected void paintBackground(Graphics graphics) {           graphics.setBackgroundColor(16777215);        }
    
          public void sublayout(int width, int height){         super.sublayout(width, height);           setPosition(x, y);        }
    
          public boolean keyDown(int keycode, int time) {
    
              char key =  net.rim.device.api.ui.KeypadUtil.getKeyChar(keycode, net.rim.device.api.ui.KeypadUtil.MODE_UI_CURRENT_LOCALE);            //To left         if(key == 79 || key == 111) {             x = x - 5;                progressPopup.updateLayout();         }                      if(key == 73 || key == 105) {             x = x + 10;               progressPopup.updateLayout();         }
    
              if(key == net.rim.device.api.system.Characters.ESCAPE) {              this.close();         }         return true;      }
    
          public boolean keyChar(char key, int status, int time) {          return false;     }
    
          public boolean trackwheelRoll(int amount, int status, int time) {         return false;     }
    
          public boolean trackwheelUnclick( int status, int time ) {            return false;     }
    
          public boolean trackwheelClick( int status, int time ) {          super.trackwheelClick(status, time);          return true;      } }
    
      private class ManagedScreen extends MainScreen {      private BitmapField _cursorField;
    
          public ManagedScreen() {
    
              _cursorField = new BitmapField(_bitmap) {             public void paint(Graphics graphics) {                    graphics.setBackgroundColor(16777215);                    super.paint(graphics);                }         };
    
              FlowFieldManager manager = new FlowFieldManager(FlowFieldManager.USE_ALL_HEIGHT | FlowFieldManager.USE_ALL_WIDTH) {               public void paint(Graphics graphics) {                    graphics.setBackgroundColor(16777215);                    super.paint(graphics);                }         };
    
              manager.add(_cursorField);            progressPopup = new InfoPopupScreen(manager);
    
              Bitmap pic = Bitmap.getBitmapResource("background.jpg");          BitmapField picField = new BitmapField(pic);          add(picField);
    
              ButtonField _closeButton = new ButtonField("Push screen", ButtonField.CONSUME_CLICK | ButtonField.FIELD_HCENTER);         _closeButton.setChangeListener(new FieldChangeListener() {                public void fieldChanged(Field field, int context) {                  pushScreen(progressPopup);                }         });
    
              add(_closeButton);        } }
    
      public static void main(String[] args) {      CursorField application = new CursorField();      application.enterEventDispatcher();   }}
    

    I hope you can solve my problem.

    TNX in advance"

    Ttry this...   In paintBackground(), call clear after you set the background color.

  • Problem in the scroll bars when the screen is not any field focus...

    Hi all

    I have a screen on which I need to display a list of items. and the list total appears at the bottom of the list. everything works fine if the lily a few number of lines. but as soon as the number of rows and Lily exceeds the length of the screen, there is the problem. I don't see the total at the bottom because I can't scroll the list. Here is the code in my class. in the class list, I use a CustomGridManager, which shows data in a table (I downloaded it). I made a few changes in the present. the code for this handler is also attached. Please tell me what changes should I make, so that the screen can be the object of a scroll. (Please go through the code)...

    SerializableAttribute public class MyClass extends {screen

    public MyClass (dataList DataList []) {}

    Super(Manager.VERTICAL_SCROLLBAR |) Manager.VERTICAL_SCROLL);

    Super();

    int noOfColumns = 2;

    int noOfRows = dataList.length;

    int [] columnWidth = {50.50};

    CustomGridManager gfmHeader = new CustomGridManager (noOfColumns, 0, columnWidth);

    Adding headers

    LabelField lblHdrCol1 = new LabelField ("Col1");

    gfmHeader.add (lblHdrCol1);

    LabelField lblHdrCol2 = new LabelField ("Col2");

    gfmHeader.add (lblHdrCol2);

    VerticalFieldManager vfmTitle = new VerticalFieldManager();

    vfmTitle.add (new LabelField ("my class"));

    vfmTitle.add (gfmHeader);

    setTitle (vfmTitle);

    Addition of body

    GFM CustomGridManager = new CustomGridManager (noOfColumns, 0, columnWidth);

    for (int i = 0; i)< noofrows;="">

    LabelField lblICol1 = new LabelField (dataList [i] .getCol1 ());

    GFM. Add (lblICol1);

    LabelField lblICol2 = new LabelField (dataList [i] .getCol2 ());

    GFM. Add (lblICol2);

    Adding a footer

    CustomGridManager gfmFooter = new CustomGridManager (noOfColumns, 0, columnWidth);

    LabelField lblFtrTotal = new LabelField ("Total");

    gfmFooter.add (lblFtrTotal);

    LabelField lblFtrValue = new LabelField ("CalculatedValue");

    gfmFooter.add (lblFtrValue);

    Add (gfmHeader);

    Add (new SeparatorField());

    Add (GFM);

    Add (new SeparatorField());

    Add (gfmFooter);

    Add (new SeparatorField());

    }

    ======================================================

    SerializableAttribute public class CustomGridManager extends Manager {}

    private int [] columnWidths;

    private int [] staticColumnWidth;

    private int columns;

    private int allRowHeight = - 1;

    /**

    * Built a new CustomGridManager with the number of columns specified.

    * Lines will be added to the need to display the fields.

    * Fields will be added to the grid in the order they are added to this Manager.

    to complete each row from left to right:

    *

    * For example, a Manager 2 column:

    *

    * [Field1] [Field2]

    * [Field3] [Field4]

    * [Sphere5]

    *

    * Column widths are equal, and the Manager will attempt to use the entire available width.

    Each line height will be equal to the height of the field higher in the same row.

    * Styles positional field are met, then the fields that are smaller than the row/column

    * they can be set to left, right, up down, or centered. They have by default at the top left.

    *

    @param columns number of columns in the grid

    @param style

    */

    public GridFieldManager (columns int, long style) {}

    Super(Manager.VERTICAL_SCROLLBAR |) Manager.VERTICAL_SCROLL);

    Super (style);

    This.colonnes = columns;

    }

    /**

    *

    @param columns columns number of columns in the grid

    @param style

    @param columnWidths width of each column in a table

    */

    public GridFieldManager (columns int, long style, int [] columnWidths) {}

    Super(Manager.VERTICAL_SCROLLBAR |) Manager.VERTICAL_SCROLL);

    Super (style);

    This.colonnes = columns;

    this.staticColumnWidth = columnWidths;

    }

    protected boolean navigationMovement (int dx, int dy, int, int time status) {}

    int focusIndex = getFieldWithFocusIndex();

    While (dy > 0) {}

    focusIndex += columns;

    {If (focusIndex > = {getFieldCount())}

    Returns false; The focus moves on this manager

    }

    else {}

    Field f = getField (focusIndex);

    If (f.isFocusable ()) {/ / only move the focus on the fields of the object of focus}

    f.setFocus ();

    -DY;

    }

    }

    }

    While (dy< 0)="">

    focusIndex = columns;

    If (focusIndex< 0)="">

    Returns false;

    }

    else {}

    Field f = getField (focusIndex);

    If (f.isFocusable ()) {}

    f.setFocus ();

    DY ++;

    }

    }

    }

    While (dx > 0) {}

    focusIndex ++;

    {If (focusIndex > = {getFieldCount())}

    Returns false;

    }

    else {}

    Field f = getField (focusIndex);

    If (f.isFocusable ()) {}

    f.setFocus ();

    -DX;

    }

    }

    }

    While (dx< 0)="">

    -focusIndex;

    If (focusIndex< 0)="">

    Returns false;

    }

    else {}

    Field f = getField (focusIndex);

    If (f.isFocusable ()) {}

    f.setFocus ();

    DX ++;

    }

    }

    }

    Returns true;

    }

    protected void sublayout (int width, int height) {}

    int y = 0;

    columnWidths = new int [columns];

    If (staticColumnWidth == null: staticColumnWidth.length)<= 0)="">

    for (int i = 0; i)< columns;="" i++)="">

    columnWidths [i] = width/columns;

    }

    } else {}

    for (int i = 0; i)< columns;="" i++)="">

    columnWidths [i] = (width * staticColumnWidth [i]) / 100;

    }

    }

    On the field [] fields = Field [new columnWidths.length];

    currentColumn int = 0;

    rowHeight = 0 int;

    for (int i = 0; i)< getfieldcount();="" i++)="">

    fields [currentColumn] = getField (i);

    layoutChild (fields [currentColumn], columnWidths [currentColumn], height-y);

    If (fields [currentColumn] .getHeight () > rowHeight) {}

    rowHeight = fields [currentColumn] .getHeight ();

    }

    currentColumn ++;

    {If (currentColumn == columnWidths.length | I == {getFieldCount () - 1)}

    int x = 0;

    If (this.allRowHeight > = 0) {}

    rowHeight = this.allRowHeight;

    }

    for (int c = 0; c)< currentcolumn;="" c++)="">

    long fieldStyle is fields [c] .getStyle ();.

    int fieldXOffset = 0;

    long fieldHalign = fieldStyle & Field.FIELD_HALIGN_MASK;

    If (fieldHalign == Field.FIELD_RIGHT) {}

    fieldXOffset = columnWidths [c] - fields [c] .getWidth ();

    }

    Else if (fieldHalign == Field.FIELD_HCENTER) {}

    fieldXOffset = (columnWidths [c] - fields [c] .getWidth ()) / 2;

    }

    int fieldYOffset = 0;

    long fieldValign = fieldStyle & Field.FIELD_VALIGN_MASK;

    If (fieldValign == Field.FIELD_BOTTOM) {}

    fieldYOffset = rowHeight - fields [c] .getHeight ();

    }

    Else if (fieldValign == Field.FIELD_VCENTER) {}

    fieldYOffset = (rowHeight-fields [c] .getHeight ()) / 2;

    }

    setPositionChild (fields [c], x + fieldXOffset, y + fieldYOffset);

    x += columnWidths [c];

    }

    currentColumn = 0;

    y += rowHeight.

    }

    If (y > = height) {}

    break;

    }

    }

    totalWidth int = 0;

    for (int i = 0; i)< columnwidths.length;="" i++)="">

    totalWidth += columnWidths [i];

    }

    setExtent (totalWidth, Math.min (y, height));

    }

    }

    Do you really want now fields is active.

    You can try adding a NullField after your Manager - a NullField is active, if it does not size.

    Other than that, you can try the substitution of navigationMovement and Manager.setVerticalScroll to go up and down the window scrolling.  I think it should work, although I never did.  You can control the scope of the first Manager to ensure that you do not have to scroll through to the end.

  • Focus BasicEditField and buttons problem

    Objective:

    -------------------------------------

    To develop Blackberry app without sequence of focus problem when using the BB with trackpad

    The problem:

    --------------------------------------

    I have 5 BasicEditFields and 5 buttons. All objects are aligned vertically. When I move the finger on the trackpad, update doesn't move from one BasicEditField to another, some are fried, and this happens also with buttons, for example, when the focus is on the first button in the row, and then for some reason when I move the finger on the trackpad button next emphasis is not the one below , but attention "jumps" to the last button. Is possible to set 'order of sequence focus' or something like that?

    If you have Blacberry with touchscreen is not a problem, but if develop you some app for example BB Curve 9360 which has only trackpad, so you cannot select all items.

    Software used:

    ------------------------------------

    Eclipse SDK Indigo version 3.7.2.

    BlackBerry Java plug-in 1.5.0.201112201607

    Operating system:

    -------------------------------------

    Win7 64 bit

    Well, I have the solution

    Don't know why it works, but it does.

    I did two things:

    1.)

    I replaced .add with insert and then add Index numbers

    2.)

    This added to the code:

    protected boolean navigationMovement (int dx, int dy, int, int time status) {}
    Returns false;
    }

    I tried without step 2). but then focus jump bad, in any case, it now works as it should.

    Thank you all for your time and your suggestions.

  • NullPointerException in screen #navigationMovement Manager

    Hello

    After you add a VerticalFieldManager to a screen, Manager of navigationMovement super screen throws a NullPointerException and the verticalFieldManager scroll with the trackpad of this point (using the Enter key to scroll works very well and after once the trackpad works again scroll).

    I use the same model as this post defining NullField focus on the top and the bottom of the field with vertical scrolling. Has anyone have the same problems, or have any ideas on places of interest to search for?

    I'm sorry, that I couldn't reproduce it with a simple example. After a few hours, I was able to solve the problem by changing the hierarchy of my screen area, adding a handler of accepting high-field the developed anything in it.

    I think what he throwed NullPointerException because he could not find a field of focus when took place the first movement of the navigation, or the system has attempted to lock the focus on an element unfocusable. I have no final conclusion, I could work around it by rearranging the fields.

  • HorizontalField scrolling problem

    I have a screen with twice the HFMs HFMs.In I added some images. The problem is that, when I'm in the second HFMs and scroll down to the last picture, my first new hfm begins to scroll, I want to stop.

    hope code below solved your problem.

    protected boolean navigationMovement (int dx, int dy, int, int time status) {}
    int focusIndex = getFieldWithFocusIndex();
    If (focusIndex == 0 & dx)< 0="" &&="" dy="=" 0)="">
    Returns true;
    }
    If (focusIndex == this.getFieldCount () - 1 & dx > 0 & dy == 0) {}
    Returns true;
    }
    Return super.navigationMovement (dx, dy, status, time);
    }

  • Horizontal scrolling for the GridField Manager problem

    Hi all

    I have my working in the Application in which I have my display my data using GridField Manager. I used the code in the example given in link by tboatright of the user.

    Now in my application, I used the extension of the screen and it automatically gives the vertical scroll bar if the total height of lines in my GridField Manager is more than BB Simulator screen. In using this I can scroll vertically easily by substituting navigationMovement (int dx, int dy, int, int time status) method...

    Now the problem is, I have 6 columns in my network manager and their width is 80 each. So only 3 columns are displayed on the Simulator screen when the first time grid is displayed but I get no horizontal scroll bar, I m not able to scroll horizontally through my all columns. Now using dominant navigationMovement (dx int, int dy, int, int time status) method (in accordance with its encoding in the above link), I am able to setFocus on the columns by pressing the left/right keys on my keyboard on Simulator of BB, but with this screen doesn't move (scroll) left or right accordingly if I m not able to see column4 column 5, column6, which are placed to the right of the main screen width of BB.

    I hope that my question in the clear for you guys...

    Thanks in advance

    You have set the style for the screen like HORIZONTAL_SCROLLBAR and HORIZONTAL_SCROLL? because the style VERTICAL_SCROLL and VERTICAL_SCROLLBAR will be set by default. We must define explicitly for horizontal scrolling

  • regarding navigationMovement() mtehod

    I used navigationMovement() to swipe left or right screen using transition between slides, first time I swipe the screen to the right the code works, but when I slipped twice then my code does not work.  Here is my code

    public final class MyScreen extends MainScreen
    {
        private boolean _pushed;
        /**
         * Creates a new MyScreen object
         */
        public MyScreen()
        {
            // Set the displayed title of the screen
            setTitle("MyTitle");
            add(new LabelField("A class extending the MainScreen class, which provides default standard"));
        }
        protected boolean navigationMovement(int dx,int dy,int status,int time)
        {
            try
            {
    
                if(dx > 0)
                {
                    UiApplication.getUiApplication().invokeLater(new Runnable() {
    
                        public void run() {
                            // TODO Auto-generated method stub
                            UiApplication.getUiApplication().popScreen(UiApplication.getUiApplication().getActiveScreen());
                            push();
                        }
                    });
    
                    //counter++;
                    //labl.setText("counter="+counter);
                    //System.out.println("="+counter);
                }
                if(dx < 0)
                {
                    UiApplication.getUiApplication().invokeLater(new Runnable() {
    
                        public void run() {
                            // TODO Auto-generated method stub
                            UiApplication.getUiApplication().popScreen(UiApplication.getUiApplication().getActiveScreen());
                            pushsecond();     
    
                        }
                    });
    
                    //counter--;
                    //labl.setText("counter="+counter);
                    //System.out.println("="+counter);
                }
                if(dy < 0)
                {
                     System.out.println("UP : ");
                    // Dialog.alert("UP : ");
                }
                if(dy > 0)
                {
                     System.out.println("DOWN : ");
                     //Dialog.alert("DOWN");
                }
                this.invalidate();
            }
            catch(Exception e)
            {
                System.out.println("WError:"+e.toString());
            }
            return true;
        }
        public void pushsecond() {
            // TODO Auto-generated method stub
                MyPreview screen = null;
                TransitionContext transitionContextIn;
                TransitionContext transitionContextOut;
    
                UiEngineInstance engine = Ui.getUiEngineInstance();
                screen = new MyPreview();  
    
                transitionContextIn = new TransitionContext(TransitionContext.TRANSITION_SLIDE);
    
                transitionContextIn.setIntAttribute(TransitionContext.ATTR_DURATION, 500);
                transitionContextIn.setIntAttribute(TransitionContext.ATTR_DIRECTION, TransitionContext.DIRECTION_LEFT);
    
                transitionContextOut = new TransitionContext(TransitionContext.TRANSITION_SLIDE);
                transitionContextOut.setIntAttribute(TransitionContext.ATTR_DURATION, 500);
                transitionContextOut.setIntAttribute(TransitionContext.ATTR_DIRECTION, TransitionContext.DIRECTION_RIGHT);
                transitionContextOut.setIntAttribute(TransitionContext.ATTR_KIND, TransitionContext.KIND_OUT);
                        engine.setTransition(null, screen, UiEngineInstance.TRIGGER_PUSH, transitionContextIn);
                        engine.setTransition(screen, null, UiEngineInstance.TRIGGER_POP, transitionContextOut);
    
                synchronized(UiApplication.getEventLock())
                {
                   UiApplication.getUiApplication().pushScreen(screen);
                    _pushed = true;
                }    
    
        }
        public void push() {
            // TODO Auto-generated method stub
            Preview screen = null;
            TransitionContext transitionContextIn;
            TransitionContext transitionContextOut;
    
            UiEngineInstance engine = Ui.getUiEngineInstance();
            screen = new Preview();
            transitionContextIn = new TransitionContext(TransitionContext.TRANSITION_SLIDE);
    
            transitionContextIn.setIntAttribute(TransitionContext.ATTR_DURATION, 500);
            transitionContextIn.setIntAttribute(TransitionContext.ATTR_DIRECTION, TransitionContext.DIRECTION_RIGHT); 
    
            transitionContextOut = new TransitionContext(TransitionContext.TRANSITION_SLIDE);
            transitionContextOut.setIntAttribute(TransitionContext.ATTR_DURATION, 500);
            transitionContextOut.setIntAttribute(TransitionContext.ATTR_DIRECTION, TransitionContext.DIRECTION_RIGHT);
            transitionContextOut.setIntAttribute(TransitionContext.ATTR_KIND, TransitionContext.KIND_OUT);
                    engine.setTransition(null, screen, UiEngineInstance.TRIGGER_PUSH, transitionContextIn);
                    engine.setTransition(screen, null, UiEngineInstance.TRIGGER_POP, transitionContextOut);
    
            synchronized(UiApplication.getEventLock())
            {
               UiApplication.getUiApplication().pushScreen(screen);
                _pushed = true;
            }           
    
        }
    }
    

    I understand your requirement.  What I'm trying to do here is you help only to find a problem in your code, by obtaining allows you to verify things are working properly or suggesting tests that will help determine where the problem actually is.  The checks that I asked you to do are exactly the same as I would do in your situation.

    In fact, I suspect the code you provided works very well - the problem is elsewhere.  So given what we know, we cannot tell you where the problem is at the moment in any case!  No, this does not mean that I want you to provide us with all your code.  If you work through a logical process to eliminate the possible causes of the problem, you will discover what the problem is yourself.

    Think you make us wait is fix your code.  Rather, it is much better if we help you fix your own code isn't?  You will then use these debugging skills for your future problems.

    No more questions.  What screen is exposed at that point, it does not work?  Which screen will be the trackpad in interaction with?

  • Problem with class extend the field

    Hi all!

    Now, I have a problem with the class extend the field:

    public class ContentItem extends field

    {

    have a bitmap and text

    }
    Public MustInherit class ContentField extend the field

    {

    protected abstract void paint (graphics graphics);

    protected abstract void drawFocus (Graphics graphics);

    }

    SerializableAttribute public class, contented extends ContentField

    {

    have a lot of field ContentItem

    and painting ContentItem field depending on the paint and drawFocus

    }

    I'm having a problem when I want to focus to ContentItem. How to focus to ContentItem class content. Please help me.

    Thank you, it has been resolved. I just override the navigationMovement method and treat it in the child field

  • navigationMovement puzzle

    I write my own field Manager to display a grid of 6 x 10 fields. The first column is not active (done via the individual fields), and I try to have thefocus wrap around the screen. For example, if move you to the right of the last column, focus should move to the 2nd column. In other words, I want 1-5 fields below to behave like a circle under the left-right movement.

    [ X ] [ 1 ] [ 2 ] [ 3 ] [ 4 ] [ 5 ]

    Up and down should behave like in a regular gridfieldmanager. For various other reasons, subclassing the GridFieldManager is not an option, so I'm subclassing Manager directly. I have this scrolling behavior works correctly. the problem arises when the focus would let the Manager. If I pressed ENTER, the default scrolling down works perfectly. When I scroll with the wheel, however, development is blocked in the first and last lines. This scrolling down with the emphasis on the field (line 9, column 4) doesn't help, as does the scroll upward on the ground (row 0, col 2).

    I thought to use getManager (.navigationMovement), but it is protected.

    My navigationMovement method:

    protected boolean navigationMovement(int dx, int dy, int status, int time){    int index = getFieldWithFocusIndex();
    
        while(index >= 0 && index < getFieldCount()){        if (dx*dx > dy*dy){ // horizontal motion            if(dx < 0){ // left                index += (index%cols == 1) ? cols - 2 : - 1;            } else{ // right                index -= ((index+1)%cols == 0) ? cols - 2 : -1;            }        }else{ // vertical motion            if(dy > 0){ // down                index += cols;            } else{ // up                index -= cols;            }        }
    
            if(index < 0 || index >= getFieldCount()) return false;        try{            getField(index).setFocus();            return true;        } catch (IndexOutOfBoundsException ioobe) {            // We hit a blank spot, cycle again        }    }    return false;}
    

    Thanks in advance!

    So this is my attempt to help moveFocus. As it does not keep track of direction or whatever it is, I guess you meant to call me from navigationMovement. It worked perfectly, except that I had to manually scroll Senior Manager, whenever the target subfield was outside the visible area. Here is my solution (which also fixed another problem: the old method scrolls with a single click; now most big dx and dy lead to more scrolling).

    protected boolean navigationMovement(int dx, int dy, int status, int time){    int index = getFieldWithFocusIndex();    int oldCol = index % cols; // index = row * cols + col
    
        dx = dx % (cols - 1) + cols - 1; // force dx positive    int newCol = (oldCol - 1 + dx) % (cols - 1) + 1;    int delta = newCol - oldCol + (cols - 1) * dy;
    
        delta = moveFocus(delta, status, time);    if(delta == 0) {        Manager mgr = getManager();        XYRect rect = new XYRect();        mgr.getFocusRect(rect);        int vscroll = mgr.getVerticalScroll();        int height = mgr.getVisibleHeight();
    
            if( rect.y < 0 ) { // scrolled above visible region            mgr.setVerticalScroll((int)Math.max( 0,                         vscroll + 3 * rect.y));        } else if ( rect.Y2() > height ) { // scrolled below screen edge            mgr.setVerticalScroll((int)Math.min(                    mgr.getVirtualHeight(),                    3 * (rect.Y2() - height) + vscroll));        }    }    return (delta == 0);}
    

    Thank you very much!!

  • Problem in the use of the JDE 4.7 NumericTextFilter.ALLOW_DECIMAL

    Hello

    I wrote the code for the decimal entry as

    public NumericTextFilter numFilter = new NumericTextFilter (NumericTextFilter.ALLOW_DECIMAL);

    private AutoTextEditField test = new AutoTextEditField ("","", 8, BasicEditField.NO_NEWLINE | ") Field.FIELD_HCENTER);

    test.setFilter (numFilter);

    Here's my problem while using the virtualKeyboard Strom I m not able to type '1' textpad and when I click 1 entry appears as "." (DECIMAL)

    and when I m tilt blackberry in landscape mode so I m get '1' and '. " at different place and I m able to type.

    is there some their in blackberry os. 4.7.0.75 for this their.

    can we know what is theirs.

    Respect,

    Neev

    This is a known bug in version 4.7. It is fixed in a future release - I believe in 4.7.0.86.

    The only work around is to rotate the phone to get the view of the landscape. The keyboard works properly in this view.

  • Strange: Objectchoicefield and ObjectListField in Gridfieldmanager - navigation problem

    Hi @all,

    I have a very strange problem, because running Simulator runs as I would have liked, but the device, the navigation is bad:

    running OS 5.0.0.42 3 on device (BB9700) and the Simulator

    1. the building screen

    2. put verticalfieldmanager on it that contains the background image

    3. put gridscreenmanager (with a column - the problem is with more then one column, too) on the first position of the vfm

    4. turn objectchoicefield with 5 points on the 1st row of the gsm

    5. put the objectlistfield with 5 points on the second line of gsm

    Program running in the Simulator:

    View all as I prefer.

    The first objectchoicefield and beyond the objectlistfield.

    When I scroll with trackpad OCF Gets the focus first and after that the olf on its first line.

    I can scroll up and down, and everything's fine.

    Program running on the device:

    View all as I prefer.

    The first objectchoicefield and beyond the objectlistfield.

    When I scroll with trackpad OCF Gets the focus first and after that the olf on its first line.

    So far so good:

    When I scroll down to the olf, all things are working properly. For example, point 4 a now focus.

    Now, if I try to go back in the OLF, it should go back to article 3 of the olf, but this is the leap into objectchoicefield. After that, if I try to go back to the objectlistfield, it jumps directly to point 4, which he came before.

    If I don't put the objectchoicefield in the first row, everything works fine.

    What can I do?

    I did something wrong?

    All ideas are very appeciated.

    Thanks in advance.

    CUA

    Michael

    Well, I found it.

    I made a mistake in the application of my own gridfieldmanager navigationmovement method.

    What is already strange: I used the same gridfieldmanager within 2 screens in my application. First screen was working fine, the second one was bad. Same content in both screens.

    Sorry for that.

    Thank you for all.

    CUA

    Michael

  • Development/unfocus field custom button problem

    Hi all

    I have something weird happens.  I have a custom button field that swaps the images based on a focused state or blur.  I have been using this field custom for awhile now, and I have never had any problems.  Imagine the following provision:

    ______________    ________________________

    | Custom button |    | BasicEditField |

    ------------------------    ------------------------------------------

    When my screen is launched, the focus is on the custom button.  If I move the trackball in a downward movement, the focus is taken the custom button, and its background image changes adequately to what has been defined in the untargeted State.  The BasicEditField then has the focus.  This is the correct behavior.

    If, however, I move the trackball in a movement to the right to the BasicEditField, then the BasicEditField will indeed get the focus, however the custom button field always displays its "highlight" picture  Using print statements, I was able to determine that when I move in a movement to the right with the trackball, the custom field button loses the focus and then gets the focus back to back, that's why it shows the highlighted image.

    Additional info:  This isn't an issue on touch devices, and custom button Manager is a TableLayoutManager.

    Any ideas why this might be happening?  Here's the code to my custom button field:

    public class BitmapButtonField extends Field {
        private String text = "";
        private Bitmap bitmap;
        private Bitmap bitmapHighlight;
        private Bitmap b;
        private boolean highlighted;
    
        public BitmapButtonField(String image, String imageHighlight, long style) {
    
            super(style | Field.FOCUSABLE);
    
            this.bitmap = Bitmap.getBitmapResource(image);
            this.bitmapHighlight = Bitmap.getBitmapResource(imageHighlight);
    
            b = bitmap;
    
        }
    
        public BitmapButtonField(String text, String image, String imageHighlight,
                long style) {
    
            super(style | Field.FOCUSABLE);
    
            this.text = text;
            this.bitmap = Bitmap.getBitmapResource(image);
            this.bitmapHighlight = Bitmap.getBitmapResource(imageHighlight);
    
            b = bitmap;
    
        }
    
        protected void drawFocus(Graphics graphics, boolean on) {
            // Do nothing
        }
    
        public int getPreferredHeight() {
            return bitmap.getHeight();
        }
    
        public int getPreferredWidth() {
            return bitmap.getWidth();
        }
    
        protected void layout(int width, int height) {
            setExtent(getPreferredWidth(), getPreferredHeight());
        }
    
        protected boolean navigationClick(int status, int time) {
            fieldChangeNotify(1);
            return true;
        }
    
        protected void onFocus(int direction) {
            b = bitmapHighlight;
            invalidate();
            System.out.println("FOCUSED");
    
        }
    
        protected void onUnfocus() {
            b = bitmap;
            invalidate();
            System.out.println("UNFOCUSED");
        }
    
        protected void paint(Graphics graphics) {
    
            int topTextPadding = (b.getHeight() - getFont().getHeight()) / 2;
            int sideTextPadding = (b.getWidth() - getFont().getAdvance(text)) / 2;
    
            graphics.drawBitmap(0, 0, getWidth(), getHeight(), b, 0, 0);
            graphics.setColor(Color.WHITE);
            if (text.length() > 0) {
                graphics.drawText(text, sideTextPadding, topTextPadding,
                        Graphics.ELLIPSIS, b.getWidth());
            }
        }
    }
    

    Have you looked at navigationMovement in the TableLayoutManager?  I confess that I rewrote it because it handles no left and right as I wanted.  Perhaps, you might be able to do the same thing.

Maybe you are looking for