• 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
Re: Help with my stream object please
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with my stream object please


  • Subject: Re: Help with my stream object please
  • From: Will Mason <email@hidden>
  • Date: Mon, 10 Oct 2005 09:01:54 -0700 (PDT)

To answer your question, yes. The variables you've declared are globals, and therefore not connected to any instance of your class, but to every instance of your class and to every instance of every other class and to every other piece of code in your app for that matter. Instance variables must be declared in the class' interface.

 Will

----- Original Message ----
From: Mark Williams <email@hidden>
To: CocoaDev list <email@hidden>
Sent: Mon Oct 10 10:44:29 2005
Subject: Re: Help with my stream object please

The downloader class is actually about 10 pages long printed so it's
too big to post here.
I have a questions. Ok I did not declare most of my variables in the
header file. I declared them at the top of the class file before the
@implementation line. Is this why they are being shared between
instances?

Mark.

On Oct 10, 2005, at 4:59 AM, Cameron Hayne wrote:

> On 10-Oct-05, at 1:23 AM, Mark Williams wrote:
>
>
>> Ok, well I'm at my wits end. No matter what I do my downloader
>> class seems to share it's variables with all instances of itself.
>> Does any one here know much A about streams, and B would maybe be
>> willing to take a look at my downloader to see what I am doing wrong.
>>
>
> I doubt very much that the problem has anything to do specifically
> with streams. It's almost certainly a more fundamental issue - e.g.
> you have global variables that are causing the problem, or some Obj-
> C object is getting released too early, etc.
> As I suggested earlier, carefully proceeding step by step through
> your code in the debugger will show you the problem.
>
> But I think I recall that you reported problems in using the
> debugger - if so, you should concentrate instead on fixing that
> problem first. Try it with a simple "Hello World" problem, then try
> some of Apple's sample projects, etc.
>
> And if the code isn't too long, why not just post it here?
>
> --
> Cameron Hayne
> email@hidden
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> 40fornextsoft.com
>
> This email sent to email@hidden
>
>
>

 _______________________________________________
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



 _______________________________________________
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

References: 
 >Re: Help with my stream object please (From: Mark Williams <email@hidden>)

  • Prev by Date: Re: Help with my stream object please
  • Next by Date: Re: Help with my stream object please
  • Previous by thread: Re: Help with my stream object please
  • Next by thread: Re: Help with my stream object please
  • Index(es):
    • Date
    • Thread