RE: NSServices

2009-09-03 Thread Colin Deasy
Ive tried it with the required context as well, no luck. I even tried building it with 10.6 SDK. > From: kyle.slu...@gmail.com > To: colde...@hotmail.com > Subject: Re: NSServices > Date: Wed, 2 Sep 2009 20:41:33 -0700 > CC: cocoa-dev@lists.apple.com > > Re-read the docs. Your plist needs to sp

mdimporter architecture problem on 10.6

2009-09-03 Thread Gideon King
Hi, I am trying to get our metadata importer to run under Snow Leopard, but no matter what I do, when I try to run it, I get a message saying that the architecture doesn't match the current 64 bit architecture, like this: Gideons-Home-Mac-Pro:Frameworks gideon$ /usr/bin/mdimport -d2 /Users/

Fonts that are always there

2009-09-03 Thread Gabriel Zachmann
Does anyone know which fonts are always there on every Mac OS X 10.5 system? (besides the base 14 fonts from Adobe) Or is there somewhere a list? (Of course, I should always have a second alternative.) Best regards, Gabriel. smime.p7s Description: S/MIME cryptographic signature ___

Re: Trouble with NSButtonCell

2009-09-03 Thread Reinhard Segeler
Don't know anything about the toolkit you're using, but I would use setAction: for single click and setDoubleAction: for double click,... Hope this helps. Reinhard Am 03.09.2009 um 05:41 schrieb Dave DeLong: Hi everyone, I'm using Brandon's excellent BWToolkit in a project of mine right n

Re: Core Data dog-slow when using first time after boot

2009-09-03 Thread Ruotger Skupin
Am 26.08.2009 um 01:21 schrieb Ben Trumbull: When I use setRelationshipKeyPathsForPrefetching the fetch throws: -[NSSQLAttribute inverseRelationship]: unrecognized selector sent to instance 0x10ee150 Can you provide the entire stack trace at this point ? gdb use future-break objc_except

Re: a bug in iphone SDK's creation of view based xib files.

2009-09-03 Thread jon
Hi Joey, On Sep 3, 2009, at 12:15 AM, Joey Hagedorn wrote: Please do not discuss unreleased software on this list. You have access to the developer forums which are an appropriate place to discuss issues you may have. The issue you're discussing applies to iPhone OS 3.0 as well, so I'll co

Re: a bug in iphone SDK's creation of view based xib files.

2009-09-03 Thread jon
On Sep 3, 2009, at 6:21 AM, jon wrote: I should have mentioned in the steps that this is not a UIViewController subclass, that option should be left off to create a regular "UIView" Class...) correction, that should have said: "that this is not a UITableViewController subclass, that

Re: a bug in iphone SDK's creation of view based xib files.

2009-09-03 Thread Roland King
(a second related thing is:) setting the Simulated Status Bar to disabled, does not actually disable the status bar, (it does inside of IB, but inside the iPhone simulator after it is compiled, it does not) one has to also edit the XIB to actually turn off the Status bar?? (maybe i

hud panel possible bug?

2009-09-03 Thread Rick C.
hello again, i have noticed in snow leopard only if you are using the standard hud panel in IB and you will run your project then taking the resize handle of the panel and drag it down and away quickly it will create vertical lines at the top part of the panel. i have noticed this even in a ne

Re: a bug in iphone SDK's creation of view based xib files.

2009-09-03 Thread jon
On Sep 3, 2009, at 6:37 AM, Roland King wrote: I didn't know the status bar was in there, either way that's not the way you do it I realize after you just reminded me, that i had said that wrong, I did edit the plist file, rather than the XIB file to disable the status bar.it wo

[iphone] ebook

2009-09-03 Thread Dragos Ionel
Hi, I am trying to build a book reader for iPhone. If any of have any experience, can you please guide me? For example - should I use a UITextView or UIWebView? - how can the page flip effect can be achieved? No need to go to details, just direct me into the right direction. Thanks a lot, Dra

Re: Fonts that are always there

2009-09-03 Thread I. Savant
On Sep 3, 2009, at 6:57 AM, Gabriel Zachmann wrote: Does anyone know which fonts are always there on every Mac OS X 10.5 system? (besides the base 14 fonts from Adobe) Or is there somewhere a list? Do you really want a list of fonts or do you mean to find a safe, system-provided font?

Re: [iphone] ebook

2009-09-03 Thread I. Savant
On Sep 3, 2009, at 9:05 AM, Dragos Ionel wrote: - should I use a UITextView or UIWebView? A text view adds a lot of editing perks but limited styling perks. A web view allows attaching stylesheets so that the actual content is pure HTML (an established markup language). Since you're looki

Re: a bug in iphone SDK's creation of view based xib files.

2009-09-03 Thread Roland King
On 03-Sep-2009, at 8:49 PM, jon wrote: On Sep 3, 2009, at 6:37 AM, Roland King wrote: I didn't know the status bar was in there, either way that's not the way you do it I realize after you just reminded me, that i had said that wrong, I did edit the plist file, rather than the XIB f

PDFView caching issue?

2009-09-03 Thread DairyKnight
Hi, I'm trying to do some customized drawing in a PDFView, so I overrided 'drawPage' as follows: - (void)drawPage:(PDFPage *)page { int width = [page boundsForBox:kPDFDisplayBoxMediaBox].size.width; int height = [page boundsForBox:kPDFDisplayBoxMediaBox].size.height; int x = [page bou

How does launchAppWithBundleIdentifier work?

2009-09-03 Thread Gregory Weston
Specifically, I note that the documentation for the fourth parameter, the launch identifier, reads: "On input, a pointer to a number object variable. On return, the variable contains a number object with a unique identifier for the launch attempt. You can use this value to distinguish indiv

bad behavior from unlockFocus on 10.6

2009-09-03 Thread Robert Clair
I have this piece of code in my drawing program: [image lockFocus]; NSBitmapImageRep* bitmapRep = [[NSBitmapImageRep alloc] initWithFocusedViewRect: NSMakeRect( 0.0, 0.0, width, height) ]; [image unlockFocus]; image is an NSImage with a single representation, either

Re: Image Thresholding

2009-09-03 Thread Steve Christensen
On Sep 2, 2009, at 10:29 PM, fawad shafi wrote: I want to convert grayscale or RGB image to Binary Image. Please provide sample code. Requests to "please provide sample code" sounds like you want other people to do your work for you. There is plenty of information on how to do that if you

lazy bound problem

2009-09-03 Thread Donnie Lee
Hello! I build a bundle's code which I build with "-undefined dynamic_lookup" option: @interface test @end @implementation test (testCategory) - (void)test { NSLog(@"Hello"); } @end ...and I call this test method in bundle's code. `nm -mg` for bundle executable for i386: ... (undefined

Context menus into services

2009-09-03 Thread Gregory Weston
I know and agree with the rationale, but it's really looking like a premature move. I've got a context menu item that operates on general file system objects, but not on volumes and not on a couple of specific "special" folder types. In the process of converting to a service for 10.6, I'd c

Re: hud panel possible bug?

2009-09-03 Thread Corbin Dunn
Hi Rick, On Sep 3, 2009, at 5:49 AM, Rick C. wrote: hello again, i have noticed in snow leopard only if you are using the standard hud panel in IB and you will run your project then taking the resize handle of the panel and drag it down and away quickly it will create vertical lines at t

Overriding NSTextTable behaviour in NSTextView

2009-09-03 Thread Keith Blount
Hello, I would like to make a minor adjustment to the way tables work in an NSTextView, but as the tables panel is a bit of a black box and as the table classes - NSTextTable and NSTextTableBlock - aren't the easiest thing to use (they are straightforward if you just want to create a table prog

Re: NSDictionary, allKeys and the NSAutoreleasePool

2009-09-03 Thread Roland King
Is that *all* the code? Your output has two 'ar 1' lines but you only NSLog() with that pattern once. The output doesn't match the code. On 03-Sep-2009, at 10:21 PM, Horst Jäger wrote: Hi, yesterday I stumbled upon something strange concerning the autorelease pool. Please consinder the

NSDictionary, allKeys and the NSAutoreleasePool

2009-09-03 Thread Horst Jäger
Hi, yesterday I stumbled upon something strange concerning the autorelease pool. Please consinder the following lines of code: NSLog(@"devel"); NSAutoreleasePool *autoreleasePool = [[NSAutoreleasePool alloc] init]; NSDictionary *di = [[NSDict

Re: NSDictionary, allKeys and the NSAutoreleasePool

2009-09-03 Thread Graham Cox
On 04/09/2009, at 12:21 AM, Horst Jäger wrote: Any explanation? Relying on retain counts to tell you an object's state is not a good idea. What I'm guessing is that the code internally looks something along the lines of: - (void) release { if( retainCount == 1 ) [self deallo

Re: Trouble with NSButtonCell

2009-09-03 Thread Dave DeLong
Unfortunately, "setDoubleAction:" is not a method on NSCell or any of its subclasses (except NSPathCell). Really all the BWToolkit is doing is skinning. As far as I can tell from browsing through the code, it's not actually changing functionality of the controls. Dave On Sep 3, 2009, at

Re: NSDictionary, allKeys and the NSAutoreleasePool

2009-09-03 Thread Scott Andrew
"ar" is not a member of "d"i. allKeys creates an autoreleased NSArray with the keys values retained in indexes. "ar" is placed in the auto release pool when it is created in the allKeys call. When you call [autorelease release] the items are freed when you since the pool is released and fre

Re: Trouble with NSButtonCell

2009-09-03 Thread Scott Andrew
I think you need to create a subclass of NSButton that uses your cell. Then use setAction and setDoubleAction. Scott On Sep 3, 2009, at 7:41 AM, Dave DeLong wrote: Unfortunately, "setDoubleAction:" is not a method on NSCell or any of its subclasses (except NSPathCell). Really all the BWTo

Re: NSDictionary, allKeys and the NSAutoreleasePool

2009-09-03 Thread Greg Guerin
Horst Jäger wrote: NSDictionary *di = [[NSDictionary alloc] init]; NSArray *ar = [di allKeys]; di is an empty NSDictionary. Therefore, ar will always be an empty immutable NSArray. Consequently, it's possible to return a singleton empty NSArray that's never released. I'm not saying thi

What about revamping OpenUp.app for Snow Leopard?

2009-09-03 Thread Giulio Cesare Solaroli
Hello, I may sound a little bit old fashioned, but I still much prefer Scott Anguish's (of Stepwise.com fame) OpenUp.app application (http://www.stepwise.com/Software/OpenUp/) instead of the MacOS X built in Archive Utility (the default application used to open zip, tar, etc...). OpenUp.app has b

watch changes to any properties on an object

2009-09-03 Thread Alexander Cohen
Hello, I have a base object that needs to know when any of it's properties or subclasses properties have changed and set a dirty flag on itself. Is there a way to do this? thx AC ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do

Re: Trouble with NSButtonCell

2009-09-03 Thread Corbin Dunn
On Sep 3, 2009, at 7:58 AM, Scott Andrew wrote: I think you need to create a subclass of NSButton that uses your cell. Then use setAction and setDoubleAction. Creating a subclass of NSButton isn't necessary; the custom cell can be set in IB (Leopard+). Dave needs to subclass NSButtonCell

Re: bad behavior from unlockFocus on 10.6

2009-09-03 Thread Kyle Sluder
Check the AppKit release notes. Sounds like one if the common mistake cases covered there. --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 moderato

Handling NSApplicationDefined events

2009-09-03 Thread McLaughlin, Michael P.
The relevant docs make it clear how to send an NSApplicationDefined NSEvent, e.g., to NSApp, but I cannot find anything, esp. no examples, about how to handle events of this type. I was assuming that it could be done in AppDelegate. Perhaps not -- but I'd really like to see a description and one

Re: Fonts that are always there

2009-09-03 Thread Jens Alfke
On Sep 3, 2009, at 3:57 AM, Gabriel Zachmann wrote: Does anyone know which fonts are always there on every Mac OS X 10.5 system? (besides the base 14 fonts from Adobe) Apple has some Knowledge-Base articles listing the installed fonts, but I don't have a link handy. —Jens___

change in launch services binding behavior?

2009-09-03 Thread Matt Neuburg
I wonder whether someone (preferably from Apple) could provide details on how Snow Leopard has changed its algorithm for how a document is bound to an application, esp. when double-clicking the doc in the Finder. In the past, where many apps could claim a file type / extension, such as plain text

Re: bad behavior from unlockFocus on 10.6

2009-09-03 Thread Ken Ferry
Hi Bob, > This all worked fine until 10.6. The original NSImage object was left unmolested. Nope. :-) Clearly you're seeing behavior change somewhere, but this attribution is not correct. -[NSImage lockFocus] is a commonly misunderstood method. It is and always has been lossy. Lock/unlock focu

Re: iPhone-detecting call event...

2009-09-03 Thread David Duncan
On Sep 2, 2009, at 10:20 AM, Farooq zaman wrote: Is it possible to detect phone-call event on iPhone? If yes, what are the available APIs? No, it is not. The only interaction possible with the Phone is to request it to dial a number via a URL. -- David Duncan Apple DTS Animation and Print

Re: NSDictionary, allKeys and the NSAutoreleasePool

2009-09-03 Thread David Duncan
This is essentially correct. Why bother to decrement the retain count when the object is going away after all... On Sep 3, 2009, at 7:29 AM, Graham Cox wrote: Relying on retain counts to tell you an object's state is not a good idea. What I'm guessing is that the code internally looks someth

Re: watch changes to any properties on an object

2009-09-03 Thread Jens Alfke
On Sep 3, 2009, at 8:24 AM, Alexander Cohen wrote: I have a base object that needs to know when any of it's properties or subclasses properties have changed and set a dirty flag on itself. Is there a way to do this? No, not in general. Key-value observing requires knowing the exact prope

Re: Fonts that are always there

2009-09-03 Thread Jens Alfke
On Sep 3, 2009, at 6:07 AM, I. Savant wrote: (Of course, I should always have a second alternative.) No, you should fall back on the system as mentioned above. Always. Why? It's perfectly reasonable to look for, say, Tahoma but fall back to Helvetica, then use the system font as a last r

Re: Fonts that are always there

2009-09-03 Thread I. Savant
On Sep 3, 2009, at 12:26 PM, Jens Alfke wrote: No, you should fall back on the system as mentioned above. Always. Why? It's perfectly reasonable to look for, say, Tahoma but fall back to Helvetica, then use the system font as a last resor The term "fall back on" means exactly what you de

Re: Handling NSApplicationDefined events

2009-09-03 Thread Quincey Morris
On Sep 3, 2009, at 08:58, McLaughlin, Michael P. wrote: The relevant docs make it clear how to send an NSApplicationDefined NSEvent, e.g., to NSApp, but I cannot find anything, esp. no examples, about how to handle events of this type. I was assuming that it could be done in AppDelegate. P

Distinguishing between return and enter in NSTextField

2009-09-03 Thread Rick Mann
Hi. I'd like to insert a new line when the user presses return in an NSTextField, but take completely custom action when they press Enter. Is the only way to do this to subclass NSTextField and override the NSResponder keyDown: method? TIA, Rick

Re: Getting a StringPtr from Gestalt on 64-bit

2009-09-03 Thread Scott Lahteine
On Sep 2, 2009, at 9:02 PM, Scott Lahteine wrote: My preference pane uses Gestalt(gestaltUserVisibleMachineName, &mySInt32), coercing the SInt32 into a StringPtr to get the Machine Name. On 64-bit I get a warning because StringPtr is a 64-bit pointer on that architecture. Does Gestalt() ensure th

NSImage with multiple representation sizes

2009-09-03 Thread Benjamin Rister
(Apologies if this ends up a duplicate…I sent the original over a week ago, and as far as I can see it's not in either Apple's or Cocoabuilder's archives, so I don't see any other explanation besides it just being eaten by something.) The core question: Is it still the best practice to have

Re: Distinguishing between return and enter in NSTextField

2009-09-03 Thread Rick Mann
I would like to use the delegate, but it sends me insertNewLine: for both keys. Is there another method I can implement? On Sep 3, 2009, at 11:14:20, Douglas Davidson wrote: Short answer: no. Stay away from keyDown: and look at delegate methods instead. I have a standard rant on this topic

Re: NSDictionary, allKeys and the NSAutoreleasePool

2009-09-03 Thread mmalc Crawford
On Sep 3, 2009, at 7:56 AM, Scott Andrew wrote: As Cocoa documentation states all items returned from a message are autoreleased unless otherwise stated in the documentation for the API call. The documentation emphatically does not state that. The basic rules are given here:

Re: Distinguishing between return and enter in NSTextField

2009-09-03 Thread Douglas Davidson
Short answer: no. Stay away from keyDown: and look at delegate methods instead. I have a standard rant on this topic; I don't have it handy but it should be in the list archives. Douglas Davidson On Sep 3, 2009, at 10:54 AM, Rick Mann wrote: Hi. I'd like to insert a new line when the us

Re: Getting a StringPtr from Gestalt on 64-bit

2009-09-03 Thread David Duncan
On Sep 3, 2009, at 10:56 AM, Scott Lahteine wrote: CSCopyMachineName() returns the name of the computer as set by the user in the Sharing preference pane, which is not the same thing as the gestaltUserVisibleMachineName. The "Machine Name" I want is the Apple-defined identifier for the type

Re: watch changes to any properties on an object

2009-09-03 Thread Alexander Cohen
Ok, thats what i thought. But just for implementation ideas, how does CoreData know when one of it's @dynamic properties is changed? It must set some sort of flag somewhere in order to know what to write out when it needs to save. How does it handle that? thx AC On Sep 3, 2009, at 12:27 P

Re: NSDictionary, allKeys and the NSAutoreleasePool

2009-09-03 Thread Scott Andrew
I could have sworn in either the apple docs (or one of the cocoa books, maybe this board). I maybe thinking of the general rule that you don't own the object until you retain it and its only valid or the within the method that its recieved. My bad. Scott On Sep 3, 2009, at 11:29 AM, mmalc

Re: NSImage with multiple representation sizes

2009-09-03 Thread Ken Ferry
Hi Benjamin, I think there's some confusion here between size and pixel size. The "size" of an image is the default size of the rect in which it's drawn when the person drawing it doesn't have any more specific information. That's a concept that there can only be one of for the entire image, so i

Re: watch changes to any properties on an object

2009-09-03 Thread Jens Alfke
On Sep 3, 2009, at 11:32 AM, Alexander Cohen wrote: Ok, thats what i thought. But just for implementation ideas, how does CoreData know when one of it's @dynamic properties is changed? It must set some sort of flag somewhere in order to know what to write out when it needs to save. How doe

Re: NSDictionary, allKeys and the NSAutoreleasePool

2009-09-03 Thread Jens Alfke
On Sep 3, 2009, at 11:40 AM, Scott Andrew wrote: I could have sworn in either the apple docs (or one of the cocoa books, maybe this board). I maybe thinking of the general rule that you don't own the object until you retain it and its only valid or the within the method that its recieved.

Re: Distinguishing between return and enter in NSTextField

2009-09-03 Thread Douglas Davidson
Try taking a look at the current event. Douglas Davidson On Sep 3, 2009, at 11:18 AM, Rick Mann wrote: I would like to use the delegate, but it sends me insertNewLine: for both keys. Is there another method I can implement? On Sep 3, 2009, at 11:14:20, Douglas Davidson wrote: Short answ

Re: bad behavior from unlockFocus on 10.6

2009-09-03 Thread Robert Clair
Hi Ken - > This all worked fine until 10.6. The original NSImage object was left unmolested. Nope. :-) Clearly you're seeing behavior change somewhere, but this attribution is not correct. -[NSImage lockFocus] is a commonly misunderstood method. It is and always has been lossy. No

Re: Getting a StringPtr from Gestalt on 64-bit

2009-09-03 Thread Clark Cox
On Thu, Sep 3, 2009 at 10:56 AM, Scott Lahteine wrote: >> On Sep 2, 2009, at 9:02 PM, Scott Lahteine wrote: >>> >>> My preference pane uses Gestalt(gestaltUserVisibleMachineName, >>> &mySInt32), coercing the SInt32 into a StringPtr to get the Machine >>> Name. On 64-bit I get a warning because Stri

Re: watch changes to any properties on an object

2009-09-03 Thread Alexander Cohen
Ah, ok, this is more like what i wanted to hear! :) I understand how @dynamic works, but how to I get to funnel all calls to @dynamic properties to the same call such as setValue:forKey: or something like that where i can parse the key and update my internal data and set the flags i need to

Re: watch changes to any properties on an object

2009-09-03 Thread Ben Trumbull
Well, @dynamic doesn't have anything to do with KVO. It's just storage and accessors for properties. Core Data knows when non- dynamic modeled properties change too. It sets a dirty flag, just as you would have to. Most of that happens in -willChangeValueForKey:. Unfortunately, overridi

Re: NSServices

2009-09-03 Thread Peter Ammon
Hi Colin, Adding the NSRequiredContext is the right way to make it appear by default. Note that after adding it, you will have to run /System/Library/ CoreServices/pbs (or log out and back in) to make the Service appear. If you are unsure if the system is recognizing the context, run pbs

Re: Getting a StringPtr from Gestalt on 64-bit

2009-09-03 Thread Scott Lahteine
On Sep 3, 2009, at 3:14 PM, Clark Cox wrote: At this point, as far as I can tell Gestalt() is still a viable solution, and the returned pointer is just guaranteed to be in the low 4GB of RAM. Not possible. On 64-bit Intel (at least with the default settings), there is no such thing as a vali

Re: watch changes to any properties on an object

2009-09-03 Thread Quincey Morris
On Sep 3, 2009, at 12:14, Alexander Cohen wrote: Ah, ok, this is more like what i wanted to hear! :) I understand how @dynamic works, but how to I get to funnel all calls to @dynamic properties to the same call such as setValue:forKey: or something like that where i can parse the key and up

Re: [Workaround] Re: My NSUndoManager subclass is broken on SL - how to fix?

2009-09-03 Thread Jayson Adams
On Sep 2, 2009, at 9:48 PM, Graham Cox wrote: For anyone interested (doesn't seem like anyone is, unfortunately) I have worked out a solution which can only be described as an inglorious hack. I have submitted a bug report requesting that NSUndoManager is made (optionally) backwards compat

Re: Getting a StringPtr from Gestalt on 64-bit

2009-09-03 Thread David Duncan
On Sep 3, 2009, at 12:35 PM, Scott Lahteine wrote: As it turns out Gestalt(gestaltUserVisibleMachineName) returns error -5551 in a 64 bit binary anyway. I wasn't seeing this because apparently my build architecture - "Standard Universal (32/64 bit)" - was/is for some reason launching the 32

Re: bad behavior from unlockFocus on 10.6

2009-09-03 Thread Ken Ferry
Well, please file a bug with a test case that shows the behavior change. I still think there's something else going on. -Ken Cocoa Frameworks NSImage owner On Thu, Sep 3, 2009 at 11:53 AM, Robert Clair wrote: > Hi Ken - > > >> > This all worked fine until 10.6. The original NSImage object was

Re: watch changes to any properties on an object

2009-09-03 Thread Quincey Morris
On Sep 3, 2009, at 12:44, Quincey Morris wrote: (call them "dynamic" if you want, but that's the same as their being compiled as "@dynamic") I meant, "... that's *not* the same as ...", of course. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.

Re: Core Data dog-slow when using first time after boot

2009-09-03 Thread Ben Trumbull
On Sep 3, 2009, at 4:49 AM, Ruotger Skupin wrote: Since it's not a many to many, you can perform the prefetching effectively by hand using a fetch request to preload the relevant destination rows with an IN query based on the data you initially fetched for the source entity. You shouldn't

Re: watch changes to any properties on an object

2009-09-03 Thread Alexander Cohen
Overriding willChangeValueForKey: was one of the first things i tried before posting and I noticed it was not being called, i thought it was weird but nothing more. Good to know that overriding it was deprecated. Thx for the info on how CoreData manages it's saves. I was hoping to not have

NSControlTextDidChangeNotification - What key pressed?

2009-09-03 Thread jeffs87
Hi, I added an NSControlTextDidChangeNotification for a text field and I was wondering if there is a way to see what key was pressed when the selector is called? thanks Jeff ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not pos

Re: watch changes to any properties on an object

2009-09-03 Thread Alexander Cohen
On Sep 3, 2009, at 3:44 PM, Quincey Morris wrote: On Sep 3, 2009, at 12:14, Alexander Cohen wrote: Ah, ok, this is more like what i wanted to hear! :) I understand how @dynamic works, but how to I get to funnel all calls to @dynamic properties to the same call such as setValue:forKey: or

Re: NSDictionary, allKeys and the NSAutoreleasePool

2009-09-03 Thread Greg Parker
On Sep 3, 2009, at 11:47 AM, Jens Alfke wrote: On Sep 3, 2009, at 11:40 AM, Scott Andrew wrote: I could have sworn in either the apple docs (or one of the cocoa books, maybe this board). I maybe thinking of the general rule that you don't own the object until you retain it and its only valid

RE: NSServices

2009-09-03 Thread Colin Deasy
Hey Peter, Thanks for the response. Ya I had gone through all that process, and my app was showing up in the output. When I debugged it against textedit it said that it was disabled! I've got it working now, it was caused by 1 of the following: - Duplicate applications ( e.g both a debug and rel

Re: NSControlTextDidChangeNotification - What key pressed?

2009-09-03 Thread Jens Alfke
On Sep 3, 2009, at 1:03 PM, jeff...@aol.com wrote: I added an NSControlTextDidChangeNotification for a text field and I was wondering if there is a way to see what key was pressed when the selector is called? Nope — this notification is higher level and happens after any user- driven chan

Re: NSControlTextDidChangeNotification - What key pressed?

2009-09-03 Thread Andy Lee
On Sep 3, 2009, at 4:03 PM, jeff...@aol.com wrote: I added an NSControlTextDidChangeNotification for a text field and I was wondering if there is a way to see what key was pressed when the selector is called? Maybe look at [NSApp currentEvent]? (This comes to mind because it was suggested i

Re: Handling NSApplicationDefined events

2009-09-03 Thread McLaughlin, Michael P.
Quincey Morris wrote: >It's straightforward. Subclass NSApplication and override sendEvent: >to test for NSApplicationDefined. > >Don't forget to specify your subclass as the "Principal Class" in your >target's properties. The one example I found like that passed the event on even though it had b

Re: watch changes to any properties on an object

2009-09-03 Thread Ben Trumbull
On Sep 3, 2009, at 12:14, Alexander Cohen wrote: Ah, ok, this is more like what i wanted to hear! :) I understand how @dynamic works, but how to I get to funnel all calls to @dynamic properties to the same call such as setValue:forKey: or something like that where i can parse the key and update my

Re: Handling NSApplicationDefined events

2009-09-03 Thread Quincey Morris
On Sep 3, 2009, at 13:39, McLaughlin, Michael P. wrote: The one example I found like that passed the event on even though it had been handled. Is @interface MyApplication : NSApplication { } @implementation MyApplication -(void)sendEvent:(NSEvent *)evt { if ([evt type] == NSApplicationDe

Does -[NSFileManager attributesOfItemAtPath:error:] traverse symlinks?

2009-09-03 Thread Charles Srstka
Okay, the documentation for -[NSFileManager attributesOfItemAtPath:error:] states the following: In Mac OS X v 10.6 and earlier, if the last component of the path is a symbolic link (the value of the NSFileType key in the attributes dictionary isNSFileTypeSymbolicLink), it will be traversed

NSUserDefaults

2009-09-03 Thread Oftenwrong Soong
Hi all, Why does NSUserDefaults provide method stringForKey but not a method setString:forKey (akin to setBool:forKey, setFloat:forKey, etc.)? This does not seem symmetric. I'm using setObject:forKey when saving a NSString to the defaults database. Is this correct? Thanks, Soong ___

Re: NSUserDefaults

2009-09-03 Thread Steven Degutis
As NSString, NSData, NSDictionary, etc are derived from NSObject, they can be easily set with -setObject:forKey:, whereas int, float, NSInteger, etc are scalar types and thus cannot be set with this method. Thus, they have convenient setters/getters, whereas object types have convenient getters onl

Re: NSControlTextDidChangeNotification - What key pressed?

2009-09-03 Thread jeffs87
That worked... if (([[NSApp currentEvent] type] == NSKeyDown) && ([[NSApp currentEvent] keyCode] == 0x1b)) { } thanks Jeff >Maybe look at [NSApp currentEvent]? > >(This comes to mind because it was suggested in answer to >another question.) > >-Andy

Re: NSUserDefaults

2009-09-03 Thread Andy Lee
On Sep 3, 2009, at 5:05 PM, Oftenwrong Soong wrote: Why does NSUserDefaults provide method stringForKey but not a method setString:forKey (akin to setBool:forKey, setFloat:forKey, etc.)? This does not seem symmetric. I'm using setObject:forKey when saving a NSString to the defaults databas

Re: a bug in iphone SDK's creation of view based xib files.

2009-09-03 Thread Joey Hagedorn
On Sep 3, 2009, at 5:21 AM, jon wrote: Thanks for reporting a bug, this is the best way to get problems fixed. the springs and struts are disabled on views with simulated user interface attributes, so this is expected...In this case, it sounds like you expect the view provided in the

Re: NSUserDefaults

2009-09-03 Thread Steven Riggs
That's how I do it. I also use setValue:forKey: when passing NSLocalizedString() -Steve On Sep 3, 2009, at 5:05 PM, Oftenwrong Soong wrote: Hi all, Why does NSUserDefaults provide method stringForKey but not a method setString:forKey (akin to setBool:forKey, setFloat:forKey, etc.)? Thi

Re: Does -[NSFileManager attributesOfItemAtPath:error:] traverse symlinks?

2009-09-03 Thread Kyle Sluder
Get out of my OmniFocus inbox! I noticed this the other day and was about to file a Radar on it today. You should do the same. --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator commen

Re: Getting a StringPtr from Gestalt on 64-bit

2009-09-03 Thread Kyle Sluder
On Thu, Sep 3, 2009 at 12:47 PM, David Duncan wrote: > The kernel you are booted into has no effect on the binaries that will > launch. However, your project settings will determine what build is > launched, and older projects will often have i386 as default (a newly > created project shows that x8

Re: Does -[NSFileManager attributesOfItemAtPath:error:] traverse symlinks?

2009-09-03 Thread Charles Srstka
On Sep 3, 2009, at 4:36 PM, Kyle Sluder wrote: Get out of my OmniFocus inbox! I noticed this the other day and was about to file a Radar on it today. You should do the same. --Kyle Sluder I filed one a while ago, although it was on the lack of a documented method to get the attributes of

Re: Does -[NSFileManager attributesOfItemAtPath:error:] traverse symlinks?

2009-09-03 Thread Kyle Sluder
The header file describes the correct behavior. rdar://problem/7196143 It has been stated that the header files are as valid sources of documentation as the docset. The current behavior is the only one that makes sense. --Kyle Sluder ___ Cocoa-dev ma

restoring NSSplitView divider's position

2009-09-03 Thread kvic...@pobox.com
i have a multi-document, multi-window app and i'm getting ready to use NSSplitView for the first time. from reading the docs and searching at cocoadev, i don't see how to get the current position of the divider so that i can save it, and later restore it on subsequent launches of my app/docume

Default authorization dialog text in Snow Leopard misleading

2009-09-03 Thread Kevin Wojniak
In Snow Leopard, the default dialog text is now "Type your password to allow MyApp to make changes." In Leopard it was "MyApp.app requires that you type your password." The SL version is slightly misleading, at least from a user's perspective. In our app we aren't making any direct changes,

NSBundle from an URL.

2009-09-03 Thread Erik Österlund
Hello. I just wanted to check out NSBundle's + bundleFromURL. I looked in the documentation and said nothing about only some protocols working, so I thought I could load a bundle via HTTP which would be awesome, but that seemed to fail. Is this a bug, or am I being stupid? Here is my code

Re: NSBundle from an URL.

2009-09-03 Thread Jens Alfke
On Sep 3, 2009, at 3:36 PM, Erik Österlund wrote: I just wanted to check out NSBundle's + bundleFromURL. I looked in the documentation and said nothing about only some protocols working, so I thought I could load a bundle via HTTP which would be awesome, but that seemed to fail. Is this a

Crash in CFRunLoopWakeUp

2009-09-03 Thread Mark Allan
Hi all, I've been battling with this intermittent crash for about two weeks now and can't figure it out for the life of me. I've got try/catch blocks around nearly all my code, and definitely around any code which runs in a separate thread, but it's not catching whatever causes this cras

Re: NSBundle from an URL.

2009-09-03 Thread Randall Meadows
On Sep 3, 2009, at 4:36 PM, Erik Österlund wrote: 2009-09-04 00:33:52.657 TestClient[90551:a0f] An uncaught exception was raised 2009-09-04 00:33:52.659 TestClient[90551:a0f] *** -[NSBundle initWithURL:]: non-file URL argument 2009-09-04 00:33:52.663 TestClient[90551:a0f] *** Terminating app

Re: NSBundle from an URL.

2009-09-03 Thread Ken Thomases
On Sep 3, 2009, at 5:36 PM, Erik Österlund wrote: I just wanted to check out NSBundle's + bundleFromURL. I looked in the documentation and said nothing about only some protocols working, so I thought I could load a bundle via HTTP which would be awesome, but that seemed to fail. Is this a b

Re: change in launch services binding behavior?

2009-09-03 Thread Gregory Weston
Matt Neuburg wrote: I wonder whether someone (preferably from Apple) could provide details on how Snow Leopard has changed its algorithm for how a document is bound to an application, esp. when double-clicking the doc in the Finder. I've done a little bit of experimenting on that a couple

Re: Crash in CFRunLoopWakeUp

2009-09-03 Thread Greg Parker
On Sep 3, 2009, at 3:41 PM, Mark Allan wrote: I've been battling with this intermittent crash for about two weeks now and can't figure it out for the life of me. I've got try/catch blocks around nearly all my code, and definitely around any code which runs in a separate thread, but it's not

Binding table columns that change at runtime

2009-09-03 Thread BareFeet
Hi all, I'm fairly comfortable with setting up bindings for table columns to an NSArrayController. Now I'd like to use bindings where the columns change at runtime. Is this possible? I am avoiding using CoreData (so I can run on Mac OS X 10.3 ish and upwards). Any help appreciated. Thank

Re: hud panel possible bug?

2009-09-03 Thread Rick C.
sure thing corbin thanks! rick From: Corbin Dunn To: Rick C. Cc: cocoa dev Sent: Thursday, September 3, 2009 10:14:28 PM Subject: Re: hud panel possible bug? Hi Rick, On Sep 3, 2009, at 5:49 AM, Rick C. wrote: > hello again, > > i have noticed in snow l

  1   2   >