|
Re: Cancelling dispatch_after?
I think that should be an “or”: if you assign it to a non-local variable *or* pass it as a parameter. That’s because the block is implicitly moved to the heap (which is what a copy does) if the
I think that should be an “or”: if you assign it to a non-local variable *or* pass it as a parameter. That’s because the block is implicitly moved to the heap (which is what a copy does) if the
|
By
Quincey Morris
·
#396
·
|
|
Re: Cancelling dispatch_after?
I think ARC copies the block automatically if you assign it to a variable instead of just having it as a parameter of a function/method call. (A block really only gets copied once; it’s more like
I think ARC copies the block automatically if you assign it to a variable instead of just having it as a parameter of a function/method call. (A block really only gets copied once; it’s more like
|
By
Jens Alfke
·
#395
·
|
|
Re: Cancelling dispatch_after?
Makes sense, but there’s a bit of a problem.
To do that I’m going to have to create the block and keep a reference to it. That doesn’t seem to be how the GCD dispatch code snippet works - it
Makes sense, but there’s a bit of a problem.
To do that I’m going to have to create the block and keep a reference to it. That doesn’t seem to be how the GCD dispatch code snippet works - it
|
By
Graham Cox
·
#394
·
|
|
Re: Opening File in Finder
Oops, sorry, that was weird. Mail sent that message when I just closed the window, which wasn’t what I intended to happen.
I was in the process of composing an extremely witty response, but it
Oops, sorry, that was weird. Mail sent that message when I just closed the window, which wasn’t what I intended to happen.
I was in the process of composing an extremely witty response, but it
|
By
Quincey Morris
·
#393
·
|
|
Re: Opening File in Finder
Perhaps. :)
By
Quincey Morris
·
#392
·
|
|
Re: Opening File in Finder
Oh wow, I didn't know about that method -- perhaps because my code predated 10.6. :)
--Andy
Oh wow, I didn't know about that method -- perhaps because my code predated 10.6. :)
--Andy
|
By
Andy Lee
·
#391
·
|
|
Re: Cancelling dispatch_after?
If you mean “cancel” in the sense of “prevent it from starting”, then the answer is yes, you can use
If you mean “cancel” in the sense of “prevent it from starting”, then the answer is yes, you can use
|
By
Quincey Morris
·
#390
·
|
|
Re: Opening File in Finder
Hi Gerriet,
Try this:
BOOL didSelect = [[NSWorkspace sharedWorkspace] selectFile:filePath
inFileViewerRootedAtPath:containingDirPath];
-Andy
Hi Gerriet,
Try this:
BOOL didSelect = [[NSWorkspace sharedWorkspace] selectFile:filePath
inFileViewerRootedAtPath:containingDirPath];
-Andy
|
By
Andy Lee
·
#389
·
|
|
Cancelling dispatch_after?
Hi all,
Is there a way to cancel a scheduled block used with dispatch_after(…)?
While I’m finding the functionality it offers really useful, it seems like as soon as you use it you have to
Hi all,
Is there a way to cancel a scheduled block used with dispatch_after(…)?
While I’m finding the functionality it offers really useful, it seems like as soon as you use it you have to
|
By
Graham Cox
·
#388
·
|
|
Re: Observing changes in TableView
I just tried it again, and now Xcode told me that: “ Action ‘boxClicked:' sent by 'Check Box' is connected to 'File's Owner,' an invalid target (Objects inside view based table views may only be
I just tried it again, and now Xcode told me that: “ Action ‘boxClicked:' sent by 'Check Box' is connected to 'File's Owner,' an invalid target (Objects inside view based table views may only be
|
By
Gerriet M. Denkmann
·
#387
·
|
|
Re: Opening File in Finder
It does indeed. Thanks very much for telling me.
Kind regards,
Gerriet.
It does indeed. Thanks very much for telling me.
Kind regards,
Gerriet.
|
By
Gerriet M. Denkmann
·
#386
·
|
|
Re: Observing changes in TableView
Though in concept, I love the idea of KV observers, in practice, I’ve found that they lead to too many crashes.
I’ve switched over to sending notifications and it’s much less to worry about and
Though in concept, I love the idea of KV observers, in practice, I’ve found that they lead to too many crashes.
I’ve switched over to sending notifications and it’s much less to worry about and
|
By
Alex Zavatone
·
#385
·
|
|
Re: Observing changes in TableView
Gerriet, I am doing the same thing now on iOS.
Here’s what I am doing and am open to better approaches.
Being able to do this requires a special set up where the cell contents are retrieved from
Gerriet, I am doing the same thing now on iOS.
Here’s what I am doing and am open to better approaches.
Being able to do this requires a special set up where the cell contents are retrieved from
|
By
Alex Zavatone
·
#384
·
|
|
Re: Opening File in Finder
So, doesn’t NSWorkspace’s activateFileViewerSelecting method do that?
So, doesn’t NSWorkspace’s activateFileViewerSelecting method do that?
|
By
Quincey Morris
·
#383
·
|
|
Opening File in Finder
I want to have a Finder window with “/a/hugeFolder/someThin"g selected.
[ NSWorkspace.sharedWorkspace openFile: @“/a/hugeFolder/someThing” withApplication: @“Finder" ]
results in an
I want to have a Finder window with “/a/hugeFolder/someThin"g selected.
[ NSWorkspace.sharedWorkspace openFile: @“/a/hugeFolder/someThing” withApplication: @“Finder" ]
results in an
|
By
Gerriet M. Denkmann
·
#382
·
|
|
Re: Observing changes in TableView
It was the app delegate.
I found another solution:
The contentArray contains only a few dictionaries - less than a dozen.
So I decided to observe all of them:
for( NSDictionary *d in
It was the app delegate.
I found another solution:
The contentArray contains only a few dictionaries - less than a dozen.
So I decided to observe all of them:
for( NSDictionary *d in
|
By
Gerriet M. Denkmann
·
#381
·
|
|
Re: Observing changes in TableView
This ought to work, so I think you should focus on finding out why it isn’t. What are you specifying for the target? It should be something that doesn't depend on the cell itself, like the view
This ought to work, so I think you should focus on finding out why it isn’t. What are you specifying for the target? It should be something that doesn't depend on the cell itself, like the view
|
By
Quincey Morris
·
#380
·
|
|
Observing changes in TableView
macOS 12.6
I have an ArrayController which has ContentArray bound to AppDelegate.contentArray
The contentArray contains MutableDictionaries with a key “Flag”, value: boxed BOOL.
And a TableView
macOS 12.6
I have an ArrayController which has ContentArray bound to AppDelegate.contentArray
The contentArray contains MutableDictionaries with a key “Flag”, value: boxed BOOL.
And a TableView
|
By
Gerriet M. Denkmann
·
#379
·
|
|
Re: Documentation on printing in NSView, etc.
Just after posting, a web search turned up this, which is I think what I was looking
Just after posting, a web search turned up this, which is I think what I was looking
|
By
Graham Cox
·
#378
·
|
|
Documentation on printing in NSView, etc.
Hi all,
Can anyone link any sort of documentation that explains what all the stuff NSView does for printing does? I’m sure there used to be documentation explaining this but I just can’t find it.
Hi all,
Can anyone link any sort of documentation that explains what all the stuff NSView does for printing does? I’m sure there used to be documentation explaining this but I just can’t find it.
|
By
Graham Cox
·
#377
·
|