NSFileHandle fileHandleForUpdatingAtPath never returns

2008-05-29 Thread Denis Bohm
When another application has a device file open and I try to use NSFileHandle fileHandleForUpdatingAtPath to open the same device file, the call just seems to hang and never return. The API documentation doesn't say what should happen in this case. Does anyone know why it isn't

CGContextSetRGBFillColor() off by one?

2008-05-29 Thread Mike Manzano
Hi there, I have this code: CGContextSetRGBFillColor(cref, 0xaa/255.0, 0xb0/255.0,0xc0/255.0, 1) ; CGContextFillRect(cref, CGRectMake(0, 0, w, h)) ; CGContextFlush(cref) ; Later on, I get the image buffer to print out the contents of the first pixel:

Re: NSFileHandle fileHandleForUpdatingAtPath never returns

2008-05-29 Thread Ken Thomases
On May 29, 2008, at 1:29 AM, Denis Bohm wrote: When another application has a device file open and I try to use NSFileHandle fileHandleForUpdatingAtPath to open the same device file, the call just seems to hang and never return. The API documentation doesn't say what should happen in this

Re: 10.5.3 Release Notes?

2008-05-29 Thread Jean-Daniel Dupas
Le 29 mai 08 à 06:58, Scott Anguish a écrit : On May 28, 2008, at 11:31 PM, Kyle Sluder wrote: Hi, This is more a question for Tech Pubs or DTS than anyone, I guess, but are there/will there be developer release notes for 10.5.3? Can anyone confirm any previous show-stoppers are fixed

odd problem with NSMutableDictionary and initWithContentsOfFile

2008-05-29 Thread Leslie Smith
I very recently upgraded from 10.4.11 Xcode 2.5 to 10.5.2 and Xcode 3. The code below worked fine (i.e. correctly) on the earlier system, but now gives really unexpected results. Is there a known workround, or am I simply missing something? It appears that the method call

Re: odd problem with NSMutableDictionary and initWithContentsOfFile

2008-05-29 Thread Ken Ferry
Hi Leslie, The issue is that you cannot init an object more than once. See if [[NSMutableDictionary alloc] initWithContentsOfFile:] behaves as it ought. -Ken On Wed, May 28, 2008 at 12:58 AM, Leslie Smith [EMAIL PROTECTED] wrote: I very recently upgraded from 10.4.11 Xcode 2.5 to 10.5.2 and

Re: odd problem with NSMutableDictionary and initWithContentsOfFile

2008-05-29 Thread Michael Vannorsdel
You can't init an object more than once (well not an intended use). You do: SimParamnames = [NSMutableDictionary dictionary]; and later: [SimParamnames initWithContentsOfFile: aFile]; which are both initializing the object. The second init is either being ignored or perhaps corrupting

Re: CGContextSetRGBFillColor() off by one?

2008-05-29 Thread Uli Kusterer
Am 29.05.2008 um 09:21 schrieb Mike Manzano: Regardless of what I set the red component to, the value in the actual image buffer is always off by one (it is always exactly one less). This does not seem to be true for the green and blue components. Any ideas why? ColorSync hard at

Re: Package Builder Questions

2008-05-29 Thread Fritz Anderson
On 29 May 2008, at 2:51 AM, Adil Saleem wrote: I want some help with Package Builder. Should i ask the questions on this list or is there any separate list for that ? Have a look at [EMAIL PROTECTED] — F ___ Cocoa-dev mailing list

Re: 10.5.3 Release Notes?

2008-05-29 Thread Kyle Sluder
On Thu, May 29, 2008 at 12:58 AM, Scott Anguish [EMAIL PROTECTED] wrote: this is where I'd insert the 'this isn't an official support channel' template text. I know that, but if 1) I had missed something that had been released or 2) you or another Apple employee could announce a forthcoming

Enter key down

2008-05-29 Thread Micha Fuhrmann
Hi there! It must be simple, it has to be simple... But I can't figure out where to start... I'm simply trying to catch the Enter key down event from a text view. Any help appreciated. Michael ___ Cocoa-dev mailing list

Re: Mount Point

2008-05-29 Thread Kyle Sluder
On Wed, May 28, 2008 at 2:36 PM, Mr. Gecko [EMAIL PROTECTED] wrote: Hello I have a program that finds a device by it's device number such as /dev/disk2s3 how would I find out the mount point/name of that device? If not how can I find the device number and name from a mount point? Mounting is

Re: Ending Editing when Doc Saves?

2008-05-29 Thread Dave Fernandes
Make the window the first responder in your document's saveDocument method... - (IBAction)saveDocument:(id)sender { NSWindow* window = [self windowForSheet]; [window makeFirstResponder:window]; [super saveDocument:sender]; } On May 28, 2008, at 11:15 PM, David Carlisle

Re: Ending Editing when Doc Saves?

2008-05-29 Thread Kyle Sluder
On Wed, May 28, 2008 at 11:15 PM, David Carlisle [EMAIL PROTECTED] wrote: If I'm adding text to an NSTextField, then I select Save, somehow the message needs to get to the NSTextField wherever it is that it needs to terminate editing and send its contents to the model before the model is

Overlapping Extensions and UTIs in NSDocument

2008-05-29 Thread Markus Müller
Hello. I have a problem in my document-based application related to UTIs. I'd like to allow importing of FreeMind files (Extension: mm). I added the following definition to my info.plist keyUTImportedTypeDeclarations/key array dict keyUTTypeConformsTo/key array stringpublic.xml/string

Re: Ending Editing when Doc Saves?

2008-05-29 Thread Mike Abdullah
I would advise against that exact approach as there are lower level save methods which can be called without -saveDocument: being used. Have a look through the NSDocument for details on the over -save… methods. On 29 May 2008, at 13:41, Dave Fernandes wrote: Make the window the first

Re: DO woes

2008-05-29 Thread Aurélien Hugelé
See DO problems posted just few days ago. Aurélien, Objective Decision Team On 29 mai 08, at 00:39, Western Botanicals wrote: Cocoa Experts, Thank you for your time. I am having a problem with DOs. I am working on this time clock system to track the timecards of employees. The

Re: Cover Flow in Cocoa?

2008-05-29 Thread John C. Randolph
On May 28, 2008, at 2:19 PM, Scott Anguish wrote: I really can't stress how bad an idea using private API is. Speaking as a former DTS engineer, I will second Scott's statement above. -jcr ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: Enter key down

2008-05-29 Thread I. Savant
It must be simple, it has to be simple... But I can't figure out where to start... I'm simply trying to catch the Enter key down event from a text view. Look through the introductory Cocoa material regarding the Responder Chain:

re: odd problem with NSMutableDictionary and initWithContentsOfFile

2008-05-29 Thread Leslie Smith
Hi: I found out what I was doing wrong: rather than [SimParamnames initWithContentsOfFile: aFile]; I should have had SimParamnames = [SimParamnames initWithContentsOfFile: aFile]; because within the documentation for initWithContentsOfFile it says Return Value: An initialized object—which

Re: odd problem with NSMutableDictionary and initWithContentsOfFile

2008-05-29 Thread Jason Stephenson
Leslie Smith wrote: Hi: I found out what I was doing wrong: rather than [SimParamnames initWithContentsOfFile: aFile]; I should have had SimParamnames = [SimParamnames initWithContentsOfFile: aFile]; A more normal way of doing the above is NSMutableDictionary *SimParamnames;

RE: IKImageView weird Zooming behaviour?

2008-05-29 Thread Karl von Moller
Hi to all, Recently I have been exploring what ImageKit has to offer and by and large it's all very cool. However I have an IKImageView which is hooked up in interface builder to + and - button's in the aim to zooming IN and OUT of the image. So this is being handled by IB and not by my

Re: Ending Editing when Doc Saves?

2008-05-29 Thread Jens Alfke
On 29 May '08, at 6:17 AM, Roland King wrote: why does that work? It causes the textfield to lose focus, which ends editing, so it tells its target bindings that its value changed. —Jens smime.p7s Description: S/MIME cryptographic signature

Re: tile opened windows

2008-05-29 Thread Jens Alfke
On 29 May '08, at 6:34 AM, vince wrote: I have a doc based app that at times requires multiple opened docs. I'd like to add a 'tile windows' menu option that places the docs in some sort of random checkerboard-styled order on the display. Is this a major task? thanks. No, that should be

Re: odd problem with NSMutableDictionary and initWithContentsOfFile

2008-05-29 Thread Andy Lee
On May 29, 2008, at 9:41 AM, Leslie Smith wrote: because within the documentation for initWithContentsOfFile it says Return Value: An initialized object—which might be different than the original receiver ... and my original code assumes that the return value is the same object. This is

Re: odd problem with NSMutableDictionary and initWithContentsOfFile

2008-05-29 Thread Jens Alfke
On 29 May '08, at 6:41 AM, Leslie Smith wrote: I found out what I was doing wrong: rather than [SimParamnames initWithContentsOfFile: aFile]; I should have had SimParamnames = [SimParamnames initWithContentsOfFile: aFile]; No. As two people have said already, *you can't initialize an

Re: 10.5.3 Release Notes?

2008-05-29 Thread Sean McBride
On 5/28/08 11:31 PM, Kyle Sluder said: This is more a question for Tech Pubs or DTS than anyone, I guess, but are there/will there be developer release notes for 10.5.3? Can anyone confirm any previous show-stoppers are fixed (like the NSOpenPanel bug that essentially makes garbage-collected

Appending to file with writeToFile

2008-05-29 Thread Glover,David
Hi All, I'm using writeToFile to send strings to a log file at various points in my program, however it doesn't append the strings, it just overwrites the previous one. So the only thing in the log file is the very last string that was sent to it. I've searched around for a while and

Re: Overlapping Extensions and UTIs in NSDocument

2008-05-29 Thread Sean McBride
On 5/29/08 3:20 PM, Markus Müller said: Could it be that it's not allowed to have UTIs with overlapping extensions? Bingo. LaunchServices does a 1-to-1 mapping between a file and a UTI. That is, a file can have only 1 UTI. So if two UTI declarations claim the same extension you are screwed.

Re: 10.5.3 Release Notes?

2008-05-29 Thread Jens Alfke
On 29 May '08, at 7:48 AM, Sean McBride wrote: If it was a show-stopper you filed a bug right? All you need to do therefore is email [EMAIL PROTECTED] and ask if bug #x is fixed in 10.5.3. Presto. In theory that will work. In practice, it's a waste of time for everyone to file duplicate

Re: Appending to file with writeToFile

2008-05-29 Thread Jens Alfke
On 29 May '08, at 7:42 AM, Glover,David wrote: I've searched around for a while and can't find any way to append the strings in my file. I was wondering if anyone else had achieved this? Or if anybody knows how to do it? For stream access to files, use NSFileHandle, NSOutputStream, the C

Re: 10.5.3 Release Notes?

2008-05-29 Thread Sean McBride
On 5/29/08 8:01 AM, Jens Alfke said: If it was a show-stopper you filed a bug right? All you need to do therefore is email [EMAIL PROTECTED] and ask if bug #x is fixed in 10.5.3. Presto. In theory that will work. In practice, it's a waste of time for everyone to file duplicate bug reports

RE: Appending to file with writeToFile

2008-05-29 Thread Glover,David
Thank you for your advice - I used your suggestion plus using seekToEndOfFile beforehand worked a treat. Thanks again -Original Message- From: Ken Thomases [mailto:[EMAIL PROTECTED] Sent: 29 May 2008 16:08 To: Glover,David Cc: Cocoa-dev@lists.apple.com Subject: Re: Appending to file

Re: Package Builder Questions

2008-05-29 Thread Randall Meadows
On May 29, 2008, at 1:51 AM, Adil Saleem wrote: I want some help with Package Builder. Should i ask the questions on this list or is there any separate list for that ? If you can find a copy of the latest (June 2008) MacTech issue, the cover story is Thinking Inside the Box with

Re: 10.5.3 Release Notes?

2008-05-29 Thread Nathan
on macbreak they just mentioned some website that does a detailed release notes for apple updates... I don't remember the website though. But it is out there, try a google search maybe? On May 29, 2008, at 12:41 PM, Jerry LeVan wrote: It appears to me that some people have read some useful

Re: IKImageView weird Zooming behaviour?

2008-05-29 Thread Randall Meadows
On May 29, 2008, at 8:26 AM, Karl von Moller wrote: Recently I have been exploring what ImageKit has to offer and by and large it's all very cool. However I have an IKImageView which is hooked up in interface builder to + and - button's in the aim to zooming IN and OUT of the image. So

Re: Enter key down

2008-05-29 Thread Aki Inoue
When you want to handle key events in NSTextView, see - textView:doCommandBySelector: delegate method. http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSTextView_Class/Reference/Reference.html#//apple_ref/occ/instm/NSObject/textView:doCommandBySelector: Aki On

Re: Enter key down

2008-05-29 Thread Douglas Davidson
On May 29, 2008, at 10:13 AM, Aki Inoue wrote: When you want to handle key events in NSTextView, see - textView:doCommandBySelector: delegate method. http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSTextView_Class/Reference/Reference.html#/

Re: Enter key down

2008-05-29 Thread I. Savant
When you want to handle key events in NSTextView, see - textView:doCommandBySelector: delegate method. http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSTextView_Class/Reference/Reference.html#/ /apple_ref/occ/instm/NSObject/textView:doCommandBySelector: Ah -

Re: Overlapping Extensions and UTIs in NSDocument

2008-05-29 Thread Markus Müller
Thank you for your answer. I filled a radar describing this issue. Best regards, Markus Müller On Thu, May 29, 2008 at 4:55 PM, Sean McBride [EMAIL PROTECTED] wrote: On 5/29/08 3:20 PM, Markus Müller said: Could it be that it's not allowed to have UTIs with overlapping extensions? Bingo.

Adding Categories to NSMutableData

2008-05-29 Thread Robert Kukuchka
Hello, I'm trying to add a simple category to NSMutableData, but when I try to call my method I'm getting *** -[NSConcreteData remainderDataWithParseByte:]: unrecognized selector sent to instance 0x816400. I've added categories to NSString and NSArray before, which have similar abstract

Copying NSTextStorage

2008-05-29 Thread Gordon Apple
This used to work. No more. Has something changed in NSTextStorage? In my Shape object, I have a dictionary of parameters, one being key = text with value NSTextStorage*, similar to what is done in Sketch (without the dictionary). My copyWithZone duplicated the dictionary and called

Re: Adding Categories to NSMutableData

2008-05-29 Thread Kenny Leung
Hi Rob. Looks like you've added the category to NSMutableData, but you're talking to an NSData. -Kenny On May 29, 2008, at 10:59 AM, Robert Kukuchka wrote: Hello, I'm trying to add a simple category to NSMutableData, but when I try to call my method I'm getting *** -[NSConcreteData

newbie question: menu item appears when app runs, but is not visible in NIB

2008-05-29 Thread Paul Archibald
Comrades, -- Newbie Alert -- This is my first posting to this list, and has to do with my first foray into Cocoa + ObjC + Interface Builder. I am trying to understand the relationships between resource elements in the NIB and the ObjC code the the Xcode project, and how to modify them. I

Re: Adding Categories to NSMutableData

2008-05-29 Thread Ken Thomases
On May 29, 2008, at 12:59 PM, Robert Kukuchka wrote: I'm trying to add a simple category to NSMutableData, but when I try to call my method I'm getting *** -[NSConcreteData remainderDataWithParseByte:]: unrecognized selector sent to instance 0x816400. I've added categories to NSString and

Re: Adding Categories to NSMutableData

2008-05-29 Thread Robert Kukuchka
Yep, indeed the case. PBKAC. Thanks everyone, sorry for the fodder question. ~Rob On 29-May-08, at 11:24 AM, Kenny Leung wrote: Hi Rob. Looks like you've added the category to NSMutableData, but you're talking to an NSData. -Kenny On May 29, 2008, at 10:59 AM, Robert Kukuchka wrote:

CoreAnimation and Filters

2008-05-29 Thread Joachim Deelen
Hi, I'm having trouble with the following code: CIFilter *outFilter = [CIFilter filterWithName:@CIZoomBlur]; [outFilter setDefaults]; outFilter.name = @zoomOutFilter; [outFilter setValue:[NSNumber numberWithFloat:20.0] forKey:@inputAmount]; [newImageLayer

Re: CoreAnimation and Filters

2008-05-29 Thread Dmitri Goutnik
On May 29, 2008, at 11:32 PM, Joachim Deelen wrote: The Animation of the Filter is working fine. The ZoomBlur gets animated from 20.0 to 0.0 in 1.8 seconds. But as soon as the animation has finished, the Value for the filter instantly drops back to 20.0. I've tried different fillModes but

Re: CoreAnimation and Filters

2008-05-29 Thread Joachim Deelen
Hi Dimitri, YES! That's the solution. I always thought, that removing on completion just removes the Animation-Object from the Layer so its memory can be freed by the garbage-collector. That it has an effect on the animated value(s) seems a bit strange to me. But it works! Thank you

Re: CGContextSetRGBFillColor() off by one?

2008-05-29 Thread Mike Manzano
I just tried running it on an old PowerBook, and I get the same results. Do you know for sure that ColorSync is in play here? Thanks, Mike On May 29, 2008, at 2:40 AM, Uli Kusterer wrote: Am 29.05.2008 um 09:21 schrieb Mike Manzano: Regardless of what I set the red component to, the value

Re: newbie question: menu item appears when app runs, but is not visible in NIB

2008-05-29 Thread Jean-Daniel Dupas
Le 29 mai 08 à 20:25, Paul Archibald a écrit : Comrades, -- Newbie Alert -- This is my first posting to this list, and has to do with my first foray into Cocoa + ObjC + Interface Builder. I am trying to understand the relationships between resource elements in the NIB and the ObjC code

Cocoa bug? release/removeObserver from inside observeValueForKeyPath

2008-05-29 Thread Geoff Schmidt
Suppose that two objects A and B are observing a key on a third object C. Suppose further that from its observeValueForKeyPath method, A releases B, causing B's dealloc method to be called, and that B's dealloc method properly calls removeObserver. Then, despite the call to removeObserver,

Re: newbie question: menu item appears when app runs, but is not visible in NIB

2008-05-29 Thread Paul Archibald
Yes, I did that. No dice. At this point I am doing better. Since I have just barely begun, I just made a new branch of the codebase and started over (in the nib, the source code I copied and pasted into the new branch). So, now the menu looks okay. I still don't understand what was going

Re: newbie question: menu item appears when app runs, but is not visible in NIB

2008-05-29 Thread Bill Bumgarner
On May 29, 2008, at 3:47 PM, Gary L. Wade wrote: Interface Builder can be buggy at times, leaving some leftovers around when they should be gotten rid of. I've got a couple of leftovers myself, but they're harmless so far; one of these days, I'll just go all down-and-dirty editing on it,

Re: newbie question: menu item appears when app runs, but is not visible in NIB

2008-05-29 Thread I. Savant
Paul Archibald wrote: When I run the app, I see a menu item that is not visible in the NIB file. I recognize the extra item, I built it. However, I had some problems with the NIB, so I reverted to an older copy of the NIB, and started modifying that. I thought I had gotten rid of the old

Re: Cocoa bug? release/removeObserver from inside observeValueForKeyPath

2008-05-29 Thread Hamish Allan
On Thu, May 29, 2008 at 11:15 PM, Geoff Schmidt [EMAIL PROTECTED] wrote: 3) If this is already known, is there a customary pattern for avoiding the problem? Never release from observeValueForKeyPath is a bit harsh! I don't know if it's known, but you could try [obj

filtering a list like address book

2008-05-29 Thread Mark Bateman
Hi, I'm writing an application to display a list of nav aids. I'd like to be able to search the list like the iphone address book does. I.e. you type and the list filters in realtime. does anyone have any code snippets to point me in the right direction.

Re: filtering a list like address book

2008-05-29 Thread August Trometer
I'm assuming your nav aids list will have an array controller and that you're building for Tiger or better. You can get the search behavior by adding a search field to your interface and binding the search field's predicate to the array controller's filterPredicate. It will then filter

Re: filtering a list like address book

2008-05-29 Thread I. Savant
I'm assuming your nav aids list will have an array controller and that you're building for Tiger or better. You really shouldn't. A number of reasons for this presented themselves on this very list within the last few weeks. You can get the search behavior by adding a search field to

Re: CGContextSetRGBFillColor() off by one?

2008-05-29 Thread Ken Ferry
Well, if you use CGContextSetRGBFillColor as you said, then that sets a device RGB colorspace up as the fill colorspace, and device colorspaces don't do color matching. Device means 'untagged'. Which is to say, I don't know, sounds strange. Try asking on Apple's quartz-dev list. -Ken On Thu,

PDFDocuments and CGPDFDocuments

2008-05-29 Thread Kevin Ross
Hi everyone, I seem to have run into a little snag recenlty. I have an application that manipulates PDF files (scaling, imposition, transforms...). I am using a PDFView for the interface but performing all of the transformations in Quartz. I find myself shuttling data back and forth by

Re: Re: newbie question: menu item appears when app runs, but is not visible in NIB

2008-05-29 Thread Paul Archibald
I am really a total newbie (3 or 4 days) with IB, so I have NO confidence that I can tell what is a bug yet. I barely understand what I am doing as yet. However, I should have done the IB run mode thing. I did not think of that. I just looked at it and it looks correct (no extra item). Go

Re: PDFDocuments and CGPDFDocuments

2008-05-29 Thread Joel Norvell
Kevin, The PDFAnnotationEditor example program does a lot of this sort of thing; have you looked at it? Also, any operation you can perform on an NSView also applies to a PDFView; plus you have the additional PDFView protocol. Other pertinent resources would be Apple's quartz-dev list and David

Hii I have problem in

2008-05-29 Thread haresh vavdiya
Hello Friends, I m doing tic tac toc game and i have completed most of the parts. But only remaining portion is disable button when player won the game. I have set like [button1 setEnabled:FALSE]; and its working but erase all press button. Means whenever player wins

Another newbie question

2008-05-29 Thread Paul Archibald
Comrades: Hi, its me again. My interface consists (mostly) of a bunch of popup buttons with various values in them. Out user will set up all these popups and click go, and the app will emit a string which can be used to run a command line program. So, for example we have a couple of

Re: Hii I have problem in

2008-05-29 Thread Andrew Farmer
On 29 May 08, at 21:13, haresh vavdiya wrote: I m doing tic tac toc game and i have completed most of the parts. But only remaining portion is disable button when player won the game. I have set like [button1 setEnabled:FALSE]; and its working but erase all press button. Means whenever player

Re: CGContextSetRGBFillColor() off by one?

2008-05-29 Thread Uli Kusterer
Am 29.05.2008 um 23:17 schrieb Mike Manzano: I just tried running it on an old PowerBook, and I get the same results. Do you know for sure that ColorSync is in play here? No. It just seemed like the most likely culprit to investigate, because by definition, a color correction system must

Re: Copying NSTextStorage

2008-05-29 Thread Jens Alfke
On 29 May '08, at 11:03 AM, Gordon Apple wrote: Apparently, NSTextStorage does not conform to NSCopying, even though its superclass (NSAttributedString) does. Has something changed recently with NSTextStorage that makes copy not work? Is there a reason you need to use NSTextStorage

Re: Another newbie question

2008-05-29 Thread Michael Vannorsdel
What I'd suggest is to assign each selection with a tag number in IB (or programatically if need be). Then in your code you can get the tag: int colorID = [[colorButton selectedItem] tag]; Assign each its corresponding ID as the tag like 4 for black, 1 for red, ect. On May 29, 2008, at

Re: CGContextSetRGBFillColor() off by one?

2008-05-29 Thread Mike Manzano
After playing with it some more I think it might be a floating point precision error. On May 29, 2008, at 9:40 PM, Uli Kusterer wrote: Am 29.05.2008 um 23:17 schrieb Mike Manzano: I just tried running it on an old PowerBook, and I get the same results. Do you know for sure that ColorSync