• 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
Complex doc-based/URL/bundle documents
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Complex doc-based/URL/bundle documents


  • Subject: Complex doc-based/URL/bundle documents
  • From: Gerben Wierda <email@hidden>
  • Date: Tue, 26 Feb 2002 00:50:43 +0100

I am trying to write a doc-based application that can load a bundle through an URL. I have been able to get his working for a FileWrapper. Now I must move from that method to the even more low level method of (for instance) readFromURL:ofType: but sadly that method tells me it can only do file: (and not http or ftp, see below).

Now, I would like to use an URL like http://some.domain/foo/bar.ext which contains, say, one.plist and two.plist. I haven't been able to find out from the docs hw to do this and what functionality is available. I have read about NSURL and friends and those seem to be working for more than just file:, but I have no idea how to go forward.

The design of the app calls for a cache-approach, where the URL is used to get some basic facts about the 'document' after which a local copy is created which then can be loaded with loadFileWrapperRepresentation. That last pat is working, but I am wondering where and how to implement the first part.

I am looking for two things: exampl code with (http etc) URL's and how to combine these with a doc-based application (e.g. should I override - (id)openDocumentWithContentsOfURL:(NSURL *)anURL display:(BOOL)flag; in my NSDocumentController subclass?

readFromURL:ofType:

- (BOOL)readFromURL:(NSURL *)anURL ofType:(NSString *)docType

Reads and loads document data of type docType from the URL anURL, returning whether the operation was successful. This method only supports URLs of the file: scheme, and calls readFromFile:ofType:.

G
_______________________________________________
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.

  • Prev by Date: Re: Help with Help
  • Next by Date: Re: Apple Help
  • Previous by thread: Re: DOs and DOn'ts
  • Next by thread: Can't find mysql.h
  • Index(es):
    • Date
    • Thread