On Nov 17, 2008, at 10:01 AM, Scott Ribe wrote:
Mounts is being used, but just not in the init function.
You have declared it as a local variable. It *cannot* be used
elsewhere.
I suspect that you have also declared it as a member (attribute,
property,
whatever) and expect that you're ass
Thank you all, for taking the time to explain the workings this was
very instructive and very apreciated!!!
Thank you
Sandro Noel.
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the
> Mounts is being used, but just not in the init function.
You have declared it as a local variable. It *cannot* be used elsewhere.
I suspect that you have also declared it as a member (attribute, property,
whatever) and expect that you're assigning to that, but the local variable
will shadow tha
On Nov 17, 2008, at 1:18 AM, Kyle Sluder wrote:
On Mon, Nov 17, 2008 at 1:03 AM, Stephen J. Butler
<[EMAIL PROTECTED]> wrote:
2) always use the value returned from an init* method.
This isn't strictly necessary. If you need a singleton object that
lives for the duration of your app, for examp
On Nov 17, 2008, at 1:03 AM, Stephen J. Butler wrote:
On Sun, Nov 16, 2008 at 11:52 PM, Sandro Noel <[EMAIL PROTECTED]>
wrote:
as it turns out. with the bug fixed the mounts array is left null
because
the file does not exist yet.
so further in the program is i try to add to the array, nothing
On Mon, Nov 17, 2008 at 12:02 AM, Sandro Noel <[EMAIL PROTECTED]> wrote:
> NSFileManager *fileManager;
>fileManager = [NSFileManager defaultManager];
>if ( [fileManager fileExistsAtPath:[[self
> applicationSupportFolder] stringByAppendingPathComponent:@"Bonjour
> Mou
On Mon, Nov 17, 2008 at 1:03 AM, Stephen J. Butler
<[EMAIL PROTECTED]> wrote:
> 2) always use the value returned from an init* method.
This isn't strictly necessary. If you need a singleton object that
lives for the duration of your app, for example, there's no reason you
can't just alloc/init on
On Sun, Nov 16, 2008 at 11:52 PM, Sandro Noel <[EMAIL PROTECTED]> wrote:
> as it turns out. with the bug fixed the mounts array is left null because
> the file does not exist yet.
> so further in the program is i try to add to the array, nothing happens.
>
> and if i try "mounts = [[NSMutableArray
you fixed the [mounts initWithContentsOfFile:...] bug and it
still happens?
Cheers,
Chuck
- Original Message
From: Sandro Noel <[EMAIL PROTECTED]>
To: Scott Ribe <[EMAIL PROTECTED]>
Cc: cocoa-dev@lists.apple.com
Sent: Sunday, November 16, 2008 9:16:15 PM
Subject:
File:...] bug and it
still happens?
Cheers,
Chuck
- Original Message
From: Sandro Noel <[EMAIL PROTECTED]>
To: Scott Ribe <[EMAIL PROTECTED]>
Cc: cocoa-dev@lists.apple.com
Sent: Sunday, November 16, 2008 9:16:15 PM
Subject: Re: Two arrays sharing the same adress space.
I&
9:16:15 PM
> Subject: Re: Two arrays sharing the same adress space.
>
> I'm actually checking here in this function.
>
> - (IBAction)mountSomeServers:(id)sender
> {
>
> NSDictionary *mountDictionary;
>
> mountDictionary = [NSDictionary dictionaryWithO
I'm actually checking here in this function.
- (IBAction)mountSomeServers:(id)sender
{
NSDictionary *mountDictionary;
mountDictionary = [NSDictionary dictionaryWithObjectsAndKeys:
[server stringValue], ServerNameKey,
> 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 PROTECTED]
http://www.killerbytes.com/
(303) 722-0567 voice
__
Forgot to answer the first question.
This is a debug built, and I'm checking in the code where mounts is
being assigned objects
I have not enabled any optimization that I know of ...
Sandro Noel.
On 16-Nov-08, at 11:37 PM, Scott Ribe wrote:
At what point in the code are you checking? Is th
Scott.
thank you for your explanation.
Mounts is being used, but just not in the init function.
it is being used later in the code.
that is why i was geting confused because the 2 arrays, are not meant
to hold the same type of data.
and right now, they contain mixed data type.
witch makes m
At what point in the code are you checking? Is this a release build, or a
debug build in which you've gone & enabled some optimizations?
In the code you posted mounts is init'd (twice actually, which is
unecessary), then never used. It's perfectly possible that the two variables
mounts & bonjourSe
On Nov 16, 2008, at 8:22 PM, Sandro Noel wrote:
mounts = [[NSMutableArray alloc] init];
[mounts initWithContentsOfFile:[[self applicationSupportFolder]
stringByAppendingPathComponent:@"Bonjour Mounter.plist"]];
You are initializing "mounts" twice, and you're also throwing
I just declared a third NSMutableArray to see if that one would have a
different pointer, and well it had the same pointer somehow...
what is this ?
is it some type of setting ?
Sandro Noel.
On 16-Nov-08, at 11:22 PM, Sandro Noel wrote:
Greetings.
I'm having a weird behaviour, i have 2 arr
Greetings.
I'm having a weird behaviour, i have 2 arrays declared in the same
controller, and for some reason they both share the same memory space.
well actually in debug they share the same pointer, witch is not
something I asked for.
the bonjourservices and the mounts array's are the one
19 matches
Mail list logo