Over-listening.  Help!

Here's my situation...
Poker Tournament Manager application...
Need to maintain a "Payout Summary" that lists player names, their finishes, and their payout. The Payout Summary needs to be recreated whenever a player's name changes, the finishing order changes or a player's payout changes. Each of these attributes can be changed from many different classes.
Right now, I have a listener that updates the Payout Summary whenever any of these attributes on a player changes.
The problem is that there are some operations (like changing the total payout pool) that will sweep across all player objects and update them...causing the Payout Summary to be recreated many times when it only needs to be updated once the operation is complete.
My question: What's a general recommendation for handling this type of thing? I thought about having controller classes to handle all the updates and then handle updating the payout summary, but given the number of places from which I can update these things that seems like it might not be the right way.

I believe the general practice is not to care unless there is a noticeable performance problem. If the "payout summary" is just an object in memory then it only takes a few microseconds to redundantly update it 30 or 50 times.
Of course if you're updating a remote database 30 or 50 times you'll need to do something. Like having a feature to temporarily turn off that listener while mass updates are going on, or something like that.

Similar Messages

  • My IPhone 3GS JailBroken turns on but shuts off then the black background comes up with white apple logo? And then turns on again? Does it over and over! HELP!

    My IPhone 3GS JailBroken turns on but shuts off then the black background comes up with white apple logo? And then turns on again? Does it over and over! HELP! Why Does This Happen And Is This Repairable?
    Let Me Know! Cheers
    Ryan Crawt
    [email protected]

    Its against the forum TOS to talk about J/B  phones.  you will have to use google to resolve your issue.

  • HT201272 I've got songs on my iPad that are not on my iPhone which I want but for some reason they won't go on over Icloud, help!?

    I've got songs on my iPad that are not on my iPhone which I want but for some reason they won't go on over Icloud, help!?

    perfect. ok do the following:
    settings > mail, contacts, calendars > go into the exchange account. You should have an email in the account field...[email protected] or [email protected], etc.... I am assuming you don't remember the password to this exchange account so once you know the email, you can go to email providers site and click on forgot password and you will go through the steps to get a new password. Once you do this, you will need to go back into your "exchange account " and the field that has the exchange email > touch the > to open settings. Change the password to your new password you got from above. Once you do this, you can add the exchange account to your ipad and all of your contacts will sync to both devices.
    Please confirm.

  • I can't open personal accounts on the internet. After entering ID and Password then the enter key, it's as if the screen refreshes itself and wants me to start over. Help Please.

    I can't open personal accounts on the internet. After entering ID and Password then the enter key, it's as if the screen refreshes itself and wants me to start over. Help Please.

    Click here and follow the instructions.
    (72059)

  • In my iphone6, voice over got switched on and screen got locked. Phone is not responding for slide but only responding for double tap. Phone is not accepting my passcode as I double tap in passcode screen. Single tap just gives a voice over. pls help

    In my iphone6, voice over got switched on and screen got locked. Phone is not responding for slide but only responding for double tap. Phone is not accepting my passcode as I double tap in passcode screen. Single tap just gives a voice over. pls help me to unlock the screen and switch off voice over

    Thanks a lot Sted !! It worked

  • Using Voice Over in the ios5 music app, when tapped into an album there is no way to back out of it except by switching off voice over! Help.

    Using Voice Over in the ios5 music app, when tapped into an album there is no way to back out of it except by switching off voice over! Help. This is preventing me upgrading the iPad2 to iOS5 for a blind man I work with. Am I missing something or is it a bug?

    here is a link to macosxhints.com that tells you how to output all of your feed URLs to a terminal window. from there you can cut and paste them into your new feed reader of choice...
    http://www.macosxhints.com/article.php?story=20080319094830396
    and if you are in the marked for a new reader may i suggest David Watanabe's excellent NewsFire. he had just recently made it totally free as a gift to the macintosh community.
    best of luck.

  • My ipad screen has turned color and looks "over-exposed" - help!

    my ipad screen has turned color and looks "over-exposed" - help!

    Settings > General > Accessibility > Invert Colors Off

  • Why does creative cloud is still asking serial number after i purchase and it wouldn't let me use it anymore because my trial is over need help NOW PLZ

    why does creative cloud is still asking serial number after i purchase and it wouldn't let me use it anymore because my trial is over need help NOW PLZ

    Hi There,
    Kindly try the following steps:
    Sign out and sign in to Creative Cloud app: Sign out, Sign in | Creative Cloud Desktop app
    Sign in, activation, or connection errors | CS5.5 and later
    Thanks.
    Atul Saini

  • IDE mouse-over popup help

    For us non-lightening speed readers, is there any way to get the IDE mouse-over popup help textboxes to stay up for a few seconds longer for larger texts, especially?
    If it is difficult enough for a native English reader, I can imagine the frustration of those non-native readers with the misfortune of not having the IDE localized in their own language.
    Thanx

    Go to:
    TOOLS>OPTIONS>GENERAL SETTING
    Thyen select SYSTEM SETTING and then you will find an option called TOOL
    TIPS DISMISSAL DELAY. Set a large number for that, to keep the tooltip text longer.
    Thanks.

  • New iMac can't find photosmart 2610 over network -- HELP

    Just got a new iMac 24" 2.8gig with Leopard. Most of the setup went fine, but the computer steadfastly refuses to see my printer over the wireless network. It is an HP Photosmart 2610.
    I have used the same printer wirelessly with a MacBook Pro with no problem -- it found it right away, though that was with Tiger (it still worked after it was upgraded to Leopard). It also works great with 3 Windows WP PC's, two wirelessly and one via ethernet.
    My Router is a Cisco 800 series and I use a Cisco WAP. The iMac had no problem connecting to the WAP and Internet.
    The core problem is the iMac doesn't acknowledge that the printer exists. It doesn't find it automatically and when I direct it to the correct IP is still doesn't find it. Also, Leopard doesn't seem to have the driver for it. When I search for drivers from the pull-down after entering the IP I get a bizillion HP options including many Photosmart's. But the lowest model # without a letter in front of it is the 3300.
    I then tried downloading the dirver from HP. It said it installed successfully but still didn't show the driver from the pull-down. When I tried used "other" and directing it straight to the driver it would act like nothing happened and come back to the same pull-down without the 2610 as a choice. I also tried installing HP's entire all-in-one software suite for 10.5. It installed sucessfully but also doesn't see the printer.
    I tried temporarily moving the iMac and connecting it to the 2610 via USB. It suddenly found it no problem -- both the iMac software and the HP software. And it worked fine... The moment it was back via network, it doesn't find it despite it still working fine from every other device in the household.
    Not sure what there is left to try. It is not an option to permanently have it connected by USB. I spoke with HP and they say that because it works from every other device. They say it is an Apple issue. Apple says it must be an HP driver issue points me back to HP. So I am left in limbo with no functional printing capacity.
    I've tried searching the Internet for any reports on this but can't find them. Others seem to be successfully using the 2610, though it is unclear if others were using it via the Network.
    Any help is greatly appreciated. I am beginning to wonder if HP ceased supporting the network functionality in their 10.5 driver update but I can't get an answer on this.
    Thanks.

    To be specific, since the Apple Printers and Faxes function does not find it in the "Default" list, I select "IP" and then enter the valid IP address that I know to be for the printer. I have tested it multiple times from other devices to confirm the IP address and even printed a network diagnostics page from the printer to confirm it. I even had someone else review it for typos just to cross every base...
    It then accepts it as a "valid" IP address and assigns it a "Generic Postscript Printer." I then chose the pull down for "other" drivers. I just checked again. There is no driver called "HP IP". There are hundreds of HP drivers those. I am looking for the HP Photosmart 2600 series. But the lowest series they list is the HP Photosmart 3100 series.
    Again, I have covered all the bases I can think of. The Apple site lists the 2600 series as an included driver in Leopard but it isn't showing up. The HP site lists the 2610 as "Leopard ready." I have downloaded and run the OX 10.5 HP 2600 series driver executable from HP and it says it was successful (tried several times). I also downloaded and installed the entire stupid 400-and-something MB software "all-in-one" software suite for the 2600 series from HP. You can run its own setup program indpependent of the Apple one and it doesn't find it either. When you enter the IP is says it found no printer and refuses to continue the setup. I have turned the printer on and off many times and checked all the connections. I have confirmed that the other PC's in the household are in fact seeing it at that IP...
    I have spoken with Apple Tech Support ("it must be an HP driver issue, sorry") and HP tech support ("it must be a problem with your Mac because it works for others... but perhaps we can sell you a new printer that should work better" (no kidding, they actually tried to do this!).
    On principle (and practical) grouns I am reluncant to get a new printer when the one I have works perfectly well for everything accept this Mac. But I am totally out of options unless someone can help.

  • This computer is no longer authorized message over and over- please help

    got a new laptop, tried to sync ipod touch and got message "this computer is no longer authorized".  when I hit authorize my husbands email comes up, rather than mine, it is his old itouch.  when I type in my email and password and hit authorize it says this computer is already authorized.  when I hit ok, it all starts over again......... "this computer is no longer authorized".  HELP!!!! what do I do?

    It's probably because you are trying to sync apps or songs that were downloaded with your Husbands account.  If you right click (Windows) or Control+click (Mac) and select Get Info it will display what acount it was downloaded under.
    If it was downloaded with your Husbands Apple ID, you won't be able to sync it to your device without entering his password.

  • JCheckBox/Action Listener help

    Hey
    I'm trying to make an applet with two tabs, a PurchasePanel and a StorePanel, and have data altered in one of them affect the data in the other. On the StorePanel, the data is input infields and through a ButtonListener command it is stored as both a String in a text field on the StorePanel, and as a check box on the PurchasePanel. Now, from the PurchasePanel I need to make an ActionListener function that when the CheckBoxes are pressed, some data is added to another textfield, and when it is unchecked the data is removed. I'm not sure I implemented the actionlistener correctly as the buttonlistener and the actionlistener commands aren't recognizing variables from each other. Any help is appreciated.
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.util.*;
    import java.awt.Container;
    import java.text.*;
    public class StorePanel extends JPanel
    private ArrayList compList;
    private PurchasePanel purchasePanel;
    private JLabel brandName, price, memory, cpuType, cpuSpeed, info;
    private JTextArea cpuInfo;
    private JTextField BTL, PTL, MTL, TTL, STL;
    private JPanel smallPanel, leftPanel, rightPanel, wholePanel;
    private JScrollPane scrollBox;
    public int counter = 0;
    public StorePanel(ArrayList compList, PurchasePanel pPanel)
    this.compList = compList;
    this.purchasePanel = pPanel;
    brandName = new JLabel("Brand Name ");
    price = new JLabel("Price");
    memory = new JLabel("Memory");
    cpuType = new JLabel("CPU Type");
    cpuSpeed = new JLabel("CPU Speed");
    BTL = new JTextField();
    PTL = new JTextField();
    MTL = new JTextField();
    TTL = new JTextField();
    STL = new JTextField();
    JPanel smallPanel = new JPanel();
    smallPanel.setLayout(new GridLayout(5,2));
    smallPanel.add(brandName);
    smallPanel.add(BTL);
    smallPanel.add(price);
    smallPanel.add(PTL);
    smallPanel.add(memory);
    smallPanel.add(MTL);
    smallPanel.add(cpuType);
    smallPanel.add(TTL);
    smallPanel.add(cpuSpeed);
    smallPanel.add(STL);
    // organize components here
    // here is an example
    JButton button1 = new JButton("Store");
    button1.setSize(1,1);
    button1.addActionListener(new ButtonListener());
    info = new JLabel("INFORMATION", SwingConstants.CENTER);
    leftPanel = new JPanel();
    leftPanel.setLayout(new BorderLayout());
    leftPanel.add(info,BorderLayout.NORTH);
    leftPanel.add(smallPanel,BorderLayout.CENTER);
    leftPanel.add(button1,BorderLayout.SOUTH);
    cpuInfo = new JTextArea("No Computer",19,27);
    scrollBox = new JScrollPane(cpuInfo);
    rightPanel = new JPanel();
    rightPanel.add(scrollBox);
    wholePanel = new JPanel();
    wholePanel.setLayout(new BorderLayout());
    wholePanel.add(leftPanel,BorderLayout.WEST);
    wholePanel.add(rightPanel,BorderLayout.EAST);
    this.add(wholePanel);
    private class ButtonListener implements ActionListener
         public void actionPerformed(ActionEvent event)
              String BN = BTL.getText();
              String P = PTL.getText();
              String M = MTL.getText();
              String CT = TTL.getText();
              String CS = STL.getText();
              String error = "";
              String enter = "";
              String computerString = "";
              int speed = 0;
              int memory = 0;
              double price = 0;
              String status = "Yes";
              String bPrice = "";
              JCheckBox computer;
              try
                   speed = Integer.parseInt(CS);
                   memory = Integer.parseInt(M);
                   price = Double.parseDouble(P);
              catch (NumberFormatException exception)
                   info.setText("Enter a number for Price, Memory, or Speed.");
                   info.setForeground(Color.red);
                   status = "No";
              if(BN.length() == 0 || P.length() == 0 || M.length() == 0 || CT.length() == 0 || CS.length() == 0)
                   error = "Please Enter All Fields.";
                   status = "Empty";
              if(status == "Yes" || status == "Empty")
              if(error == "Please Enter All Fields.")
                   info.setText(error);
                   info.setForeground(Color.red);
              else
                   DecimalFormat myFormatter = new DecimalFormat("0,000.00");
                   bPrice = myFormatter.format(price);
                   if(counter == 0)
                        cpuInfo.replaceRange("",0,11);
                   enter = "\nBrandName:\t\t" + BN + "\nCPU:\t\t" + CT + "," + speed
                                  + "HZ\nMemory:\t\t" + memory + "M\nprice:\t\t$" + bPrice + "\n";
                   info.setText("Computer Added.");
                   info.setForeground(Color.red);
                   cpuInfo.append(enter);
                   counter ++;
                   computer = new JCheckBox("BrandName:"+BN+"CPU:"+CT+","+speed+"HZMemory:"+memory+"Mprice:$"+bPrice);
                   computer.addItemListener(new PurchasePanel.CheckBoxListener());
                   purchasePanel.leftPane.add(computer);
                   compList.add(computer);
    public class PurchasePanel extends JPanel
    private ArrayList compList;
    private JLabel CTP, Filler;
    private JTextArea totalPrice;
    protected JPanel rightPane, leftPane;
    protected JSplitPane wholePane;
    private JScrollPane scrollPane;
    private JCheckBox checked;
    private double TP = 0.00;
    public PurchasePanel(ArrayList compList)
         this.compList = compList;
         // organize components for purchase panel
         CTP = new JLabel("Current Total Purchase");
         Filler = new JLabel(" ");
    totalPrice = new JTextArea("$" + TP,18,22);
    scrollPane = new JScrollPane(totalPrice);
         rightPane = new JPanel();
         rightPane.setLayout(new BorderLayout());
    rightPane.add(CTP, BorderLayout.CENTER);
         rightPane.add(scrollPane, BorderLayout.SOUTH);
         leftPane = new JPanel();
         leftPane.setLayout(new BoxLayout(leftPane, BoxLayout.Y_AXIS));
         leftPane.setSize(800,700);
         leftPane.add(Filler);
         wholePane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, leftPane, rightPane);
         this.add(wholePane);
    private class CheckBoxListener implements ItemListener
         public void itemStateChanged(ItemEvent event)
                   if(StorePanel.ButtonListener.computer.getStateChange() == ItemEvent.SELECTED)
                        TP = TP + 10.05;
    public class Assignment6 extends JApplet
    private int APPLET_WIDTH = 650, APPLET_HEIGHT = 350;
    private JTabbedPane tPane;
    private StorePanel storePanel;
    private PurchasePanel purchasePanel;
    private ArrayList computerList;
    //The method init initializes the Applet with a Pane with two tabs
    public void init()
         //list of computers to be used in every panel
         computerList = new ArrayList();
         //customer purchase panel uses the list of computers
         purchasePanel = new PurchasePanel(computerList);
         //store inventory panel uses the list of computers and also
         //established a connection with purchasePanel
    storePanel = new StorePanel(computerList, purchasePanel);
    //create a tabbed pane with two tabs
    tPane = new JTabbedPane();
    tPane.addTab("Store Inventory", storePanel);
    tPane.addTab("Customer Purchase", purchasePanel);
    getContentPane().add(tPane);
    setSize (APPLET_WIDTH, APPLET_HEIGHT); //set Applet size
    }

    If you pass along references to the appropriate panel to the Listeners, then they can update the right thing accordingly eg.
    // To enable the StorePanel to add/erase data from a textfield by listening to a checkbox in the PurchasePanel class
    // PurchasePanel class
    checked.addItemListener(new CheckBoxListener(storePanel));
    // CheckBoxListener class
    public void itemStateChanged(ItemEvent e) {
        // When checkbox checked
        if(checked)
            storePanel.writeToTextField("blahblah");
        else
            storePanel.writeToTextField("");
    }That was pseudocode of course! If you need the PurchasePanel to listen to the button in the StorePanel, you need to do the reverse.

  • HT2371 I started to set up new ipad, I accidentally selected portuguese although I want the ticked default english that showed on first screen. Localisation screen came up (in portuguese) but don't want to continue in portuguese. How to start over? Helpes

    Started set up on ipad. When I went to second screen, showing list of more language preferences I accidentally touched portuguese and this must have replaced the default, ticked, English option. Next screen, localisation, came up (in Portuguese) but I don't want to proceed in this language. how can I start over again. The ipad therefore is not set up with normal screen of apps etc. therefore I cannot change language back using this screen.
    I also tried to Restore my Ipad to factory settings via itunes. You must update to latest version of Ipad software as part of this. The download is about 1 GB and takes 3 hours. Unfortunately when I try this on my PC it installs half the download then drops it - I have tried 3 times and it drops it after an hour and a half each time. I am hoping therefore there might be some simple way of setting up ipad that does not involve 'Restore and Update'. Very frustrated. Please help. Stuck.

    If you press the home button it should come up with some options. One of them will be start over. Those options will be in the different language but you can try each one and via process of elimination eventually will get back tot the default screen.

  • Over limit - help with options

    I have a wedding dvd that is 4.59 GB so it's just a hair over the limit. I need it to be best quality for viewing - so the encoding is set right now at "Best Performance." I have menus at 780 MB (they have motion and audio - audion is only like 5 MB, motion I already reduced menu as a QT menu to play in background - it's only 21 MB, so that's not going to get me there by eliminating).
    I don't think I want to change quality of encoding - or is there a setting that is less that won't change viewing quality on DVD?
    Or, how many minutes do I need to cut? If I cut video, then how do I replace the video on iDVD. Everything is all set and customized, not a standard theme, so I don't want to redo. Would like to replace the movie for "Play movie" and will chapters all stay set pulling from the movie?
    ARGH - so close!
    Thanks for your help -
    Alexa

    Or, how many minutes do I need to cut?
    Did you check project info ? For example .....
    Click Here:
    If DL is supported on your Burner then you should be ok provided iDvd can see the settings for DL as opposed to SL.
    Burning to a DVD+R DL (Double Layer) disc
    Newer SuperDrive optical drives in Macintosh computers can burn discs in DVD+R DL (Double Layer) format. Double-layer discs store almost twice as much content as single-layer discs, making them a great choice for large projects.
    To see whether your computer’s SuperDrive can burn DVD+R DL discs, choose Project > Project Info. If you see 8.0 GB (Double Layer) in the DVD Type pop-up menu, you can use DVD+R DL discs for your project.
    To burn a project to a DVD+R DL disc:
    With the finished project open in iDVD, choose Project > Project Info and then choose Double Layer (DL) from the DVD Type pop-up menu.
    Select the encoder setting you want to use. If you have more than 120 minutes of content, select High Quality.
    Click the Burn button (shown below).
    When prompted, insert a DVD+R DL disc into the drive.
    You can use your internal SuperDrive or an external third-party drive.
    If the disc isn’t blank, iDVD asks whether you want to erase the disc.
    If your project is small enough to fit on a single-layer disc and you insert a double-layer disc, you see a dialog giving you the option to change the media type. You can cancel the burn and start again, or insert a single-layer disc and continue.
    You should always burn double-layer discs directly from iDVD and not from a disc image. Double-layer discs burned from a disc image may cause playback issues in some DVD players, such as freezing during playback.
    NOTE: After burning, to eject a disc from your computer’s internal disc drive, press the Media Eject key on your keyboard, if there is one. On keyboards with no Media Eject key, hold down the F12 key until the eject icon appears and your disc is ejected.
    Hope this helps but if not just come on back.

  • Color Filling Over Time Help

    Hello, I am working on an audio template. I am trying to make a waveform similar to the one you can see in Soundcloud. I've managed to program an expression to generate the waveform. But I am having an issue with filling up the waveform with a color with respect to time. For example, do you see on soundcloud how the waveform fills up orange as the song progresses? This is the concept I am trying to work on. Here is what I have so far:
    I want the blue bar to move to the right over time, but I only want the white parts of the waveform to turn blue as it progresses (the rest of the blue solid hidden). How would I go about doing this? My knowledge in After Effects is limited so any help is GREATLY appreciated! Thank you
    Please let me know if you need more information

    So just to clarify you are trying to create a levels representation for the duration of an audio file and not an animated audio frequency analysis. If that's what you're doing just pre-compose those hundreds of layers or nest the comp in your main comp and then use the track matte. If it were me I'd probably just import the audio layer into the comp, press the L key twice to reveal the audio wave form, press the ~ key to make the timeline full screen, expand the wave form, take a screenshot, add the screenshot to the comp, apply Keylight, then add a shape layer below the screenshot, set the screenshot as an inverted alpha track matte for the animated gradient and be done with it. This comp would be nested in my main comp to complete the effect.
    If I wanted a different look for the waveform I would edit the screenshot in Photoshop or use a Premiere Pro or any other program to capture a screenshot of the waveform. Since you've done all the work of creating your hundreds of layers I'd just pre-compose them all, drop a shape layer with an animated gradient below the pre-comp and set up the track matte.

Maybe you are looking for