Re: Is it possible to detour a drag and drop operation?

2009-08-16 Thread Iceberg-Dev
On Aug 16, 2009, at 2:03 AM, Jerry Krinock wrote: On 2009 Aug 15, at 12:51, Iceberg-Dev wrote: When the drop is validated in the right window (type of item accepted), I would like to either display a window above the right window or change the right window content to give the user a list

Re: Is it possible to detour a drag and drop operation?

2009-08-16 Thread Graham Cox
On 16/08/2009, at 5:51 AM, Iceberg-Dev wrote: When the drop is validated in the right window (type of item accepted), I would like to either display a window above the right window or change the right window content to give the user a list of more detailed possible drop locations.

Trying to track down error in NSPersistentDocument when saving

2009-08-16 Thread Gideon King
Hi, I'm hoping someone may have encountered something like this before, or have knowledge of the internals of NSPersistentStore... I am getting an exception on NSDictionary setObject:forKey: (attempt to insert nil key), and although I am not getting any stacktrace, it appears when I step

Re: Trying to track down error in NSPersistentDocument when saving

2009-08-16 Thread Graham Cox
On 16/08/2009, at 9:26 PM, Gideon King wrote: Any suggestions as to where to look for a solution to this would be very welcome. How about setting a conditional breakpoint on [NSDictionary setObject:forKey] with the condition object == nil? Also, set a breakpoint on objc_exception_throw

Re: Trying to track down error in NSPersistentDocument when saving

2009-08-16 Thread Gideon King
Cool - haven't used conditional breakpoints before, and didn't realize about objc_exception_throw... That gives me completely different information, but much more useful: #4 0x97578cba in -[NSAtomicStore(_NSInternalMethods) _insertNodeIntoMainCache:] () #5 0x97578c51 in

Cleaning garbage in Core Data

2009-08-16 Thread Squ Aire
I have an Employee entity with the attribute userInfo, which is a binary data type that stores some NSDictionary of key-value pairs. With time, as the user uses the app, garbage will pile up (albeit gradually) in these dictionaries that are associated with the employees. And by garbage, I

Obtain MobileMe username

2009-08-16 Thread David Kocher
What is the current best practice to obtain the MobileMe username as configured in the MobileMe Preference pane? Previously, the DotMacKit.framework allowed but this is no longer maintained with no 64bit version available. One could search the Keychain for passwords of Kind .Mac but it

Re: Cleaning garbage in Core Data

2009-08-16 Thread Graham Cox
On 17/08/2009, at 1:22 AM, Squ Aire wrote: Just to make it clear: The whole userInfo dictionary will tend to NOT be garbage. Only a subset of key-value pairs within the userInfo dictionaries for the employees will be garbage. I want to get rid of this subset without bothering the user in

Re: Cleaning garbage in Core Data

2009-08-16 Thread Sherm Pendley
On Sun, Aug 16, 2009 at 11:22 AM, Squ Airesqu...@live.com wrote: Just to make it clear: The whole userInfo dictionary will tend to NOT be garbage. Only a subset of key-value pairs within the userInfo dictionaries for the employees will be garbage. I want to get rid of this subset without

RE: Cleaning garbage in Core Data

2009-08-16 Thread Squ Aire
For now, just imagine that a set of valid (non-garbage) keys are stored in a ValidKeys entity (with a single attribute called 'key' of type string). Or just imagine some global array storing those keys if you like that better. Now, imagine that we have chosen a bunch of employees to clean up

Re: Cleaning garbage in Core Data

2009-08-16 Thread I. Savant
On Aug 16, 2009, at 11:22 AM, Squ Aire wrote: Just to make it clear: The whole userInfo dictionary will tend to NOT be garbage. Only a subset of key-value pairs within the userInfo dictionaries for the employees will be garbage. I want to get rid of this subset without bothering the user

Re: Cleaning garbage in Core Data

2009-08-16 Thread I. Savant
On Aug 16, 2009, at 11:34 AM, Squ Aire wrote: For now, just imagine that a set of valid (non-garbage) keys are stored in a ValidKeys entity (with a single attribute called 'key' of type string). Or just imagine some global array storing those keys if you like that better. ... Surely

RE: Cleaning garbage in Core Data

2009-08-16 Thread Squ Aire
Seems to me that the source of the problem is the mixing of transient and persistent key-value pairs within the same dictionary. If you store the transient pairs in a dictionary of their own, that whole dictionary could be transient. It's not like that. I don't decide beforehand what is

RE: Cleaning garbage in Core Data

2009-08-16 Thread Squ Aire
Don't mark as garbage - delete them. Problem solved. If you need them to stick around in the garbage state, they're not garbage! I am not *explicitly* marking anything as garbage. Whenever a user decides to remove a ValidKeys managed object, corresponding key-value pairs in all the

Printing Multiple-Pages Issue

2009-08-16 Thread Renzil D'Souza
Hi, I'm trying to print a really large image into 'N' pages. So I over-rode 'knowsPageRange' and 'rectForPage'. Since I was able to successfully draw on a single page, my rectForPage function returns the entire 'print view frame' itself, and I draw a sub-image in this frame. My understanding is

Adding string encodings CoCoa

2009-08-16 Thread tim lindner
Is it possible to add an encoding to CoCoa? I have some text data from a legacy system which is ASCII for 0-127, but 128-255 is unique to the system. I'd like to load it into a text view and just have it work. What options do I have? -- tim lindner tlind...@macmess.org

Re: Adding string encodings CoCoa

2009-08-16 Thread Steve Christensen
Well, certainly one way would be to preprocess the text buffer, converting the custom characters into a standard encoding like UTF-8, then passing the processed buffer into +[NSString stringWithUTF8String:]. At that point it would just work since it's in a known encoding. Depending on

Re: Cleaning garbage in Core Data

2009-08-16 Thread Caleb Strockbine
On Aug 16, 2009, at 3:02 PM, Graham Cox graham@bigpond.com wrote: On 17/08/2009, at 1:47 AM, Squ Aire wrote: Key-value pairs in the userInfo dictionaries are marked as garbage as the app is running and depending on various factors. Don't mark as garbage - delete them. Problem solved. If

Re: Problem with Float type variable

2009-08-16 Thread Scott Ribe
I mean there is only 1 digit after the decimal. It should not have the range problem with a value this small. Because you're translating from a decimal representation to a binary one, and back again. Consider a very simple case: 0.1. What sum of powers of two equals 0.1? (Hint, it's an infinite

Turn off menu highlight in outline view?

2009-08-16 Thread Graham Cox
I have an outline view using source list style. When I right-click on the view, the item under the mouse highlights with a blue outline independent of the current selection. This gives the impression that the menu command applies to that item, not the real selected item. In my case my menu

Re: Printing Multiple-Pages Issue

2009-08-16 Thread Graham Cox
On 17/08/2009, at 3:56 AM, Renzil D'Souza wrote: I'm trying to print a really large image into 'N' pages. So I over- rode 'knowsPageRange' and 'rectForPage'. If you're simply trying to tile a large view over 'n' pages, you don't need to do this - that's what it will do by default with no

Re: Turn off menu highlight in outline view?

2009-08-16 Thread Jerry Krinock
On 2009 Aug 16, at 17:21, Graham Cox wrote: I have an outline view using source list style. When I right-click on the view, the item under the mouse highlights with a blue outline independent of the current selection. This gives the impression that the menu command applies to that item,

Stymied by NSCollectionView

2009-08-16 Thread Andrew McClain
I've been reading docs and looking at IconCollection for the last week and I still can't really figure this out. Here's the behavior I want to model: pretend I'm making poker dice game. I have a visual representation of the dice, and I want to select a certain number of them each round. Right now

Displaying an animated graph (= nodes and edges)

2009-08-16 Thread Kaspar Fischer
Dear list, After some hours of research I realise that I need some advice on how to tackle this: My goal is to render a graph [1] consisting of at most 100 nodes and 300 edges (most of the time the graph will be much smaller, though). I have an algorithm to position the nodes and the

Re: Cleaning garbage in Core Data

2009-08-16 Thread BJ Homer
On Sun, Aug 16, 2009 at 10:35 AM, Squ Aire squ...@live.com wrote: I am not *explicitly* marking anything as garbage. Whenever a user decides to remove a ValidKeys managed object, corresponding key-value pairs in all the userInfo dictionaries are *conceptually* marked as garbage. This is

Re: Cleaning garbage in Core Data

2009-08-16 Thread Jerry Krinock
To Squ: I read through all your posts today and, although several people have asked you, I still don't see where you've confirmed that this garbage/ cleanup is indeed a performance issue. My recommendation remains that you confirm this first, especially now that multithreading Core Data

Re: iPhone: detect if docked?

2009-08-16 Thread David Duncan
More than likely yes. But I'm not certain you can use the EA framework to detect such a situation anyway (if someone knows for certain I'm happy to be wrong here). And in absence of further data as to the nature of the power source, it would be difficult for a developer to recognize this

Re: Printing Multiple-Pages Issue

2009-08-16 Thread Renzil D'Souza
Hi, No, I want control over how many pages I'm dividing my view into, and precisely how I divide my image into those pages. I'm writing a function for someone to print N images from 1 large image, and the user of the function may want to supply the ratios at which to divide the image (vertically