Re: Re: Window too large for Versions Browser

2013-10-03 Thread Half Activist
Well, the minSize is actually correctly set but that doesn't seem to be small enough for Versions on small desktops, I found a solution by implemeting the NSWindowDelegate methods below to set the minSize to 640x480 when entering Versions, and setting it back to 1200x680 when exiting. - (void)w

Re: Window too large for Versions Browser

2013-10-03 Thread Jerry Krinock
On 2013 Oct 03, at 00:12, Half Activist wrote: > Well, the minSize is actually correctly set but that doesn't seem to be small > enough for Versions on small desktops, I found a solution by implemeting the > NSWindowDelegate methods below to set the minSize to 640x480 when entering > Versions

Re: iOS Calendar Question

2013-10-03 Thread Dave
On 3 Oct 2013, at 00:49, Mike Abdullah wrote: > > On 2 Oct 2013, at 19:03, Dave wrote: > >> >> On 2 Oct 2013, at 18:56, Alex Kac wrote: >> >>> To Safari - probably not. You’d have to bring up the document interaction >>> controller, which would bring up any app that supports ICS - which w

Can I create a thread with a runloop and a dispatch queue?

2013-10-03 Thread Jens Alfke
The main thread of a Cocoa app has a runloop (of course) and also the main GCD dispatch queue. This is very handy because it means tasks on that thread can be scheduled either using the runloop (NSTimer or delayed-perform) or using GCD (dispatch_async, dispatch_sync). But background threads don

Re: UIActionSheet -addButtonWithTitle weirdness on iPad

2013-10-03 Thread David Duncan
On Oct 2, 2013, at 11:49 PM, Markus Spoettl wrote: > On 10/2/13 10:40 PM, David Duncan wrote: >> On Oct 2, 2013, at 9:33 AM, Markus Spoettl wrote: >> >>> On the iPad (both device and simulator) this produces a sheet with >>> "Button2" missing. No matter how many buttons one adds, the last one a

Re: Can I create a thread with a runloop and a dispatch queue?

2013-10-03 Thread Daniel DeCovnick
You did not miss anything. Since a queue can run on any or multiple threads (except the main queue), creating a runloop on it - and runloops are thread-specific - means that one dispatched block may run on a thread that doesn’t have the runloop created in another by a previously dispatched block

Re: Can I create a thread with a runloop and a dispatch queue?

2013-10-03 Thread Kyle Sluder
On Thu, Oct 3, 2013, at 10:55 AM, Jens Alfke wrote: > The main thread of a Cocoa app has a runloop (of course) and also the > main GCD dispatch queue. This is very handy because it means tasks on > that thread can be scheduled either using the runloop (NSTimer or > delayed-perform) or using GCD (di

Re: Can I create a thread with a runloop and a dispatch queue?

2013-10-03 Thread Jens Alfke
On Oct 3, 2013, at 11:09 AM, Daniel DeCovnick wrote: > You did not miss anything. Since a queue can run on any or multiple threads > (except the main queue), creating a runloop on it - and runloops are > thread-specific - means that one dispatched block may run on a thread that > doesn’t have

NSControl subclass is not becoming initial first responder without Full Keyboard Access

2013-10-03 Thread Steve Mills
We have an NSControl subclass in a window. The class returns YES from acceptsFirstResponder and canBecomeKeyView, and it overrides some NSResponder methods (mouseDown:, keyDown:). The control is set to be the initialFirstResponder in the xib. Yet it will not be the initial first responder unles

How to get a "Normal" button in iOS 7/IB

2013-10-03 Thread Dave
Hi All, I want to create a button (UIButton) that actually looks like a button, e.g. with a border round, as in iOS <7 is iOS 7, preferably with IB but in code otherwise. Which properties do I need to tweak in order to get this? I've been playing around for a while and can't seem to just get a

Re: Can I create a thread with a runloop and a dispatch queue?

2013-10-03 Thread Ken Thomases
On Oct 3, 2013, at 1:46 PM, Kyle Sluder wrote: > On Thu, Oct 3, 2013, at 10:55 AM, Jens Alfke wrote: >> The main thread of a Cocoa app has a runloop (of course) and also the >> main GCD dispatch queue. This is very handy because it means tasks on >> that thread can be scheduled either using the ru

Re: Can I create a thread with a runloop and a dispatch queue?

2013-10-03 Thread Jens Alfke
On Oct 3, 2013, at 11:46 AM, Kyle Sluder wrote: > There is magic sauce in CFRunLoop that runs the main queue as part of > processing the runloop. All other queues are managed by code running on > a thread managed by libdispatch. The main queue is a special case; it > doesn't make sense for this

Re: Cocoa-dev Digest, Vol 10, Issue 633

2013-10-03 Thread Frederick Bartram
On Oct 3, 2013, at 1:59 PM, cocoa-dev-requ...@lists.apple.com wrote: > > The main thread of a Cocoa app has a runloop (of course) and also the main > GCD dispatch queue. This is very handy because it means tasks on that thread > can be scheduled either using the runloop (NSTimer or delayed-perfo

Re: Can I create a thread with a runloop and a dispatch queue?

2013-10-03 Thread Jens Alfke
On Oct 3, 2013, at 11:58 AM, Ken Thomases wrote: > That said, it's simple enough to write a category on NSThread such that you > can ask a thread to run a block and it will do so when its run loop is run. > Basically, it would leverage -[NSObject performSelector:onThread:…] and the > block w

Re: How to get a "Normal" button in iOS 7/IB

2013-10-03 Thread David Duncan
On Oct 3, 2013, at 11:56 AM, Dave wrote: > I want to create a button (UIButton) that actually looks like a button, e.g. > with a border round, as in iOS <7 is iOS 7, preferably with IB but in code > otherwise. Which properties do I need to tweak in order to get this? You can create any button

Re: Can I create a thread with a runloop and a dispatch queue?

2013-10-03 Thread Kyle Sluder
On Thu, Oct 3, 2013, at 12:05 PM, Jens Alfke wrote: > > Because I’ve got tens of thousands of lines of code*, a lot of which does > some tricky asynchronous work using the runloop/thread paradigm, and I > don’t want to break it by rewriting all of it en masse to use GCD. If I > could start using G

Re: How to get a "Normal" button in iOS 7/IB

2013-10-03 Thread Jens Alfke
On Oct 3, 2013, at 11:56 AM, Dave wrote: > I want to create a button (UIButton) that actually looks like a button, e.g. > with a border round, as in iOS <7 is iOS 7, preferably with IB but in code > otherwise. Which properties do I need to tweak in order to get this? I don’t think you can. I’

Re: How to get a "Normal" button in iOS 7/IB

2013-10-03 Thread Dave
On 3 Oct 2013, at 20:05, David Duncan wrote: > On Oct 3, 2013, at 11:56 AM, Dave wrote: > >> I want to create a button (UIButton) that actually looks like a button, e.g. >> with a border round, as in iOS <7 is iOS 7, preferably with IB but in code >> otherwise. Which properties do I need to

Re: How to get a "Normal" button in iOS 7/IB

2013-10-03 Thread Kyle Sluder
On Thu, Oct 3, 2013, at 11:56 AM, Dave wrote: > Hi All, > > I want to create a button (UIButton) that actually looks like a button, > e.g. with a border round, as in iOS <7 is iOS 7, preferably with IB but > in code otherwise. Which properties do I need to tweak in order to get > this? Normal but

Re: Can I create a thread with a runloop and a dispatch queue?

2013-10-03 Thread Jens Alfke
On Oct 3, 2013, at 12:07 PM, Kyle Sluder wrote: > They're fundamentally different ways of doing multiprocessing. So to use GCD I have to rip apart all of my code that uses threads/runloops at once and rewrite it? (As I’ve said, I don’t mind upgrading it bit by bit as I go; it’s the big-bang a

Re: Can I create a thread with a runloop and a dispatch queue?

2013-10-03 Thread Kyle Sluder
On Thu, Oct 3, 2013, at 12:14 PM, Jens Alfke wrote: > > On Oct 3, 2013, at 12:07 PM, Kyle Sluder wrote: > > > They're fundamentally different ways of doing multiprocessing. > > So to use GCD I have to rip apart all of my code that uses > threads/runloops at once and rewrite it? (As I’ve said, I

Re: How to get a "Normal" button in iOS 7/IB

2013-10-03 Thread Dave
On 3 Oct 2013, at 20:09, Kyle Sluder wrote: > On Thu, Oct 3, 2013, at 11:56 AM, Dave wrote: >> Hi All, >> >> I want to create a button (UIButton) that actually looks like a button, >> e.g. with a border round, as in iOS <7 is iOS 7, preferably with IB but >> in code otherwise. Which properties

Re: How to get a "Normal" button in iOS 7/IB

2013-10-03 Thread Alex Kac
Two ways: 1) Use an image. 2) Subclass the button and handle the drawing yourself. On Thu, Oct 3, 2013 at 12:56 PM, Dave wrote: > Hi All, > > I want to create a button (UIButton) that actually looks like a button, > e.g. with a border round, as in iOS <7 is iOS 7, preferably with IB but in > co

Re: How to get a "Normal" button in iOS 7/IB

2013-10-03 Thread Eric E. Dolecki
Make it a custom button, supply with resizableImageWithCapInsets Google Voice: (508) 656-0622 Twitter: eric_dolecki XBoxLive: edolecki PSN: eric_dolecki On Thu, Oct 3, 2013 at 2:56 PM, Dave wrote: > Hi All, > > I want to create a button (UIButton) that actually looks like a butt

Re: How to get a "Normal" button in iOS 7/IB

2013-10-03 Thread Esteban Torres
Just create a UIButton that's custom; set the background color and the layer's corner radius, borderWidth and borderColor properties to something like 5.0f, 1.5f and [[UIColor blackColor] CGColor] and that should look pretty similar to the "old" "regular" buttons -- Esteban Torres (+506)8813-0

iOS 7 GUI update lag during drag touches

2013-10-03 Thread Carl Hoefs
iOS 6.1.3 & 7.0.2, newb! I'm seeing an unacceptable lag in my iOS app on drag touches, from when a finger is dragged across the screen to when my code updates the screen. I can't figure out what is causing the lag. Here's my setup. I have a -touchesBegan:withEvent: method in my view controller

Re: iOS 7 GUI update lag during drag touches

2013-10-03 Thread Carl Hoefs
I meant to say -touchesMoved instead of -touchesBegan below. - Carl On Oct 3, 2013, at 12:47 PM, Carl Hoefs wrote: > iOS 6.1.3 & 7.0.2, newb! > > I'm seeing an unacceptable lag in my iOS app on drag touches, from when a > finger is dragged across the screen to when my code updates the screen.

Re: UIActionSheet -addButtonWithTitle weirdness on iPad

2013-10-03 Thread Fritz Anderson
On 3 Oct 2013, at 12:59 PM, David Duncan wrote: > On Oct 2, 2013, at 11:49 PM, Markus Spoettl wrote: > >> On 10/2/13 10:40 PM, David Duncan wrote: >>> On Oct 2, 2013, at 9:33 AM, Markus Spoettl wrote: >>> On the iPad (both device and simulator) this produces a sheet with "Button2"

Re: Can I create a thread with a runloop and a dispatch queue?

2013-10-03 Thread Jens Alfke
On Oct 3, 2013, at 12:17 PM, Kyle Sluder wrote: > What is adopting GCD going to get you if you aren't going to use GCD the > way it was intended? Could you be a bit friendlier here and cut me some slack? Of course I want to use GCD in the way it’s intended. I’m an experienced developer, I’ve b

RE: iOS 7 GUI update lag during drag touches

2013-10-03 Thread Julius Oklamcak
> CGPoint apoint=[[touches anyObject] locationInView:[self view]]; > [layer setPosition:apoint]; You need to disable implicit CALayer animation(s): [CATransaction begin]; [CATransaction setDisableActions:YES]; [layer setPosition:apoint]; [CATransaction commit]; __

Re: How to get a "Normal" button in iOS 7/IB

2013-10-03 Thread Fritz Anderson
On 3 Oct 2013, at 2:09 PM, Dave wrote: > Sorry, should have said, without using an Image. Why? Images are how this sort of thing gets done. Anything else is a stunt, unless you have some constraint you're not telling us about. (You're familiar with -[UIImage resizableImageWithCapInsets:] and r

Re: UIActionSheet -addButtonWithTitle weirdness on iPad

2013-10-03 Thread David Duncan
On Oct 3, 2013, at 12:58 PM, Fritz Anderson wrote: > > On 3 Oct 2013, at 12:59 PM, David Duncan wrote: > >> On Oct 2, 2013, at 11:49 PM, Markus Spoettl wrote: >> >>> On 10/2/13 10:40 PM, David Duncan wrote: On Oct 2, 2013, at 9:33 AM, Markus Spoettl wrote: > On the iPad

Re: Can I create a thread with a runloop and a dispatch queue?

2013-10-03 Thread Ken Thomases
On Oct 3, 2013, at 3:00 PM, Jens Alfke wrote: > Also, my project is a library, and I don’t want to put too many restrictions > on how it’s used by the caller. For example, here’s one method that runs an > async query: > - (void) runAsync: (void (^)(CBLQueryEnumerator*))onComplete; > When t

Re: iOS 7 GUI update lag during drag touches

2013-10-03 Thread Carl Hoefs
Thanks, Julius! Now there's no response lag at all! - Carl On Oct 3, 2013, at 1:11 PM, Julius Oklamcak wrote: >> CGPoint apoint=[[touches anyObject] locationInView:[self view]]; >> [layer setPosition:apoint]; > > You need to disable implicit CALayer animation(s): > > [CATransaction begin]; >

Re: Can I create a thread with a runloop and a dispatch queue?

2013-10-03 Thread Jens Alfke
On Oct 3, 2013, at 1:23 PM, Ken Thomases wrote: > I've seen APIs, including some from Apple, that take a queue as an argument > for where a completion block should be invoked. I've always thought they > were a bit silly. If the caller's onComplete block needs to be run in a > particular con

Re: Can I create a thread with a runloop and a dispatch queue?

2013-10-03 Thread Ken Thomases
On Oct 3, 2013, at 3:55 PM, Jens Alfke wrote: > On Oct 3, 2013, at 1:23 PM, Ken Thomases wrote: > >> I'm not seeing how the above API would be easier/cleaner to implement if run >> loops had queues. > > Because the implementation could initially capture the current dispatch queue > (by callin

Re: Can I create a thread with a runloop and a dispatch queue?

2013-10-03 Thread Mike Abdullah
On 3 Oct 2013, at 20:00, Jens Alfke wrote: > > On Oct 3, 2013, at 11:46 AM, Kyle Sluder wrote: > >> There is magic sauce in CFRunLoop that runs the main queue as part of >> processing the runloop. All other queues are managed by code running on >> a thread managed by libdispatch. The main que

Re: Can I create a thread with a runloop and a dispatch queue?

2013-10-03 Thread Ken Thomases
On Oct 3, 2013, at 4:04 PM, Ken Thomases wrote: > On Oct 3, 2013, at 3:55 PM, Jens Alfke wrote: > >> On Oct 3, 2013, at 1:23 PM, Ken Thomases wrote: >> >>> I'm not seeing how the above API would be easier/cleaner to implement if >>> run loops had queues. >> >> Because the implementation coul

Re: Can I create a thread with a runloop and a dispatch queue?

2013-10-03 Thread Mike Abdullah
On 3 Oct 2013, at 20:14, Jens Alfke wrote: > > On Oct 3, 2013, at 12:07 PM, Kyle Sluder wrote: > >> They're fundamentally different ways of doing multiprocessing. > > So to use GCD I have to rip apart all of my code that uses threads/runloops > at once and rewrite it? (As I’ve said, I don’t

Re: How to get a "Normal" button in iOS 7/IB

2013-10-03 Thread Dave
On 3 Oct 2013, at 21:13, Fritz Anderson wrote: > On 3 Oct 2013, at 2:09 PM, Dave wrote: > >> Sorry, should have said, without using an Image. > > Why? Images are how this sort of thing gets done. Anything else is a stunt, > unless you have some constraint you're not telling us about. > > (Y

Re: Can I create a thread with a runloop and a dispatch queue?

2013-10-03 Thread Jens Alfke
On Oct 3, 2013, at 2:04 PM, Ken Thomases wrote: > Well, you've gone from requesting the ability to assign a queue to a run loop > to assuming that all run loops would have queues. You’re right. I think I was implicitly imagining it would be like [NSRunLoop currentRunLoop] in that it would c

Re: Can I create a thread with a runloop and a dispatch queue?

2013-10-03 Thread Jens Alfke
On Oct 3, 2013, at 2:09 PM, Mike Abdullah wrote: > You can actually target a custom queue at any other queue you like, to create > a whole chain of them. Work submitted to such queues ends up executing within > the context of multiple queues at once. OK, this I did not know, despite (I though

Wrapping Content of a UIScrollView

2013-10-03 Thread Dave
Hi, I have a subclass of UIScrollView which contains a bunch of image views. The requirement is for the Scroll View to "wrap" when the user scroll past the last image, e.g. if Scrolling Right when the last image is scrolled onto, to have the first image appear as if it is last + 1. If Scrolling

Re: Runloops and Window Dragging

2013-10-03 Thread Uli Kusterer
On 03 Oct 2013, at 02:47, Caylan Larson wrote: > On Oct 2, 2013, at 5:06 PM, Jens Alfke wrote: > >>> I am using CGWindowListCreateImage to fetch an image of the windows behind >>> my app. This works beautifully and is OK for my needs. >> >> I assume you’re doing this to apply some kind of f

Throttling iOS 7 event callbacks

2013-10-03 Thread Carl Hoefs
Is there a way in iOS 7 to throttle the event callback rate? I'm getting a maximum of 60 event callbacks per second when I slide my finger quickly across the screen. I'd like to limit that to a max of about 10/sec or so. Does iOS offer a setting to do this, or do I need to implement a throttling

Re: How to get a "Normal" button in iOS 7/IB

2013-10-03 Thread Kyle Sluder
On Thu, Oct 3, 2013, at 02:39 PM, Dave wrote: > I really don't want to make lots of images just for this and to be > honest, if a Framework doesn't support an Industry Standard "Button" out > of the box, then, it sucks! Give. It. Up. And did you read Eric Dolecki's reply? --Kyle Sluder ___

Re: Can I create a thread with a runloop and a dispatch queue?

2013-10-03 Thread Mike Abdullah
On 3 Oct 2013, at 22:37, Jens Alfke wrote: > > On Oct 3, 2013, at 2:09 PM, Mike Abdullah wrote: > >> You can actually target a custom queue at any other queue you like, to >> create a whole chain of them. Work submitted to such queues ends up >> executing within the context of multiple queu

txt file renamed to mp3, MPMoviePlayerPlaybackDidFinishReasonUserInfoKey returning 0

2013-10-03 Thread Devarshi Kulshreshtha
I am trying to identify if a file can be played in MPMoviePlayer or not, for this I have added below code in viewDidLoad: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayBackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:_fileDisplayMovieP

Re: Can I create a thread with a runloop and a dispatch queue?

2013-10-03 Thread Kyle Sluder
On Thu, Oct 3, 2013, at 01:00 PM, Jens Alfke wrote: > > On Oct 3, 2013, at 12:17 PM, Kyle Sluder wrote: > > > What is adopting GCD going to get you if you aren't going to use GCD the > > way it was intended? > > Could you be a bit friendlier here and cut me some slack? Of course I > want to use

Re: How to get a "Normal" button in iOS 7/IB

2013-10-03 Thread Robert Martin
You presented a problem, and other members spent their precious time trying to help you solve it. Just take it or leave it, but thank them all the same. Your opinion of a framework is irrelevant, please stop wasting bandwidth. Rob On Oct 3, 2013, at 5:39 PM, Dave wrote: > > On 3 Oct 2013, a

Re: Can I create a thread with a runloop and a dispatch queue?

2013-10-03 Thread Kyle Sluder
> My point is that using GCD is not a win if you aren't actually going to > use it in a way that is compatible with its design Er, I obviously meant "incompatible" here. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do no

Re: txt file renamed to mp3, MPMoviePlayerPlaybackDidFinishReasonUserInfoKey returning 0

2013-10-03 Thread Kyle Sluder
On Thu, Oct 3, 2013, at 04:04 PM, Devarshi Kulshreshtha wrote: > Please suggest how can I test the above scenario, and get the expected > result. You should probably ask on the coreaudio-api list. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@li

Re: Throttling iOS 7 event callbacks

2013-10-03 Thread Seth Willits
On Oct 3, 2013, at 3:56 PM, Carl Hoefs wrote: > Is there a way in iOS 7 to throttle the event callback rate? I'm getting a > maximum of 60 event callbacks per second when I slide my finger quickly > across the screen. I'd like to limit that to a max of about 10/sec or so. > Does iOS offer a set

Re: Throttling iOS 7 event callbacks

2013-10-03 Thread Carl Hoefs
Done. Thanks! - Carl On Oct 3, 2013, at 4:48 PM, Seth Willits wrote: > On Oct 3, 2013, at 3:56 PM, Carl Hoefs wrote: > >> Is there a way in iOS 7 to throttle the event callback rate? I'm getting a >> maximum of 60 event callbacks per second when I slide my finger quickly >> across the screen

Re: How to get a "Normal" button in iOS 7/IB

2013-10-03 Thread Alex Zavatone
The cap approach is something that's supported with a standard button and it works really well. FWIW, I've been using it since 1998 with PNGs. Basically, the approach is that you have a PNG graphic that is nicely antialiased and alpha channeled. It consists of a button's left and right caps a

Re: Can I create a thread with a runloop and a dispatch queue?

2013-10-03 Thread Charles Srstka
On Oct 3, 2013, at 6:06 PM, Kyle Sluder wrote: > Other people have addressed the dispatch_get_current_queue() problem. > Andy Matuschak has opined that the correct way to design an API that > accepts a block argument is to also accept a dispatch queue on which to > run that block. The problem I

Re: Can I create a thread with a runloop and a dispatch queue?

2013-10-03 Thread Kyle Sluder
> On Oct 3, 2013, at 6:22 PM, Charles Srstka wrote: > > The problem I see with queue arguments is that there are two types of queues > that people might be using — dispatch_queue_t and NSOperationQueue — and > there doesn't seem to be a way to convert one into the other. So if you > design you

Re: How to get a "Normal" button in iOS 7/IB / One Solution

2013-10-03 Thread Ronald Hofmann
This is a fully configurable, common, all garden, down to earth, no messing around - Button code snippet generated by UI Tuner. //*** // UI Tuner - v1.2 // Auto generated code // Generated on: 04-10-2013 00:29 // Deployment Target: iOS 6.0 //***

Re: Can I create a thread with a runloop and a dispatch queue?

2013-10-03 Thread dangerwillrobinsondanger
There are books. Pro Multithreading and Memory Management for iOS and OSX (Apress) By Kazuki Sakamoto and Tomohiko Furumoto Actually not bad. Concurrent Programming in Mac OSX and ios (Oreilly) Vandad Nahavandipoor Not as thorough. Sent from my iPhone > On 2013/10/04, at 8:01, Mike Abdul

Re: Can I create a thread with a runloop and a dispatch queue?

2013-10-03 Thread dangerwillrobinsondanger
Also Advanced Mac OSX Programming (Big Nerd Ranch) By Mark Dalrymple Covers CFRunLoop NSThread and GCD but not as deeply. Sent from my iPhone > On 2013/10/04, at 13:03, dangerwillrobinsondan...@gmail.com wrote: > > There are books. > > Pro Multithreading and Memory Management for iOS and OSX

UIScrollView Dynamic Paging Size

2013-10-03 Thread Peng Gu
I am implementing a horizontal multi-image scrollview. The images have variable widths, so a portion of the next imageview image also be shown on the screen. To display the next image view correctly, I need to change the paging size. As this link