• 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
Problems with objects getting crossed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems with objects getting crossed


  • Subject: Problems with objects getting crossed
  • From: Mark Williams <email@hidden>
  • Date: Wed, 5 Oct 2005 08:51:25 -0700

I am writing an app that should have multiple download streams available. The problem i am having is that the downloader is getting crossed up some how.
If you open a stream the app works great. But if you open a second stream suddenly both objects start getting modified in both streams so let me explain the structure.
First I have a data stream class that handles all the transport.
Next I have a downloader.
In the main controller when you click download it initializes a new downloader object on a new thread loading it's own nib file. The controller then passes the server and file info to the downloader which begins the download after initializing it's own stream object. That works perfectly. BUT if you start a second download then suddenly the status flags get crossed and if you click cancel on the second window the first stream is canceled and you cannot cancel the second stream. The thing is the program keeps a log of it's transport interactions and it clearly shows two distinct streams are open. So how is it then that the two are acting as if a single item has been opened. Both the stream and downloader are NSObject subclasses but I've tried them as NSDocument also, which does not work. I thought the point of object oriented programing was to be able to do this type of thing, so I know it has to be me, does any one know what I might be missing?


Thanks
Mark.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Problems with objects getting crossed
      • From: Pete Yandell <email@hidden>
    • Re: Problems with objects getting crossed
      • From: Cameron Hayne <email@hidden>
  • Prev by Date: Re: newbie interface problem
  • Next by Date: theme files
  • Previous by thread: Re: No Reference to Table Column
  • Next by thread: Re: Problems with objects getting crossed
  • Index(es):
    • Date
    • Thread