A matter of design about the update of a screen of classes different all in now the lock of the event.

I have a screen:

  • A class that extends the screen

I have three Classes that contain a call to a database that returns records of ~ 50 that I fill a ListField with. The ListField is added to a different Manager according to the class

  1. A class that contains a VerticalFieldManager
  2. A class that contains a HorizontalFieldManager
  3. Another class that contains a HorizontalFieldManager

Once I complete the list and add what it the respective Manager, how can I add the Manager of one of the three classes of the class that extends the screen when I lock the event?

Is it a bad design?

There is a lot of code that will fill the lists, so I thought that using separate classes would be the way to go.

I guess I can't understand how to add the handler to the class that extends the screen.

If it is a bad design, which is a good approach?

Yes, it should work. A couple of optimizations:

(1) you don't have to check the isForeground() - even if your application is currently in the background, you want the user to see an update of the screen once it is implemented, not you?

(2) you already have myScreen as the reference on the active screen - use instead of run this getActiveScreen() second time:

myScreen.replace (oldVfm, value);

I guess you can mark this as resolved issue.

Tags: BlackBerry Developers

Similar Questions

  • A matter of design using the custom in custom frames fields.

    A matter of design, which is a good implementation of the following?

    I read the articles in the Knowledge Base 'Create custom fields' and 'Create a custom handler for a screen presentation' and what I want to do is control any arbitrary custom field - a Manager custom.

    For example, if I have the following fields:

    1. Field
    2. Field
    3. Field
    4. Field
    5. Field

    I want the second and fifth fields to have a different margin, filling or the width of the first, third and fourth fields, I would by methods layout() and object to the second and fifth fields - which shall replace the custom method of the sublayout() Manager logic?

    Or can I add logic in the custom handler, I find the fields with the method getField() to get the second and fifth fields and change the margin, filling or width with the logic in the custom handler?

    What is the right place to put the logic?

    Thank you.

    the field can only work with the space assigned by the Manager. how he uses this space is to the field, he could see itself smaller, for example.

  • Question about the event thread

    Hello world

    I need to perform a lot of Http 'Get' and 'Post' requests If I'm not directly interacting with the UI (event thread), then I need to put the class managing http requests in its own thread?

    Any advice would be appreciated, thanks!

    You should not run any operation (such as an HTTP GET or POST request) blocking or no matter how long processing thread in the case. If you do, you run the risk of allowing the event queue overflow while you have this thread do something else, which will cause your app ending with the system.

    You must always start a worker for any HTTP operation thread.

  • Question about the events of list management

    I searched in the circles of a response to this problem for a while now.

    Background information:

    I have an application that uses a number of listservs. However, some end users have complained about this particular control since you not only have select from the popup LOV, but you then have to click on the 'Add' button until the selected value will be submitted to the page. They would like me to display some callback types click on 'Add' when a value is selected, but not yet added.

    I found the names of the different elements of the list manager and created a simple javascript function to change the background color of the text box where the selected value is displayed and attached that work to the onchange event.

    My problem is that if something enter the text box fire the onchange event, by clicking on the 'Add' button does not work. In other words, I can put a red background (or whatever I end up doing) if they have not yet added value, but I can't put it right back when the user clicks on 'Add '. The best work around I came uses the list manager onmouseover event, but is not as clean as I like it.

    The 'Add' button has an onclick (obviously) the events that first calls a function "appendToList" and then deletes the text box.

    {color: #0000ff} & lt; "input type ="button"name =" "value ="Add"onclick =" appendToList (return [0].p_v99.value.toUpperCase (), return [0] .p_v04); return [0].p_v99.value = "" / & gt;

    {color} {color: #000000} The appendToList function is defined in the body of the page, just forward to the & lt; fieldset & gt; tag that creates the list manager, leading me to believe that there is a template somewhere.

    Question:

    Is it possible to edit the template for the list manager so that I can call my function when the user clicks on the button "add"?

    or

    Is it possible to redefine the function appendToList somewhere on this page, so I can place a call to function within this function?

    or

    Is there another way to restore the appearance of the text box when the user clicks on the button 'Add' that I thought not again?


    Thanks for any help you can provide. This is bugging me. {color}

    Hello

    I think that what follows may work for you.

    Suppose you have a component called P4_LIST_MANAGER list manager. Add the following code in the Footer area of the region setting:

    <script type="text/javascript">
    var lm = document.getElementById("P4_LIST_MANAGER_ADD");
    lm.onchange = function()
    {
     if (lm.value.length > 0)
     {
      lm.style.backgroundColor = 'red';
     }
    }
    var lmfs = document.getElementById("P4_LIST_MANAGER");
    lmfs.onclick = function()
    {
     if (lm.value.length == 0)
     {
      lm.style.backgroundColor = 'white';
     }
    }
    </script>
    

    The main problem you see is that for an input element onchange event is not raised when its value is changed via javascript on the page. The above assumes that the user has clicked in the area of field set to use either the Add or Remove buttons, and then resets the background color.

    Andy

    Published by: ATD 15 January 2009 19:02

  • Telephone call about the event log errors - they claim to be the Technical Support

    Original title: event error logs

    I get a phone call from a person claiming to be a b/c my computer Tech support has published many errors in the event log.  Is - is this legitimate?  He wants me to do stuff in the event log.

    Hello

    Yes, it's a SCAM!

    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="">

  • Structure of the matter and structure of the event with a condition of the indicator (boolean)

    Hello

    I read a lot of posts but I can't solve my problem. I would like to set up a business structure and the structure of the event, and the condition to run the code inside is a Boolean indicator, in this case called Wahnelt (screenshot). I know I should use signal value, but I don't know how to implement. Here is the program:

    Any help will be more thankful

    a state machine with timer elapsed...

  • How to be informed about the events of limited resources

    Is there a listener that you can attach to your application and receive messages when the unit is low on resources?

    From time to time my application gets a little loading icon in the middle that makes the whole device freeze for a few seconds and then continue as normal.

    LowMemoryListener would fail anyway.  It gives you the opportunity to free objects that you don't need really.  But until the garbage collector runs, will always be the objects of place, and it's the garbage collector runs it causing you problems.

    I found in the past that you can get the quick wins to optimize the use of your Bitmaps.  For example, you can load at startup of the application and use the loaded single copy with your application, as it is possible to have two or more BitmapFields using the same Bitmap.  Loading of these only once can translate into a great saving on memory usage and garbage collection works, all the more that they need to get contiguous bytes (at least that is my understanding).  You can do similar things to files, say its workload once bytes and use bytes as a ByteArrayInputStream to the player.  So by sharing resources and do not recreate these you significantly reduce your memory footprint and improve performance.

    Edit: Just made some changes to improve readability.

  • event handler programmatically for different loop than the event itself

    Hello

    I'm driving a car of mine using compactDAQ in labview. I have two parallel looping using queues. One is for the tips - READ LOOP playback engine - (running more often), and the other for writing to the engine in bits - LOOP to WRITE.

    When I shoot a little some (by CAR), the motor starts to move with a pre-defined pace and to a predefined position. So far so good. Thus, when the engine starts, it replaces two bits:

    -sets bit BUSY (indicating the movement)

    -Disable INP bit, which indicates that the motor is not in a position

    As soon as the engine reaches its final destination the BUSY bit is cleared and the bit of the INP is set.

    The question is: How can I sign up for the BUSY bit (INP or both) goes high (or low) in LOOP WRITE, given that the bit is read LOOP read? Is it possible to do using queues? I read something about the events, but I don't know exactly how incorporating them in line-ups. Is this OK same design for the engine management?

    I have attached some of my code, where I have a structure of the event, where a condition is the change of the busy flag that is updated in LOOP READ. However the structure of the event will never run.

    I would like my RTO case run once and then expects busy go upstairs, and then again for INP to go UP and after that the next case is running (stop or other).

    I know that my code is not perfect, but I'm pretty new to labview...

    Thanks for any information that can help

    User events are just another way to communicate between the 2 loops.  Queues are also used to communicate between two loops.  If you already have a queue from one loop at the other, you could just keep using that.  I have recommended the user events due to the structure of the event you have included in your loop of producer.  User events can be triggered at any time you want.  You can have the code in your block diagram that uses the Event.vi user generate causes the structure of the event with the other loop turns off.  Event structures are usually turns off when a Panel before its value control has changed, but they can also be configured for these user events.

    You can really make this communication between your two loops in different ways.  If you use a LabVIEW 2012 I strongly recommended to take a look at the producer/consumer model, which is available for you to look at this common architecture and compare it to what you have now.  If you have not 2012 try to look at the example in my last post on the producer/consumer with user events.  You will find more success using architectures such as these.

  • How seeds Cache using the Event Table of the poll

    Hello Experts

    I have configured the Event Table of the poll in my PC
    Steps to follow:
    (1) table created using SAEPT. Oracle.SQL scheme in 10g
    (2) any SAEPT. Oracle.SQL by creating a new connection pool in the physical layer
    (3) configured in repository - tools - utility - OBI event Polling tables by selecting SAEPT. Oracle.SQL and gave 15 min in the polling frequency
    (4) inserted data in SAEPT. Oracle.SQL
    (5) NQserver.log checked after the time of the poll which is 15 minutes. NQserver.log was not getting updated or details about the event that occurred.

    You think that I missed a few steps in the configuration of EFA, if so... Please help me I need to implement on the client machine soon.

    Enjoy your time guys.

    Published by: Newby on July 1, 2010 10:34

    As much as I know the vote event tables are used to purge the cache automatically. It is not used to start the cache.
    If you want to start the cache, the ibots use or you do like a program...

    Published by: user8000915 on July 1st, 2010 07:37

  • Picture of the events of clusters - change value and the mouse down

    Hello everyone

    I am facing a problem of triggering events using two arrays of clusters.

    I have two paintings of clusters: A and B. There is a Boolean control within each group and to maintain the two paintings in clusters at the same index value (indexVals), the vertical scroll bar of A is hidden but the vertical scroll bar of B is visible. I was using a case with 3 cases triggered by structure: the mouse down, timeout and the mouse upwards. The case of "mouse down" feeds of terminal 1, which makes the case "timeout" the waiting period. The case of "timeout" continues to fuel terminal 1 timeout and has two property nodes (one for A and for B) makes the value of B indexVals is written on the indexVals of a. inside the case of "mouse up" it has a value of-1 for the terminal timeout, putting an end to the process. OK, it was working great. But...

    Now I need to keep the same procedures described above, but I need to raise an event when the user clicks any boolean (led) change state. I thought about the event "change value", but when I click on the led to trigger the event of "change value", the "mouse down" event is also triggered.

    Any suggestions?

    The real VI is a little different from what I described, but the problem is exactly the same.

    Thank you

    Dan07

    Like this:

  • Doubt in the structure of the event

    Hi all

    I am developing an app for my instruments that is user interfaced.i am new do VI architecture. In my program I use architecture producer and consumer, structure of the matter and structure of the event. In this framework programme first four are working properly, but the fifth framework structure of the case does not good. I have attached my program then please read it tell me what I did wrong?

    Thanks in advance

    Here is an example. Sorry, the pattern is a little messy.

  • Firefox I want to find out about the updates only when the ons add that I installed currently become compatible. Is this possible?

    Firefox keeps advising me up-to-date even if a few Add ons are not compatible with the newer version. Although I don't want to be notified when an update is available, I won't update if the add ons are not compatible. Also, advising me update is useless because I will not refresh firefox when all add ons are not compatible.

    Is it possible to put the automatic notification about the availability of updates to appear only when all add ons are compatible?

    You can install this extension to see the information of current compatibility on the subject: addons page.

  • Hi, I do not know where to turn: the person who takes care of all the stuff of count is out of town, this friend started Firefox and there was a message about an update, I thoght I again just click on install and wait to re start Firefox. But what I remem

    Hi, I do not know where to turn: the person who takes care of all the stuff of count is out of town, this friend started Firefox and there was a message about an update, I thoght I again just click on install and wait to re start Firefox. But what I remember is this another open window and asked me to choose 'something' (an icon or banner or?), I thought I have to click on an element (I guess I should read all clearly). Firefox updated to 3.6.4, but it also inserted some sort of what might be called a banner? But it does cover only partially the half right of my 3 toolbars at the top of the Firefox window. It cannot be used to something else because it's just a mess of colors and unknowns, except for what looks like a 'top' and what I recognize as an icon of Firefox (but only partially visible)! Now, what he does, it's partly hide this part all the toolbars and they are difficult to read and to do to turn this 'thing' impossible to understand, if I keep to? I can't find in any case to remove it or use it? But since the icon of Firefox is about it, I think you need to know what it is and how trash. I'm sorry for this accident caused my my inattention, but I'm not much of a computer person - HELP! Thanks for any help. Judi

    This has happened

    Each time Firefox opened

    Today is Thrsday June 24, 2010

    The only thing I can imagine: it's a character.

    Tools-> Add-ons-> Themes
    Here should be the character (light theme)
    and a button 'delete '.

    Click on it (delete button), and he (Persona, this mixture of colors) should disappear instantly.

    This help you?

  • Question about the V1.3.8.0 Raid driver update

    Hello.
    Can someone tell me what are the advantages of doing an update of the RAID Toshiba Windows XP MCE 1.3.8.0 driver or what case?

    Also had another problem... I tried to install the driver for interim relief and he made a mistake... my version of raid is always the one I had before and couldn t install this version.
    Any help would be cool.
    Thank you

    As far as I know the RAID driver must be installed at the begging of the installation of the OS.
    Unfortunately there is no any official documents about the correctional system and the benefits of updates.
    But I think that the new driver could be compatible with more motherboards and controller.

  • I have a question about the time machine. I recently updated my Quicken 2015 and there was something wrong with the update. Can I go back in just the Quicken file and restore it until I downloaded the update do I have to restore the entire

    I have a question about the time machine. I recently updated my Quicken 2015 and there was something wrong with the update. Can I come back in all the Quicken file and restore from time Machine before I downloaded the update to do, I need to restore the entire computer?

    Yes, you can just restore this file or application. Use Time Machine to back up or restore your Mac - Apple Support

Maybe you are looking for