Re: Crash at iOS App Startup - What Could Have Gone Wrong?

2015-04-22 Thread Mike Abdullah
> On 21 Apr 2015, at 21:43, Michael Crawford wrote: > > It's not stopping in the debugger anymore, but instead of getting my > navigation controller I'm just getting a black screen. That sounds like a good time to use Xcode’s view debugger to find out what’s actually onscreen. I’m going to haz

Re: Converting to Window Coordinates

2015-04-22 Thread Dave
Hi Again Lee Ann, Thanks a lot for this, one thing though, how do I tell which window the position is in? At present I loop through all my open windows and apply run “hitTest” on the content view until I find one. > Another thing you've missed: converting to myContentView's coordinate space >

RE: Converting to Window Coordinates

2015-04-22 Thread Lee Ann Rucker
There's also +[NSEvent mouseLocation], which gives you the position in the same screen coordinate space the windows use. > Do I have to worry about this? It seems to work, but the window I am testing > in is a plain (no title bar etc) window, so the content view and the window > Frame coincide,

Re: Converting to Window Coordinates

2015-04-22 Thread Dave
Yes, good idea, I’ll change it. Is hit testing the content view the only way to tell which window a point falls within? At the moment I loop though all windows until I find one which works, but is a bit inefficient. I’d like a windowForScreenPoint: type method. Thanks again for all your help.

Re: Submitting App Localization Issue...

2015-04-22 Thread Fritz Anderson
It would be helpful to know what the unhelpful message was, and at what stage of the process it came to you. Also, what exactly are you doing for localization? — F > On Apr 21, 2015, at 5:32 PM, Peters, Brandon wrote: > > I am getting an error in iTunes Connect for my App pertaining to

Re: Converting to Window Coordinates

2015-04-22 Thread Scott Ribe
On Apr 22, 2015, at 10:10 AM, Dave wrote: > > I really can’t understand why it was ever defined to be bottom left, does > anyone know why? Normal Cartesian coordinates. (I agree the other way made sense, measuring from the menu bar…) -- Scott Ribe scott_r...@elevated-dev.com http://www.eleva

Re: UIAlertView has zero bounds

2015-04-22 Thread Jamie Montgomerie
> On Apr 20, 2015, at 6:37 PM, M Pulis wrote: > > Sure... > > BYOV - build your own view: > > Create a custom UIViewController, pop in a UITextField and a couple of > buttons. > Works on all versions, done in under an hour max…. There’s no need to do that! You already brought up the use of

Re: Converting to Window Coordinates

2015-04-22 Thread Jens Alfke
> On Apr 22, 2015, at 9:46 AM, Scott Ribe wrote: > > On Apr 22, 2015, at 10:10 AM, Dave wrote: >> >> I really can’t understand why it was ever defined to be bottom left, does >> anyone know why? > > Normal Cartesian coordinates. (I agree the other way made sense, measuring > from the menu b

UIAlertView won't set password field as first responder

2015-04-22 Thread Rick Mann
In my UIAlertView -didPresentAlertView: delegate call, I'm trying to change focus to the password field with UITextField* tf = [inView textFieldAtIndex: 1]; [tf becomeFirstResponder]; But it's being ignored. I've verified that it is the correct field. I'm doing it in -didPresentAlertVie

Re: UIAlertView won't set password field as first responder

2015-04-22 Thread Kyle Sluder
On Wed, Apr 22, 2015, at 01:53 PM, Rick Mann wrote: > In my UIAlertView -didPresentAlertView: delegate call, I'm trying to > change focus to the password field with > > UITextField* tf = [inView textFieldAtIndex: 1]; > [tf becomeFirstResponder]; > > But it's being ignored. How many times

Re: UIAlertView has zero bounds

2015-04-22 Thread M Pulis
Yep good stuff. I forgot about those been on iOS8 too long - have converted all my code to UIAlertController(s). But the OP won't use UIAlertController to be backwards compatible and (I guess) had not seen those calls. Gary On Apr 22, 2015, at 10:03 AM, Jamie Montgomerie wrote:

RE: Converting to Window Coordinates

2015-04-22 Thread Lee Ann Rucker
> Is hit testing the content view the only way to tell which window a point > falls within? At the moment I loop though all windows until I find one which > works, but is a bit inefficient. Since everything's in the same coordinate space now, use NSPointInRect on the window frame. _

Re: UIAlertView won't set password field as first responder

2015-04-22 Thread Rick Mann
Stop. Making. Me. Abandon. Older. Users. > On Apr 22, 2015, at 12:18 , Kyle Sluder wrote: > > On Wed, Apr 22, 2015, at 01:53 PM, Rick Mann wrote: >> In my UIAlertView -didPresentAlertView: delegate call, I'm trying to >> change focus to the password field with >> >>UITextField* tf = [inView

Re: UIAlertView won't set password field as first responder

2015-04-22 Thread Kyle Sluder
On Wed, Apr 22, 2015, at 03:16 PM, Rick Mann wrote: > Stop. Making. Me. Abandon. Older. Users. Nobody is making you abandon older users. Use UIAlertView when running on older platforms. Use UIAlertController when running on newer platforms, or continue to use the UIAlertView compatibility suppor

Re: UIAlertView won't set password field as first responder

2015-04-22 Thread Rick Mann
I don't think this qualifies as "messing with the internals." Apple provides those methods. I'm not adding or removing views, or even moving them. All I want to do is change focus. There are several posts on this approach that report success. I'm not seeing it. Provide me with a solution, or te

Re: UIAlertView won't set password field as first responder

2015-04-22 Thread Shazron
- (void)didPresentAlertView:(UIAlertView*)alertView { if (alertView.alertViewStyle == UIAlertViewStylePlainTextInput){ [[alertView textFieldAtIndex:0] selectAll:nil]; } } On Wed, Apr 22, 2015 at 1:21 PM, Rick Mann wrote: > I don't think this qualifies as "messing with the internal

Re: UIAlertView won't set password field as first responder

2015-04-22 Thread Kyle Sluder
On Wed, Apr 22, 2015, at 03:21 PM, Rick Mann wrote: > I don't think this qualifies as "messing with the internals." Accessing the subviews of a view you do not own is by definition "messing with the internals". > Apple > provides those methods. Just because a method exists doesn't mean that it

Re: Converting to Window Coordinates

2015-04-22 Thread Dave
> On 22 Apr 2015, at 20:52, Lee Ann Rucker wrote: > >> Is hit testing the content view the only way to tell which window a point >> falls within? At the moment I loop though all windows until I find one which >> works, but is a bit inefficient. > > Since everything's in the same coordinate sp

Re: Converting to Window Coordinates

2015-04-22 Thread Dave
> On 22 Apr 2015, at 20:52, Lee Ann Rucker wrote: > >> Is hit testing the content view the only way to tell which window a point >> falls within? At the moment I loop though all windows until I find one which >> works, but is a bit inefficient. > > Since everything's in the same coordinate sp

RE: Converting to Window Coordinates

2015-04-22 Thread Lee Ann Rucker
Possibly +[NSWindow windowNumberAtPoint:belowWindowWithWindowNumber:], but then you'd still need to loop through your windows to find the one with the matching windowNumber. From: cocoa-dev-bounces+lrucker=vmware@lists.apple.com [cocoa-dev-bounces+lru

Re: UIAlertView won't set password field as first responder

2015-04-22 Thread Jens Alfke
> On Apr 22, 2015, at 1:34 PM, Kyle Sluder wrote: > > Accessing the subviews of a view you do not own is by definition > "messing with the internals". > ... > Just because a method exists doesn't mean that it is OK for arbitrary > clients to access it. Kyle, you may have forgotten that -textFie

UIImage to jpeg results change between 32-bit & 64-bit

2015-04-22 Thread David Brittain
In our app we create a UIImage and set its scale. It is then saved to a jpeg using UIImageJPEGRepresentation(image, 0.8); I am converting the app to 64-bit and the generated image has junk in the ppi block of the resulting jpeg. Below are examples of the data (output using ImageMagick identify) f

Re: UIAlertView won't set password field as first responder

2015-04-22 Thread Kyle Sluder
On Wed, Apr 22, 2015, at 06:03 PM, Jens Alfke wrote: > > Kyle, you may have forgotten that -textFieldAtIndex: is a method > specifically declared in UIAlertView. It’s not some general-purpose > method inherited from UIView. The documentation (see below) even > helpfully tells you which field is th

Re: UIAlertView won't set password field as first responder

2015-04-22 Thread Rick Mann
> On Apr 22, 2015, at 16:59 , Kyle Sluder wrote: > > On Wed, Apr 22, 2015, at 06:03 PM, Jens Alfke wrote: >> >> Kyle, you may have forgotten that -textFieldAtIndex: is a method >> specifically declared in UIAlertView. It’s not some general-purpose >> method inherited from UIView. The documentat

Re: UIImage to jpeg results change between 32-bit & 64-bit

2015-04-22 Thread Michael Crawford
Would it work for you to convert the image using libjpeg? It is open source. -- Michael David Crawford, Consulting Software Engineer mdcrawf...@gmail.com http://www.warplife.com/mdc/ Available for Software Development in the Portland, Oregon Metropolitan Area.

Re: UIImage to jpeg results change between 32-bit & 64-bit

2015-04-22 Thread David Brittain
Thanks for the suggestion. In the meantime I had implemented my own version of UIImageJPEGRepresentation using ImageIO... painful, but it works. (by the way this is happening on iOS 8.2, I don't have a 64-bit device with 8.3 at the moment) Dave On Wed, Apr 22, 2015 at 9:42 PM, Michael Crawford

The Case of the Dancing Keyboard

2015-04-22 Thread Gerriet M. Denkmann
An UITableViewController with an UISearchController in iOS 8.3 When I click in the SearchBar the following dance happens: Keyboard comes; Keyboard goes away; Background becomes gray; Keyboard comes again and now stays. This is sort of difficult to see in the Simulator because it happens too

Linking to MLMediaSourcePhotosIdentifier

2015-04-22 Thread Graham Cox
I’m a bit confused/concerned about a problem I’m having using MLMediaLibrary. On 10.10, my code works fine, and imports the media from Photos or iPhotos OK. On 10.9, the same code crashes. At the moment it’s a bit unclear exactly where it’s crashing - The app I built on 10.10 using XCode 6.3 cra

Re: Linking to MLMediaSourcePhotosIdentifier

2015-04-22 Thread Roland King
> > What is a clean way to detect whether an externally linked string exists, and > if it does not, to supply it myself? > Check if the address of the string constant is NULL. If it is, it wasn’t found. That’s the same as checking for weak linked methods. ___

Re: Linking to MLMediaSourcePhotosIdentifier

2015-04-22 Thread Graham Cox
More info: I have managed to reproduce the crash on my 10.9 machine, and can confirm that the crash is caused by attempting to access the symbol MLMediaSourcePhotosIdentifier. (It wasn’t crashing because I’d locally defined a string with this name to see if that fixed the probem - it did, but I

Re: Linking to MLMediaSourcePhotosIdentifier

2015-04-22 Thread Graham Cox
> On 23 Apr 2015, at 3:30 pm, Roland King wrote: > > Check if the address of the string constant is NULL. If it is, it wasn’t > found. That’s the same as checking for weak linked methods. But that test itself crashes… i.e. if I do this: if( MLMediaSourcePhotosIdentifier == nil ) {

Re: Linking to MLMediaSourcePhotosIdentifier

2015-04-22 Thread Roland King
> On 23 Apr 2015, at 13:38, Graham Cox wrote: > > >> On 23 Apr 2015, at 3:30 pm, Roland King wrote: >> >> Check if the address of the string constant is NULL. If it is, it wasn’t >> found. That’s the same as checking for weak linked methods. > > > But that test itself crashes… > > > i.e.

Re: Linking to MLMediaSourcePhotosIdentifier

2015-04-22 Thread Graham Cox
> On 23 Apr 2015, at 3:40 pm, Roland King wrote: > > That’s because you didn’t read properly. Check if THE ADDRESS OF THE STRING > CONSTANT is NULL. > > The address of the string constant is &MLMediaSourcePhotosIdentifier I read fine. I may be confused, but my understanding is that extern

Re: UIImage to jpeg results change between 32-bit & 64-bit

2015-04-22 Thread Michael Crawford
If you think it's a bug on Apple's part, please file at http://bugreport.apple.com/ Does your problem also occur in the simulator, or only on a device? It could be a symptom of some other bug, possibly a bug of your own which occurs earlier but causes trouble later. -- Michael David Crawford,

Re: Crash at iOS App Startup - What Could Have Gone Wrong?

2015-04-22 Thread Michael Crawford
I have it mostly working now. Thanks for your help. tl;dr: my .xib's were really messed up, it probably should never have worked but the problems became more apparent when I refactored a single large, rather messy source file. In the beginning I did not use a Navigation Controller; I "added" tha

Re: Linking to MLMediaSourcePhotosIdentifier

2015-04-22 Thread Roland King
> On 23 Apr 2015, at 13:50, Graham Cox wrote: > > >> On 23 Apr 2015, at 3:40 pm, Roland King wrote: >> >> That’s because you didn’t read properly. Check if THE ADDRESS OF THE STRING >> CONSTANT is NULL. >> >> The address of the string constant is &MLMediaSourcePhotosIdentifier > > > I re