setVerticalScroll does not not in 6.0.0 Simulator

My project is built using JRE 5.0.0 and everything works correctly when you test in a simulator running OS 5.0.0. The problem I have is that for a screen scroll does not work when testing on a simulator running OS 6.0.0.

I have a class derived from screen with a unique VerticalFieldManager added as follows:

summaryContent = new VerticalFieldManager(VerticalFieldManager.VERTICAL_SCROLL | VerticalFieldManager.VERTICAL_SCROLLBAR);
add(summaryContent);

Multiple instances of HorizontalFieldManager are then added to summaryContent. Each HorizontalFieldManager contains two fields (a LabelField and a RichTextField). I replaced for the LabelField getPreferredWidth method to return a constant value to ensure a fixed width. The RichTextField is created with the USE_ALL_WIDTH and NON_FOCUSABLE styles.

I have managers in place to capture the navigation, wheel and touch events and from that determine the amount of movement, the user has a up/down input. This amount is then passed to the next method:

protected void scrollContent(int amount)
{
    int verticalScroll = summaryContent.getVerticalScroll();
    int virtualHeight = summaryContent.getVirtualHeight();
    int visibleHeight = summaryContent.getVisibleHeight();
    int maxScroll = virtualHeight - visibleHeight;

    if (maxScroll < 0) maxScroll = 0;

    int fontHeight = getGraphics().getFont().getHeight();
    int requestedScroll = amount * fontHeight;

    if (requestedScroll < 0)
    {
        if (verticalScroll + requestedScroll < 0) requestedScroll = -verticalScroll;
    }
    else
    {
        if (verticalScroll + requestedScroll > maxScroll) requestedScroll = maxScroll - verticalScroll;
    }

    summaryContent.setVerticalScroll(verticalScroll + requestedScroll);
    summaryContent.invalidate();
}

Any value is passed to summaryContent.setVerticalScroll (), the verticalScrollPosition remains at 0. Yet once, this will only occur when you test in a Simulator runs 6.0.0 OS. I do not have a physical device with this OS, so I can't check if the problem is with the version of the OS or the Simulator. I tested on a device and in a simulator running OS 5.0.0 and it works perfectly.

Is this a bug or something I can make anyone see bad?

I finally get it working. The problem is off not to be in the code that I posted originally, but in the input event handlers. Originally, my navigationMovement event handler looks like this:

    protected boolean navigationMovement(int dx, int dy, int status, int time)
    {
        if (dy != 0) scrollContent(dy);
        return true;
    }

The fix was to add the following line at the beginning of the navigationMovement method:

       super.navigationMovement(dx, dy, status, time);

For some reason, the call to the base class method is required on OS 6.0 but not 5.0.

Tags: BlackBerry Developers

Similar Questions

  • Vista Data Execution Prevention does not let me play tractor simulator 2013

    Vista Data Execution Prevention does not let me play tractor simulator 2013

    Moved from feedback

    Hi, Tractor1o1,

    If you choose to protect all programs, you can always turn off DEP for individual programs. If you think that a program does not run correctly when DEP is enabled, check for a compatible version of the DEP program or an update from the software publisher before you change your DEP settings.

    http://Windows.Microsoft.com/en-us/Windows-Vista/change-data-execution-prevention-settings

    Please do not duplicate messages.  It is a violation of the Code of conduct.  See the article "Please Don't ':

    "Post questions that are identical or similar to the questions you have already posted. When someone has an answer to your question, that person will respond. »

    http://answers.Microsoft.com/en-us/page/FAQ#faqCodeConduct

    Thank you.

  • Simulation does not stop in the Loop Simulation &amp; control

    I'm working on a settlement in a loop of control & Simulation. I created a State space model and an inside observer.

    Now, I've implemented nearlly all, but now the simulation does not stop.

    First here is a picture of the .vi when it still works:

    But this isn't the end result, I want to have.

    I want to connect the output of the subtrahation (2 x - y) at the entrance to the exterior product.

    You can see from the image below:

    If I do, my continious simulation and never stops. The simulation time is always set to 10 sec.

    The .vi is attached. I hope someone can help me.

    I don't understand your suggestion. I've set up a node of your comments, but this does not solve the problem.

    But I found another solution to the problem. I build the .vi completely new and used the arithmetic of the design group Signal and control Simulation. The gain block and the summation block works better in my case that digital add and multiply the blocks. Now, the tracks of the simulation and the regulation works well.

  • Joystick does not work with Combat Flight Simulator Europe.

    Original title:

    SFC Europe running on one machine to Vista

    I've just loaded SFC Europe on my machine that runs Vista Home Premium 32-bit with SP2 update. Impossible to get joystick to work - have tried two types and get the same gibberish to the two joysticks. I can calibrate the joystick OK; they work great on FSX and FS2004; CFS 2 and 3, but the SFC Europe won't recognize them. Game can be played on the keyboard. Clues?

    Hello

    1. do you get an error message?

    2. What is the brand and model of the gamepad?

    3. do you get an error message?

    I suggest you try the steps in the following link and check if this solves the problem.

    http://support.Microsoft.com/kb/831361

    (Note: the above link works for Combat Flight Simulator Europe.)

    I hope this helps!

  • Same project does not work in the 9500 Simulator

    Hello

    I have developed a project KSOAP2 in blackberry JDE4.2.0 it works fine there. But when I run the same project in JDE4.7.0 9500 Simulator for me transport http and other functions do not work. Please help me wat could be the reason

    I think you need turn the pot of kSOAP2 a library cod. This link should be helpful:

    How - to compile a jar file in a library of BlackBerry

    It may first have to preverify the jar. This blog has some useful info:

    http://www.craigagreen.com/index.php?/blog/BlackBerry-and-NET-WebService-tutorial-part-1.html

  • My PCI-6250 does not see my SCXI box

    Hello

    I want to install a station using a PCI-6250 connected to an SCXI chassis cable 68 pin.  We have a couple of these formations, so they gave me a Setup disk that have our configuration is already done.  However, I had to install a software, that they neglected to give me.  I got the latest driver for the latter of NOR.   Well, maximum running, my tree is distinguished by a previous configuration.  And mine is not communicating with the SCXI.  My cards are "x" ed out.  The Communicator 'chassis' in the SCXI chassis Configuration is grey (no options).  I checked the wiring and disconnected all the blocks for the cards.

    Here is my tree.

    NOTE: Mine also does not have the "NOR-DAQmx devices" under the heading "devices and Interfaces, only in the software section.  Other configurations have this list.  I don't know how to get "devices OR-DAQmx" shown.

    Any help would be appreciated.

    My system

    • Commune
  • Editor Script OR 1.3.1
  • NEITHER Spy 2.7
  • NOR-488. 2 2.73
  • NOR-DAQmx ADE support 9.0.2
  • NOR-DAQmx Device Driver 9.0.2
  • NOR-DAQmx MAX Configuration 9.0.2
  • NOR-FGEN 2.5.1
    • FGEN Soft Front Panel
  • NOR-HWS 1.4.5
  • NOR-PAL 2.5.2
  • NOR-TClk 1.6.1
  • NOR-USI 1.0.2
  • NI-VISA 4.6
    • NiVisaServer.exe
    • NIvisaic.exe
  • Duration of NI-VISA 4.6
  • NOR-DAQ traditional 7.4.4
  • IVI drivers
    • Advanced

      • Instrument Driver software modules
      • Simulation software driver modules
      • Pilot simulation sessions
    • Pilot sessions
    • Logical names
  • Hi mz6yx6,

    First of all, don't worry about trying to get to the ' devices OR-DAQmx "appear. 4.6 Max, which was first included with NOR-DAQmx 9.0, has a revised UI layout which displays the devices inside "Devices and Interfaces" rather than display them in subfolders like ' devices OR-DAQmx.

    Also, thank you for the view a report of the configuration of the system MAX. The report shows that the SCXI chassis and modules are configured as simulated devices, which I think is the problem. DAQmx (> = 8.7) does not support configurations where a simulated SCXI chassis and modules are connected to a real communication hardware DAQ. Since your system has not simulated hardware DAQ (except the SCXI chassis and modules), the "Châssis Communicator" menu has no options to display.

    To resolve this issue, remove the SCXI chassis in MAX and create a real one (not simulated). How to do this depends on if you manually configure the chassis or you import a configuration from a file .nce, .ini or .txt:

    • Manual: right click on "Devices and Interfaces", then select «Create a new...» ». In the window "new...". "which appears, open the ' Chassis SCXI of NOR-DAQmx ' subtree and select the chassis type from there. Do not select "Simules NOR-DAQmx device" or modular Instrument The modules must be detected automatically, but you will need to manually reconfigure the accessories.
    • Import from a file .nce, .ini or .txt: in the dialog box 'Assistant Import Configuration', check that the 'Warnings and conflicts' column displays "XYZ will be replaced" or "Create device" and does not "create a simulated device.
    • If the Setup disk makes the SCXI configuration programmatically or an installer for the application, then more information about what is on the Setup disk would be useful.

    Brad

  • App does not start on the Simulator, error: (this file could not be opened. Make sure you have the proper permissions and try again).

    I get an error when I try to run my application after packaging and loading on the Playbook Simulator.

    When I try to start my application, I get a white screen for 1 second, it flashes black for a second before leaving white and then I get this error message: "this file could not be opened. Make sure you have the proper permissions and try again. »

    I have in my source folder:

    config. XML

    Icon.PNG

    Index.html

    Load.js

    Progress.CSS

    I don't think that my code using anything that requires permissions. (that is to say, does not use the shared files, or camera, etc.)  At the moment it is simply a text box and a button that calls code that retrieves data from the database I have. API reference, he said that I don't need permission for the use of the HTML5 and sql database.

    This is my config file:

    
    http://www.w3.org/ns/widgets"
            xmlns:rim="http://www.blackberry.com/ns/widgets"
            version="1.0.0.0">
    
      Test
    
      
        A simple test app.
      
    
    My Name
    
      
    
    access_shared
    
    
      
      
    
    
    

    I don't have any uses which I put in the "access_shared" to test, but it did not help.

    My app works very well in the Opera browser, and also in the training Simulator, I don't understand why it does not work on the playbook Simulator.

    I read something on the extension of the Javascript and exporting to a JAR file. Do I need to do? I have only a single .js file with a few defined variables and functions that implement the functionality of database/sql.

    I can't think of anything...

    Make sure that the index.html file referenced in your config.xml file has exactly the same name as the index.html file in your application.  You list all of your files with the 'I' for 'Index.xml' in capital letters.  The Tablet OS applies a case-sensitive file system.

    If this is the case, I suggest rename Index.html index.html, reconditioning and try again.

  • Application created using the BB for Eclipse plugin does not run in the Simulator

    Hi all!

    I created an application using BB plugin for Eclipse.  I try to run in the Simulator, but it never gets displayed (the application icon is never shown).  However, I create a "Hello World" sample, which works perfectly in the Simulator.  My application in Eclipse has never shows all files .cod or .jad, there only have files .jdp and .rapc

    My doesn´t app have encoding problems or errors of any kind (at least not displayed in the view of error).

    TIP: I have copy - paste code in different applications, is that a problem?

    I tried:

    • Restart Eclipse,
    • Configuration of active building of blackberry,
    • Cleaning of the project,
    • Creation of the project,
    • Reinstall Eclipse,

    but none of this seems to work.

    Can someone help me please?

    Best regards

    Juan.

    Hi all!

    In the event that a person gets the same problem, I mentioned.  I found the solution: it turns out that I had a very high class with a lot of code on it and that s the reason why the application does not get launched into the Simulator.  What I did that I shared this class on the 4different classes each managing different parts of the code and now it works perfectly.

    Hope someone is enjoying this, cause I spent a lot of time trying to figure out what the problem was.

    Best regards

    Juan.

  • Call WebService PlayBook does not work

    Hello world

    I have an app developed in Tablet SDK for Adobe Air with flash builder, that calls a web service on the internet. It works very well in the development environment, but does not work on playbook and Simulator. which I did nothing!

    any idea? If I missed something?

    Thanks for any help!

    Is that what you gave your app permission to access the internet?

  • WebWorks widget navigation mode work only not in ripple or Phone Simulator

    Hi, this is my first Bb Widget/WebWorks app, and I am currently having problems with the navigation mode.  Basically, it does not ripple, or in the simulator of v6.0 9700 device or on a real device of 9700 after packaging and signing of the package.

    I have read the documentation on the official website of WebWorks on the use of navigation mode:

    http://devBlog.BlackBerry.com/2010/05/BlackBerry-widget-navigation-mode/

    https://bdsc.webapps.BlackBerry.com/HTML5/documentation/ww_developing/rim_navigation_element_1582456...

    https://bdsc.webapps.BlackBerry.com/HTML5/documentation/ww_developing/using_the_navigation_mode_1866...

    I find these forums and found a how to on a policy which could have disabled Javascript on the phone, but my camera is not a policy, and it is not connected to a corporate server.

    Here are the contents of the config.xml file.


    http://www.w3.org/ns/widgets ".
    "xmlns:RIM ="http://www.blackberry.com/ns/widgets"
    version = "2.3.0.9".
    RIM: header = "" Widget-RIM: RIM/widget ">"
        
        
     
      nnn
      nnn - nnn
      ipsom
      <>committees mode = "auto" / >
     
     
     
     

    The application uses nine HTML files, including the file index.html.  Here is an excerpt of the file index.html.

    To check widget works, I have included this javascript call to display the name of the application from the config.xml file, and when the page appears in the training, the Simulator or on the device, the name of the application appears.

    The index.html page provides a list of items that have a link to the other pages.  Here is a sample of some of the links.  According to the documentation of WebWorks, the element will automatically receive focus when the user navigates to the screen in the application.  Just to be safe, I've added option, x-blackberry-Focus = "true" to some of the links to try to force the focus navigation, but it does not work.

    AAA

    BBB

    CCC

    Essentially, when the application loads in Wellington, I can navigate the application because the training allows me to use the mouse pointer in Windows to control what is on the screen of the virtual device.

    When I package, sign and load the application on the Simulator, the Windows mouse pointer is of no use in the Simulator, so at the start of my application, I try to use the cursor keys to navigate through the page, but the elements do not receive focus.  Of course, the cursor keys work in the Simulator, because they move the cursor autour, let me choose the icons etc.

    The only way I can get a pointer to appear in my app is when I press the menu button on the simulated phone and choose the Select option, which then displays a text on-screen cursor, and then moving the trackpad, the cursor becomes a pointer that I can move and then click a link properly following the href attribute.

    I loaded the application signed on my device and the behavior is exactly the same with the Simulator.  I must be doing something wrong because I searched with Google and have not been able to find similar experiences.  My config.xml file is missing a value?

    I'm sorry, I should have said something too.  Ripple itself does emule not the trackpad navigation.  So, you won't see focus moving in your content when you try to interact with the trackpad (it does nothing).

    However the Simulator certainly should allow you to test this feature.

    Is the snippet of code provided here work for you?

    https://bdsc.webapps.BlackBerry.com/HTML5/documentation/ww_developing/using_the_navigation_mode_1866...

  • iPhone 7 more buttons outside does not

    I've had my iPhone 7 + for about 2 weeks now. Every once in awhile all buttons outside to stop, volume up/down, power, home. The home button will still record and push and give the sensation of taptic and touchID works. The phone itself still works and I can answer texts and which do not use notifications.

    The couple spent time he did, he came upon her in about 4-5 minutes, however it was about half an hour and still nothing. I want to restart my phone, but the switch does not work.

    Has anyone seen this issue or know how to fix?

    Thanks in advance.

    I just experienced the same problem on my iPhone 7, I think it's a bug in iOS, but I am using iOS 10.0.2. Power + button low Volume allowed me to turn it off then turn it back on... Apple please fix this bug!

  • App store, Safari and iTunes does not connect to the Internet after installing macOS Sierra

    App store, Safari and iTunes does not connect to the Internet after installing macOS Sierra

    After upgrade 'OS X El Capitan' to "macOS Sierra" window only empty "App store" and page "Safari" made its appearance, no error message shows. store "iTunes" and "Dictionary" does not connect too.

    But Google chrome works well.

    So have you tried the next steps in your original post that Safari does not work after installing macOS Sierra:

    (1) x OS: "Unable to connect" or "unable to connect to the App Store. An internet connection is required"- Apple Support

    2) Advanced the steps to correct the problems with the iTunes Store - Apple Support connection

  • Safari does not work after installing macOS Sierra

    Safari and apple store does not work after installing macOS Sierra

    Alas, my crystal ball is in the shop for cleaning, so you will need to provide more details on what "doesn't work" and above all error messages. First of all, let's start the App Store. Provide as much information as possible for those of us who do not sit on your shoulder.

  • My iPad Apple 3rd generation wifi + his cell phone does not work

    MY 3rd generation Apple iPad, wifi + cell

    model number MD408LL/a

    Serial number DM * VGL

    THE SOUND DOES NOT WORK

    < personal information under the direction of the host >

    All sounds, or simply notification and sounds apps (for example do music and videos app still have sound)? If notifications and apps you have notifications on mute: on the iPad side switch - Apple Support ? If the sounds in all applications which have tried for example soft-reset/reboot of the iPad, insert/remove the headphones?

  • After recent, iPhone, 6, update, Windows, Explorer, does not work, see, iPhone

    I installed the latest update required for my iphone ios 6 a few days ago, and now when I try to download pictures from my iphone to my PC (via USB connection), the PC does not see the iphone.   iTunes sees it yet, but windows Explorer does not work.  It seems that some setting has been broken through the update of ios.  A way to solve this problem?

    Restart the computer and the iPhone. Unlock the iPhone before connecting it to the computer. Any change?

    TT2

Maybe you are looking for