PackageMaker installer not always installing into /Applications

2009-10-26 Thread Paul Messmer
I'm trying to build simple application installers (one for 10.4, one for 10.5+) that place required files into Application Support as well as the application itself into the Applications folder.  Our current installers (built with a superset of the script below) work fine on a clean machine.  T

Re: How to use Uniform Type Identifiers for this ... ?

2009-10-26 Thread Greg Guerin
Subject: Re: How to use Uniform Type Identifiers for this ... ? From: Jay Reynolds Freeman Date: Sun, 25 Oct 2009 20:28:24 -0700 Delivered-to: em...@hidden Delivered-to: em...@hidden The issue isn't that it crashes, the issue is that I cannot test that any given version of "MyApp" does the

Re: pump event

2009-10-26 Thread Jonathan Hess
Perhaps you're looking for these methods: -[NSApplication currentEvent] -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] Documented here: http://developer.apple.com/mac/library/documentation/Cocoa/Reference/ApplicationKit/Classes/NSApplication_Class/Reference/Reference.html Goo

Re: PackageMaker installer not always installing into /Applications

2009-10-26 Thread Kyle Sluder
You want the installer-dev list. --Kyle Sluder ___ 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 cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/

Re: Professional Error Handling

2009-10-26 Thread Kyle Sluder
On Sun, Oct 25, 2009 at 3:44 PM, Dick Bridges wrote: > N.B. Switching from error codes to exception handling can be somewhat > disconcerting initially so it's probably not something you'd want to take on > if you are under strong time pressures. In Cocoa, we don't use exceptions to handle cases

Re: How to use Uniform Type Identifiers for this ... ?

2009-10-26 Thread Jay Reynolds Freeman
By "mousing on", I refer to the action of double-clicking a document so as to cause an an appropriate application to launch and deal with that document. The desired actions are: Double-click Able ==> Alice launches and deals with Able; double-click Bravo ==> Bob launches and deals with B

NSCarbonWindow vs NSSavePanel sheets - Incompatibility?

2009-10-26 Thread Motti Shneor
Hello everyone. I'm just changing the title of a previous thread, as my problems were narrowed down from general NSSavePanel modality, into a (possibly) bug in the OS. The problems occur whenever I try to display a NSSavePanel as a sheet over a Carbon window. - (void) saveCarbonWindow: (Windo

MIN(), MAX()?

2009-10-26 Thread Chunk 1978
i can't find any info about these c functions in the documentation. each take 2 floating point arguments, but i'm not positive what the function is doing with the arguments: float myMinimumFloat = MIN(50.0, 78.0); what does the function do with 50 and 78? also, my flaming shields are up. thi

Releasing NSCarbonWindow question.

2009-10-26 Thread Motti Shneor
Hello everyone. In my Cocoa Plugin, which runs in a Carbon host application, I need to access and manipulate a host-created Carbon window. My Cocoa interface would be NSWindow *cocoaWrap = [[NSWindow alloc] initWithWindowRef: hostWindow]; However, when I finish my plugin's work, and I need to

Re: MIN(), MAX()?

2009-10-26 Thread Graham Cox
On 26/10/2009, at 8:35 PM, Chunk 1978 wrote: i can't find any info about these c functions in the documentation. each take 2 floating point arguments, but i'm not positive what the function is doing with the arguments: float myMinimumFloat = MIN(50.0, 78.0); what does the function do wi

Re: MIN(), MAX()?

2009-10-26 Thread Dave Keck
> also, my flaming shields are up.  this is certainly very basic so flame away > if you must, but i just can't remember coming across these functions in any > of my c books. Try command+double-clicking them in Xcode. That'll take you to their definition. ___

Re: kCGErrorIllegalArgument: CGSUnionRegionWithRect : Invalid region

2009-10-26 Thread Matthew Lindfield Seager
It did in fact make it through; a good way to check is to look at Cocoabuilder (http://www.cocoabuilder.com) and the Apple mailing list archives (http://lists.apple.com).  In this case, I found your message here: http://lists.apple.com/archives/cocoa-dev/2009/Oct/msg01683.html In Jon's defence I

Re: pump event

2009-10-26 Thread Alastair Houghton
On 25 Oct 2009, at 14:59, simon Scylla wrote: hello every one i need to get current system event,waiting until the function get some event,then remove it from the queue what should i do? Usually, *not* that. There are two occasions on which you *might* want to run an event pump yourself:

Re: Professional Error Handling

2009-10-26 Thread Alastair Houghton
On 25 Oct 2009, at 22:44, Dick Bridges wrote: FWIW, there are some people (myself included) that consider "error numbers" to be something of an anti-pattern when exception handling is available. There are also some people (myself included) that consider that you are wrong. This has been

Transitioning to GC-supported

2009-10-26 Thread Dave Keck
Hey list, Until recently, I didn't realize that System Preferences on 10.6 required preferences panes to be GC-supported. As such, I wrote my preference pane RC-only, and now I've got a fun few weeks ahead of me. :) I'm planning on systematically going through each of my source files and updating

Re: PackageMaker installer not always installing into /Applications

2009-10-26 Thread Fritz Anderson
On 25 Oct 2009, at 6:28 PM, Paul Messmer wrote: I'm trying to build simple application installers (one for 10.4, one for 10.5+) that place required files into Application Support as well as the application itself into the Applications folder. Our current installers (built with a superset o

Re: Professional Error Handling

2009-10-26 Thread Jens Alfke
On Oct 25, 2009, at 3:44 PM, Dick Bridges wrote: FWIW, there are some people (myself included) that consider "error numbers" to be something of an anti-pattern when exception handling is available. Because of [IMHO] improvements in gcc, Objective-C now supports exception handling and it mi

Re: Transitioning to GC-supported

2009-10-26 Thread Jens Alfke
On Oct 26, 2009, at 6:45 AM, Dave Keck wrote: 1. Apply workaround for interior pointers by '[containingObject self];' at the end of the method, to keep the containing object alive. A valid point, but in my experience this is a rare problem: I have never run into an instance of a bug cause

Preparing for MOM versioning in version 1

2009-10-26 Thread Fritz Anderson
I'm about to unleash a Core Data-based application, and I'm sure the schema will change in later versions. The Core Data Model Versioning and Data Migration Programming Guide seems to say that migrating a store from one version to another, at least in simple cases, is magical: The applicati

Re: Preparing for MOM versioning in version 1

2009-10-26 Thread Volker in Lists
Hi Fritz, I have it running that way in one of my applications. The user base is small (< 50 users), so I might not have yet had the chance to discover magic not happening. I also invested a lot of time in the model process, to avoid too many changes. My changes, that worked well, include

Re: Make a solid line look like 3D

2009-10-26 Thread Matthias Arndt
Hi guys, first let me thank you for all information and suggestions you provided! Am 26.10.2009 um 00:48 schrieb I. Savant: That was entirely my fault, sorry. I have no idea where I got the idea it was for a screen saver. I did not follow the link. In my defense, a better description of th

Re: IKImageBrowserView Dragging outside

2009-10-26 Thread Tobias Jordan
Hey Jonathan & Thomas, it's finally working and even more easier than I've thought: So I made a subclass of my IKImageBrowserView and added a new delegate method, the one's missing: // --- // -browserView:dropped

Re: Make a solid line look like 3D

2009-10-26 Thread I. Savant
On Oct 26, 2009, at 12:44 PM, Matthias Arndt wrote: For some reasons I still don't understand (Argh!) the drawRect: method of my view didn't pass the right rectangle to the object actually responsible for the drawing. I just fixed the code to aim for the best performance improvement: Don't

Re: Make a solid line look like 3D

2009-10-26 Thread Jean-Daniel Dupas
Le 26 oct. 2009 à 17:44, Matthias Arndt a écrit : Hi guys, first let me thank you for all information and suggestions you provided! Am 26.10.2009 um 00:48 schrieb I. Savant: That was entirely my fault, sorry. I have no idea where I got the idea it was for a screen saver. I did not follo

Re: Make a solid line look like 3D

2009-10-26 Thread Matthias Arndt
Am 26.10.2009 um 17:44 schrieb Matthias Arndt: or some reasons I still don't understand (Argh!) the drawRect: method of my view didn't pass the right rectangle to the object actually responsible for the drawing. I mis-phrased that! There is no *technical* thing I don't understand with the

Re: Make a solid line look like 3D

2009-10-26 Thread I. Savant
On Oct 26, 2009, at 1:10 PM, Jean-Daniel Dupas wrote: What do you expect as rectangle ? drawRect: parameter is the smaller rectangle that contains all rect marked as dirty. If you want to exact list of dirty rects, you can query it using the -getRectsBeingDrawn:count: methods. This is mo

Re: Transitioning to GC-supported

2009-10-26 Thread Greg Parker
On Oct 26, 2009, at 6:45 AM, Dave Keck wrote: 3. Wrap all CF*Create(), CG*Create(), CF*Copy(), CG*Copy(), etc. with CFMakeCollectable(), and replace corresponding CFRelease()s with a custom macro - CFReleaseIfRC(). (This way, if I ever choose to go GC-only, I can simply remove all calls to C

Custom NSScroller

2009-10-26 Thread Bryan Matteson
Well, after much work I've finally gotten some scrollbars to look how I want. There's one thing I can't seem to figure out how to get rid of, as I have pointed out in the screenshot you can find at the link below. I want the top of the vertical scroller to sit flush against the top of the v

Getting a handle on inf

2009-10-26 Thread Ian Piper
Hi all, Following up on my query about unit tests yesterday... I am writing another test checking boundary conditions for a calculation. In the normal running program I am feeding a very large number (1000) into one text field and the result displayed i

Re: Custom NSScroller

2009-10-26 Thread Kyle Sluder
On Mon, Oct 26, 2009 at 11:24 AM, Bryan Matteson wrote: > Any nudge in the right direction would be appreciated. That's the corner view. NSOutlineView asks its document view for a corner view by checking to see if it responds to the -cornerView method. --Kyle Sluder

Re: Getting a handle on inf

2009-10-26 Thread Kyle Sluder
On Mon, Oct 26, 2009 at 11:26 AM, Ian Piper wrote: > STAssertEquals("inf", [newTemperatureInC stringValue], @"Expecting inf; we > got %s", [newTemperatureInC stringValue]); -stringValue returns an NSString, you used a %s specifier rather than %...@. --Kyle Sluder

Re: Custom NSScroller

2009-10-26 Thread Bryan Matteson
That's the corner view. NSOutlineView asks its document view for a corner view by checking to see if it responds to the -cornerView method. Thank you, Kyle. Calling the setCornerView: method with nil accomplished what I was looking for. ___ Cocoa-

Re: Getting a handle on inf

2009-10-26 Thread Greg Parker
On Oct 26, 2009, at 11:26 AM, Ian Piper wrote: So I am guessing that when I get a float displayed as "inf" this is not the string it seems to be. Also, it looks like the string value of whatever is coming back is not something that I can use. Can anyone suggest how I might handle a test case

Re: Custom NSScroller

2009-10-26 Thread Bryan Matteson
On Oct 26, 2009, at 1:37 PM, Bryan Matteson wrote: Calling the setCornerView: method with nil accomplished what I was looking for. Correction, that does not work, either. Setting a custom corner view does solve the problem however. Thanks. ___ C

Re: Preparing for MOM versioning in version 1

2009-10-26 Thread mmalc Crawford
On Oct 26, 2009, at 9:00 am, Fritz Anderson wrote: > I'm about to unleash a Core Data-based application, and I'm sure the schema > will change in later versions. The Core Data Model Versioning and Data > Migration Programming Guide seems to say that migrating a store from one > version to anot

Re: Getting a handle on inf

2009-10-26 Thread Ian Piper
On 26 Oct 2009, at 18:45, Greg Parker wrote: On Oct 26, 2009, at 11:26 AM, Ian Piper wrote: So I am guessing that when I get a float displayed as "inf" this is not the string it seems to be. Also, it looks like the string value of whatever is coming back is not something that I can use. Can

Re: Getting a handle on inf

2009-10-26 Thread Greg Parker
On Oct 26, 2009, at 12:11 PM, Ian Piper wrote: On 26 Oct 2009, at 18:45, Greg Parker wrote: On Oct 26, 2009, at 11:26 AM, Ian Piper wrote: So I am guessing that when I get a float displayed as "inf" this is not the string it seems to be. Also, it looks like the string value of whatever is

Re: Getting a handle on inf

2009-10-26 Thread Nick Zitzmann
On Oct 26, 2009, at 1:11 PM, Ian Piper wrote: [testConverter setValue:[NSNumber numberWithFloat: 1000.0] forKey:@"originalTemp"]; I don't know if it makes a difference, but I'm curious as to why you're not using the INFINITY #define that's in math.h... i

Re: Getting a handle on inf

2009-10-26 Thread Ken Thomases
On Oct 26, 2009, at 2:11 PM, Ian Piper wrote: On 26 Oct 2009, at 18:45, Greg Parker wrote: On Oct 26, 2009, at 11:26 AM, Ian Piper wrote: So I am guessing that when I get a float displayed as "inf" this is not the string it seems to be. Also, it looks like the string value of whatever is c

RE: Professional Error Handling

2009-10-26 Thread Dick Bridges
> -Original Message- > From: Alastair Houghton [mailto:alast...@alastairs-place.net] > Sent: Monday, October 26, 2009 4:02 AM > To: Dick Bridges > Cc: Squ Aire; cocoa-dev@lists.apple.com > Subject: Re: Professional Error Handling > > On 25 Oct 2009, at 22:44, Dick Bridges wrote: > > > FWIW,

Re: Professional Error Handling

2009-10-26 Thread Kyle Sluder
On Mon, Oct 26, 2009 at 12:57 PM, Dick Bridges wrote: > IIUC, > http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/Exceptions/Exceptions.html > is available to everyone and is not under NDA. It's the "Introduction to > Exception Programming Topics for Cocoa". As noted on this

Snow Leopard Address Book rejecting dragged vCards

2009-10-26 Thread Doug Knowles
Hi, My company's application has the ability to drag contact information for one or more contacts from our application in multiple formats, including vCard. Under Leopard, this enabled us to support dragging contacts from our application into the Address Book. This has stopped working in Snow Leo

Re: Transitioning to GC-supported

2009-10-26 Thread John Engelhart
What follows is my $0.02, and is worth every penny you paid for it. :) On Mon, Oct 26, 2009 at 9:45 AM, Dave Keck wrote: > I'm planning on systematically going through each of my source files and > updating them to be GC-supported. I've been compiling a list of things to > do > and to look out

Moving from standalone apps to some internet related programming

2009-10-26 Thread Nick Rogers
Hi, In my some 2 yrs of cocoa programming with cocoa, I have been able to make a main app (which is selling) and a few related small apps. Now I have to make a small utility that would download the appropriate (best) version of main app that would run on the user system by polling for the Ma

Re: Moving from standalone apps to some internet related programming

2009-10-26 Thread Philip Ershler
On Oct 26, 2009, at 4:50 PM, Nick Rogers wrote: Hi, In my some 2 yrs of cocoa programming with cocoa, I have been able to make a main app (which is selling) and a few related small apps. Now I have to make a small utility that would download the appropriate (best) version of main app that w

Re: Getting a handle on inf

2009-10-26 Thread Ian Piper
On 26 Oct 2009, at 19:46, Ken Thomases wrote: You want STAssertEqualObjects, here. You want to compare for equal value, not identity, which is what STAssertEquals does. Greg, Ken, Thanks, that is what I was looking for. Great help, thank you. Ian. -- __

Re: Moving from standalone apps to some internet related programming

2009-10-26 Thread Nick Rogers
hi, the package is 6 MB for the demo & 11 MB for the full version, so packaging all is not desired. thanks, Nick On 27-Oct-2009, at 4:32 AM, Philip Ershler wrote: On Oct 26, 2009, at 4:50 PM, Nick Rogers wrote: Hi, In my some 2 yrs of cocoa programming with cocoa, I have been able to m

Re: Moving from standalone apps to some internet related programming

2009-10-26 Thread Nick Zitzmann
On Oct 26, 2009, at 4:50 PM, Nick Rogers wrote: Now I have to make a small utility that would download the appropriate (best) version of main app that would run on the user system by polling for the MacOS type and its ability to run 64-bit apps. I have no internet related programming expe

Re: Moving from standalone apps to some internet related programming

2009-10-26 Thread Jon Nall
On Oct 26, 2009, at 3:50 PM, Nick Rogers wrote: Hi, In my some 2 yrs of cocoa programming with cocoa, I have been able to make a main app (which is selling) and a few related small apps. Now I have to make a small utility that would download the appropriate (best) version of main app that w

Re: NSTableView Always Undesirably Selects First Row when It Loses Key Focus

2009-10-26 Thread Grant Erickson
On 10/23/09 4:31 PM, Grant Erickson wrote: > I have a device list in my preference pane implemented as a NSTableView under > 10.5, not unlike the list of network devices in Apple's Network preference > pane. > > Unlike the Network table, in my case there is no mandate that an item (i.e. > row) alw

Re: Moving from standalone apps to some internet related programming

2009-10-26 Thread PCWiz
Its much easier to just build a Universal Binary (which will run on any architecture) and distribute that. A few megabytes here and there will not make a huge difference, as others have said. On 2009-10-26, at 4:50 PM, Nick Rogers wrote: Hi, In my some 2 yrs of cocoa programming with cocoa,

keyPathsForValuesAffectingValueFor: not updating immediately

2009-10-26 Thread Brad Gibbs
Hi, I have a Core Data app with a category on a model object, Address. The category has a method to return a fullAddress property, which is composed of the streetAddress, city, state and zipCode. Updating one of the dependent properties only updates the fullAddress property after I've sw

Re: keyPathsForValuesAffectingValueFor: not updating immediately

2009-10-26 Thread I. Savant
On Oct 26, 2009, at 9:07 PM, Brad Gibbs wrote: I have a Core Data app with a category on a model object, Address. The category has a method to return a fullAddress property, which is composed of the streetAddress, city, state and zipCode. Did you read the documentation for this method?

Re: Getting a handle on inf

2009-10-26 Thread Andrew Farmer
On 26 Oct 2009, at 12:11, Ian Piper wrote: ...and I still get a failed build with this message: Expecting inf; we got inf Which seems odd. And internally, this is because the IEEE float machinery guarantees that all infinite and NaN values compare as not-equal to each other, so that 1/0 !

Re: keyPathsForValuesAffectingValueFor: not updating immediately

2009-10-26 Thread Brad Gibbs
I did read the documentation, which is why I used +keyPathsForValuesAffectingFullAddress. I also tried +keyPathsForValuesAffectingValueForFullAddress: Both methods work, but only after changing the view and then coming back to it. On Oct 26, 2009, at 6:27 PM, I. Savant wrote: On Oct 26

Re: NSURLDownload and file quarantine

2009-10-26 Thread Wim Lewis
On Oct 21, 2009, at 2:34 PM, Wim Lewis wrote: Is there any useful documentation on what the behavior of NSURLDownload is supposed to be w.r.t. file quarantine? I'm having a hard time getting consistent behavior out of it. FYI, if anyone else is having similar problems, it turns out that thi

Re: keyPathsForValuesAffectingValueFor: not updating immediately

2009-10-26 Thread Jim Correia
On Mon, Oct 26, 2009 at 10:03 PM, Brad Gibbs wrote: > I did read the documentation, which is why I used > +keyPathsForValuesAffectingFullAddress.  I also tried > +keyPathsForValuesAffectingValueForFullAddress: > > Both methods work, but only after changing the view and then coming back to > it.

Re: Transitioning to GC-supported

2009-10-26 Thread Dave Keck
>> 4. Search for every call to -retain, -alloc, -init pairs, and -copy. >> Verify that the object being retained is strongly referenced, and if not, it >> must >> be CFRetain()ed or -disableCollectorForPointer: must be called for it. > > I'm not sure what you mean by this. For example, I have an

first responder being clobbered

2009-10-26 Thread Michael Link
I have a custom UITableViewController that uses a custom cell that displays a text field. I have this method added to the table view controller to set the text field as first responder - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; MLPropertyEditing

Re: first responder being clobbered

2009-10-26 Thread Dave DeLong
Nope. In CocoaTouch, you can explicitly assign a UIResponder to be first responder by sending it the -becomeFirstResponder message. There is no "makeFirstResponder" method. IMO, this is one of the improvements of CocoaTouch over Cocoa. The responder system seems to be better organized.

Re: first responder being clobbered

2009-10-26 Thread Graham Cox
On 27/10/2009, at 2:55 PM, Michael Link wrote: Is there a different solution to getting a first responder in a table cell and not having it resign on 3.1? I'm unfamiliar with the iPhone version of Cocoa and whether its rules are different, but certainly on the Mac you shouldn't invoke -

Core Data: Undoing Cut-Paste, Drag-Drop between documents

2009-10-26 Thread Jerry Krinock
Steps to Reproduce: 1. Build Apple's DepartmentAndEmployees sample project. 2. Launch it. 3. Create two documents (i.e. two departments) 4. Add an employee to Document 1. 5. Select the employee and Edit > Cut. 6. Click on the Employee table in Document 2. 7. Click Edit > Paste. Cut employ

Re: Transitioning to GC-supported

2009-10-26 Thread Jens Alfke
On Oct 26, 2009, at 8:43 PM, Dave Keck wrote: For example, I have an object that [self retain]; while it does some work that takes awhile. I don't hold a reference to this object anywhere after it's created - it simply notifies its delegate when its finished. I remember a thread about this a

Re: first responder being clobbered

2009-10-26 Thread glenn andreas
On Oct 26, 2009, at 10:55 PM, Michael Link wrote: I have a custom UITableViewController that uses a custom cell that displays a text field. I have this method added to the table view controller to set the text field as first responder - (void)viewWillAppear:(BOOL)animated { [super

Re: Core Data: Undoing Cut-Paste, Drag-Drop between documents

2009-10-26 Thread Quincey Morris
On Oct 26, 2009, at 21:18, Jerry Krinock wrote: But this answer is not as plausible if the user makes the move using drag-drop instead of cut-paste. (Drag-drop is not implemented in DepartmentAndEmployees, but it is common in real apps.) Clearly, the user has now performed only one operat

Cocoa replacement for Carbon CompositeIconRef() for Snow Leopard 64-bit apps?

2009-10-26 Thread Dalmazio Brisinda
Hello all, I'm working with a Snow Leopard 64-bit app that contains a Finder-like file browser that uses Carbon IconRef's. I'm trying to get the icons for the selected file with a custom overlay based on the current file selection and Icon Services. The problem I'm having is that the Icon

Re: Cocoa replacement for Carbon CompositeIconRef() for Snow Leopard 64-bit apps?

2009-10-26 Thread Kyle Sluder
On Mon, Oct 26, 2009 at 10:26 PM, Dalmazio Brisinda wrote: > If there's a way to extract an IconRef from an NSImage (I see that NSImage > has an -initWithIconRef: method defined) after doing all compositing via > NSImage and related classes that would be good too. Sounds like you should move all

Re: Cocoa replacement for Carbon CompositeIconRef() for Snow Leopard 64-bit apps?

2009-10-26 Thread Dalmazio Brisinda
Kyle, if I had my way, that's exactly what I would be doing... alas! It's presently out of my control. I'm stuck with dealing in IconRef's for the time being... Best, Dalmazio On Mon, Oct 26, 2009 at 10:26 PM, Dalmazio Brisinda > wrote: If there's a way to extract an IconRef from an NSIma