• 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: Two arrays sharing the same adress space.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Two arrays sharing the same adress space.


  • Subject: Re: Two arrays sharing the same adress space.
  • From: Sandro Noel <email@hidden>
  • Date: Mon, 17 Nov 2008 00:16:15 -0500

I'm actually checking here in this function.

- (IBAction)mountSomeServers:(id)sender
{

	NSDictionary *mountDictionary;

	mountDictionary = [NSDictionary dictionaryWithObjectsAndKeys:
					   [server stringValue], ServerNameKey,
					   [share stringValue], VolumeNameKey,
					   [type title], TransportNameKey,
					   @"", MountDirectoryKey,
					   [user stringValue], UserNameKey,
					   [password stringValue], PasswordKey,
					   [NSNumber numberWithBool:YES], AsyncKey, NULL];
	[mounts addObject:mountDictionary];

this is the only place where objects are being added to the mount array.

I checked the init function and as soon as the bonjourServices array is initialized witch is after the mounts array
it is assigned the same pointer as the mounts array, and from what i can deduce it's because the mounts array is empty
at the time, because the file it is trying to load does not exist yet.


I'm just guessing here, I've never encountered that kind of problem in 17 years of programing in any language.
mind you i'm quite new to cocoa, but i did not face that problem in any of my other cocoa programs.


Sandro Noel.

On 17-Nov-08, at 12:04 AM, Scott Ribe wrote:

This is a debug built, and I'm checking in the code where mounts is
being assigned objects

Which, if I recall correctly, is before bonjourServices is allocated. What
do you think the problem is?


--
Scott Ribe
email@hidden
http://www.killerbytes.com/
(303) 722-0567 voice



_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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: Two arrays sharing the same adress space.
      • From: Charles Steinman <email@hidden>
References: 
 >Re: Two arrays sharing the same adress space. (From: Scott Ribe <email@hidden>)

  • Prev by Date: Re: Two arrays sharing the same adress space.
  • Next by Date: Re: Two arrays sharing the same adress space.
  • Previous by thread: Re: Two arrays sharing the same adress space.
  • Next by thread: Re: Two arrays sharing the same adress space.
  • Index(es):
    • Date
    • Thread