• 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: Storing and Retrieving Strings
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Storing and Retrieving Strings


  • Subject: RE: Storing and Retrieving Strings
  • From: "Kenny Millar" <email@hidden>
  • Date: Thu, 19 Jan 2006 14:06:47 -0000

Yip,

Why not drop the large string into a file, include it in your resources and
then use seomthing like this...

NSBundle *mainBundle = [NSBundle mainBundle];
strPath = [mainBundle pathForResource:@"Large String Doc" ofType:@"txt"];
[strPath retain];

if(strPath)
{
	NSString myString = [NSString stringWithContentsOfFile:strPath]; //
heres the interesting bit.
	[myString retain];
}

-Kenny

> -----Original Message-----
> From: cocoa-dev-bounces+kennymillar=email@hidden
> [mailto:cocoa-dev-bounces+kennymillar=email@hidden]
>  On Behalf Of Mike Abdullah
> Sent: 19 January 2006 13:55
> To: email@hidden
> Subject: Storing and Retrieving Strings
>
> I need to store and retrieve some strings in my app.  I know
> how to do this for localisation strings, but this is
> different.  I need the retrieved string to be the same
> regardless of the localisation.
>
> I could just hardcode the strings into my source code, but
> some of them are quite long, and some contain return
> characters, thereby making it quite awkward looking if I do this.
>
> Any suggestions?
> Mike.
>  _______________________________________________
> 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: 
 >Storing and Retrieving Strings (From: Mike Abdullah <email@hidden>)

  • Prev by Date: Storing and Retrieving Strings
  • Next by Date: anotherDockProgram-help
  • Previous by thread: Storing and Retrieving Strings
  • Next by thread: anotherDockProgram-help
  • Index(es):
    • Date
    • Thread