Re: The use of UIActionSheet mysteriously disables our app with a white screen after memory warning.

2012-03-20 Thread Rhythmic Fistman
On 19 March 2012 23:09, G S stokest...@gmail.com wrote: On Mon, Mar 19, 2012 at 9:29 AM, Rhythmic Fistman rfist...@gmail.com wrote: I have this problem too. I have a small non-storyboard project that reproduces it a TSI in progress. Woah, finally, someone else emerges!  Please let us know

Re: SSL NSURLConnection to fake-cert server?

2012-03-20 Thread Mike Abdullah
Sent from my iPad On 20 Mar 2012, at 05:16 AM, Rick Mann rm...@latencyzero.com wrote: I'm connecting to my dev server which has a self-signed cert. When I do this, NSURLConnection complains with: NSLocalizedDescription = An SSL error has occurred and a secure connection to the server

Re: The use of UIActionSheet mysteriously disables our app with a white screen after memory warning.

2012-03-20 Thread Rhythmic Fistman
On 20 March 2012 10:12, Rhythmic Fistman rfist...@gmail.com wrote: On 19 March 2012 23:09, G S stokest...@gmail.com wrote: On Mon, Mar 19, 2012 at 9:29 AM, Rhythmic Fistman rfist...@gmail.com wrote: I have this problem too. I have a small non-storyboard project that reproduces it a TSI in

Re: How to get max size of view according to constraints?

2012-03-20 Thread Richard Somers
On Mar 19, 2012, at 10:20 PM, Charles Srstka wrote: As everyone knows, if you have a view with a bunch of subviews and you’ve got NSLayoutConstraints set up for everything, in many cases you might end up with a minimum or maximum size for the view beyond which the constraints are

Re: How to get max size of view according to constraints?

2012-03-20 Thread Charles Srstka
On Mar 20, 2012, at 8:16 AM, Richard Somers wrote: On Mar 19, 2012, at 10:20 PM, Charles Srstka wrote: As everyone knows, if you have a view with a bunch of subviews and you’ve got NSLayoutConstraints set up for everything, in many cases you might end up with a minimum or maximum size for

Re: How is this an incorrect decrement of a reference count?

2012-03-20 Thread G S
I think most of this is in the NIB loading guide and the template code for UIViewController subclases (and the code auto-generated when you add outlets in Xcode using the mouse) does this. Thanks. I'm not using ARC and won't be for this release of my app. The posted link was for the Mac OS

Re: SSL NSURLConnection to fake-cert server?

2012-03-20 Thread Jens Alfke
On Mar 19, 2012, at 10:16 PM, Rick Mann wrote: What do I need to do to? I'm using -sendAsynchronousRequest:queue:completionHandler: So I can't set a delegate. If you want more control over credentials and certificate trust, you’ll need to use the delegate API. —Jens

Re: The use of UIActionSheet mysteriously disables our app with a white screen after memory warning.

2012-03-20 Thread G S
My UIAlertView version has exactly the same problem. Are you sure it worked for you? Yep. For some reason my business partner's iPhone 4S gets hammered with an outrageous number of memory warnings, whereas my iPhone 4 rarely does. He doesn't seem to be running anything extra in the

Re: How is this an incorrect decrement of a reference count?

2012-03-20 Thread David Duncan
On Mar 20, 2012, at 10:48 AM, G S wrote: I *am not* releasing the IBOutlets in dealloc, and have yet to see a leak in Leaks as a result. For a myriad of arcane reasons it is fairly difficult to see UIView (or CALayers) in Leaks. That doesn't mean they will eventually be deallocated. I

Re: How to get max size of view according to constraints?

2012-03-20 Thread Kyle Sluder
On Tue, Mar 20, 2012, at 12:01 PM, Charles Srstka wrote: Right, but the problem is that I want to make a view that can be given arbitrary subviews at runtime, and I don’t necessarily know what its subviews and their constraints will be at compile time. What I want is a way to determine the

Re: How to get max size of view according to constraints?

2012-03-20 Thread Charles Srstka
On Mar 20, 2012, at 1:03 PM, Kyle Sluder wrote: Tried it. I don't believe it's possible. The whole point of scroll views (actually, clip views) is that the bounds coordinate space inside them is independent of the size of the view itself. If you start drawing constraints between the contents

Re: SSL NSURLConnection to fake-cert server?

2012-03-20 Thread Rick Mann
On Mar 20, 2012, at 10:53 , Jens Alfke wrote: On Mar 19, 2012, at 10:16 PM, Rick Mann wrote: What do I need to do to? I'm using -sendAsynchronousRequest:queue:completionHandler: So I can't set a delegate. If you want more control over credentials and certificate trust, you’ll need

Re: How to get max size of view according to constraints?

2012-03-20 Thread Kyle Sluder
On Mar 20, 2012, at 11:14 AM, Charles Srstka wrote: On Mar 20, 2012, at 1:03 PM, Kyle Sluder wrote: What I’m trying to find is the upper limit on the width and height according to the current set of constraints at runtime, when I don’t necessarily know what the subviews or their constraints

Re: SSL NSURLConnection to fake-cert server?

2012-03-20 Thread Jens Alfke
On Mar 20, 2012, at 11:16 AM, Rick Mann wrote: I had written a fairly elaborate wrapper around the delegate-based API so I could use blocks in a way similar to what the new call provides. It also returned the NSURLConnection object, and allowed canceling of a request. But I always felt

Re: How to get max size of view according to constraints?

2012-03-20 Thread Charles Srstka
On Mar 20, 2012, at 1:21 PM, Kyle Sluder wrote: It ran the constraints system, solved for the maximum size of the content view, and prevented you from resizing the NSWindow. But it knew what all the subviews were: the empty set. That's not the same as solving the constraints system without

Re: How is this an incorrect decrement of a reference count?

2012-03-20 Thread Eeyore
I think the link was to the Resource Programming Guide which covers both Mac OS X and iOS. You will want to look at page 17 in the PDF Legacy Patterns. If you follow David's advice and want to try Heap Shot analysis, there's a good introduction here:

Re: How to get max size of view according to constraints?

2012-03-20 Thread Kyle Sluder
On Mar 20, 2012, at 11:46 AM, Charles Srstka wrote: On Mar 20, 2012, at 1:21 PM, Kyle Sluder wrote: It ran the constraints system, solved for the maximum size of the content view, and prevented you from resizing the NSWindow. But it knew what all the subviews were: the empty set. That's

Re: How is this an incorrect decrement of a reference count?

2012-03-20 Thread Eeyore
On Mar 20, 2012, at 12:19 PM, Eeyore wrote: I think the link was to the Resource Programming Guide which covers both Mac OS X and iOS. You will want to look at page 17 in the PDF Legacy Patterns. Sorry, I meant: You will want to look at the section Legacy Patterns on page 17 of the PDF

Odd initial save behavior with bundle based NSDocument

2012-03-20 Thread Neil Clayton
Hi All, I'm seeing something a bit odd with NSDocument in 10.7. We're writing large files to our own package, so as a result I've overridden: - (BOOL) writeToURL:ofType:forSaveOperation:originalContentsURL:error: - (BOOL)readFromURL:ofType:error: + (BOOL) autosavesInPlace - is fixed to return

UIPickerView joy

2012-03-20 Thread Alex Zavatone
I just noticed something lovely in iOS 4.x and UIPickerView related and am looking to confirm with the group It appears that setting the height of a UIPicker ist verboten. I've run in iOS 4.x and 5.0 in the simulator and on devices and it appears that the height is somewhat fixed - in most

Re: How is this an incorrect decrement of a reference count?

2012-03-20 Thread G S
OK, thanks for the info and reference material. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com

NSDate interval formatting

2012-03-20 Thread Markus Spoettl
Hello all, I'm looking for a way to determine how a locale would like to have date intervals formatted. NSDateFormatter has a cool method (+dateFormatFromTemplate:options:locale:) that produces a date format string that can be used to format dates where you only know which components you

further confusion regarding the release of controls loaded from a nib

2012-03-20 Thread G S
The Apple doc for iOS says: From a practical perspective, in iOS and OS X outlets should be defined as declared properties. Outlets should generally be weak, except for those from File’s Owner to top-level objects in a nib file (or, in iOS, a storyboard scene) which should be strong. Outlets that

Re: further confusion regarding the release of controls loaded from a nib

2012-03-20 Thread David Duncan
On Mar 20, 2012, at 1:49 PM, G S wrote: This just adds more confusion. If the properties for the majority of IBOutlets are weak (since they're usually all going to be owned by the UIViewController's view), why would we release them in dealloc? If you aren't using ARC, then you couldn't have

Re: further confusion regarding the release of controls loaded from a nib

2012-03-20 Thread Eeyore
The material quoted is post-ARC usage (not the use of weak and not assign). In the legacy paradigm material, you will see that pre-ARC. You can choose retain or assign (or copy, but I'll leave that out here). iOS outlets should be held as retain, and therefore need to be nil-ed in viewDidUnload

Re: How to get max size of view according to constraints?

2012-03-20 Thread Charles Srstka
On Mar 20, 2012, at 2:26 PM, Kyle Sluder wrote: NSWindow runs the constraint system on its view hierarchy, and then constrains the size of the window the size computer for its content view. Yes! I’d like a way to do the same thing, and get at that computed size. Running the constraints

Re: further confusion regarding the release of controls loaded from a nib

2012-03-20 Thread G S
Thanks. I didn't know whether they meant weak as a keyword necessarily, or simply the concept of a weak reference. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the

Re: How to get max size of view according to constraints?

2012-03-20 Thread jonat...@mugginsoft.com
On 20 Mar 2012, at 21:12, Charles Srstka wrote: The -layoutSubtreeIfNeeded method, in contrast, always seems (at least in my testing) to change everything to the minimum allowed size. So for the example above, if you set the view to have the size { 200, 300 }, it would change that to {

Re: UIPickerView joy

2012-03-20 Thread Luke Hiesterman
Only the three heights you identified are supported. There isn't special sauce for getting around that, though enforcement wasn't always there in the past. Luke On Mar 20, 2012, at 1:05 PM, Alex Zavatone wrote: I just noticed something lovely in iOS 4.x and UIPickerView related and am

Re: How to get max size of view according to constraints?

2012-03-20 Thread Charles Srstka
On Mar 20, 2012, at 4:29 PM, jonat...@mugginsoft.com wrote: I am getting a bit befuddled. Is the following what we have: 1. A certain view hierarchy managed by a set of constraints. Yes. 2. A certain Charles, who wishes to programatically modify (maximise?) the size of one (or more) of

Re: further confusion regarding the release of controls loaded from a nib

2012-03-20 Thread G S
OK, I think I know why there weren't any leaks. Per (possibly old) examples, I have IBOutlet in both the member-variable declarations and the property declarations. Now I'm realizing that IB will show two outlets: one for the member variable itself, and one for the property when you have this:

Re: further confusion regarding the release of controls loaded from a nib

2012-03-20 Thread Alex Zavatone
Set breakpoints on them and right after them and when you hit them see: 1) what their values are 2) if they ever get hit at all. That should help you get to the bottom of what's being used when. On Mar 20, 2012, at 5:50 PM, G S wrote: OK, I think I know why there weren't any leaks. Per

Serial I/O over USB

2012-03-20 Thread Graham Cox
I'm just looking for a quick pointer to a class or external unix program to use to do simple serial communication over USB. I want to make a small utility to go with an Arduino project but I'm not sure where to start. I can use the Arduino built-in serial monitor, but that only prints the

Re: Serial I/O over USB

2012-03-20 Thread Nick Zitzmann
On Mar 20, 2012, at 4:23 PM, Graham Cox wrote: I'm just looking for a quick pointer to a class or external unix program to use to do simple serial communication over USB. I want to make a small utility to go with an Arduino project but I'm not sure where to start. I can use the Arduino

Re: How to get max size of view according to constraints?

2012-03-20 Thread Peter Ammon
Hello Charles, It sounds like you have the idea that constraints establish a minimum and maximum size on a window (or view), and the window is free to take on any size within that range. When you resize a window, it evaluates the constraints at the proposed size. If would make the constraints

SOLVED Re: How to get max size of view according to constraints?

2012-03-20 Thread Charles Srstka
Sweet! I’ve found the solution to my own problem. Here it is, in case someone else finds this thread wondering the same thing. What I was trying to do was to keep track of the NSScrollView being resized, and adjust the size of its document view as needed. Toward this end, I was trying to

Re: How to get max size of view according to constraints?

2012-03-20 Thread Peter Ammon
On Mar 20, 2012, at 10:01 AM, Charles Srstka wrote: On Mar 20, 2012, at 8:16 AM, Richard Somers wrote: On Mar 19, 2012, at 10:20 PM, Charles Srstka wrote: As everyone knows, if you have a view with a bunch of subviews and you’ve got NSLayoutConstraints set up for everything, in many

Re: How to get max size of view according to constraints?

2012-03-20 Thread Charles Srstka
On Mar 20, 2012, at 7:00 PM, Peter Ammon wrote: 2. Establish another constraint that says the height of the document view equals the height of the scroll view. Give this constraint a priority lower than required. What its priority should be depends on how tightly you want the document view

Re: further confusion regarding the release of controls loaded from a nib

2012-03-20 Thread G S
I went through and removed all the IBOutlet notation from the members and reconnected everything to the properties in IB. Also added release calls for all the controls in dealloc. The app appears to be quite solid, with no leaks or analyzer issues detected. I'm calling it done! Needless to

Re: further confusion regarding the release of controls loaded from a nib

2012-03-20 Thread Kyle Sluder
On Mar 20, 2012, at 5:33 PM, G S wrote: Needless to say, it seems like ARC was a desperately needed step forward. I don't mind doing things the right way and I have a high tolerance for syntactic tedium, but the invisibility of NSNib's usage of properties and the resulting asymmetry of the

Re: further confusion regarding the release of controls loaded from a nib

2012-03-20 Thread G S
I'm doing an iPhone app. I'm not doing any Mac app. I should simply have said the nib-loading behavior. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators

Re: further confusion regarding the release of controls loaded from a nib

2012-03-20 Thread Kyle Sluder
On Mar 20, 2012, at 5:59 PM, G S wrote: I'm doing an iPhone app. I'm not doing any Mac app. I should simply have said the nib-loading behavior. Except the nib loading behavior is vastly different on the two operating systems. This is why the documentation goes into detail about both.

Re: further confusion regarding the release of controls loaded from a nib

2012-03-20 Thread G S
Well, my code doesn't show things being allocated and assigned to the IBOutlets, but it shows a bunch of releases of the associated members. As far as I can gather, the code is now correct. It is this asymmetry that strikes me as messy and error-prone.

NSFileOwnerAccountName will not assign to root

2012-03-20 Thread Prime Coderama
Does anyone know why the assignment of NSFileOwnerAccountName and NSFileGroupOwnerAccountName does not work? The directory created defaults to my account and the staff group. NSFileManager *fileManager = [NSFileManager defaultManager]; NSMutableDictionary *attr = [NSMutableDictionary

Re: NSFileOwnerAccountName will not assign to root

2012-03-20 Thread Fritz Anderson
On 20 Mar 2012, at 8:52 PM, Prime Coderama wrote: Does anyone know why the assignment of NSFileOwnerAccountName and NSFileGroupOwnerAccountName does not work? The directory created defaults to my account and the staff group. NSFileManager *fileManager = [NSFileManager defaultManager];

UIBezierPath stroke oddity

2012-03-20 Thread Marco Tabini
In an attempt to figure out how well gesture recognizers work, I've built a very simple app that uses a UIPanGestureRecognizer and using them to construct a UIBezierPath that I then stroke, but I am getting strange artifacts on the resulting drawing operation (see

Re: Missing header files/folders?

2012-03-20 Thread Shane Stanley
On 07/10/2011, at 4:42 PM, Joar Wingfors wrote: On 6 okt 2011, at 22:38, Jens Alfke wrote: On Oct 6, 2011, at 9:09 PM, Shane Stanley wrote: I've just bought a new Mac, and after migrating and updating I notice that inside the frameworks in /System/Library/Frameworks/, the Headers link

Re: Missing header files/folders?

2012-03-20 Thread Jens Alfke
On Mar 20, 2012, at 9:20 PM, Shane Stanley wrote: This has come up again. I have a customer who has upgraded to Lion from Snow Leopard, and there are no header files (which my app uses) in his /System/Library/Frameworks/. But there is no option to reinstall Xcode with Xcode 4.3. You