ListField onFocus() calling repeatedly

Hello

For OS 6.0, nobody knows what are the onFocus() method of a ListField causes several times if you hold your finger down on an empty area of the ListField (where there is no line) and move you your finger?  I don't see this behavior on 5.0.  I don't know why onFocus() is regularly invited as when I do this, one of my lines of list is selected and the ListField should have already developed.

This affects a logic I use to dynamically add the MenuItems when the ListField is focused.  Therefore, I am trying to stop this behavior...

Thank you!

Found the problem:

Once I overrided touchEvent() for the ListField, then the problem stopped.

Tags: BlackBerry Developers

Similar Questions

  • Paint method is called repeatedly

    Hello

    I am facing a problem with my method of painting for one of my classes that extends BitMapField. Keeps the paint method called, even if there is no user input. I tried to run my application on my simulator mode debugging so that I can confirm that the paint method is called repeatedly.

    Here is the list of specific things to my class and also the steps I took to fix this problem:

    1. I went on methods onFocus and onUnFocus for this class. I thought they might be the culprit, so I commented on them but the paint for this class method always gets called.

    2. I have objects of that class type housed in some custom HorizontalFieldManagers and VerticalFieldManagers. Each of them have invalid codes to perform certain operations. Also I tried to comment out these lines, but to no avail. Initially, I assumed that invalidate repainted the entire screen, without worrying be call from where paint of my custom BitmapField method is called on.

    3. I also more mounted onFocus and onUnFocus for my hfms and vfms methods. I commented out them, but nothing helped. Initially, I assumed the onFocus and onUnFocus methods call my hfms the paint method, which I am also mounted, and call the paint of my bitmapfield method.

    Am I right to assume that if the problem persists, the constant call of painting, I will soon hit a stack overflow? Someone kindly help me on this. Maybe there are other methods that I need to replace? Or there are other methods that call my method of painting?

    Thank you

    Hello

    as suggested, I double-checked my code and found the problem. Using a condition, I do a setBitmap in my painting for the BitmapField method. For some strange reason, calling a setBitmap called paint again. When I tried to put it in my methods onFocus and onUnFocus, they do not call the paint and so the infinite loop does not occur. Thanks for your suggestion.

  • CVI 2013 SP1 - function calls repeated with pointer on a variable array parameter causes a shift of the index

    I have some functions will be pointers as parameter and CVI 2012 SP1, they work as before without problems but with CVI 2013 SP1 they are now incorrect.

    Here the description of what is happening - I found a cure, but a duty adopt the old code and I think it's clear that nobody don't "captures" all lines in a 'big old code' which are affected (maybe):

    I have functions

    'function_XYZ(int *p_paraArr) '.

    with 'p_paraArr' as pointers on a table (int).

    Suppose I have another function

    "fct_TOP (void)".

    where is a local array variable which is inizialized by

    "int TheArray [25] = {0};

    and inside of this "TOP"-function-body I call a function ".

    "function_XYZ (TheArray).

    There are no complains of the compiler (CVI 2012 or 2013) and the code works (but the CVI 2013 only once!).

    But if I put 'fct_TOP' loop I have a lag in the "TheArray' -memory.  (The loop surrounds the function "TOP"! "")

    This means that the result "TheArray" obtained from "function_XYZ (TheArray)" starts at index '1' not on the index '0' - as the first time that the function "function_XYZ (TheArray)" was performed. ".

    The solution is:

    I only replaced

    "function_XYZ (TheArray)" (<1>)

    by

    "function_XYZ (&(TheArray[0]))" (<2>)

    overall the program now works every time (in the whole loop)-the first time (in the loop).

    In the second version (<2>) everything is necessary to "work well":

    The '&' and parentheses "(...)", which contains the element that may be designated by the '& '.

    And I hope that you believe me: I've tested several times, it was only "little" change that solved the problem.

    So it seems that the ICB 2013 (SP1) is a kind of internal offset index by a repeated execution of the

    "function_XYZ (TheArray).

    but I don't know how or why but I see in debug mode by observing the expected against the values in the table received!

    At the first time the (implicit) internal index of 'TheArray' is '0', but the following times (during the execution of the loop) the internal index passes to '1' (seen in the debugger because that all the expected values were shiftet like that!).

    So there's an explicit index in the table ("function_XYZ (&(TheArray[0]))") necessary to make the first time of this clear code execution.

    There are some good improvements in 2013 CVI (SP1) and I like this environment more than the 2012 version - but:

    There are other "changes" also, in the compiler (or linker...?) that are more rigid than "in ancient times.

    The problem of this kind of error is always the 'old code '!

    It is expected of such behavior.

    The compiler/linker do not complain (a complaint would be good!) writing but he made this mistake (in a loop).

    By the way: my 'compilation Options' are set to 'Extended' (without change in the "..." ("- button - Options) and that all of the boxes, except the" OpenMP_support "-box are checked!"» So I think that I put the very rigid compiler - maybe there are some «...» ' - button - settings to get rid of this problem, but I have not found them/it.

    My request:

    -Check the stiffer compiler by the need of an explicit index

    - or switch to the 'old' behavior with "function_XYZ (TheArray)" always refers to implicit index '0' of the element "TheArray". "."

    Thank you for your messages, comments and suggestions.

    -As I wrote before - maybe it's the style of programming or error"self made"... maybe...
    .. But if I replace 'function_XYZ (TheArray)' by "function_XYZ (&(TheArray[0]))" and
    then it works... Why so and not, if bothe the same? ...

    But as long as I do not post sample code, nobody is going to accept - I accept it. So consider this post more as an allusion to the fact that of the LW/CVI 2012-2013 LW/CVI more changed than just the LW - GUI or certain features: the compiler changed its 'way to'... or almost.

    For this problem, I think that I will use the solution 'use no implicit and explicit pointers'.
    Who should be a good idea taking into account
        http://forums.NI.com/T5/LabWindows-CVI/fatal-run-time-error-dereference-of-out-of-bounds-pointer/TD-...

    mybe also only caused by wrong code... who knows... but for me it is a sufficient reason to act as I suggest above.

    Best regards,
    F.

  • I get phone calls repeated from people with foreign accents saying that Microsoft receives several error messages from my computer. They are authentic?

    The [usually Indian] appellants say they work for the Microsodt and are very persistent.

    Hello

    Yes, it's a SCAM! If they still call hang up!

    Avoid scams to phone for tech support
    http://www.Microsoft.com/security/online-privacy/avoid-phone-scams.aspx

    In the United States, you can contact the FBI, Attorney general, the police authorities and consumer
    Watch groups. Arm yourself with knowledge.

    The Internet Crime Complaint Center (IC3) is a partnership between the Federal Bureau of Investigation
    (FBI) and the National White Collar Crime Center (NW3C), funded in part by the Bureau of Justice Assistance
    (BJA).
    http://www.ic3.gov/complaint/default.aspx

    No, Microsoft wouldn't you not solicited. Or they would know if errors exist on your
    computer. So that's the fraud or scams to get your money or worse to steal your identity.

    Avoid scams that use the Microsoft name fraudulently - Microsoft is not unsolicited
    phone calls to help you fix your computer
    http://www.Microsoft.com/protect/fraud/phishing/msName.aspx

    Scams and hoaxes
    http://support.Microsoft.com/contactus/cu_sc_virsec_master?ws=support#tab3

    Microsoft Support Center consumer
    https://consumersecuritysupport.Microsoft.com/default.aspx?altbrand=true&SD=GN&ln=en-us&St=1&wfxredirect=1&gssnb=1

    Microsoft technical support
    http://support.Microsoft.com/contactus/?ws=support#TAB0

    Microsoft - contact technical support
    http://Windows.Microsoft.com/en-us/Windows/help/contact-support

    I hope this helps.

    Rob Brown - Microsoft MVP<- profile="" -="" windows="" expert="" -="" consumer="" :="" bicycle=""><- mark="" twain="" said="" it="">

  • ListField onFocus selection last element

    Hello

    ListField seems to be select the last item in the list by default when it gets focus for the first time on a screen. Subsequent navigations between other fields in the form and the listfield seem to function normally (first elmt is picked up first).  Does anyone have an idea why this is happening?

    Thank you

    Teja.

    Sorry misunderstood.  I'm not sure. Never seen that before.  You're doing a setSelectedIndex?

  • I allow calls from verified contacts, but still receive unwanted calls

    in do not distrub, I allow calls from verified contacts, but always receive unwanted calls, I even got a call with my name in the caller ID!

    If you allow calls repeated under tension, then the telemarketers or who calls you are probably recall several times. As for the one with your name in the caller ID, I am one of those who earlier. Turns out be a telemarketing touting T-Mobile robot. I was incredibly ticked. So I got my carrier on the phone a few minutes asking them to open a trace. These calls are illegal.

    The foam of telemark will stop at nothing in their attempts to get through you.

  • How to use ListField UI component dyanamically

    Hello friends,

    I am new to the BB

    I want to use the ListField UI component..,.

    I use SDK 5.0,

    in this section I want to add & remove items dyanamically.,.

    So please tell me how can I do this...?

    Thank you.

    Nilesh

    Depending on how you use the field, there are delete and insert options available.  You can also set the size, then the ListField together invalidate().  These options are available via the aptly named in the ListField method calls.  Take a look at it API.

    Alternatively, you can create a new ListField with your updates and replace the existing one with your new ListField.

    Everything should work these options, you must choose the one that is easiest for you.  I admit that I generally use the option replace.  .

    In any case, the documentation, try them and let us know how you go.

  • PushApplication onMessage is called several times

    Hi guys,.

    I contacted my team BE but I'm waiting for answer, I want to ask the community:

    Your onMessage is called repeatedly with the same message?

    I see in the code for the examples of the RIM, they check that this message is new (not melted yet):

        public static void process( PushInputStream pis, Connection conn ) {
            Logger.log( "Reading incoming push message ..." );
    
            try {
    
                HttpServerConnection httpConn;
                if( conn instanceof HttpServerConnection ) {
                    httpConn = (HttpServerConnection) conn;
                } else {
                    throw new IllegalArgumentException( "Can not process non-http pushes, expected HttpServerConnection but have "
                            + conn.getClass().getName() );
                }
    
                String msgId = httpConn.getHeaderField( MESSAGE_ID_HEADER );
                String msgType = httpConn.getType();
                String encoding = httpConn.getEncoding();
    
                Logger.log( "Message props: ID=" + msgId + ", Type=" + msgType + ", Encoding=" + encoding );
    
                if( !alreadyReceived( msgId ) ) {
    }
    }
    

    You have the same control in your application?

    Thank you

    Eugen

    There is no guarantee that dups can be sent to the device, but in my experience its pretty rare. You will need to add a message id to the http header when you tap the message to make it work.

  • Towards the end of loading images in ListField

    Hi all

    I have a Listfield with some areas where a field is a BitmapField in which I should place bitmaps that are downloaded from the internet.

    Is it possible to auto update the listfield when each Bitmap is finished downloading so that the uploaded image could be seen in the BitmapFields of each ListField without calling the drawListRow(). ??

    No - but it's easy to invoke it for the line that you have just updated, because ListField gives you the ability to invalidate a specific line.

  • Paint is called several times...

    Hello

    My code has a check box form field, on which I paint custom color development on its width and its height. The user interface works fine, but her object is called repeatedly even though no cases of the user (such as scrolling or selection) occurs on the ground.

    Here is my code block:

    CheckboxField checkBoxField = new CheckboxField(checkBox
                            .toString()) {
    
    protected void paint(Graphics graphics) {
       System.out.println("in paint() of cb");
       if (this.isFocus()) {
        System.out.println("is focused");
        graphics.setColor(getHighlightColor());
        graphics.fillRect(0, 0,    this.getExtent().width,this.getExtent().height);
       }
    
    graphics.setColor(getFontColor());
    super.paint(graphics);
    }
    };
    

    Also, I found another similar post but it dint work for me: http://supportforums.blackberry.com/t5/Java-Development/paint-method-gets-called-repeatedly/m-p/5829...

    Any help would be much appreciated...

    P.S. This checkbox field is held in a verticalFieldManager.

    Thank you...

    Hey...

    Thanks for the reply Peter...

    finally understood it...

    My screen had an image bitmap field, in which object, I used the setSpace(). The setSpace() seems to invalidate the field and thus invoke its object in a nested way.

    However, what surprised me are the fact that such behavior was only on the screen with the check box and the date fields.

    Anyway, moral of the story: be careful of API do you use in object, do NOT invalidate the field.

    Thank you...

  • Receiving calls the LAN IP. Help, please

    Hello

    First time poster, but I couldn't find a similar thread.

    My C60 telepresence codec is receiving calls repeatedly every 30 seconds to a minute on my local network.  The call alert incoming says it comes from an IP address included in our premises: 10.10.10.XXX, and for each incoming call, the last 3 digits of the address IP is different (10.10.10.15, then 10.10.10.25, then 10.10.10.700, etc.).  If I leave it alone for a week, I'll be back to more than 1,000 missed calls and the machine is frozen.  Often it will be frozen every time I wake up, and I have to restart.  I have not changed the configuration at all since the latter was working fine.

    I contacted my gateway ISDN service provider first disconnect and their services to solve the problems, but the calls were still coming.  I just unplugged the Cat6 cable to see if this is the case of in the codec itself.  The calls stopped coming in and the area is sensitive again.

    Something in my local network called the box via the IP address.  Any of you have heard or seen what is happening before?  Any advice?

    Thanks in advance,

    -Rory

    Hi Rory,

    Certainly looks like a SIPVicious (or similar) probe.  These have been mentioned several times in the forums before.

    One thing that you can try on your endpoint is to put "xConfiguration SIP ListenPort: Off '.

    See Bug CSCue55239 - you can upgrade the firmware on your device too.

    PS - You may also be interested by this safety notice if you do not have a contract of service - it will help you to spend at least at TC6.1 if you are on an older version of software on your C60.

    Wayne

    --

    Do not forget to rate resposnes and mark your question as answered as appropriate.

  • Parallelize a procedure call

    Is there a simple way to call a parallel procedure?

    I wan't something like this:

    declare

    int l_first;

    int l_second;

    int l_third;

    Start

    l_first: = start_new_thread ('call my_procedure (1)');

    l_second: = start_new_thread ('call some_procedure (2)');

    l_third: = start_new_thread ('call some_procedure (3)');

    join_thread (l_first);

    join_thread (l_second);

    join_thread (l_third):

    end;

    The variant when you create task, create pieces, run the task and after all you drop the task is not convenient I want to just run my procedure in new thread, I don't need to chunk of other tables by rowid or something else.

    It seems that you want to use threading and not necessarily parallel processing.

    The difference? Well, parallel processing takes a load of unique work and that at the same time (hence the need for segmentation of the workload). Threads can be performed in parallel of the different workloads - for example in a a Flight Simulator thread can do the rendering, another sound, another model flight, another weather model, etc.

    And this (and other) announces, is seems you want to put on and treatment not specifically parallel.

    We can implement as background process threads (aka jobs).  But unlike the typical Windows/Posix thread synchronization between threads and access for the threads data segment, are not really possible.

    Here is an example of a class Thread base to be used in PL/SQL:

    SQL> create or replace type TThread authid current_user as object(
      2          thread_code     varchar2(32767),
      3          job_id          integer,
      4
      5          constructor function TThread( plsqlCode varchar2, startImmediate boolean default true ) return self as result,
      6          member procedure StartThread(  self in out TThread ),
      7          member function ThreadCompleted return boolean
      8  );
      9  /
    
    Type created.
    
    SQL>
    SQL> create or replace type body TThread as
      2
      3          constructor function TThread( plsqlCode varchar2, startImmediate boolean default true ) return self as result is
      4          begin
      5                  self.thread_code := plsqlCode;
      6                  if startImmediate then
      7                          self.StartThread();
      8                  end if;
      9                  return;
    10          end;
    11
    12          member procedure StartThread( self in out TThread ) is
    13                  pragma autonomous_transaction;
    14          begin
    15                  DBMS_JOB.Submit(
    16                          job => self.job_id,
    17                          next_date => sysdate,
    18                          what => self.thread_code
    19                  );
    20                  commit;
    21          exception when OTHERS then
    22                  rollback;
    23                  raise;
    24          end;
    25
    26          member function ThreadCompleted return boolean is
    27                  i       integer;
    28          begin
    29                  select 1 into i from user_jobs where job = self.job_id;
    30                  return( false );
    31          exception when NO_DATA_FOUND then
    32                  return( true );
    33          end;
    34
    35  end;
    36  /
    
    Type body created.
    
    SQL>
    SQL> declare
      2          thread1 TThread;
      3  begin
      4          thread1 := new TThread( 'dbms_lock.sleep(10);' );
      5          dbms_output.put_line( to_char(sysdate,'hh24:mi:ss')||': thread running as job '||thread1.job_id );
      6
      7          while not thread1.ThreadCompleted() loop
      8                  dbms_output.put_line( to_char(sysdate,'hh24:mi:ss')||': thread busy...' );
      9                  dbms_lock.sleep(1);
    10          end loop;
    11
    12          dbms_output.put_line( to_char(sysdate,'hh24:mi:ss')||': thread completed' );
    13
    14  end;
    15  /
    07:52:50: thread running as job 767
    07:52:50: thread busy...
    07:52:51: thread busy...
    07:52:52: thread busy...
    07:52:53: thread busy...
    07:52:54: thread busy...
    07:52:55: thread busy...
    07:52:56: thread busy...
    07:52:57: thread busy...
    07:52:58: thread busy...
    07:52:59: thread busy...
    07:53:00: thread busy...
    07:53:01: thread busy...
    07:53:02: thread busy...
    07:53:03: thread completed
    
    PL/SQL procedure successfully completed.
    
    SQL>
    

    Note that no validation is to ensure that the StartThread() method is not called repeatedly - this class is a simple test model that has yet to evolve before production use.

  • At Apple from liability? Support error!

    How to combat the irresponsibility of APPLE?

    The Office of official support for Apple in Russia (telephone 8-800-333-51-73) gave wrong information (No. address 1166414133). After the implementation of the recommendations of support, I lost the video and very precious photos. I asked repeatedly confirm, I don't lose a photo and video after the restore operation. Aperator in support gave me 100% a guarantee that all data will be retrieved on the phone. After restoration data have not been recovered.

    In the case of one call repeated to support, another operator apologized and said that the previous operator support has been deceived and advised to address in the authorized repair center. Said that perhaps pictures come up. Service center refused to retrieve and send to Apple support.

    And I'll get a picture for money clean now.

    Question:

    1 tell if it is possible to recover a photo and video if they were stored in a picture a stream? The operator says he sees that there are pictures, but I'm the on-site Web iCloud, telephone!

    2. the question of whether Apple has a responsibility, until the customer already the second time blocking the phone on the camera, then I lost a photo in 5 days, with an iCloud synchronization has been implemented, but not all photos of booted it backup in an iCloud copies are for everyday. The empty seat to iCloude 23 GB 50 GB.

    It is the responsibility of the owners to back up their photos.

  • Do not include the design of DND.

    If DND settings are disabled by disabling "Manual" then why are all other options (Silence, etc.) always switchable page? Surely, this implies that they are still doing something?

    The reason why I ask is that my 5 c iPhone does not ring sometimes and I can't work out why. Would it be when it is locked / call one repeated etc.?

    My switch is on the side, and the manual is on 'off '.

    Thank you

    James Harries wrote:

    If DND settings are disabled by disabling "Manual" then why are all other options (Silence, etc.) always switchable page? Surely, this implies that they are still doing something?

    Yes, they are doing something. If you select manual, all alerts are silenced until that you turn it off. Other parameters allow you to program the DND and select repeated so calls but DND must still be activated so that the calls repeated work.

  • Impossible to play the audio clips on the site. Click - page breaks.

    I'm playing the audio clips, sounds, dolphins (several sites) online site. Example: http://www.dolphinencounters.com/family-dolphinsounds.php#

    There is a small icon of ear for each clip. When I FIRST tried to read a clip, I got a "Quick Time plugin crashed" at the top of the page. Tried several times, same result.

    I went to TOOLS > OPTIONS > Applications tab. Given that I did not know what type of file format / clips have been, I found ALL the entries related to QuickTime and select the default setting or a different type of player. Restarted.

    When I tried this time, I still have collision warning. I double checked to make sure that QT all apps have gone and DISABLED by the plug-in page QT Extensions. Restarted.

    This time when I clicked on the icon of the ear, no sound is played, but the page pops up.

    Checked the settings/sound engineer. All OK. Updated QT for the last 7 and updated version to update system. No sound, no warning, page a few jumps.

    Other applications in the system plays its OK. Able to play videos in line with the sound. Just the noise / icon does not work.

    I would like to hear AND capture/download the sounds of dolphins. What is the problem with my system/FF 12.0? How can I fix it? How can I download?

    I tried to read the link to the icon to see the type of audio file, so I could access the issue more closely, but all links of clip are still with no recognized sound file format. Example: http://www.dolphinencounters.com/family-dolphinsounds.php#

    There are several elements on the page, but the links are all exactly as above.

    It has been long and there are probably several versions of FF as well as earlier versions of Windows, I remember listening and capture of the audio clips. Just do not remember how I did at the time.

    Win7 64 bit, 12.0 FF, QT 7 plug.

    It may be the prolongation of the QT interval, because the problem persists with all Applications QT, deleted or not, everything seems fine. No trainer, etc. No warning.

    I tried using IE and played clips, but WITHOUT my click the icon; they played just in overview. See still no way to capture or download and know that there is one somewhere.

    Hey ccorazza, you did so well with my last, have a curtain call repeat for this one? Thank you all.

    Hey, GreyWolf, sorry for the late reply. Didn't see your message until today.

    I was unable to get sound to play on this page too, but I got confused because it's an old version and I don't want to upgrade to the new version of QuickTime. But I'll test it on another PC with a Quicktime update.

    But after checking the file type, sounds, I see that they are .wav files. These files are usually played by Windows Media Player. So check to see if you can set the type of .wav file in the Tools > Options > Applications tab for Windows Media Player. Restart Firefox to see if the new change works.

    Also, I could find the urls for the files Dolphin audio so you can download them:

    You should be able to make links a right-click and choose Save the link under.

    How I found the links was I clicked on some empty page and chose to view the Page Source. A new window opens, I searched the word whistle then I copied the sounds/whistler.wav of the url part and added to http://www.dolphinencounters.com/.

    What other sites you have the problem with? I try to take a look at those and see if I can find a better answer for why this is happening.

Maybe you are looking for