Just a short thought, because I am not following this topic intensively. I would have been astonished if NSTextStorage would return a copy.
I rather think the NS(Attachment)Cell should make a copy on setStringValue: >> [cell setStringValue:[[aNotification object] string]]; // copy value to cell BR, Nikolaus Am 18.01.2012 um 10:45 schrieb Wolfgang Lux: > Riccardo Mottola wrote: > >> while debugging SWK on gnustep, Fred found out that we have a problem that >> the string returned by the textview is not a copy. >> >> On cocoa it works, it would be nice if somebody can confirm that Cocoa >> returns a copy. > > No. Cocoa doesn't return a copy of the string. > Test program attached below. The output is the same on GNUstep: > > 2012-01-18 10:41:31.294 test[43670] string (1) = This is the first string > 2012-01-18 10:41:31.294 test[43670] string (2) = This is the second string > 2012-01-18 10:41:31.294 test[43670] string (3) = This is the second string > No copy > > and on Cocoa: > > 2012-01-18 10:42:33.089 test[43687:903] string (1) = This is the first string > 2012-01-18 10:42:33.114 test[43687:903] string (2) = This is the second > string > 2012-01-18 10:42:33.115 test[43687:903] string (3) = This is the second > string > No copy > > Wolfgang > > <test.m>_______________________________________________ > Gnustep-dev mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/gnustep-dev _______________________________________________ Gnustep-dev mailing list [email protected] https://lists.gnu.org/mailman/listinfo/gnustep-dev
