• 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: NSTextView/NSMutableArray problem!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTextView/NSMutableArray problem!


  • Subject: Re: NSTextView/NSMutableArray problem!
  • From: "Peter Karlsson" <email@hidden>
  • Date: Tue, 27 May 2003 07:31:53 +0000

Hi Greg!

Yes, that was the problem, can you please explain this a little futher. Why was the string not released when I used a NSTextField for example?

Thanks a lot :-)

Peter

From: Greg Hulands <email@hidden>
To: "Peter Karlsson" <email@hidden>
CC: email@hidden
Subject: Re: NSTextView/NSMutableArray problem!
Date: Tue, 27 May 2003 17:22:10 +1000

It is possible that the string passed is getting released. Have you tried
[myMutableArray replaceObjectAtIndex: 0 withObject:[[myTextViewOutlet string] copy]];

HTH,
Greg

On Tuesday, May 27, 2003, at 04:46 PM, Peter Karlsson wrote:

Dear list!

I have a strange bug in my code, look at the following code snippet...

// This works!!!
[myTextViewOutlet setString:@"Cocoa"];

// This works!!!
[myMutableArray replaceObjectAtIndex: 0 withObject:[myTextViewOutlet string]];

// But not this!!!
[myTextViewOutlet setString:[myMutableArray objectAtIndex:0]];

Can someone tell me why the last line don't work with a NSTextView please? I get no errors and the TextView is empty after the code is executed, I was expecting "Cocoa" in the TextView as he result. It works if I use a NStextField like this.

[myTextFieldOutlet setStringValue:[myMutableArray objectAtIndex:0]];

Peter

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.



_________________________________________________________________
Tired of spam? Get advanced junk mail protection with MSN 8. http://join.msn.com/?page=features/junkmail
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: NSTextView/NSMutableArray problem!
      • From: Greg Hulands <email@hidden>
  • Prev by Date: Re: NSTextView/NSMutableArray problem!
  • Next by Date: Load View from .nib in Bundle.
  • Previous by thread: Re: NSTextView/NSMutableArray problem!
  • Next by thread: Re: NSTextView/NSMutableArray problem!
  • Index(es):
    • Date
    • Thread