UITableViewCell Red Button tap crashes app

2010-07-30 Thread Symadept
Hi, I have a table with one section of style UITableViewCellEditingStyleDelete. Once I click on the - button, it changes to vertical and my app crashes. Here is the stack trace #0 0x32043cd0 in GSEventGetType () #1 0x30b7109c in -[UITableViewCellDeleteConfirmationControl(UITableViewCellDeleteCo

Possible to hide the Drag & Drop cursor?

2010-07-30 Thread Eric Wing
I am working on a drag & drop feature where my application is the drag destination. I want to be able to receive various types of images via file handle, URL, data, etc. My custom view knows how to properly display and position the images for my specific app, better than the built-in default Mac b

Question about a custom UITableView (possibly)

2010-07-30 Thread Eric E. Dolecki
I've been asked about making a certain kind of control and I'm wondering what the best approach might be. The gist of the idea... something that looks like a UITableView, but when you select an item (that has more information behind it), it would select the row and animate expand the list item (he

[ANN] JSONKit - Yet another JSON library

2010-07-30 Thread John Engelhart
Announcing JSONKit - http://github.com/johnezang/JSONKit A BSD Licensed JSON serializer / deserializer. Yes, yet another JSON library for Cocoa / Objective-C. Why another JSON library? Well, if you assume that all the JSON libraries offer similar functionality, that leaves one major metric that

Re: Cocoa-dev Digest, Vol 7, Issue 777

2010-07-30 Thread Keary Suska
On Jul 29, 2010, at 5:59 PM, Martin Stanley wrote: >> Even if you could capture a proposed deletion before save, which AFAIK you >> can't, you will still have an undo mess. IMHO you best bet is to capture the >> situation at the point of editing the predicate, substituting the deleted >> item w

IKImageView choppy?

2010-07-30 Thread Brian Postow
I have an IKImageView, and I'm putting CGImages (That I make out of NSImages) onto it. However, a normal 200DPI 8.5/11 page takes like 3 seconds to come up, appearing in rectangles about 2inches (screen) on a side at a time. This is really annoying. Is there a way around this? Alternatively, is

Can't get image from cacheDisplayInRect:toBitmapImageRep

2010-07-30 Thread Jørgen Tjernø
Hi, I'm trying to capture a part of my view for use in NSView's dragImage, but cacheDisplayInRect:toBitmapImageRep: seems to capture a blank image. My custom NSView doesn't draw opaquely, but the region I'm trying to capture is drawn on - my view draws a checkerboard with except for "spacing" betw

NSButtonCell AttributedTitle and Word Wrap

2010-07-30 Thread Fluffy D. Bunny
Hello All, I am having an issue that is perplexing me. I have a NSMatrix using NSButtonCells to display a series of checkboxes. Because the Text is RTF I have to set AttributedTitle instead of Title. But even with wordwrap set to true it will only wrap Title and never does it to AttribtuedTitle.

Calling Matlab from Cocoa

2010-07-30 Thread Chris Goedde
Hi all, Anyone here have any experience calling Matlab from a Cocoa program? I have a rather complex calculation that I've implemented in Matlab that I would like to call from a Cocoa program. (I could re-implement it in Objective C if absolutely necessary, but I would prefer not to; it would p

does anyone use IKImageView?

2010-07-30 Thread Brian Postow
I've been following this list for a while, and have seen very few questions about the IK family, even though I've had a series of problems with it. Is it known that it is a lousy way to do things? or am I the only one who has these problems? Brian Postow Senior Software Engineer Acordex Imagin

Re: Calling Matlab from Cocoa

2010-07-30 Thread Sherm Pendley
On Fri, Jul 30, 2010 at 1:00 PM, Chris Goedde wrote: > > Anyone here have any experience calling Matlab from a Cocoa program? > > I have a rather complex calculation that I've implemented in Matlab that I > would like to call from a Cocoa program. (I could re-implement it in > Objective C if abs

Re: does anyone use IKImageView?

2010-07-30 Thread douglas welton
Hi Brian, I'm pretty sure that the volume of questions on a mailing list is not a direct indicator of software quality, but we'll leave that discussion for another time. ;^} Do you have a specific question regarding IKImageView that you would like to post? Have you checked out the Quartz mail

Re: does anyone use IKImageView?

2010-07-30 Thread Brian Postow
On Jul 30, 2010, at 1:32 PM, douglas welton wrote: > Hi Brian, > > I'm pretty sure that the volume of questions on a mailing list is not a > direct indicator of software quality, but we'll leave that discussion for > another time. ;^} > > Do you have a specific question regarding IKImageView

Re: does anyone use IKImageView?

2010-07-30 Thread Quincey Morris
On Jul 30, 2010, at 10:18, Brian Postow wrote: > I've been following this list for a while, and have seen very few questions > about the IK family, even though I've had a series of problems with it. Is it > known that it is a lousy way to do things? or am I the only one who has these > problems

Accessing items in a UIScrollView?

2010-07-30 Thread Eric E. Dolecki
I am trying to quickly prototype something - I am stuffing a bunch of subclassed UIButton controls into a UIScrollView. I would like to access those items later from another method, but I don't know how to properly access them without resorting to an NSArray approach. I have this (setState is a me

Re: Accessing items in a UIScrollView?

2010-07-30 Thread Fritz Anderson
On 30 Jul 2010, at 2:14 PM, Eric E. Dolecki wrote: > -(void) buttonClicked:(id)sender > { >int tag = [sender tag]; > >for(int i=0;i<20;i++){ >BasicListItem *tmp = (BasicListItem*)[scrollView viewWithTag:i]; > >if( tag != i ){ >[tmp setState:NO]; //Barf here >

Re: Accessing items in a UIScrollView?

2010-07-30 Thread Eric E. Dolecki
Thanks - I'm just using a NSMutable array now and doing it that way which works great. On Fri, Jul 30, 2010 at 3:30 PM, Fritz Anderson wrote: > On 30 Jul 2010, at 2:14 PM, Eric E. Dolecki wrote: > > > -(void) buttonClicked:(id)sender > > { > >int tag = [sender tag]; > > > >for(int i=0;i<2

[iPhone] Nib Loading Question

2010-07-30 Thread Development
I have a nib with two views in it. however the only view that loads is the one connected to the view outlet in the view controller. How can I get the second view to load?___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin r

Re: Intercepting deletion of NSManagedObjects or how to handle deletion in non-explicit relationships?

2010-07-30 Thread Martin Stanley
Thanks for helping me analyze the situation more carefully. Yes, I do mean deleting "a managed object of that entity type". (I come from a modelling background where we commonly used the word "entity" to mean an object of a particular type/class.) And yes, deletes are not the problem. You are c

Re: Calling Matlab from Cocoa

2010-07-30 Thread Chris Goedde
On Jul 30, 2010, at 12:27 PM, Sherm Pendley wrote: > On Fri, Jul 30, 2010 at 1:00 PM, Chris Goedde wrote: >> >> Anyone here have any experience calling Matlab from a Cocoa program? >> >> I have a rather complex calculation that I've implemented in Matlab that I >> would like to call from a Coc

Re: Intercepting deletion of NSManagedObjects or how to handle deletion in non-explicit relationships?

2010-07-30 Thread Kyle Sluder
On Fri, Jul 30, 2010 at 2:11 PM, Martin Stanley wrote: > 2- the invalid predicate breaks the NSPredicateEditor. My > NSPredicateEditorRowTemplate subclass populates its popup button dynamically > based on the current contents of an NSArrayController bound to the entity in > question (e.g., Proj

Determine encoding of file

2010-07-30 Thread Dave DeLong
Hi everyone, I have a seemingly simple question, but I haven't been able to figure it out. Given a file, how can I determine the NSStringEncoding of the file, without reading the entire file into memory? (If the file isn't a text file, then defaulting to NSUTF8StringEncoding is just fine, sinc

Re: Determine encoding of file

2010-07-30 Thread Nick Zitzmann
On Jul 30, 2010, at 4:09 PM, Dave DeLong wrote: > Hi everyone, > > I have a seemingly simple question, but I haven't been able to figure it out. > > Given a file, how can I determine the NSStringEncoding of the file, without > reading the entire file into memory? (If the file isn't a text fil

Re: Determine encoding of file

2010-07-30 Thread Kyle Sluder
On Fri, Jul 30, 2010 at 3:09 PM, Dave DeLong wrote: > Hi everyone, > > I have a seemingly simple question, but I haven't been able to figure it out. > > Given a file, how can I determine the NSStringEncoding of the file, without > reading the entire file into memory?  (If the file isn't a text fi

Re: Determine encoding of file

2010-07-30 Thread John Pannell
Hi Dave- I have some code I've been using for a few years for this purpose... when I consulted Google on the source of the TECSniffer class that I have, the search was not revealing. So... I've posted the class files here: http://www.positivespinmedia.com/dev/TEC.zip I believe it is using som

drawingRectForBounds not being called

2010-07-30 Thread Tony Romano
I have an NSTextTextField in my nib that is using a custom NSTextFieldCell (set in IB) class that has only one method over-riden, drawingRectForBounds. The method is not being called. This is what I have done. 1. Set a break point to verify it is not being called. 2. Using F-Script, verified

Re: drawingRectForBounds not being called

2010-07-30 Thread Kyle Sluder
On Fri, Jul 30, 2010 at 3:38 PM, Tony Romano wrote: > I have an NSTextTextField in my nib that is using a custom NSTextFieldCell > (set in IB) class that has only one method over-riden, drawingRectForBounds.   > The method is not being called.  This is what I have done. > > 1. Set  a break point

Re: drawingRectForBounds not being called

2010-07-30 Thread Tony Romano
@interface ViewStatusTextCell : NSTextFieldCell - (NSRect)drawingRectForBounds:(NSRect)theRect; @end - (NSRect)drawingRectForBounds:(NSRect)theRect { NSRect rect = [super drawingRectForBounds:theRect]; NSSize textSize = [self cellSizeForBounds:theRect]; NSUIntege

Re: Determine encoding of file

2010-07-30 Thread Martin Wierschin
Given a file, how can I determine the NSStringEncoding of the file, without reading the entire file into memory? Some files may have a text encoding attribute set, which you can read using getxattr and "com.apple.textEncoding". Probably you won't have the luxury of just using that API, but

Re: Determine encoding of file

2010-07-30 Thread Michael Watson
There's a good session from WWDC 2009, 112 - Text Processing in Cocoa, that has a segment about guessing encodings without having to read the entire file (in most cases). It's worth watching, even if it doesn't solve your problem directly. -- michael On 30 Jul, 2010, at 15:09, Dave DeLong wro

Re: Determine encoding of file

2010-07-30 Thread Michael Watson
And, of course, as Nick Z and that session point out, you may need to allow the user to choose the encoding somehow in your application, given you can't be 100% accurate when the encoding is unknown. -- michael On 30 Jul, 2010, at 17:35, Michael Watson wrote: > There's a good session from WWD

Re: Determine encoding of file

2010-07-30 Thread Rainer Brockerhoff
At 16:06 -0700 30/07/10, cocoa-dev-requ...@lists.apple.com wrote: >From: Dave DeLong >Date: Fri, 30 Jul 2010 16:09:22 -0600 >Message-ID: >... >Given a file, how can I determine the NSStringEncoding of the file, without >reading the entire file into memory? (If the file isn't a text file, then

Re: Intercepting deletion of NSManagedObjects or how to handle deletion in non-explicit relationships?

2010-07-30 Thread Martin Stanley
Hmm. I realize that this seems unconventional; that is why I posed the question in the first place. Perhaps you know something about NSPredicateEditor that I don't, but I think it does not use its delegate in the way you envision. To quote from the docs: -- Unlike NSRuleEditor, NSPredicateEditor

Re: Determine encoding of file

2010-07-30 Thread Michael Ash
On Fri, Jul 30, 2010 at 6:24 PM, Nick Zitzmann wrote: > > On Jul 30, 2010, at 4:09 PM, Dave DeLong wrote: > >> Hi everyone, >> >> I have a seemingly simple question, but I haven't been able to figure it out. >> >> Given a file, how can I determine the NSStringEncoding of the file, without >> read

Re: Intercepting deletion of NSManagedObjects or how to handle deletion in non-explicit relationships?

2010-07-30 Thread Kyle Sluder
On Fri, Jul 30, 2010 at 7:37 PM, Martin Stanley wrote: > Perhaps you know something about NSPredicateEditor that I don't, but I think > it does not use its delegate in the way you envision. To quote from the docs: You are correct. I was thinking of NSRuleEditor. > However, my subclass of NSPred