• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
GUI Responsiveness with a Network Resource
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GUI Responsiveness with a Network Resource


  • Subject: GUI Responsiveness with a Network Resource
  • From: Stephen Gerstacker <email@hidden>
  • Date: Mon, 21 May 2007 19:28:12 -0400

I have a cocoa app that displays a list of pictures which are stored
across the network.  The images a received via XML-RPC.  If I click on
an item in the list, my Cocoa app:

1. Shows a spinning progress indicator
2. Sets up an XML-RPC call
3. Invokes the call in a new thread
4. The callback function puts the image in an ImageView
5. The progress indicator is stopped.

This works great, until I click on two list items in a row.  This causes
a race condition and eventually seg faults the program.

I tried adding an NSLock that locks before the call is made and unlocks
after the picture is shown.  This kind of works, until I click three
items in a row, which causes the GUI to hang.

So what would be the best way to handle this situation?

Please note: I come from a Windows/Linux world.  Cocoa development has
been very different for me.  Toolbar validation and ListView populations
have been very confusing, followed by very big 'Ah Ha!' moments.

- Stephen
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: GUI Responsiveness with a Network Resource
      • From: Chris Suter <email@hidden>
  • Prev by Date: Re: Mouse position from NSEvent starts at (0, 1) ?
  • Next by Date: Re: GUI Responsiveness with a Network Resource
  • Previous by thread: Re: Opening Drawers to given size
  • Next by thread: Re: GUI Responsiveness with a Network Resource
  • Index(es):
    • Date
    • Thread