• 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: [SOLVED] How do I open a file with a name like: "Ogg/OpenAL"?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [SOLVED] How do I open a file with a name like: "Ogg/OpenAL"?


  • Subject: Re: [SOLVED] How do I open a file with a name like: "Ogg/OpenAL"?
  • From: Nir Soffer <email@hidden>
  • Date: Tue, 22 Aug 2006 16:07:43 +0300

Why do you need this strange code - replace "/" with ":" or replace ":" with "/"?

How the relative path get into the system? Do you let user to type path in a text field?

On Aug 22, 2006, at 3:11 PM, Alan Smith wrote:

- (NSString *)fullPath
{
   int replacements = 0;
   NSMutableString *string = [NSMutableString stringWithCapacity:
[relativePath length]];

   [string setString: relativePath];
   replacements = [string replaceOccurrencesOfString: @"/"
withString: @":" options: NSLiteralSearch range: NSMakeRange(0,
[relativePath length])];

   if (replacements < 1)
       [string replaceOccurrencesOfString: @":" withString: @"/"
options: NSLiteralSearch range: NSMakeRange(0, [relativePath
length])];

   return [parent stringByAppendingPathComponent: string];
}


Best Regards,

Nir Soffer

_______________________________________________
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


  • Follow-Ups:
    • Re: [SOLVED] How do I open a file with a name like: "Ogg/OpenAL"?
      • From: "Alan Smith" <email@hidden>
References: 
 >Re: How do I open a file with a name like: "Ogg/OpenAL"? (From: Matt Neuburg <email@hidden>)
 >[SOLVED] How do I open a file with a name like: "Ogg/OpenAL"? (From: "Alan Smith" <email@hidden>)

  • Prev by Date: [SOLVED] How do I open a file with a name like: "Ogg/OpenAL"?
  • Next by Date: Localize help books
  • Previous by thread: [SOLVED] How do I open a file with a name like: "Ogg/OpenAL"?
  • Next by thread: Re: [SOLVED] How do I open a file with a name like: "Ogg/OpenAL"?
  • Index(es):
    • Date
    • Thread