• 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
Getting resource for key (Swift)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting resource for key (Swift)


  • Subject: Getting resource for key (Swift)
  • From: "Jan E. Schotsman" <email@hidden>
  • Date: Mon, 20 Jul 2015 21:19:03 +0200

Still making baby steps in Swift.

What am I doing wrong this time?

var fileObject:NSURL = ...
var err:NSError?
var value:Bool?

var gotValue = fileObject.getResourceValue( &value, forKey: NSURLIsAliasFileKey, error: &err ); // cannot call getResourceValue with this parameter list
	if gotValue
		{
		// use value!
		}
else { if let error = err { println("file object inspection failed: \ (error.localizedDescription)") }}
TIA,

Jan E.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


  • Follow-Ups:
    • Re: Getting resource for key (Swift)
      • From: Charles Srstka <email@hidden>
  • Prev by Date: Re: dereference UnsafePointer
  • Next by Date: Re: Getting resource for key (Swift)
  • Previous by thread: Re: KVO detection of changes to selection in NSOpenPanel
  • Next by thread: Re: Getting resource for key (Swift)
  • Index(es):
    • Date
    • Thread