Re: Where did the icon come from?

2010-07-16 Thread John Joyce
You might be going about it wrong. A user can, in Finder's Get Info window, set the application they prefer for all files of a given "type". On my system I've set some text file types to always open in TextMate, for example. TextMate the app provides custom file icons for all the file types it ca

Re: Data downloading performance

2010-07-16 Thread Kyle Sluder
On Fri, Jul 16, 2010 at 10:36 PM, Rafael Cerioli wrote: > I guess I had something wrong, NSURLConnection does not do anything in a > background thread. It just operates in the main thread but "asynchronously" > thanks to the run loop. Well, sort of. I believe what actually happens is that it uses

Re: Data downloading performance

2010-07-16 Thread Rafael Cerioli
Le 16 juil. 2010 à 18:56, Kyle Sluder a écrit : > On Jul 16, 2010, at 3:46 PM, Rafael Cerioli wrote: > >> Hi everybody, >> >> What would be the most efficient way to download data without blocking the >> UI (I'm targeting old iPhone/iPod devices) ? >> >> - using a NSURLConnection seams nice,

Matching a vcard with an address book record

2010-07-16 Thread Gideon King
Using initWithVCardRepresentation: to create an ABPerson gives me a new person every time even if that person is already in Address book. If you drag a vCard into address book and it's already there, it prompts you as to whether to use the existing/new/merge etc., so obviously there is some way

Re: Data downloading performance

2010-07-16 Thread Kyle Sluder
On Fri, Jul 16, 2010 at 5:13 PM, Markus Spoettl wrote: > The synchronous API comes with restrictions sure, but buggy? Searching for > "NSURLConnection's synchronous API is buggy" doesn't bring up anything > (useful) - or I'm overlooking it. So what is it? As a user of the synchronous > API, I'm

Re: Data downloading performance

2010-07-16 Thread Markus Spoettl
On Jul 16, 2010, at 6:56 PM, Kyle Sluder wrote: > Don't do this. NSURLConnection's synchronous API is buggy, as a web search > will tell you. The synchronous API comes with restrictions sure, but buggy? Searching for "NSURLConnection's synchronous API is buggy" doesn't bring up anything (useful

Re: Installation of screensaver fails

2010-07-16 Thread Michael Ash
On Fri, Jul 16, 2010 at 4:34 AM, Gabriel Zachmann wrote: >> In order for a screen saver to be fully compatible with Snow Leopard, you >> must add an Intel 64 slice that supports GC. The reason is because both the >> screen saver engine and System Preferences run as Intel 64 apps on Snow >> Leop

Re: Data downloading performance

2010-07-16 Thread Kyle Sluder
On Jul 16, 2010, at 3:46 PM, Rafael Cerioli wrote: > Hi everybody, > > What would be the most efficient way to download data without blocking the UI > (I'm targeting old iPhone/iPod devices) ? > > - using a NSURLConnection seams nice, but as it calls its delegate > (-connection:didReceiveData

Re: Where did the icon come from?

2010-07-16 Thread Eric Gorr
On Jul 16, 2010, at 6:31 PM, James Walker wrote: > On 7/16/2010 2:45 PM, Eric Gorr wrote: >> Thanks, but I wasn't specific enough. >> >> What I am looking for is something like this: >> >> $WhoProvidedIcon /Path/To/file.myex >> >> UTI: com.myapplication.document >> PLIST: /path/to/myapplicatio

Data downloading performance

2010-07-16 Thread Rafael Cerioli
Hi everybody, What would be the most efficient way to download data without blocking the UI (I'm targeting old iPhone/iPod devices) ? - using a NSURLConnection seams nice, but as it calls its delegate (-connection:didReceiveData:) on the main thread, it has to take a lock on the main thread so

Re: Where did the icon come from?

2010-07-16 Thread James Walker
On 7/16/2010 2:45 PM, Eric Gorr wrote: Thanks, but I wasn't specific enough. What I am looking for is something like this: $WhoProvidedIcon /Path/To/file.myex UTI: com.myapplication.document PLIST: /path/to/myapplication.app/Contents/Info.plist ICON: /path/to/myapplication.app/Contents/Resourc

IKImageView in NSCollectionView: No Core Animation Effects

2010-07-16 Thread Rainer Standke
Hello, I have replaced a bunch of NSImageViews with IKImageViews in my app. These image views are presented inside an NSCollectionView. Both the NSImageViews and the IKImageViews had shadows turned on in IB. The NSImageViews' shadows showed up fine, but the IKImageViews' shadows are nowhere to

Re: Where did the icon come from?

2010-07-16 Thread Eric Gorr
On Jul 16, 2010, at 5:36 PM, John Joyce wrote: > On Jul 16, 2010, at 4:28 PM, Eric Gorr wrote: > >> Is there a unix tool to which I can pass a file and have it tell me where >> the icon for the file is coming from? >> >> Thank you.___ >> > Also see N

Re: Where did the icon come from?

2010-07-16 Thread Eric Gorr
Thanks, but I wasn't specific enough. What I am looking for is something like this: $WhoProvidedIcon /Path/To/file.myex UTI: com.myapplication.document PLIST: /path/to/myapplication.app/Contents/Info.plist ICON: /path/to/myapplication.app/Contents/Resources/BaseDoc.icns On Jul 16, 2010, at 5

Re: Where did the icon come from?

2010-07-16 Thread John Joyce
On Jul 16, 2010, at 4:28 PM, Eric Gorr wrote: > Is there a unix tool to which I can pass a file and have it tell me where the > icon for the file is coming from? > > Thank you.___ > Also see NSWorkspace Class Reference iconForFile: Returns an image

Re: Where did the icon come from?

2010-07-16 Thread John Joyce
On Jul 16, 2010, at 4:28 PM, Eric Gorr wrote: > Is there a unix tool to which I can pass a file and have it tell me where the > icon for the file is coming from? > > Thank you.___ You can build one fairly quickly. Here is the salient part from NSAppli

Where did the icon come from?

2010-07-16 Thread Eric Gorr
Is there a unix tool to which I can pass a file and have it tell me where the icon for the file is coming from? Thank you.___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Conta

Re: overriding every method of an object

2010-07-16 Thread Kyle Sluder
Instead of subclassing, why not create a proxy whose implementation of -forwardInvocation: does what you need? --Kyle Sluder (Sent from the road) On Jul 16, 2010, at 1:17 PM, Alexander Cohen wrote: > Hello, > > Is there a way for a subclass to override every method of its superclass? > > thx

overriding every method of an object

2010-07-16 Thread Alexander Cohen
Hello, Is there a way for a subclass to override every method of its superclass? thx AC ___ 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-ad

Re: NSStream Questions

2010-07-16 Thread Greg Guerin
John MacMullin wrote: Create a dictionary with the stream as the key, access and maintain the dictionary and stream stuff with the key, (NSValue key), lock or synchronize access to the dictionary. Applies to every pass through handleEvent (and everywhere else), ie., any broadcast code.

Re: NSStream Questions

2010-07-16 Thread Greg Guerin
Jon Loeliger wrote: I'm writing a network server that needs to accept many simultaneous client connections and keep track of them. I've written the base server parts, roughly in the style of the Apple Examples (SimpleNetworkStreamsExample). These examples, however, only allow one connected clie

Re: 1. NSStream Questions (Jon Loeliger)

2010-07-16 Thread John MacMullin
Create a dictionary with the stream as the key, access and maintain the dictionary and stream stuff with the key, (NSValue key), lock or synchronize access to the dictionary. Applies to every pass through handleEvent (and everywhere else), ie., any broadcast code. That's what I do and it works

Re: NSView Docs. Was: Binding -- or not -- a button created in code

2010-07-16 Thread Jerry Krinock
On 2010 Jul 09, at 14:30, Sean McBride wrote: > On Fri, 9 Jul 2010 13:38:36 -0700, Jerry Krinock said: > >>> mmalc has some comments on unbinding here: >>> >> >> I wonder if mmalc saw any advantage to using -viewWillMoveTo

Re: Reading in UTF-8 to Data

2010-07-16 Thread Brad Stone
I was all over the internet last night including Stack Overflow, Coco Dev, this mailing list. I can' t believe I missed this. Thanks! On Jul 16, 2010, at 2:58 PM, Kirk Kerekes wrote: > In the first page of Google hits for "nsstring quoted-printable"" > >

Re: Installation of screensaver fails

2010-07-16 Thread Nick Zitzmann
On Jul 16, 2010, at 2:34 AM, Gabriel Zachmann wrote: >> In order for a screen saver to be fully compatible with Snow Leopard, you >> must add an Intel 64 slice that supports GC. The reason is because both the >> screen saver engine and System Preferences run as Intel 64 apps on Snow >> Leopard

Re: Reading in UTF-8 to Data

2010-07-16 Thread Kirk Kerekes
In the first page of Google hits for "nsstring quoted-printable"" This is at least a starting point. ___ Cocoa-dev mailing list

NSStream Questions

2010-07-16 Thread Jon Loeliger
Folks, I'm a bit new to Cocoa/iPhone programming, so I apologize if this is Ye Olde Question Again. Googling hasn't quite anwered my quesion yet... I'm writing a network server that needs to accept many simultaneous client connections and keep track of them. I've written the base server parts, r

RE: Trying hard to get all domains in network

2010-07-16 Thread Meet Bhatha
Hi Dave, All, Thanks for reply. By domain discovery I mean to say the domains in our intranet on which our account is created/provisioned i.e. on the domain on which we log in. I try to get these intranet domains in our network. Thanks , Meet B. -Original Message- From: Dave Carrigan

Re: Installation of screensaver fails

2010-07-16 Thread Gabriel Zachmann
> In order for a screen saver to be fully compatible with Snow Leopard, you > must add an Intel 64 slice that supports GC. The reason is because both the > screen saver engine and System Preferences run as Intel 64 apps on Snow > Leopard if the user's Mac supports 64-bit addressing, and at least

Re: Reading in UTF-8 to Data

2010-07-16 Thread Brad Stone
Agreed Thomas but code snippets have been elusive. On Jul 16, 2010, at 1:00 PM, Thomas Engelmeier wrote: > > Am 16.07.2010 um 14:58 schrieb Brad Stone: > >> The XML file is from an app I wrote a long time ago and contains thousands >> of documents similar to this one. Once Nick mentioned quo

Re: modal loops & memory

2010-07-16 Thread Scott Ribe
On Jul 16, 2010, at 11:52 AM, Sherm Pendley wrote: > Yes, autorelease pools work normally during a modal session. That's what I expected; just making sure I'm heading off in the right direction ;-) Thanks. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 v

NSResponder action messages not being received correctly

2010-07-16 Thread Jon Nall
I have created a tiny project that consists of an NSWindowController subclass which opens its window during the app delegate's applicationDidFinishLaunching: method. There are no custom NSWindow or NSView subclasses. I'm trying to override various NSResponder action messages. Some work, some don't

[moderator] Re: Flipping coordinate system of a CALayer

2010-07-16 Thread Scott Anguish
On Jul 16, 2010, at 2:20 AM, Dave Keck wrote: >>> The only workaround I was able to get working was to call a private >>> AppKit method to fix up the layer geometry. >> >> Which is a no-no, and shouldn’t be done. Bad Kyle. No biscuit. > > Forgive me for raising such a taboo topic, Yes, correct

Re: modal loops & memory

2010-07-16 Thread Sherm Pendley
On Fri, Jul 16, 2010 at 1:10 PM, Scott Ribe wrote: > Does [NSApp runModalForWindow: ...] wrap an autorelease pool around its event > handling? Yes, autorelease pools work normally during a modal session. sherm-- -- Cocoa programming in Perl: http://www.camelbones.org _

Re: Set Hierarchical NSUserDefaults Value

2010-07-16 Thread John Johnson
> or use something like this category I wrote last year, when I got tired of > uprooting and replanting entire trees in my User Defaults, every time I > wanted to change a leaf: > > > Very nice. I think I will find this useful. Thanks. -J___ Coco

Re: Adding an image to a project

2010-07-16 Thread Vincenzo Morgante
I used [NSBundle bundleForClass:[self class]]... And now the plugin works without any problems!!! Thanks! Vincenzo --- Ven 16/7/10, B.J. Buchalter ha scritto: Da: B.J. Buchalter Oggetto: Re: Adding an image to a project A: "Vincenzo Morgante" Cc: "Cocoa Development" Data: Venerdì 16 luglio 2

Pin entry box

2010-07-16 Thread Allyn Bauer
Hello, Has anybody ever needed to make a pin number entry box similar to the one in the Preferences used to set the passcode? I'd appreciate links if you have them. I'm having problems getting the text to always be 'secure' and allowing only one digit per box. Any tips? Thanks, Allyn Bauer

modal loops & memory

2010-07-16 Thread Scott Ribe
Does [NSApp runModalForWindow: ...] wrap an autorelease pool around its event handling? -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do n

Re: Reading in UTF-8 to Data

2010-07-16 Thread Thomas Engelmeier
Am 16.07.2010 um 14:58 schrieb Brad Stone: > The XML file is from an app I wrote a long time ago and contains thousands of > documents similar to this one. Once Nick mentioned quotable-printable I > remembered I used that. It was so long ago I had forgotten. There are many > users that use

Re: Reading in UTF-8 to Data

2010-07-16 Thread Brad Stone
Kyle - I have my legacy file format perfectly parsed into an NSDictionary and my code works fine from the NSOpenPanel to select the legacy document to creating the new document in Cocoa, adding it to the managedObjectContext, inserting the data in all the right places and saving the new document

Re: Reading in UTF-8 to Data

2010-07-16 Thread Kyle Sluder
On Fri, Jul 16, 2010 at 5:58 AM, Brad Stone wrote: > The XML file is from an app I wrote a long time ago and contains thousands of > documents similar to this one.  Once Nick mentioned quotable-printable I > remembered I used that.  It was so long ago I had forgotten.  There are many > users th

Re: Implementing Ken-Bun Effect

2010-07-16 Thread marcelo . alves
You can place your image inside a scroll view and animate it, using Core Animation. Check the UIView class methods to begin an animation context and commit it. Sent from my iPhone On 16/07/2010, at 09:09, Kalyanraju M wrote: > Hi All, > I have a image with size 480 * 320 (iPhone Landscape mo

Re: UIKit newbie user confusion with connections and touch events

2010-07-16 Thread marcelo . alves
Download the UiGestureRecognizer tutorial from wwdc 2010. Probably is named "Gesture Recognizers", or something like that. It's way easier and more standard with the rest of the operating system than working with UIEvents. Sent from my iPhone On 13/07/2010, at 06:35, rramage wrote: > I'm

Re: Set Hierarchical NSUserDefaults Value

2010-07-16 Thread Richard Somers
On Jul 16, 2010, at 7:12 AM, Richard Somers wrote: How do I change the "Second Level" value? I think I just found out the answer to my question. You can't. You must get and set the value as a dictionary. --Richard ___ Cocoa-dev mailing list (Coco

Set Hierarchical NSUserDefaults Value

2010-07-16 Thread Richard Somers
I need to modify a user defaults value that is hierarchical. "First Level" = { "Second Level" = 1; }; None of the NSUserDefaults set methods take a key path. They all look like this. - (void)setInteger:(NSInteger)value forKey:(NSString *)defaultName How do I change the "Second Level" value?

Re: Reading in UTF-8 to Data

2010-07-16 Thread Brad Stone
The XML file is from an app I wrote a long time ago and contains thousands of documents similar to this one. Once Nick mentioned quotable-printable I remembered I used that. It was so long ago I had forgotten. There are many users that use the app and each of them have hundreds, if not thousa

Re: how to deploy the sqlite file in my Cocoa application installation

2010-07-16 Thread Mike Abdullah
On 16 Jul 2010, at 13:27, davel...@mac.com wrote: > > On Jul 16, 2010, at 5:23 AM, Mike Abdullah wrote: > >> SQLite is not part of Cocoa, so this is the wrong list. You should either: >> >> 1) Find the SQLite docs/list >> 2) Use Core Data instead >> >> On 16 Jul 2010, at 02:39, Wayne Shao wro

Re: how to deploy the sqlite file in my Cocoa application installation

2010-07-16 Thread davelist
On Jul 16, 2010, at 5:23 AM, Mike Abdullah wrote: > SQLite is not part of Cocoa, so this is the wrong list. You should either: > > 1) Find the SQLite docs/list > 2) Use Core Data instead > > On 16 Jul 2010, at 02:39, Wayne Shao wrote: > >> Hi, >> >> I am using sqlite in my cocoa application (

Implementing Ken-Bun Effect

2010-07-16 Thread Kalyanraju M
Hi All, I have a image with size 480 * 320 (iPhone Landscape mode). I need to animate the image from part of the image with co-ordiantes like (11, 17, 200, 134) to part of image with co-ordinates (253, 59, 200, 134). Can some one help me to solve the above problem. Thanks in advance. Regards,Kaly

Re: Animate NSWindow frame using Core Animation?

2010-07-16 Thread Mike Abdullah
Window resize can only be as fast as the views redrawing inside it. Have you tried profiling during a resize to see if any of your views are taking too long to redraw? (or perhaps redrawing unnecessarily). Instruments and Quartz Debug are your friends here. On 16 Jul 2010, at 11:38, Oleg Krupno

Re: Animate NSWindow frame using Core Animation?

2010-07-16 Thread Oleg Krupnov
My "table" view is layer-hosting. The contentView of my window is layer-backed. I even tried to setWantsLayer:YES for the superview of the contentView, that is, the theme frame view of the window, but it does not seem to bring Core Animation into the window frame animation. On Fri, Jul 16, 201

Re: Animate NSWindow frame using Core Animation?

2010-07-16 Thread vincent habchi
Le 16 juil. 2010 à 12:38, Oleg Krupnov a écrit : > Any other ideas? Is your view CALayer backed? Vincent___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators

Re: Animate NSWindow frame using Core Animation?

2010-07-16 Thread Oleg Krupnov
Thanks Mike, I forgot to mention that I've already tried -[NSWindow setFrame:display:animate:], but it does not seem to differ from the other methods I mentioned. Well, it's all quite smooth, but very noticeably less smooth than the Core Animation-powered animations of the views inside the window

Re: Animate NSWindow frame using Core Animation?

2010-07-16 Thread Mike Abdullah
Aside from Core Animation, you could also try -setFrame:display:animate: It blocks the main thread while running, but is generally pretty smooth. On 16 Jul 2010, at 10:55, Oleg Krupnov wrote: > Hi, > > I'm using quite a few animations in my app's UI, using the Core > Animation, and all of the a

Animate NSWindow frame using Core Animation?

2010-07-16 Thread Oleg Krupnov
Hi, I'm using quite a few animations in my app's UI, using the Core Animation, and all of the animations work wonderfully smooth and quick. However, when I need to animate the frame of the window (namely, change its size), it feels so sluggish and jagged. I guess this is because, unlike the view

Re: how to deploy the sqlite file in my Cocoa application installation

2010-07-16 Thread Mike Abdullah
SQLite is not part of Cocoa, so this is the wrong list. You should either: 1) Find the SQLite docs/list 2) Use Core Data instead On 16 Jul 2010, at 02:39, Wayne Shao wrote: > Hi, > > I am using sqlite in my cocoa application (for regular mac desktop/laptop). > > 1. How do I initialize the sqli

Re: Flipping coordinate system of a CALayer

2010-07-16 Thread Oleg Krupnov
Further investigation has shown that when the custom layer-hosting view is placed in the parent layer-backed container view, the parent view internally discards the flipping transform of the child view's root layer on each call to its -setFrame (which can be quite often). I have cured this problem