Field editor undo vs document dirty

2009-04-06 Thread Quincey Morris
I can't work out if this simple and I'm just missing it, or if this is hard ... In a NSDocument-based application, I have some text fields in the document window. Typing in one of these text fields (that is, typing characters but not pressing Tab or Return to end editing) is of course und

Re: Re: NSWindow from code

2009-04-06 Thread Jan Bernard Marsman
Thanks Graham. I will do that. I was thinking in terms of class portability to include these panels inside my view (-controller) ;-) JB > On 07/04/2009, at 3:40 AM, Jan Bernard Marsman wrote: > > From my subclass of an NSView I call the (simplified) following: > > - openHUD { > >[NSButton *

Re: New question about borken NSOperationQueue

2009-04-06 Thread Peter N Lewis
On 01/02/2009, at 5:40 , jurin...@eecs.utk.edu wrote: Previous post indicates that NSOperationQueue only seems to work with ONE queue. It is worse than that, it can crash even with a single queue - the only believed safe case is to a single core processor (ie, the iPhone). Otherwise you

Re: Does waitUntilExit really mean that?

2009-04-06 Thread Adam R. Maxwell
On Apr 6, 2009, at 9:02 PM, Michael Ash wrote: On Mon, Apr 6, 2009 at 11:10 PM, Adam R. Maxwell wrote: On Apr 6, 2009, at 7:50 PM, Michael Ash wrote: First off, I wouldn't write code like this. You have no guarantee that readToEndOfFileInBackgroundAndNotify will actually read everything

Re: Does waitUntilExit really mean that?

2009-04-06 Thread Ken Thomases
On Apr 6, 2009, at 11:02 PM, Michael Ash wrote: If you do insist on running an inner runloop, then you'll need to do that *first*, before you use waitUntilExit, to avoid the potential deadlock. There is no potential deadlock. waitUntilExit is documented as running the run loop. Well, ther

Re: Does waitUntilExit really mean that?

2009-04-06 Thread Michael Ash
On Mon, Apr 6, 2009 at 11:10 PM, Adam R. Maxwell wrote: > > On Apr 6, 2009, at 7:50 PM, Michael Ash wrote: >> First off, I wouldn't write code like this. You have no guarantee that >> readToEndOfFileInBackgroundAndNotify will actually read everything >> while your code is stuck in waitUntilExit, s

Re: Does waitUntilExit really mean that?

2009-04-06 Thread Adam R. Maxwell
On Apr 6, 2009, at 7:50 PM, Michael Ash wrote: On Mon, Apr 6, 2009 at 1:47 PM, Michael Domino wrote: [task setLaunchPath:@"/usr/bin/hdiutil"]; [task setArguments:[NSArray arrayWithObjects:@"info", nil]];

Re: Does waitUntilExit really mean that?

2009-04-06 Thread Michael Ash
On Mon, Apr 6, 2009 at 1:47 PM, Michael Domino wrote: > Hi all, > > Thanks for all the advice about how to make my pipe reads non-blocking, that > works almost perfectly. I have a class now that handles the notifications > (called msgTarget in the code snippet below). The puzzle here is the meanin

NSMatrix of NSButtonCells prototype bindings not applied to instances in matrix

2009-04-06 Thread Ben Golding
I've been trying to create a calendar matrix of days which are clickable to select a day in the month. It's a something of a classic example of using NSMatrix from what I've read but I'm trying to use bindings to hook it up. I am using an NSArrayController holding an array of NSButtonCel

[Moderator] Re: iPhone development

2009-04-06 Thread Scott Anguish
This isn't on topic for Cocoa programming. Please try and keep the discussion about Cocoa programming and Mac OS X application development. Thanks Scott On 6-Apr-09, at 6:38 PM, Development wrote: How much time can I expect o have to wait for an iPhone app to be reviewed and rejected or

Re: MVC pattern, bindings, and controllers

2009-04-06 Thread Ken Thomases
On Apr 6, 2009, at 5:40 PM, Quincey Morris wrote: On Apr 6, 2009, at 09:30, Gwynne Raskind wrote: This brings me to the controller object, which is where such "glue" code belongs. At the moment, I bind the views to the model using NSObjectController. But NSObjectController doesn't provide t

Re: Does waitUntilExit really mean that?

2009-04-06 Thread Ken Thomases
On Apr 6, 2009, at 12:47 PM, Michael Domino wrote: Thanks for all the advice about how to make my pipe reads non- blocking, that works almost perfectly. I have a class now that handles the notifications (called msgTarget in the code snippet below). The puzzle here is the meaning of "waitUnti

Re: NSWindow from code

2009-04-06 Thread Graham Cox
On 07/04/2009, at 3:40 AM, Jan Bernard Marsman wrote: From my subclass of an NSView I call the (simplified) following: - openHUD { [NSButton * button] = [NSWindow * w] = ... [[w contentView] addSubview: ] NSWindowController * nw = [NSWindowController initWithWindow:w]; [nw

Re: MVC pattern, bindings, and controllers

2009-04-06 Thread Quincey Morris
On Apr 6, 2009, at 09:30, Gwynne Raskind wrote: This brings me to the "Attributed String" and "Data" bindings of NSTextView itself. What it wants is either an NS(Mutable?)AttributedString or an NSData containing RTF data. I have neither of those in my model object; I have an NSMutableString

Re: iPhone development

2009-04-06 Thread Dave DeLong
Current babble indicates 7 to 10 days. Dave On Apr 6, 2009, at 4:38 PM, Development wrote: How much time can I expect o have to wait for an iPhone app to be reviewed and rejected or approved? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

iPhone development

2009-04-06 Thread Development
How much time can I expect o have to wait for an iPhone app to be reviewed and rejected or approved? ___ 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

Re: No more crash logs since 10.5.6 ?

2009-04-06 Thread Dave Keck
Oh - I should also mention that in the process of writing a crash reporter for my app, I found that if I caught the usual crash signals, a crash report wouldn't be generated. I had to "re-crash" the app from the signal handler, using abort(). ___ Cocoa-d

Re: Regarding NSScroller

2009-04-06 Thread Andrew Farmer
On 06 Apr 09, at 05:53, Sourabh Sahu wrote: As in MFC there is class SCrollInfo, Is there anything which is similar to this on Cocoa? Do you mean this? http://msdn.microsoft.com/en-us/library/bb787537(VS.85).aspx If so, no. All of these values are properties of the NSScroller object (and

Re: No more crash logs since 10.5.6 ?

2009-04-06 Thread Dave Keck
Is it just your app, or any app? Perhaps this: http://developer.apple.com/qa/qa2001/qa1288.html could help? David ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the

Cache

2009-04-06 Thread fawad shafi
Dear All, i m working on UIWebView, i want that if any page displayed in UIWebView. it should store in cache, but with that page all its embeded images, css files, javascript files should be stored in cache. When i called the page from cache, all the images,css files ,javascript files should

MVC pattern, bindings, and controllers

2009-04-06 Thread Gwynne Raskind
I'm developing a Cocoa application with bindings, as should be obvious. I do apologize if this is a newbie question, but my searches of the documentation haven't made any of this clearer to me. I'm trying to make use of the MVC pattern, properly isolating UI code from my model objects using

No more crash logs since 10.5.6 ?

2009-04-06 Thread Xavier Miller
Hello, Our application doesn't generate crash logs as before. Now, if for example there is a "bad access" signal, the application quits without report. I can reproduce the problem by adding a sementation fault (accessing a bad initialized pointer) in the sample Cocoa project code. In all ver

Re: Creating and accessing a sparse image

2009-04-06 Thread Andrew Farmer
On 06 Apr 09, at 11:02, Ramakrishna Vavilala wrote: I am investigating the use of sparse bundles and sparse images to distribute some data with my application. I have a few questions: 1. Is there an API to create and mount them? Not that I'm aware of. Just shell out to the hdiutil command-lin

[MEET] CocoaHeads-LA meeting Thu 4/9 7:30pm

2009-04-06 Thread Rob Ross
Greetings LA CocoaHeads. This Thursday Ken Bowlus will be demoing his iPhone app and discussing how to set up an iPhone project, a high-level view of the iPhone API, and a walk through of the source code for his app. We meet at the offices of E! Entertainment at 7:30pm. Our meeting locati

SQLite and Unicode

2009-04-06 Thread Тимофей Даньшин
Hello. When I insert non-latin strings into my SQLite3 database, they turn into some weird sets of characters (as I select those strings later in Terminal), and the fields, which contain those strings, become unusable by my application. I googled for it for quite a bit, but everywhere it s

RE: [Q] "auto"-incrementing integer attribute in awakeFromInsert

2009-04-06 Thread Jon C. Munson II
Actually, since I'm using a fetch in the routine to get the next value, the processPendingChanges call didn't seem to be necessary (at least for my app), so I was able to just use the disable/enable messages around the ID portion. When I tested that, it worked just peachy! :) Thanks for that! Pe

Re: [Q] "auto"-incrementing integer attribute in awakeFromInsert

2009-04-06 Thread Sean McBride
On 4/6/09 2:10 PM, Jon C. Munson II said: >So, I agree Sean that the auto-increment set is being done in a different >"pass" than the actual add. > >However, it seems adding a record can be undone (and redone presumably) - >just need to press Undo twice. > >While that works, I don't think it is th

Re: [Q] "auto"-incrementing integer attribute in awakeFromInsert

2009-04-06 Thread Chris Hanson
On Mar 18, 2009, at 8:52 AM, Jon C. Munson II wrote: I'm having a little trouble getting a self-incrementing attribute to work in the awakeFromInsert override. What do you want to do with this attribute? When using Core Data, you don't need to define your own primary or foreign keys. Ev

Re: Non-pageable app

2009-04-06 Thread Sidney San Martín
There's still a big difference (in the real world) between writing to RAM and writing to disk. Data written to disk could be recovered weeks later, depending on the machine's usage, and it's right to be concerned about keys ending up there. On Mon, Apr 6, 2009 at 1:24 PM, Clark Cox wrote: > > Whe

RE: [Q] "auto"-incrementing integer attribute in awakeFromInsert

2009-04-06 Thread Jon C. Munson II
Namaste! I realize this reply is a bit later in the calendar, however, I finally had time to tryout the default "for free" undo from the managedObjectContext. What I found is that Undo will first undo the auto-increment, a second, subsequent, undo will then Undo the Add. One exception to this is

Re: PDFView in layer backed view appears white

2009-04-06 Thread John Calhoun
On Apr 6, 2009, at 6:31 AM, Memo Akten wrote: Hi, I would like to add a PDFView to another view. But if my root view is layer backed I see nothing (just white). The PDFView contains a subview. You can get to it via: -[PDFView documentView]. Perhaps retain this subview, remove from super, a

Re: NSString* kMyKey = @"aKey" vs #define MYKEY @"aKey"

2009-04-06 Thread Greg Parker
On Apr 3, 2009, at 3:44 PM, Quincey Morris wrote: On Apr 3, 2009, at 15:15, Nate Weaver wrote: IIRC they're optimized to point to the same memory location (I wasn't sure, so I tested and confirmed). I usually do: NSString * const kConstantNameHere = @"foo"; That's what I've seen in Apple he

Re: Non-pageable app

2009-04-06 Thread Jonathan Hendry
On Apr 3, 2009, at 19:27 PM, Clark Cox wrote: On Fri, Apr 3, 2009 at 3:57 PM, Rich Collyer wrote: My primary interest is to ensure that the content of an NSSecureTextField and any times I extract the string from it, the memory is not paged out, or cached. Then turn on "Use Secure Virtu

Does waitUntilExit really mean that?

2009-04-06 Thread Michael Domino
Hi all, Thanks for all the advice about how to make my pipe reads non- blocking, that works almost perfectly. I have a class now that handles the notifications (called msgTarget in the code snippet below). The puzzle here is the meaning of "waitUntilExit". My hdiutil info task was returnin

Creating and accessing a sparse image

2009-04-06 Thread Ramakrishna Vavilala
I am investigating the use of sparse bundles and sparse images to distribute some data with my application. I have a few questions: 1. Is there an API to create and mount them? 2. Can disks be mounted privately for a process? I don't want any other process to access that image while my process is

NSWindow from code

2009-04-06 Thread Jan Bernard Marsman
Dear experts, I can't seem to get the working of it, nor find the answer on the internet : My goal is to have a panel with a slider when I click on a button from my main app to change an image, say it's brightness. So in the subclass of this image, I want some popup action with a nspanel Any adde

Re: Non-pageable app

2009-04-06 Thread Greg Guerin
Jonathan Hendry wrote: For instance, if you plug a secure, encrypted USB key into a public- access Mac, to which you may not have admin access in order to change the preference setting. You don't want some malware running on such a machine to be able to snoop the password that you enter t

Re: Non-pageable app

2009-04-06 Thread Clark Cox
On Sun, Apr 5, 2009 at 11:03 PM, Kyle Sluder wrote: > On Sun, Apr 5, 2009 at 8:07 PM, Chris Suter wrote: >> What am I missing? > > If the attacker physically powers off the machine while the page is > written out to disk, s/he can just read the page off the swap space on > the HDD.  If this page

Re: Non-pageable app

2009-04-06 Thread Michael Ash
On Mon, Apr 6, 2009 at 2:03 AM, Kyle Sluder wrote: > On Sun, Apr 5, 2009 at 8:07 PM, Chris Suter wrote: >> What am I missing? > > If the attacker physically powers off the machine while the page is > written out to disk, s/he can just read the page off the swap space on > the HDD.  If this page c

Re: NSButton not responding to click in worker thread

2009-04-06 Thread Michael Ash
On Mon, Apr 6, 2009 at 2:20 AM, Vijay Kanse wrote: > Hello All, > I have separated my task on thread when my main thread is blocked. > I am not able to find where my main thread is blocked. Separating my task on > worker thread  i am not able to get button click event. > > I think this is because

Re: Need localization-proof method of transporting dates.

2009-04-06 Thread Michael Ash
On Mon, Apr 6, 2009 at 1:55 AM, Greg Guerin wrote: > Michael Ash wrote: > >> Good point. Although this has the disadvantage of temporarily using a >> bunch of memory, roughly doubling your footprint for this data >> structure, that's not likely to be a problem for the typical use cases >> for this

Re: NSURLConnection error codes. Is there a list somewhere ?

2009-04-06 Thread I. Savant
On Mon, Apr 6, 2009 at 9:04 AM, Jérome Foucher wrote: >> Look in NSURLError.h ... > Anyway, you saved my day. Cocoa-dev 1 - Spotlight 0. It might be worth (if you haven't already) forcing Spotlight to index your /Developer folder. I think a thread came up recently where the Developer folder is

Re: NSURLConnection error codes. Is there a list somewhere ?

2009-04-06 Thread Mike Abdullah
Yeah it took me quite some time before I stumbled upon it. I think they might be listed in the docs under Foundation Constants or something. On 6 Apr 2009, at 14:04, Jérome Foucher wrote: Le 6 avr. 09 à 14:45, Mike Abdullah a écrit : Look in NSURLError.h Houra !!! Thanks a million. I r

Re: Regarding NSScroller

2009-04-06 Thread I. Savant
On Mon, Apr 6, 2009 at 8:53 AM, Sourabh Sahu wrote: > As in MFC there is class SCrollInfo, Is there anything which is similar to > this on Cocoa? Your post raises a couple of issues: 1 - For those not familiar with SCrollInfo (or MFC in general), perhaps you should explain what it is, rather

Re: Equivalent of Redraw(MFC) on Cocoa

2009-04-06 Thread Mike Abdullah
On 6 Apr 2009, at 14:07, Dave Geering wrote: On Mon, Apr 6, 2009 at 10:52 PM, Sourabh Sahu wrote: Hi Everyone, What is equivalent of Redraw method of MFC on Cocoa? Sourabh Usually you can send an NSView or a subclass of NSView "setNeedsDisplay:YES" and it will redraw the entire view. But

RE: IB Plugin help

2009-04-06 Thread Jon C. Munson II
Hi Jon, Here are my responses to your responses to my responses :): [1] INSTALLING THE PLUGIN [Jon C. Munson II] Thank you for all this information. I'll chew on it for a bit since there is quite a lot said herein. [2] THE PLUGIN AND FRAMEWORK IDENTIFIERS [Jon C. Munson II] I did

PDFView in layer backed view appears white

2009-04-06 Thread Memo Akten
Hi, I would like to add a PDFView to another view. But if my root view is layer backed I see nothing (just white). If I disable layer backing, pdf appears fine. My code is: NSString *path = [[NSBundle mainBundle] pathForResource:fileName ofType:nil inDirectory:folder]; PDFDocument* pdf = [

Re: Equivalent of Redraw(MFC) on Cocoa

2009-04-06 Thread Dave Geering
On Mon, Apr 6, 2009 at 10:52 PM, Sourabh Sahu wrote: > Hi Everyone, > What is equivalent of Redraw method of MFC on Cocoa? > Sourabh Usually you can send an NSView or a subclass of NSView "setNeedsDisplay:YES" and it will redraw the entire view. ___ Co

Re: NSURLConnection error codes. Is there a list somewhere ?

2009-04-06 Thread Jérome Foucher
Le 6 avr. 09 à 14:45, Mike Abdullah a écrit : Look in NSURLError.h Houra !!! Thanks a million. I really wonder why XCode didn't find it when I searched the documentation Anyway, you saved my day. Cocoa-dev 1 - Spotlight 0. Jérome___ Cocoa-

Regarding NSScroller

2009-04-06 Thread Sourabh Sahu
Hi Everyone, As in MFC there is class SCrollInfo, Is there anything which is similar to this on Cocoa? Sourabh DISCLAIMER == This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual

Equivalent of Redraw(MFC) on Cocoa

2009-04-06 Thread Sourabh Sahu
Hi Everyone, What is equivalent of Redraw method of MFC on Cocoa? Sourabh DISCLAIMER == This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. I

Re: NSURLConnection error codes. Is there a list somewhere ?

2009-04-06 Thread Mike Abdullah
Look in NSURLError.h On 6 Apr 2009, at 10:23, Jérome Foucher wrote: Hi there, A piece of code that uses NSURLConnection to download files is reporting error codes like -1001 and -1009. Unfortunately, all I can get are these error codes. The software is running on a remote machine that on

NSURLConnection error codes. Is there a list somewhere ?

2009-04-06 Thread Jérome Foucher
Hi there, A piece of code that uses NSURLConnection to download files is reporting error codes like -1001 and -1009. Unfortunately, all I can get are these error codes. The software is running on a remote machine that only reports the codes to a web service, so I cannot get the descriptio