Re: How to parse multipart/form-data?

2012-01-29 Thread Thomas Davie
CoreParse! https://github.com/beelsebob/CoreParse I hope that helps :) Thanks Tom Davie if (*ra4 != 0xffc78948) { return false; } On 28 Jan 2012, at 06:29, Kai Cao wrote: > Hi, > > I'm using CocoaHTTPServer to upload files from computer to iOS devices. But > the result NSData received from

Use of Application nib file template

2012-01-29 Thread Rick Mann
One of the file templates for iOS UI is "Application," described as, "An Interface Builder document suitable for creating an iOS application, including an application delegate and window." Problem is, I don't see how to use it. I tried making it the main nib file (via info.plist), but my app th

Re: Use of Application nib file template

2012-01-29 Thread Rick Mann
Okay, slight misunderstanding about how this file is supposed to work. I got it in my head that it actually instantiated the UIApplication object. I realize now that it does not. Now I just have to figure out why an exception is being thrown. I'm sure it's some sort of name mismatch with Info.p

Re: Use of Application nib file template

2012-01-29 Thread Rick Mann
Figured it out. Some of the objects in my new nib weren't properly set up. In this day and age of Xcode 4 and iOS 5, I'm really disappointed that the NIB loading still doesn't report errors very well. -- Rick On Jan 29, 2012, at 3:29 , Rick Mann wrote: > Okay, slight misunderstanding about ho

Subclassing IKImageView

2012-01-29 Thread Jan E. Schotsman
Hello, I want to modify IKImageView so that it erases with the window background color. By default it erases with medium gray which looks awful. I tried implementing -drawRect but this is only called when the window opens. It isn't even called when the image is set to nil. Can one set th

Re: getting a nsurl file size

2012-01-29 Thread Eric Smith
The getResource... method returns YES whether I pass @"content-length" or NSURLFileSize (I tried that one first). Eric On Jan 28, 2012, at 10:21 PM, Ken Thomases wrote: > On Jan 28, 2012, at 11:53 PM, Eric Smith wrote: > >> I'm trying to determine the size of a file on a server. If I send th

Re: getting a nsurl file size

2012-01-29 Thread Eric Smith
Charles, Works like a charm. Thank you! Eric On Jan 28, 2012, at 11:28 PM, Charles Srstka wrote: > On Jan 29, 2012, at 12:21 AM, Ken Thomases wrote: > >> * The keys that are valid for that method are those listed in the NSURL >> documentation. They may bear no relation to HTTP response hea

Re: Use of Application nib file template

2012-01-29 Thread Kyle Sluder
On Jan 29, 2012, at 3:55 AM, Rick Mann wrote: > Figured it out. Some of the objects in my new nib weren't properly set up. > > In this day and age of Xcode 4 and iOS 5, I'm really disappointed that the > NIB loading still doesn't report errors very well. When it threw an exception, did you bre

Re: Is NSRuleEditor worth the learning curve?

2012-01-29 Thread Fritz Anderson
On 28 Jan 2012, at 6:23 PM, Erik Stainsby wrote: > One example I have found (NibBasedSpotlightSearcher.xcodeproj - circa 2006) > presents a window in the nib which holds clusters of related controls in a > single view. I'm doing the gasping guppy trying to see where in the code > those individu

Re: Subclassing IKImageView

2012-01-29 Thread Fritz Anderson
On 29 Jan 2012, at 8:42 AM, Jan E. Schotsman wrote: > I want to modify IKImageView so that it erases with the window background > color. By default it erases with medium gray which looks awful. > > I tried implementing -drawRect but this is only called when the window opens. > It isn't even cal

Re: Drag and drop in collectionview

2012-01-29 Thread Gordon Apple
> If you are just trying to rearrange things in your list, you do not need to > get involved with the pasteboard. Rearranging arrays (or ordered sets) is a > little tricky, especially if you want to drag a dispersed collection to a > specific location which is in or after the extent of the selecti

NSLayoutManager's setDefaultAttachmentScaling: not working in custom PDF NSContexts.

2012-01-29 Thread Gus Mueller
I have an issue where using NSLayoutManager's setDefaultAttachmentScaling:NSImageScaleProportionallyDown doesn't seem to work if I setup my own NSGraphicsContext + CGPDFContext. The problem is that large inline images are not scaled down when drawn like they would be in an NSTextView. Text aft

Re: Use of Application nib file template

2012-01-29 Thread Ben Kennedy
On 29 Jan 2012, at 8:54 am, Kyle Sluder wrote: > When it threw an exception, did you break in the debugger? By default, Xcode > breaks on objc_exception_throw. Obviously you will need to hit Continue if > you want to see any log output. Or you could just print the first argument; > consult your

Sensitivity of swipe gesture

2012-01-29 Thread James Merkel
Somewhat off-topic for Cocoa -- but In Lion 10.7, the swipe gesture is a nice feature of the mouse. However I find that frequently the mouse wants to swipe pages when I just want to scroll the page. When that happens the page has to "settle down" before anything else can be done. Kind of annoy

Re: Subclassing IKImageView

2012-01-29 Thread Jan E. Schotsman
On Jan 29, 2012, at 6:27 PM, Fritz Anderson wrote: I want to modify IKImageView so that it erases with the window background color. By default it erases with medium gray which looks awful. I'm curious — how does the instance property .backgroundColor not suit your purpose? Me I am curi

Re: Use of Application nib file template

2012-01-29 Thread Rick Mann
Yep, I hit continue. It just jumps to __kill without logging. Printing the first argument might work, I'll try that next time. Sent from my iPhone On Jan 29, 2012, at 8:54, Kyle Sluder wrote: > On Jan 29, 2012, at 3:55 AM, Rick Mann wrote: > >> Figured it out. Some of the objects in my new

Re: Use of Application nib file template

2012-01-29 Thread Kyle Sluder
On Sun, Jan 29, 2012 at 11:12 AM, Ben Kennedy wrote: > On 29 Jan 2012, at 8:54 am, Kyle Sluder wrote: > >> When it threw an exception, did you break in the debugger? By default, Xcode >> breaks on objc_exception_throw. Obviously you will need to hit Continue if >> you want to see any log output.

Re: Use of Application nib file template

2012-01-29 Thread Ben Kennedy
On 29 Jan 2012, at 2:23 pm, Kyle Sluder wrote: >>> Or you could just print the first argument; consult your local ABI >>> documentation for more info. >> >> Why doesn't Xcode do this automatically? Infuriating. > > Do what, start calling Objective-C runtime functions in my program > without my

Re: How to parse multipart/form-data?

2012-01-29 Thread Jens Alfke
On Jan 27, 2012, at 10:29 PM, Kai Cao wrote: > I'm using CocoaHTTPServer to upload files from computer to iOS devices. But > the result NSData received from the browser is multipart form data, which is > really hard to parse manually. I know I can write a parser from scratch, > however, it's t

How do you run an app on the device with Instruments?

2012-01-29 Thread G S
Hi all. After finding an alleged answer on the Web (since the Apple documentation refers to the nonexistent Run > Start with Performance Tool menu in Xcode), I still can't get my app running in Instruments. Choosing Profile from the Product menu does cause Instruments to prompt for a template, but

NSTextFieldCell not getting disabled

2012-01-29 Thread Abhijeet Singh
Hi,I have used NSComboBoxCell in my NSTableView to show the list of items. Once user done with its selection and moved to next TableView row I replace NSComboBoxCell with non editable NSTextFieldCell in previous row using (NSCell *)tableView:(NSTableView *)tableView dataCellForTableColumn:(NSTab

iCloud On OSX - Cannot save changes

2012-01-29 Thread April
On iOS iCloud is easy. On OSX I don't know what the problem is. Ok.. First I had a document on my computer. The using the setUbiquidous method I moved it to iCloud. It is on iCloud, and readable. But thats the problem. I have read only access to it from the Mac App. When I open the document I u

NSPopUpButton Binding Frustration

2012-01-29 Thread Seth Willits
This is such a dead simple problem that I think I've encountered a couple times over the years and I don't think I've managed to ever find a solution that works how I want. I'll break this down into an easy specific example. Say I have a file type popup in a save sheet for saving an image: @

Re: NSPopUpButton Binding Frustration

2012-01-29 Thread Quincey Morris
On Jan 29, 2012, at 22:32 , Seth Willits wrote: > The popup should display the names, but I want the selected item bound to > fileType which is one of the UTIs. By my reading of the documentation, this > _should be very simple_. > > Bind: > content -> fileTypes* > contentValues -> fileTypeNames