On Jul 21, 2015, at 6:07 PM, Jens Alfke wrote:
On Jul 21, 2015, at 1:48 AM, Jan E. Schotsman
wrote:
So I just needed to replace "Bool?" by "AnyObject?"
Yes. If you look at the method’s declaration, the parameter type is
“id*” in Obj-C, so it’s pretty clear you need to pass a pointer to
> On Jul 21, 2015, at 1:48 AM, Jan E. Schotsman wrote:
>
> So I just needed to replace "Bool?" by "AnyObject?"
Yes. If you look at the method’s declaration, the parameter type is “id*” in
Obj-C, so it’s pretty clear you need to pass a pointer to an object. If you’d
tried to pass a BOOL* in Ob
On Jul 20, 2015, at 9:37 PM, Charles Srstka wrote:
This is, in a nutshell, how I do it:
let url = ...
do {
var isAliasAny: AnyObject? = nil
try url.getResourceValue(&isAliasAny, forKey: NSURLIsAliasFileKey)
if let isAlias = isAliasAny as? NSNumber {
print("is alias: \(isA
> On Jul 20, 2015, at 2:19 PM, Jan E. Schotsman wrote:
>
> 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:
> NSURLIsAliasFileK
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