Re: How to get remote metadata

2015-09-28 Thread dangerwillrobinsondanger
Pretty standardized on RFCs with a few oddballs that are known and you'll know if you need them. Sent from my iPhone > On Sep 28, 2015, at 2:43 PM, Gerriet M. Denkmann wrote: > > >> On 28 Sep 2015, at 00:31, Mike Abdullah wrote: >> >> >>> On 27 Sep 2015, at 18:08, Gerriet M. Denkmann w

Re: Drawing many different strings quickly

2015-09-28 Thread Ben
> On 27 Sep 2015, at 19:26, Quincey Morris > wrote: > > On Sep 27, 2015, at 10:42 , Ben > wrote: >> >> - Not all strings to be drawn at once, a scroll view is being used and I am >> using responsive scrolling to pre-draw areas. The problem occurs when

Re: Drawing many different strings quickly

2015-09-28 Thread Aandi Inston
I'd like to suggest a different approach if things cannot be tuned to have far fewer draw calls. Font caching etc. is very fast, but not as fast as it could be given the choices it has to support. I think you said you had one font, one size. I'm guessing you also have no more than 256 different cha

Re: -[NSThread start] blocks ?!?

2015-09-28 Thread John Daniel
> On Sep 28, 2015, at 12:13 AM, cocoa-dev-requ...@lists.apple.com > wrote: > > Thank you, John. You are referring to what my secondary thread is doing. My > point is that if we can’t at least rely on -[NSThread start] returning before > the secondary

Re: How to get remote metadata

2015-09-28 Thread Jens Alfke
> On Sep 27, 2015, at 10:43 PM, Gerriet M. Denkmann > wrote: > > The NSHTTPURLResponse allHeaderFields dictionary contains keys like: > “Content-Length” and “Last-Modified”. > Are these standardized or might other sites use other keys like > “Modification-Date” or “Nbr-of-Bytes” ? Oh my yes,

Re: Drawing many different strings quickly

2015-09-28 Thread Jens Alfke
> On Sep 28, 2015, at 1:41 AM, Ben wrote: > > When scrolling vertically, there could be up to 100,000 strings to be drawn, > horizontally, much fewer, less than 10,000. I'm assuming a maximum grid size > of 100 columns and 10k rows. This should be a worst-case assumption. As various people ha

NSThread subclass get blocked on 'start' method call

2015-09-28 Thread Alexey Belkevich
I have problem with NSThread subclass. It's very similar to this case -  http://prod.lists.apple.com/archives/cocoa-dev/2015/Sep/msg00454.html. I have a library, that provide developer-friendly interface to AddressBook.framework. And I unable to use GCD for thread safety, because of `ABAddressBoo

Re: NSThread subclass get blocked on 'start' method call

2015-09-28 Thread Jens Alfke
> On Sep 28, 2015, at 9:29 AM, Alexey Belkevich > wrote: > > Here is the source code of Example - > https://www.dropbox.com/s/r5k8o28pocu7afk/aptest.zip?dl=0 > Can you isolate this down to something less complex? There’s a lot of so

Re: Drawing many different strings quickly

2015-09-28 Thread Quincey Morris
On Sep 28, 2015, at 01:41 , Ben wrote: > > Unfortunately NSTableView doesn't offer the type of interactions I want. I > have filed a radar requesting enhancements. What about a hybrid approach? Use a NSTableView to draw the strings as a background “layer” of your scroll view, and put a sibling

Re: NSThread subclass get blocked on 'start' method call

2015-09-28 Thread John Daniel
> On Sep 28, 2015, at 3:00 PM, cocoa-dev-requ...@lists.apple.com wrote: > > I have problem with NSThread subclass. It's very similar to this case - > http://prod.lists.apple.com/archives/cocoa-dev/2015/Sep/msg00454.html > . >

Re: NSThread subclass get blocked on 'start' method call

2015-09-28 Thread Alexey Belkevich
On 28 сентября 2015 at 8:00:43 , Jens Alfke (j...@mooseyard.com) wrote: On Sep 28, 2015, at 9:29 AM, Alexey Belkevich wrote: Here is the source code of Example -  https://www.dropbox.com/s/r5k8o28pocu7afk/aptest.zip?dl=0 Can you isolate this down to something less complex? There’s a lot of sou

Background Helper app - brings up UI element, needs CMD-C/X/V

2015-09-28 Thread Alex Kac
I have a Cocoa helper app with no menu bar (since its a helper). It has a menu status item that brings down a popover and an NSTextField: https://www.dropbox.com/s/n0iot0it3dfw2mb/Screenshot%202015-09-28%2014.04.21.png?dl=0 The problem is that without a menu bar, none of the CMD key functions for

Re: Continue application processing with mouse down on a menu

2015-09-28 Thread Lee Ann Rucker
On Sep 26, 2015, at 10:03 AM, Eric Schlegel wrote: > >> On Sep 26, 2015, at 9:51 AM, Jens Alfke wrote: >> >> >>> On Sep 26, 2015, at 7:11 AM, Programmingkid >>> wrote: >>> >>> It has seem like a rule that has been in place forever that an application >>> pauses processing when the mouse

Re: -[NSThread start] blocks ?!?

2015-09-28 Thread Greg Parker
> On Sep 26, 2015, at 3:33 PM, Jerry Krinock wrote: > > In a OS X app, predating Grand Central Dispatch, in the main thread, I create > and start a new thread > > NSThread* worker ; > worker = [[NSThread alloc] initWithTarget:instance > selector:@selector(beginW

Re: NSThread subclass get blocked on 'start' method call

2015-09-28 Thread Jens Alfke
So, the problem actually begins _before_ you create the second thread. If you look at all of the running threads, you’ll see the first thread you created (“Thread 6” on my simulator) locked up inside its dealloc method: (lldb) bt * thread #6: tid = 0x7b7198, 0x000104b4ed92 libsystem_kernel.

Re: Background Helper app - brings up UI element, needs CMD-C/X/V

2015-09-28 Thread Jens Alfke
> On Sep 28, 2015, at 1:05 PM, Alex Kac wrote: > > The problem is that without a menu bar, none of the CMD key functions for > text fields works now. Stuff like cut, copy paste. So with that in mind, how > do I enable that to work? You may need to capture the key events (possibly in your view

Re: Continue application processing with mouse down on a menu

2015-09-28 Thread Eric Schlegel
> On Sep 28, 2015, at 1:06 PM, Lee Ann Rucker wrote: > > I would really really like my NSStatusItem to be able to process whatever it > takes to let it think my menu is a key window so I can process key events in > the search field and the rest of the menu Filed a bug, with a sample app to re

Re: Drawing many different strings quickly

2015-09-28 Thread Ben
> On 28 Sep 2015, at 17:08, Jens Alfke wrote: > > >> On Sep 28, 2015, at 1:41 AM, Ben > > wrote: >> >> When scrolling vertically, there could be up to 100,000 strings to be drawn, >> horizontally, much fewer, less than 10,000. I'm assuming a maximum grid

Re: Background Helper app - brings up UI element, needs CMD-C/X/V

2015-09-28 Thread Alex Kac
I guess I need more help than that. Here is what I’ve got: NSViewController - with a NIB that has a plain NSView, with an NSTextField in it. Using an NSPopover, the NSViewController is the content for the popover. My only two classes are the NSApplication delegate, and the NSViewController. Nei

Re: Background Helper app - brings up UI element, needs CMD-C/X/V

2015-09-28 Thread Alex Kac
OK I think I found something: http://cocoa.thedizzyheights.com/2010/07/cut-copy-and-paste-in-lsuielement-applications/ http://stackoverflow.com/questions/970707/cocoa-keyboard-shortcuts-in-dialog-without-an-edit-menu I’m going to try that now. > On Sep 28, 2015, at 3:22 PM, Alex Kac wrote: > >

Re: Background Helper app - brings up UI element, needs CMD-C/X/V

2015-09-28 Thread Ken Thomases
On Sep 28, 2015, at 4:22 PM, Alex Kac wrote: > > I guess I need more help than that. Here is what I’ve got: > > NSViewController - with a NIB that has a plain NSView, with an NSTextField in > it. Using an NSPopover, the NSViewController is the content for the popover. > > My only two classes a

Re: ARC, blocks, capture variables

2015-09-28 Thread Scott Ribe
On Sep 27, 2015, at 7:51 PM, Scott Ribe wrote: > > On Sep 27, 2015, at 7:03 PM, Quincey Morris > wrote: >> >> IIRC you can simply assign ‘self’ to a local variable just before assigning >> to ‘fun', and use the local variable name instead of ‘self’ inside the block. > > Well, that does work

Re: ARC, blocks, capture variables

2015-09-28 Thread Quincey Morris
On Sep 28, 2015, at 15:20 , Scott Ribe wrote: > > The essential problem was in the library design, not the calls. I was keeping > self.authfun as an instance var for the sole purpose of unregistering the > callback when the owner (a window controller) was being torn down. The better > way (IMO

Re: Background Helper app - brings up UI element, needs CMD-C/X/V

2015-09-28 Thread Alex Kac
OK I found the best solution :) Leave the MainMenu in the NIB. It won't be displayed, but all the actions will be handled properly. > On Sep 28, 2015, at 3:38 PM, Ken Thomases wrote: > > On Sep 28, 2015, at 4:22 PM, Alex Kac wrote: >> >> I guess I need more help than that. Here is what I’ve

Re: ARC, blocks, capture variables

2015-09-28 Thread Scott Ribe
> On Sep 28, 2015, at 5:53 PM, Quincey Morris > wrote: > > You lost me at “I”, because it’s not clear whether you are the library or the > client at that point. Was ‘authfun’ a property of the window controller (the > client/owner?) or something in the library? > > Is the ‘id’ in the new API

Re: ARC, blocks, capture variables

2015-09-28 Thread Scott Ribe
On Sep 28, 2015, at 6:24 PM, Quincey Morris wrote: > > On Sep 28, 2015, at 17:14 , Scott Ribe wrote: >> >> "Assigning block literal to a weak variable; object will be released after >> assignment" > > Well, you wouldn’t assign a literal there. You want the exact same block > pointer for bot

Re: ARC, blocks, capture variables

2015-09-28 Thread Quincey Morris
On Sep 28, 2015, at 17:33 , Scott Ribe wrote: > > Ah, I just tried assignment to weak ivar then registration, gets the same > value. Anyway, avoiding monkeying with temp vars to fool the compiler is why > I re-did the API. I’d say that the monkeying comes from ensuring you get the same pointer

Re: Drawing many different strings quickly

2015-09-28 Thread Graham Cox
> On 28 Sep 2015, at 6:41 pm, Ben wrote: > > The control is only drawing the areas requested by the dirtyRect parameter. > Typically this is an area of (I think - going by memory) 256px square at a > time. When looking at the result of getRectsBeingDrawn, there is only one > rect the same as

Re: Drawing many different strings quickly

2015-09-28 Thread dangerwillrobinsondanger
Are you trying to have selectable text? If not, NSImage has a nice API for drawing to the image context. Then you just have an NSImage. Let AppKit do the work. It will cache the drawing of that image until you change it. You can assign that to a layer or use one for each string. + (NSImage *)i

Faster text editing in iOS App

2015-09-28 Thread Appa Rao Mulpuri
Hi, Do we have any support to faster edit the text in iOS app? Explored different things like using default keyboard/new Custom keyboard with prediction ON and use of microphone to translate the text from dictation. Looking for tools where translation to text from dictation happened within the

Where did NSSession put my file ?

2015-09-28 Thread Gerriet M. Denkmann
OS X 10.10.5 Trying to download a file with: session = [ NSURLSessionsessionWithConfiguration: defaultSessionConfiguration delegate: self delegateQu

Where did NSSession put my file ?

2015-09-28 Thread Gerriet M. Denkmann
OS X 10.10.5 Trying to download a file with: session = [ NSURLSessionsessionWithConfiguration: defaultSessionConfiguration delegate: self delegateQu

How to specify Volume to NSURLSession ?

2015-09-28 Thread Gerriet M. Denkmann
When I download a file using NSURLSession downloadTaskWithRequest the file ends up in exactly the wrong volume. Which means: I have to copy it to the right one, which, for really big files, can take some non-trivial time. Is it possible to advise NSURLSession which volume to use? Gerriet. ___