Can't collapse treepath after setmodel method

Hi
I'm writing app client for my ejb modules. I have entity bean named Category, and I want navigate through them using JTree. Everything is ok, but when I add new category in my app, I'm refreshing JTree and I'm loosing my selection path - all nodes are collapsed. That's my code (only add method):
javax.swing.tree.TreePath treePath = categoryTree.getSelectionPath();
javax.swing.tree.DefaultMutableTreeNode treeNode = (javax.swing.tree.DefaultMutableTreeNode)categoryTree.getLastSelectedPathComponent();
CategoryTreeNode categoryTreeNode = (CategoryTreeNode)treeNode.getUserObject();
int categoryId = categoryTreeNode.categoryId;
if(categoryNameText.getText().length() == 0)
return;
new CategoryCreate(categoryId, categoryNameText.getText());
categoryTree.setModel(new CategoryTreeObject().jTree.getModel()); // here I acquire new jTree (with added node) and swap models in my jTree which is displayed
categoryTree.setSelectionPath(treePath);
categoryTree.expandPath(treePath); // should it work here?
Thanks,
Michael

Presumably when you create a new tree model it contains new DefaultMutableTreeNodes?
Since your selected path is defined by "old" tree nodes and your new model has "new" tree nodes the old path doesn't match a path in the new model.
I think DefaultMutableTreeNode doesn't use the user object to determine equality. If you're confident that your user object uniquely identifies the node then you could subclass DefaultMutableTreeNode to use that user object in its equals method.
Ideally you'd get your model to reload only the bit you're interested in (ie, mutate it - as the name suggests!).
Hope this helps.

Similar Messages

  • Why can I no longer, after having downloaded Lion, write accents and other diacriticals when in the Google, Yahoo, FaceBook, or even here in this post? The new method for getting at the "option" symbols works fine in other places like spotlight, but now e

    Why can I no longer, after having downloaded Lion, write accents and other diacriticals when in the Google, Yahoo, FaceBook, or even here in this post? The new method for getting at the "option" symbols works fine in other places like spotlight, but now even the older "option+letter" doesn't work in most places.

    Chrome doesn't support the new accent/diacritics/macron chooser. I'm not sure about other browsers such as Firefox. You can use the old Option+letter combination that Doug suggested. Hopefully updates will solve these little incompatibilities shortly.
    Neill

  • Can not refresh page after save properly(When not saving master record)

    I am using jdeveloper 11g R2 (11.1.2.3) JSF Facelet
    In some use case I have Address as master table and Person as detail table
    For some business reason I need to don't save same addresses
    eg:
    If +1 Test St+ is in database already and new user coming and adding this address with new person
    I need to use the row in database not creating a new address
    I do saving in doDML method of Address with some hashing algorithm and it is fine
    My problem is that I can not refresh page after save properly
    User coming to page think Adding a new address and a new person but in fact no new
    address added because of business I describe above
    Any ideas how I can implement this?
    Appreciate that
    Regards
    Mohsen

    Hi,
    from your description it is not clear why the page doesn't refresh. It could be a problem in your implementation code - who knows. What if you perform the address check on a command button that actually submits the new address? If the check returns true (address exists) you would call row.refresh(forget new row); and re-query the view object so the address coming from the database is displayed. If you wanted to use the doDML then yuou need to be aware that doDML doesn't help removing the row the user created. It just ignores the database update but the entity is still around, which in my suggested solution wont be the case.
    Frank

  • I can't update iPhoto after installing OSX 10.9.2, it has the name otto@**** in the apple ID box and will not let me change it. Any thoughts?

    Hello people,
    I can't update iPhoto after installing OSX 10.9.2, it has the name otto@**** in the apple ID box and will not let me change it. Any thoughts?
    Thanks
    <Email Edited By Host>

    You installed a hacked app, originally from the Mac App Store. It contains the receipt for a different app, downloaded using an account that you don't control. You need to identify and remove the hacked app.
    Important: The app you need to remove is not necessarily the one named in the App Store alert. For example, the App Store may prompt you to update "Angry Birds" or "Twitter," but the hacked app may be something else entirely. Don't make any assumptions about which app you're looking for. To find it, you must carry out a systematic search with Spotlight.
    1. Triple-click anywhere in the line of text below on this page to select it:
    kMDItemAppStoreHasReceipt=1
    Copy the selected text to the Clipboard by pressing the key combination command-C.
    2. In the Finder, press command-F to open a search window, or select
    File ▹ Find
    from the menu bar. In the search window, select
    Search: This Mac
    from the row of tokens below the toolbar. Below that is a popup menu of search criteria, initially showing Kind. From that menu, select
    Other...
    A sheet will drop down. In that sheet, select
    Raw Query
    as the criterion, then click OK or press return.
    Now there will be a text box to the right of the menu of search criteria. That's where you enter the raw search query. Click in that box and paste the text you copied earlier by pressing command-V.
    4. The search window will now show all the App Store products that are installed. Compare those search results with the list of your purchases from the App Store. To see the complete list, you may need to unhide hidden purchases. If any apps were download from the App Store using other Apple ID accounts that you control, sign in to the store under each of those ID's and check the purchases.
    At least one of the apps in the Spotlight search results is not among your purchases in the App Store. Move each such item to the Trash, after quitting it if it's running. You may be prompted for your administrator password. Empty the Trash.
    Quit and relaunch the App Store. Test.
    If you find these instructions confusing, ask for an alternative method.

  • I am part of a family sharing setup.  Can I have my own payment method so the organizer does not get charged for my purchases?

    I am part of a family sharing setup.  Can I have my own payment method so the organizer does not get charged for my purchases?  If so, how do I set this up?

    Yes.  Just redeem gift cards so that your own account always has a sufficient credit balance.  Here is how it works:
    Family purchases and payments
    After you set up your family, any time a family member initiates a new purchase it will be billed directly to your account unless that family member has gift or store credit. First, their store credit will be used to pay the partial or total bill. The remainder will bill to the family organizer's card.

  • Can you do anything after sendRedirect()

    I'm not able to test this myself as I don't have a development environment set up, but this is my question.
    Is it possible to do anything after a call to sendRedirect(), e.g. setting cookies, additional checking? The javadocs say that if the response has been committed, this method throws an IllegalStateException. Is it possible to do anything after a call to sendRedirect(), such as writing to a response, adding cookies?
    Here is some code which may explain my question:
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              String username = request.getParameter(USER_ID);
              response.sendRedirect(anotherUrl);
                                              // is this even possible????
              response.addCookie(new Cookie("Login", "true"));
         }

    I just tested this with the following code:
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    Cookie[] cookies = request.getCookies();
              for(int i = 0; i < cookies.length; i++) {
                   Cookie c = cookies;
                   LOGGER.info("Cookie: " + c.getName() + ", " + c.getValue());
    response.sendRedirect(someURL());
    response.addCookie(new Cookie("Login", "true"));
    Basically it will print all cookies in the request. On the first doPost, it does the redirect before adding the Login cookie. On subsequent doPost's the Login cookie was not printed out, the only cookie I found was the JSESSIONID, which was expected. So you can't set cookies after a redirect.

  • Can't Start Portal After Install

    After downloading and installing the of evaluation Portal 4.0 SP1, I get the following message upon startup when I enter the system password that I entered during installation:
    Starting WebLogic Server ....
    The WebLogic Server did not start up properly.
    Exception raised:
    java.lang.IllegalAccessError: try to access method weblogic/management/internal/
    Helper.preloadMBeanInfos()V from class weblogic/management/Admin
    at weblogic.management.Admin.initialize(Admin.java:210)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:362)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:202)
    at weblogic.Server.main(Server.java:35)
    Reason: Fatal initialization exception
    I even tried "weblogic" for the system password and I get the same message.
    What password should I use to start the server?

    I've followed the directions and am experiencing the exact same problem. Brand
    new installation of Weblogic server 6.1 SP2 with examples. That install is working.
    Then added Portal 4.0 SP1, updated the license file and I have the same issue
    with the Illegal access exception resulting in the "Fatal initialization exception"....
    Hmm!
    [email protected] (Bowrat) wrote:
    Below listed are the common errors you run into during installation
    process:
    - You need to have the correct version numbers of both the weblogic
    server and the portal server. For instance the portal server 4.0 (eval
    copy) will only run on WebLogic 6.1 SP1. So check the edocs for
    supported platforms
    - Make sure you have the installed the full version of the weblogic
    server (including examples)
    - Finally, you need to run the UpdateLicense.cmd file to update the
    license.bea under ur Bea Root
    Give it a shot after u have checked all of the above three - goodluck
    - Bowrat
    www.Bowstreet.com
    Steve Anderson <[email protected]> wrote in message news:<[email protected]>...
    From: Steve Anderson <[email protected]>
    Newsgroups: weblogic.support.install
    Subject: Can't Start Portal After Install
    References:
    NNTP-Posting-Host: 209.11.114.150
    X-Original-NNTP-Posting-Host: 209.11.114.150
    Message-ID: <[email protected]>
    Date: 13 Feb 2002 20:25:53 -0800
    X-Trace: 13 Feb 2002 20:25:53 -0800, 209.11.114.150
    Organization: BEA SYSTEMS Inc
    Lines: 18
    XPident: firewall-user
    Path: newsgroups.bea.com!209.11.114.150
    Xref: newsgroups.bea.com weblogic.support.install:9600
    After downloading and installing the of evaluation Portal 4.0 SP1,I get the following message upon startup when I enter the system password
    that I entered during installation:
    Starting WebLogic Server ....
    The WebLogic Server did not start up properly.
    Exception raised:
    java.lang.IllegalAccessError: try to access method weblogic/management/internal/
    Helper.preloadMBeanInfos()V from class weblogic/management/Admin
    at weblogic.management.Admin.initialize(Admin.java:210)
    at weblogic.t3.srvr.T3Srvr.initialize(T3Srvr.java:362)
    at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:202)
    at weblogic.Server.main(Server.java:35)
    Reason: Fatal initialization exception
    I even tried "weblogic" for the system password and I get the samemessage.
    What password should I use to start the server?

  • 60 Second Delays in Client Getting Entity Bean (after finder method)

    I am running WLS5.1 with SP10. I have a stateless EJB that gets a
    read-write BMP entity EJB. My test client that executes the stateless
    session bean periodically encounters long delays (60 seconds or more)
    when acquiring the entity bean using its finder method. Logging shows
    the finder method is executing properly, and typically takes 180 ms to
    locate the entity bean; however, from the stateless session beans side,
    it appears to take 60 seconds. The test client is only a single thread,
    so I know the pool is not depleted, or anything like that. Something
    appears to be going haywire with the container.
    Does anybody have an idea what might be going on?
    Thanks.
    Greg

    Hi Greg,
    On a whim, I tried the same test with the thin driver, and the same
    delay occurred. This time, instead of a rollback being at the top ofthe
    thread dump stack trace, it was in some other Oracle call, with the
    top of the stack trace being a socketreader.are you using MTS? Is the db-server a SMP-box? Which exact patch level
    does your Oracle instance have? If yes, can you try to force a dedicated
    server connection and see if the problem disappears? I guess for an OCI
    connection you will have to edit tnsnames.ora, for a
    thin-driver-connection you would have to modify the connect string to
    something like this:
    jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOS
    T=<dnsname>)(PORT=1521)))(CONNECT_DATA=(SID=<your
    sid>)(SERVER=DEDICATED))))
    There is a bug in 8.1.6.0 which is supposed to be fixed in 8.1.6.3, but
    I can still reproduce it in 9i :-(. It makes the MTS-dispatcher hang for
    60 seconds if you have an SMP box with low load, so maybe this could be
    your problem.
    Daniel
    -----Original Message-----
    From: Greg Crider [mailto:[email protected]]
    Posted At: Wednesday, November 28, 2001 8:17 AM
    Posted To: ejb
    Conversation: 60 Second Delays in Client Getting Entity Bean (after
    finder method)
    Subject: Re: 60 Second Delays in Client Getting Entity Bean (after
    finder method)
    My client has been using OCI in production and development
    with JTS for
    over a year now without a problem. We went to OCI because
    there was some
    other problem with the thin driver. I'm not sure what the
    problem was,
    but Oracle acknowledged it, but said it wouldn't be corrected until
    Oracle 9i came out. We're still using 8.1.6, so from what I'm
    told, we
    don't use the thin driver.
    On a whim, I tried the same test with the thin driver, and the same
    delay occurred. This time, instead of a rollback being at the
    top of the
    thread dump stack trace, it was in some other Oracle call, with the
    top of the stack trace being a socketreader.
    Somebody else suggested that there may be a problem with
    transactions.
    Does this ring a bell? Again, I have a stateless session bean
    invoking a
    read-write entity bean, invoking a read-only entity bean. From
    everything I read, including weblogic docs, I should just rely on my
    deployment descriptor to control transactions and stay away from JTA.
    Hi Greg,
    I remeber long ago there were an issue with jts/oci driver combination
    when the connections were opened but never used...
    Buy the way, are there any specific reasons to use OCI instead of
    thin driver?
    "Greg Crider" <[email protected]> wrote in message
    news:[email protected]...
    I know. That's what I don't get. BTW Slava, I am using the
    latest OCI
    driver; thanks for the suggestion. I tried tweaking some of the Solaris
    kernel settings as relates to TCP, but that didn't clear up the problem
    either; however, it did change the frequency. Modifying the retransmit
    settings (very small values, sub 1.5 seconds) seemed to make it occur
    less frequently.
    It seems like its time for me to contact BEA Support and see what they
    can turn up. Thanks for the suggestions. If anybody else has an idea,
    let me know. I'm betting this is a simple, stupid config problem. I'll
    post back here when I find out what's up.
    But for some reason WebLogic code called the rollback:
    ... rollback
    at
    weblogic.jdbc.common.internal.ConnectionEnv.cleanup(Connection
    Env.java:499)
    at
    weblogic.jdbc.common.internal.ConnectionEnv.destroy(Connection
    Env.java:417)
    at
    weblogic.jdbc.common.internal.ConnectionEnv.destroy(Connection
    Env.java:393)
    at weblogic.jdbcbase.jts.Connection.close(Connection.java:274)
    at weblogic.jdbcbase.jts.Connection.commit(Connection.java:530)
    at
    weblogic.jdbcbase.jts.TxConnection.commitOnePhase(TxConnection
    .java:55)
    at
    weblogic.jts.internal.CoordinatorImpl.commitSecondPhase(Coordi
    natorImpl.java
    :484)
    at
    weblogic.jts.internal.CoordinatorImpl.commit(CoordinatorImpl.java:383)
    at weblogic.jts.internal.TxContext.commit(TxContext.java:255)
    Slava Imeshev <[email protected]> wrote:
    Hi Greg,
    Which version of OCI driver do you use? OCI driver proved to be
    not that stable as the thin driver. Could you try to download
    and to install the latest version of the OCI driver and
    let us know
    if it helps?
    Regards,
    Slava Imeshev
    [email protected]
    "Greg Crider" <[email protected]> wrote in message
    news:[email protected]...
    Yup, get fresh connection from the db connection pool,
    and close it
    >when
    I'm done. The logs don't indicate that I've ever exhausted the
    connection pool.
    It's interesting to note these problems are occurring on
    Solaris with
    Oracle OCI connections. Running the same code under Linux with thin
    driver connections works just fine.
    Weird. Do you obtain database connection from a
    datasource and close
    >it
    every time
    you use it?
    Greg Crider <[email protected]> wrote:
    Okay, this appears to be the offending thread. As it
    turns out, the
    >same
    behavior as first described in my initial post, is
    occurring this
    >time
    in the
    business method of the entity bean, as opposed to the
    finder. The
    getNextURL() is the business method in this case. I am using BMP, and
    the
    ejbLoad() and ejbStore() methods are not throwing any
    SQLExceptions.
    Also, I
    don't see anything in the error logs that indicate a
    EJB transaction
    failure.
    This being the case, why would an Oracle rollback be
    attempted? Am I
    misinterpretting this stack trace?
    "ExecuteThread-67" daemon prio=5 tid=0x14e300 nid=0x51 runnable
    [0xe7880000..0xe7881a30]
    at oracle.jdbc.oci8.OCIDBAccess.do_rollback(Native Method)
    at oracle.jdbc.oci8.OCIDBAccess.rollback(OCIDBAccess.java:417)
    at
    oracle.jdbc.driver.OracleConnection.rollback(OracleConnection.java:510)
    at
    weblogic.jdbc.common.internal.ConnectionEnv.cleanup(ConnectionEnv.java:4
    >99
    at
    weblogic.jdbc.common.internal.ConnectionEnv.destroy(Conne
    ctionEnv.java:4
    >17
    at
    weblogic.jdbc.common.internal.ConnectionEnv.destroy(Conne
    ctionEnv.java:3
    >93
    at weblogic.jdbcbase.jts.Connection.close(Connection.java:274)
    at weblogic.jdbcbase.jts.Connection.commit(Connection.java:530)
    at
    weblogic.jdbcbase.jts.TxConnection.commitOnePhase(TxConnec
    tion.java:55)
    at
    weblogic.jts.internal.CoordinatorImpl.commitSecondPhase(CoordinatorImpl.
    >ja
    va:484)
    at
    weblogic.jts.internal.CoordinatorImpl.commit(CoordinatorIm
    pl.java:383)
    at weblogic.jts.internal.TxContext.commit(TxContext.java:255)
    at
    weblogic.ejb.internal.StatefulEJBObject.postInvokeOurTx(StatefulEJBObjec
    >t.
    java:320)
    at
    weblogic.ejb.internal.BaseEJBObject.postInvoke(BaseEJBObje
    ct.java:845)
    at
    com.pi.speechport.ETO.LoadShare.ETOLoadShareEJBEOImpl.getNextURL(ETOLoad
    >Sh
    areEJBEOImpl.java:114)
    at
    com.pi.speechport.ETO.Transcription.ETOTranscriptionBusin
    ess.getVendorUR
    >L(
    ETOTranscriptionBusiness.java:146)
    at
    com.pi.speechport.ETO.Transcription.ETOTranscriptionBusin
    ess.transcribe(
    >ET
    OTranscriptionBusiness.java:193)
    at
    com.pi.speechport.ETO.Transcription.ETOTranscriptionEJBEO
    Impl.transcribe
    >(E
    TOTranscriptionEJBEOImpl.java:188)
    at
    com.pi.speechport.ETO.Transcription.ETOTranscriptionEJBEO
    Impl_WLSkel.inv
    >ok
    e(ETOTranscriptionEJBEOImpl_WLSkel.java:223)
    at
    weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(B
    asicServerObjec
    >tA
    dapter.java:347)
    at
    weblogic.rmi.extensions.BasicRequestHandler.handleRequest
    (BasicRequestHa
    >nd
    ler.java:86)
    at
    weblogic.rmi.internal.BasicExecuteRequest.execute(BasicEx
    ecuteRequest.ja
    >va
    :15)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
    Dimitri Rakitine wrote:
    Make a thread dump during these 60 seconds to see
    what server is
    >doing.
    Greg Crider <[email protected]> wrote:
    I am running WLS5.1 with SP10. I have a stateless
    EJB that gets a
    read-write BMP entity EJB. My test client that executes the
    stateless
    session bean periodically encounters long delays (60
    seconds or
    >more)
    when acquiring the entity bean using its finder
    method. Logging
    >shows
    the finder method is executing properly, and
    typically takes 180 ms
    >to
    locate the entity bean; however, from the stateless
    session beans
    side,
    it appears to take 60 seconds. The test client is
    only a single
    thread,
    so I know the pool is not depleted, or anything like that.
    Something
    appears to be going haywire with the container.
    Does anybody have an idea what might be going on?
    Thanks.
    Greg
    Dimitri
    Greg
    >__
    GREGORY K. CRIDER, Emerging Digital Concepts
    Systems Integration/Enterprise Solutions/Web &
    Telephony Integration
    (e-mail) [email protected]
    (web) http://www.EmergingDigital.com
    (voicemail) 866-474-4147
    (phone) 703-335-0974
    (cell) 703-851-5073
    (fax) 703-365-0223

  • Can not access BIOS after update BIOS

    Can not access BIOS after update X220 BIOS to version 1.19
    Type: 4290-R32
    BIOS: 1.19
    http://download.lenovo.com/ibmdl/pub/pc/pccbbs/mobiles/8duj09uc.txt
    http://download.lenovo.com/ibmdl/pub/pc/pccbbs/mobiles/8duj09uc.iso
    Ask google and try anyway but not work
    - Press ThinkVantage, Press F1, Press Fn+F1
    - Power off, unplug AC, unplug battery, wait 15 miniute, try all again
    - Try to update BIOS again

    That is really weird.
    When you are in Windows, can you test and see if the F1 key is working? If it is working. Shut down the laptop then boot it back up. At the Thinkpad screen, keep spamming the F1 key and see if you are able to boot into BIOS.
    //JameZ
    Check out the Community Knowledge Base for hints and tips.
    Did someone help you today? Press the star on the left to thank them with a Kudo!
    If you find a post helpful and it answers your question, please mark it as an "Accepted Solution"!
    X240 | 8GB RAM | 512GB Samsung SSD

  • I have a 3gs and just updated my ios from 4.1 to 6.1.  But I can't activate it after the upgrade. heeeeelp!

    I have a 3gs and just updated my ios from 4.1 to 6.1. But I can't activate it after the upgrade. what to do?

    joycesalvador wrote:
    ... But I can't activate it after the upgrade. what to do?
    See this discussion.
    https://discussions.apple.com/message/21189708

  • I can't use firefox after upgrading to 4.0. I get the message I have to restart my computer for upgrading, but ik doesn't start. I get the message over and over

    I can't open firefox after upgrading to 4.0
    I get the message over and over again that i have to restart my computer for upgrading to firefox.
    I tried new installation. But i got problems on all my accounts

    Start your '''Computer''' in safe mode. Then start Firefox. Try '''Safe''' web sites.
    Starting The Computer In Safe Mode;
    If running, turn your computer off.
    Remove any disks and thumb drives that are in your hard drives or ports.
    Now start your computer but also;
    '''Windows; '''Press the <F8> key repeatedly.
    '''Mac: '''Hold down the Shift key.
    '''Linux; '''Using the command line, Linux/Unix computers can be booted
    into various run levels that determine which resources are loaded.
    For example, "runlevel 1" is typically the equivalent to Windows and
    Mac safe modes.
    * Source; '''[http://encyclopedia2.thefreedictionary.com/Linux+Safe+Mode Safe Mode; Free Online Encyclopedia]'''
    When the '''Boot''' menu is displayed, release the key you were pressing.
    You must now choose what mode to use. The most used are;
    * Safe Mode; The computer runs with only a minimum set of programs.
    * Safe Mode '''With '''Networking; Same as above, but with internet access.

  • Can't update apps after upgrading to iOS 8 on ipad air

    can't update apps after updating to iOS 8 on iPad air

    There are 2 ways to fix the issue:
    1) Disable mod_spdy
    2) Push Apple to fix Safari 8, b/c the problem exists in both iOS and desktop versions

  • Can't launch color after upgrading to OS 10.5

    I can't launch color after upgrading to OS 10.5. The message shows " Unable to initialize OpenGL. Make sure Video Desktop is disable." Can anyone help please?

    Click here and follow the instructions.
    (46092)

  • Can´t open LR after upgrade to 5.3 without entering a licens key

    Can´t open LR after upgrade to 5.3 without entering a licens key

    I have seen comments from someone who indicated that every time they started Lightroom they were prompted for the serial number, even though they had already entered it. Is this your situation? I can't remember what the solution is, but I have seen that problem mentioned in the past.

  • Can't open iphoto after complete reboot.

    Hi!
    My computer stoped working a while back and I had the harddrive replaced, now I can't open iphoto after importing it from time mashine. I still have the same OS X (10.6.8) on a Mac Book pro from 2009. I can't buy the new one, or update it, because my OS X is too old and after seeing all the problems with the new system I don't really want to install it. How do I make iphoto work again? When I try to open it, it just says it can't open because of a problem (no, really?).

    Is there a crash report?  Have you tried reinstalling it?
    To re-install iPhoto
    1. Put the iPhoto.app in the trash (Drag it from your Applications Folder to the trash)
    2. Download it from the App Store to reinstall It's on your Purchases List* there.
    For older versions that have been installed from Disk you'll need these additional steps:
    2a: On 10.5:  Go to HD/Library/Receipts and remove any pkg file there with iPhoto in the name.
    2b: On 10.6: Those receipts may be found as follows:  In the Finder use the Go menu and select Go To Folder. In the resulting window type
    /var/db/receipts/
    2c: on 10.7 or later they're at
    /private/var/db/receipts
    A Finder Window will open at that location and you can remove the iPhoto pkg files.
    3. Re-install.
    If you purchased an iLife Disk, then iPhoto is on it.
    If iPhoto was installed on your Mac when you go it then it’s on the System Restore disks that came with your Mac. Insert the first one and opt to ‘Install Bundled Applications Only.
    *Sometimes iPhoto is not visible on the Purchases List. it may be hidden. See this article for details on how to unhide it.
    http://support.apple.com/kb/HT4928
    One question often asked: Will I lose my Photos if I reinstall?
    iPhoto the application and the iPhoto Library are two different parts of the iPhoto programme. So, reinstalling the app should not affect the Library. BUT you should always have a back up before doing this kind of work. Always.

Maybe you are looking for

  • HT202079 Why does the Belkin 4K Mini DisplayPort to HDMI Adapter not make sound on the tv?

    I connected my cable to my tv and it displays on the tv just fine but no sound comes from the tv only the laptop. What do i need to do?

  • Adding Record in a MDM table using Java APIs

    While inserting records in a table, we have to make sure that if there is any field of type lookup, particular value entered is either present in the lookuptable or we insert in the lookup table. two questions/clarifications 1.     if there are more

  • ICloud restoring slowly

    I am changing over from an iPhone 4 to 5 and the backup from the iCloud is taking an extremely long time. I can perform basic functions on the phone but all the apps are still being downloaded.  THey each have the blue progress bar underneath and hav

  • FIM Portal in High Availability Installation

    Hi Team, I am working on something and trying to perform HA in FIM. Below is my current system: 1) server A and B for SQL DB. 2) Server C and D for FIM Portal. 3) Server E for FIM Service. 4) Server F For FIMSync Service. Steps I have performed: Inst

  • Trouble locating receipt number on purchase

    I recently purchased a computer monitor from Best Buy and was looking to register it with the manufacturer (AOC). At their product registration page, an "Invoice/Receipt Number" is needed. I am having trouble locating this on my receipt. Help would b