Re: NSPipe (NSFileHandle) writedata limit?

2010-04-12 Thread McLaughlin, Michael P.
This is turning out to be a lot trickier than I had expected. [I note that there is currently another thread in this list with a similar concern but I'm not sure if our problems are identical.] In my case, I have a main app with an NSArray of subtasks (inheriting from NSObject), initialized then

Data managment

2010-04-12 Thread Billy Flatman
Hi all, I'm trying to find the best approach to data storage with a cocoa application. I've got my application working and saving document specific data to a file, but I also need a larger data file of persistent data, that shouldn't be duplicated. I'm considering imbedding an SQLite database

Re: Problem with reading an NSPipe-NSFileHandle to end

2010-04-12 Thread Rasmus Skaarup
Try simplifying your app by eliminating the use of background threads. Or, if you feel you must use background threads for long-running computation, use them only for handling the data after receiving it. Do everything involving launching the task and initiating background reads of its

Re: Data managment

2010-04-12 Thread Joanna Carter
I'm trying to find the best approach to data storage with a cocoa application. I've got my application working and saving document specific data to a file, but I also need a larger data file of persistent data, that shouldn't be duplicated. I'm considering imbedding an SQLite database into

Re: Data managment

2010-04-12 Thread Samuel Williams
Dear Billy, It might depend on whether you want to remain cross platform or not. Also, if your requirements are very limited, CoreData might be considered overkill. On the other hand, CoreData has great integration with NSDocument type applications and Cocoa UIs. Kind regards, Samuel On

Re: Data managment

2010-04-12 Thread Dru Satori
So long as the application is single user, core data or sqlite are both excellent options. I personally prefer sqlite, as I find it easier to work with than core data. The problem I have with core data is that it's usage is so tightly wound to the managed object interface, that is can be

Re: Data managment

2010-04-12 Thread Billy Flatman
Hi Samuel, Is it possible to get core data data models to save differently, one for a document save which for example might be an XML format, and one into the applications bundle as an SQLite file? That way when a document is saved the main database won't be duplicated, just the document

Re: IKImageView delegate

2010-04-12 Thread Brian Postow
On Apr 10, 2010, at 2:13 AM, Gerriet M. Denkmann wrote: The documentation (updated this morning) says: An IKImageView object’s delegate [...] is informed of various actions by the image view through delegation messages. Why do you say that the documentation has been edited? When I look

CIContext in 10.6

2010-04-12 Thread Gerriet M. Denkmann
This works (but is deprecated in 10.6): NSOpenGLPixelFormat *pixelFomat = CGLPixelFormatObj b = [ pixelFomat CGLPixelFormatObj ]; CGLContextObj a = CGLGetCurrentContext(); ciContext = [ CIContext contextWithCGLContext:

Re: CIContext in 10.6

2010-04-12 Thread Jean-Daniel Dupas
Le 12 avr. 2010 à 16:39, Gerriet M. Denkmann a écrit : This works (but is deprecated in 10.6): NSOpenGLPixelFormat *pixelFomat = CGLPixelFormatObj b = [ pixelFomat CGLPixelFormatObj ]; CGLContextObj a = CGLGetCurrentContext();

Re: Data managment

2010-04-12 Thread Joanna Carter
Hi Billy Is it possible to get core data data models to save differently, one for a document save which for example might be an XML format, and one into the applications bundle as an SQLite file? That way when a document is saved the main database won't be duplicated, just the document

NSArrayController in entity mode and permutations (CoreData question)

2010-04-12 Thread vincent habchi
Hi again! I'd like to change the place of a NSManagedObject stored in a NSArrayController in entity mode (after a drag'n drop operation). I didn't find any suitable primitive, so I decided to go something like removeAtSomeIndex and then immediately after insertAtSomeOtherIndex. However, it

Re: Problem with reading an NSPipe-NSFileHandle to end

2010-04-12 Thread Ken Thomases
On Apr 12, 2010, at 8:46 AM, Rasmus Skaarup wrote: Try simplifying your app by eliminating the use of background threads. Or, if you feel you must use background threads for long-running computation, use them only for handling the data after receiving it. Do everything involving

Re: NSImageView Will Not Alias Images

2010-04-12 Thread Chris Tracewell
On Apr 6, 2010, at 8:16 PM, Ken Ferry wrote: This was once true, but is out of date. I'd like to see a test app. For example, how do you know you aren't getting antialiasing? It may be that you just don't like the output. :-) Well - NSImageInterpolationHigh and NSImageInterpolationNone

Re: NSPipe (NSFileHandle) writedata limit?

2010-04-12 Thread Greg Guerin
McLaughlin, Michael P wrote: Is there a recommended (better) way of sending and receiving a known (large) amount of data to and from a subtask? Is there any sample code anywhere similar to what I need? I couldn't find anything close enough to work. Reading your description, my first

Re: NSPipe (NSFileHandle) writedata limit?

2010-04-12 Thread Greg Guerin
McLaughlin, Michael P. wrote: main -- subtask (main send data) -(void)sendData:(void*)data numBytes:(NSUInteger)sz taskTag: (NSString*)tag { NSData *dataset = [NSData dataWithBytes:data length:sz]; NSNumber *num = [NSNumber numberWithUnsignedInteger:sz]; // NSUInteger NSDictionary

Re: IKImageView delegate

2010-04-12 Thread Gerriet M. Denkmann
On 12 Apr 2010, at 21:39, Brian Postow wrote: On Apr 10, 2010, at 2:13 AM, Gerriet M. Denkmann wrote: The documentation (updated this morning) says: An IKImageView object’s delegate [...] is informed of various actions by the image view through delegation messages. Why do you say

Re: NSPipe (NSFileHandle) writedata limit?

2010-04-12 Thread Jens Alfke
On Apr 12, 2010, at 9:09 AM, Greg Guerin wrote: You must send the notification with size and such BEFORE writing to the pipe. Otherwise the sender can become blocked, because the receiver doesn't know it should be reading anything. And it seems strange to use a second mechanism (a

Re: Data managment

2010-04-12 Thread Jens Alfke
On Apr 12, 2010, at 7:36 AM, Billy Flatman wrote: Is it possible to get core data data models to save differently, one for a document save which for example might be an XML format, and one into the applications bundle as an SQLite file? That way when a document is saved the main database

Re: How do I compare two NSDates using NSPredicate Core Data

2010-04-12 Thread Jeffrey Oleander
A date-time is a date-time, regardless of how it is displayed or entered or obtained from the system. The whole purpose of the NSDate object is to allow easy comparison, and determination of intervals by subtraction... well, a couple of the main purposes... and be able to display dates and

Re: NSPipe (NSFileHandle) writedata limit?

2010-04-12 Thread Marcel Weiher
On Apr 9, 2010, at 10:35 , McLaughlin, Michael P. wrote: My main thread has an NSArray of Subtasks and sends data to each via Npending = numProcessors; for (k = 0;k numProcessors;k++) { Subtask *aTask = [myTask objectAtIndex:k]; [aTask sendData:theData numBytes:sz

Re: NSArrayController in entity mode and permutations (CoreData question)

2010-04-12 Thread Quincey Morris
On Apr 12, 2010, at 08:15, vincent habchi wrote: I'd like to change the place of a NSManagedObject stored in a NSArrayController in entity mode (after a drag'n drop operation). I didn't find any suitable primitive, so I decided to go something like removeAtSomeIndex and then immediately

Re: CIContext in 10.6

2010-04-12 Thread Gerriet M. Denkmann
On 12 Apr 2010, at 21:55, Jean-Daniel Dupas wrote: Le 12 avr. 2010 à 16:39, Gerriet M. Denkmann a écrit : This works (but is deprecated in 10.6): NSOpenGLPixelFormat *pixelFomat = CGLPixelFormatObj b = [ pixelFomat CGLPixelFormatObj ];

Re: Data managment

2010-04-12 Thread Chris Ridd
On 12 Apr 2010, at 17:33, Jens Alfke wrote: There are also other data storage libraries that have a simpler data model than sqlite (they’re like on-disk NSDictionaries) so they’re a bit simpler to use and can potentially run faster. Tokyo Cabinet seems like the main contender in that area

Re: How do I compare two NSDates using NSPredicate Core Data

2010-04-12 Thread Jens Alfke
On Apr 12, 2010, at 9:35 AM, Jeffrey Oleander wrote: A date-time is a date-time, regardless of how it is displayed or entered or obtained from the system. The whole purpose of the NSDate object is to allow easy comparison, and determination of intervals by subtraction... Yup. An NSDate is

Disappearing prefs

2010-04-12 Thread Eric Long
This a Hail Mary pass... I have a bizarre bug. Perhaps someone has a hunch about what's going on. My application prefs file, which is managed with NSUserDefaults, is getting reset to default values, but so far only on a PPC running 10.5.8 and only during the wee hours of Monday mornings. (Go

Re: NSImageView Will Not Alias Images

2010-04-12 Thread Ken Ferry
On Mon, Apr 12, 2010 at 8:59 AM, Chris Tracewell ch...@thinkcl.com wrote: On Apr 6, 2010, at 8:16 PM, Ken Ferry wrote: This was once true, but is out of date. I'd like to see a test app. For example, how do you know you aren't getting antialiasing? It may be that you just don't like the

Re: NSArrayController in entity mode and permutations (CoreData question)

2010-04-12 Thread vincent habchi
Quincy, (sorry for the double answer) This is likely NOT a Core Data question. Most likely you're not doing your memory management quite correctly. Look here under the heading Mutable Arrays:

Re: Data managment

2010-04-12 Thread Dru Satori
Another consideration is: Is this a project that could ever need a multi-user or networked data engine? If the above answer is yes, then CoreData is probably a bad option (though Marko's excellent BaseTen for PostgreSQL might be an option in that case), as the options for migrating Managed

Re: NSPipe (NSFileHandle) writedata limit?

2010-04-12 Thread McLaughlin, Michael P.
Greg Guerin wrote The fundamental design is send all data before looking for any results. This is inherently synchronous, even though two or more processes are involved. If the subtask is designed to read all data before producting any results, then it shouldn't deadlock. However, if the

Re: Data managment

2010-04-12 Thread Jens Alfke
On Apr 12, 2010, at 10:54 AM, Dru Satori wrote: One application that can be used standalone, or always on multi-user or with multiple disconnected users synchronizing data when peered. Complex? You have no idea. But in the design process, many decisions had to be made, that meant

Re: NSArrayController in entity mode and permutations (CoreData question)

2010-04-12 Thread Quincey Morris
On Apr 12, 2010, at 10:14, vincent wrote: I did try to insert the moved object in another array *before* deleting and reinserting it (and then deleting it from the other array). AFAIK, inserting an object in a NSArray retains it. TO no avail. Ah, ok, sorry -- trying the easiest answer first

Re: Data managment

2010-04-12 Thread Jens Alfke
The @*$ listserv is stripping the HTML from messages, so the links in my previous post got lost. (I guess hyperlinking is too newfangled a concept for Mailman?) CouchDB: http://couchdb.apache.org Ubuntu DesktopCouch: http://www.freedesktop.org/wiki/Specifications/desktopcouch

Re: Disappearing prefs

2010-04-12 Thread Quincey Morris
On Apr 12, 2010, at 10:21, Eric Long wrote: This a Hail Mary pass... I have a bizarre bug. Perhaps someone has a hunch about what's going on. My application prefs file, which is managed with NSUserDefaults, is getting reset to default values, but so far only on a PPC running 10.5.8 and

Re: NSInvocation error when closing a dirty document

2010-04-12 Thread Brad Stone
The view that has the combo box, for example, has a Object Controller (called NoteObjectController) binded to my file's owner (MyDocument : NSDocument) with the Model Key Path to the MOC and the object controller is an entity of my model I created in Core Data. The combo box is binded to the

Re: Data managment

2010-04-12 Thread Kyle Sluder
On Apr 12, 2010, at 11:08 AM, Jens Alfke j...@mooseyard.com wrote: The @*$ listserv is stripping the HTML from messages, so the links in my previous post got lost. (I guess hyperlinking is too newfangled a concept for Mailman?) I think you meant to say The listserv is sparing us from the

Re: NSArrayController in entity mode and permutations (CoreData question)

2010-04-12 Thread vincent habchi
Quincey, thanks a lot Surely it would be more robust to make the order explicit in your data model (with a transient property if the order really is transient) and let the array controller keep the displayed content sorted according to that order? Sure, I could do that. In fact I have done

Re: Data managment

2010-04-12 Thread Dru Satori
I looked at it pretty hard, but in the end I went with a traditional RDBMS, largely for the eventual need to expose the interface to external reporting tools, that as a rule don't talk custom interfaces. Admittedly, I borrowed some concepts though. Design wise the 'server' in my configuration

Re: Data managment

2010-04-12 Thread Dru Satori
Honestly I am surprised that apple has not adopted one of the OSS database engines as a standard db in osx and implemented core data on top of it for multi user implementations. If for no other reason than to shoot at Microsoft over the mssql as part of the file system debacle Andy 'Dru'

Updating parameters of a CI filter on a CA layer

2010-04-12 Thread James Walker
The documentation for the filters property of the CALayer class says: Filter properties should be modified by calling setValue:forKeyPath: on each layer that the filter is attached to. But I don't understand exactly how to write the key path, since the filters property is an array rather than

Re: NSPipe (NSFileHandle) writedata limit?

2010-04-12 Thread Dave Keck
In my app so far, I have not even gotten to the point where the subtask produces any output. I am sending all data from main but main blocks iff the number of bytes sent 65536. There's nothing inherent about that number, as shown in the following test case: http://themha.com/ipctest

Re: Updating parameters of a CI filter on a CA layer

2010-04-12 Thread David Duncan
On Apr 12, 2010, at 1:15 PM, James Walker wrote: The documentation for the filters property of the CALayer class says: Filter properties should be modified by calling setValue:forKeyPath: on each layer that the filter is attached to. But I don't understand exactly how to write the key

Re: NSArrayController in entity mode and permutations (CoreData question)

2010-04-12 Thread Kyle Sluder
On Mon, Apr 12, 2010 at 12:12 PM, vincent habchi vi...@macports.org wrote: Besides, the proxy solution has one advantage: since the object in the NSArrayController reacts to actions performed on buttons linked to it, I think it is better to have code in the proxy object rather than on the

Re: Updating parameters of a CI filter on a CA layer

2010-04-12 Thread Kyle Sluder
On Mon, Apr 12, 2010 at 1:22 PM, David Duncan david.dun...@apple.com wrote: You need to assign a name to each filter, then you can create keypaths like @filters.myfiltername.property. Can we get some explanation of the magic involved in CALayer KVC support? Why is -setValue:forKeyPath:

Font Style Names for iPhone/iPad

2010-04-12 Thread Gordon Apple
How do I get a list of style names for a particular font family for iPhone/iPad? I can get the full font names and have my own font picker which shows those. However, that is not what I really want. I want the secondary list to show the common names, i.e., Bold, Italic, etc., like is shown in

Re: Font Style Names for iPhone/iPad

2010-04-12 Thread Eric E. Dolecki
http://www.alexcurylo.com/blog/2008/10/05/snippet-available-uifonts/ On Mon, Apr 12, 2010 at 5:03 PM, Gordon Apple g...@ed4u.com wrote: How do I get a list of style names for a particular font family for iPhone/iPad? I can get the full font names and have my own font picker which shows

Re: NSArrayController in entity mode and permutations (CoreData question)

2010-04-12 Thread Quincey Morris
On Apr 12, 2010, at 12:12, vincent habchi wrote: Sure, I could do that. In fact I have done it: This order is not a property of the inserted object, but of one liked therewith. But tell me, would drag-and-drop work by just rearranging an object ID? Besides, the proxy solution has one

Re: Font Style Names for iPhone/iPad

2010-04-12 Thread Fritz Anderson
On 12 Apr 2010, at 4:08 PM, Eric E. Dolecki wrote: http://www.alexcurylo.com/blog/2008/10/05/snippet-available-uifonts/ That gets you things like CourierNewPS-BoldItalicMT, which the OP made clear he doesn't want. He wants to know how to get the two strings Courier New and Bold Italic. The

set up a hotkey UI

2010-04-12 Thread Martin Batholdy
Hi, I would like to implement a set-hotkey option, where the user presses a hotkey, the app registers the key-combination and makes a global key-shortcut. Does someone here know a good tutorial or has some hints where to start? thanks for any help.

Re: Font Style Names for iPhone/iPad

2010-04-12 Thread Kyle Sluder
On Mon, Apr 12, 2010 at 2:47 PM, Fritz Anderson fri...@manoverboard.org wrote: That gets you things like CourierNewPS-BoldItalicMT, which the OP made clear he doesn't want. He wants to know how to get the two strings Courier New and Bold Italic. The first can come from [UIFont familyNames],

Re: set up a hotkey UI

2010-04-12 Thread Dave DeLong
The Shortcut Recorder works pretty darn well: http://code.google.com/p/shortcutrecorder/ The test project uses the PTHotKey library to demonstrate hotkey functionality, but I've found PTHotKey to be somewhat cumbersome, so I wrote my own wrapper: http://github.com/davedelong/DDHotKey Cheers,

Re: Updating parameters of a CI filter on a CA layer

2010-04-12 Thread David Duncan
On Apr 12, 2010, at 1:30 PM, Kyle Sluder wrote: On Mon, Apr 12, 2010 at 1:22 PM, David Duncan david.dun...@apple.com wrote: You need to assign a name to each filter, then you can create keypaths like @filters.myfiltername.property. Can we get some explanation of the magic involved in

Re: Font Style Names for iPhone/iPad

2010-04-12 Thread Gordon Apple
Thanks for the response, but that is what I have now and am trying to get away from. I want ³normal², ³bold² and ³Italic², not ³Veranda², ³Veranda-Bold² and ³Veranda-Italic² for the secondary list. In many cases it might be possible to strip the font Family name, but the font naming convention

Re: Font Style Names for iPhone/iPad

2010-04-12 Thread Kyle Sluder
On Mon, Apr 12, 2010 at 3:08 PM, Gordon Apple g...@ed4u.com wrote: Thanks for the response, but that is what I have now and am trying to get away from.  I want ³normal², ³bold² and ³Italic²,  not ³Veranda², ³Veranda-Bold² and ³Veranda-Italic² for the secondary list.  In many cases it might be

Re: Font Style Names for iPhone/iPad

2010-04-12 Thread Gordon Apple
Thanks. That did it. I just needed a display name. I used the following when loading the picker view: - (NSString*)styleNameForIndex:(NSUInteger)index inFontFamily:(NSString*)famName { NSString* fontName = [[UIFont fontNamesForFamilyName:famName] objectAtIndex:index]; CTFontRef fontRef

Re: NSPipe (NSFileHandle) writedata limit?

2010-04-12 Thread Andrew Farmer
On 12 Apr 2010, at 10:56, McLaughlin, Michael P. wrote: Greg Guerin wrote The fundamental design is send all data before looking for any results. This is inherently synchronous, even though two or more processes are involved. If the subtask is designed to read all data before producting any