Re: Stealing settings from Mail.app

2010-06-01 Thread Chris Idou
Hi, I personally use smtp.me.com as my server, so I think you need to add that. As far as I see, [@macdonald.org rangeOfString:@mac].location would be a wrong match. I think you need to look for [hostName hasSuffix:@.me.com] || [hostName hasSuffix:@.mac.com] Right now I'm using

Re: Core Animation - Animation Sequence

2010-06-01 Thread Tino Rachui
David, Rodolfo, I'm interested in this too so please excuse me for interfering. What is the root cause for Rodolfo's problem? He doesn't seem to set 'removedOnCompletion' to 'NO' (default is 'YES' according to docu) so I'm wondering if this could cause the unwanted effect (by the way I cannot see

Re: Managed Object Context Reference

2010-06-01 Thread Joanna Carter
Le 1 juin 2010 à 06:53, Quincey Morris a écrit : You've created another scenario by making your view need the managed object context (probably during 'drawRect:' at least?).… Richard, this really points to an abuse of the MVC design pattern :-) If you look at some of the Cocoa controls, like

Re: dynamic resolution

2010-06-01 Thread Alastair Houghton
On 31 May 2010, at 22:23, Jean-Daniel Dupas wrote: Le 31 mai 2010 à 20:50, Rafael Cerioli a écrit : Well, that's curious. I'm surely missing a particular setting because when I don't manually link that lib (and it's the same with libstdc++), I get link errors. Do you know if there is a

Re: NSTreeNode and NSCoding

2010-06-01 Thread Mike Abdullah
You could subclass NSTreeNode to add NSCoder-compliance. Should be pretty easy. On 1 Jun 2010, at 04:55, John Velman wrote: NSTreeNode doesn't seem to be NSCoding compliant. How does one archive a tree when using NSTreeNode? Does one, when saving, extract the represented objects for

Re: Stealing settings from Mail.app

2010-06-01 Thread Chris Idou
BTW, what exactly are the downsides of sending the mail to local machine sendmail? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at

Re: font glyphs on different hardware

2010-06-01 Thread Alastair Houghton
On 1 Jun 2010, at 02:42, James Maxwell wrote: Okay, so the simple solution isn't simple. this: NSFont* artFont_2 = [NSFont fontWithName:@Sonara size:30.0]; NSLog(@what's up? %i, [artFont_1 glyphWithName:@FULL STOP]); prints the glyph as 0 (which is NOT the glyph ID) So what gives?

RE: Touch screen framework in MAC

2010-06-01 Thread Banupriya K
Dave, Thanks for the reply, it would be helpful if i know the framework used for touch screen in iPhone, iPod. Regards Banupriya K -Original Message- From: David Hendrix [mailto:da...@rogueminds.net] Sent: Tue 6/1/2010 11:27 AM To: Banupriya K Subject: Re: Touch screen framework in

Re: Stealing settings from Mail.app

2010-06-01 Thread Alastair Houghton
On 1 Jun 2010, at 10:07, Chris Idou wrote: BTW, what exactly are the downsides of sending the mail to local machine sendmail? This is pretty off topic, but: 1. You can't rely on the mail system being properly configured on a normal client machine. IIRC on older versions of (non-Server) Mac

Re: Touch screen framework in MAC

2010-06-01 Thread Laurent Cerveau
MacOS and iPhoneOS are 2 differents platforms. Simply use the iPhone SDK and UIKit will be there. laurent Sent from my road phone On Jun 1, 2010, at 11:24 AM, Banupriya K banupr...@tataelxsi.co.in wrote: Dave, Thanks for the reply, it would be helpful if i know the framework used

Re: Stealing settings from Mail.app

2010-06-01 Thread Alastair Houghton
On 1 Jun 2010, at 00:33, Jn wrote: That's a good point that I hadn't given much thought to what happens when the net is down. I wasn't too worried about only supporting Mail.app because I was going to give them a way to also enter their smtp settings manually. But using your framework that

POST request on iPhone

2010-06-01 Thread Joshua Tucker
Hey, has anyone got any sample code for a POST request for interfacing with an API such as the DirectAdmin API? Ideally, something that works like this in Obj-C (example is in PHP) would be great: http://www.directadmin.com/sample_api.txt. The API documentation is at

Uncheck property list checkbox option for pre-upgrade

2010-06-01 Thread Banupriya K
Hi all, We are using package maker for our application. During upgrade the installer should retain the previous property list. Therefore i want to uncheck the property list checkbox for upgrade by default. please suggest is there any way to do it. Thanks Banupriya.

Re: POST request on iPhone

2010-06-01 Thread Alastair Houghton
On 1 Jun 2010, at 11:03, Joshua Tucker wrote: has anyone got any sample code for a POST request for interfacing with an API such as the DirectAdmin API? Ideally, something that works like this in Obj-C (example is in PHP) would be great: http://www.directadmin.com/sample_api.txt. The API

Re: Uncheck property list checkbox option for pre-upgrade

2010-06-01 Thread Alastair Houghton
On 1 Jun 2010, at 12:45, Banupriya K wrote: We are using package maker for our application. During upgrade the installer should retain the previous property list. Therefore i want to uncheck the property list checkbox for upgrade by default. please suggest is there any way to do it. Hi

Re: Core Animation - Animation Sequence

2010-06-01 Thread Rodolfo Niborski
Hello, Neither I did figure out how to use David's code. I thought that overriding the implicit animation implies the use of layer actions. I can't see how [layer addAnimation:rotation forKey:@transform]; can change the implicit animation. Besides, most of my attempts resulted in a

Writing an NNTP client

2010-06-01 Thread Joanna Carter
Can anyone tell me if Cocoa provides a ready made framework for accessing NNTP, or is there a third-party framework that is recommended? Joanna -- Joanna Carter Carter Consulting ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: POST request on iPhone

2010-06-01 Thread Alastair Houghton
On 1 Jun 2010, at 12:59, Joshua Tucker wrote: I've contacted the DirectAdmin technical support team and they said I need to send the username:password encrypted as base64 in the HTTP headers. Does anyone know of the easiest way to put this in the HTTP headers? NSURLRequest lets you set

Re: Core Animation - Animation Sequence

2010-06-01 Thread Tino Rachui
Hi Rodolfo, 2010/6/1 Rodolfo Niborski valr...@noos.fr Neither I did figure out how to use David's code. I thought that overriding the implicit animation implies the use of layer actions. I can't see how [layer addAnimation:rotation forKey:@transform]; can change the implicit animation.

Re: Writing an NNTP client

2010-06-01 Thread Mike Abdullah
No support in Cocoa. Some unfinished code in ConnectionKit which may be useful or not. On 1 Jun 2010, at 13:28, Joanna Carter wrote: Can anyone tell me if Cocoa provides a ready made framework for accessing NNTP, or is there a third-party framework that is recommended? Joanna --

Re: Touch screen framework in MAC

2010-06-01 Thread Uli Kusterer
On 01.06.2010, at 07:45, Banupriya K wrote: I would like to know the framework available for touch screen in MAC os. There is no dedicated framework for that on the Mac. I guess it depends on what touch screen you're using and how the manufacturer implements things. I think most touch

Re: Writing an NNTP client

2010-06-01 Thread Uli Kusterer
On 01.06.2010, at 14:28, Joanna Carter wrote: Can anyone tell me if Cocoa provides a ready made framework for accessing NNTP, or is there a third-party framework that is recommended? I'm not aware of anything built-in, however, you can wrap plain unix sockets in an NSFileHandle (maybe even

IKImageBrowser and non-square cells

2010-06-01 Thread Trygve Inda
I am using 10.6 and despite setting IKImageBrowser to use nonsquare cells, it seems to force everything back to square. My images are wide, but not very tall, yet it is forcing the title text to be a longs way away since the cell size is being forced back to square. Ideas?

Re: POST request on iPhone

2010-06-01 Thread Uli Kusterer
On 01.06.2010, at 12:03, Joshua Tucker wrote: has anyone got any sample code for a POST request for interfacing with an API such as the DirectAdmin API? This is the only POST request code I have. Then again, it's all I've ever needed:

Simulating app termination

2010-06-01 Thread lorenzo7620
I have an application that needs to display a message when it quits. Its not a LSUIElement or LSBackgroundOnly, just a faceless app that displays a message and plays a sound at computer restart/shutdown. The sound plays every time, but I don't always see the dialog, maybe 1 in 5 times. My

Re: UTI strings

2010-06-01 Thread Sean McBride
On Tue, 1 Jun 2010 00:29:54 -0500, John Joyce said: Remember, that although creator codes are out, extensions *seem* to be recognized, and... being a BSD, there is still also the *magic number* for file types... (the magic file does get updated regularly) Is the magic file queried when

Re: Managed Object Context Reference

2010-06-01 Thread Richard Somers
On Jun 1, 2010, at 2:37 AM, Joanna Carter wrote: Richard, this really points to an abuse of the MVC design pattern :-) ... This ensures separation between the View and the Model it is meant to be representing. Using a delegate to obtain the data required for drawing a View means that the

Re: UTI strings

2010-06-01 Thread John Joyce
On Jun 1, 2010, at 9:26 AM, Sean McBride wrote: On Tue, 1 Jun 2010 00:29:54 -0500, John Joyce said: Remember, that although creator codes are out, extensions *seem* to be recognized, and... being a BSD, there is still also the *magic number* for file types... (the magic file does get

Re: POST request on iPhone

2010-06-01 Thread Chaitanya Pandit
I'd written a sample app, here: http://www.letscocoa.com/2010/02/16/mysqlphp-iphone-app/ Thanks, Chaitanya Pandit Expersis Software Inc. On Jun 1, 2010, at 3:33 PM, Joshua Tucker wrote: Hey, has anyone got any sample code for a POST request for interfacing with an API such as the

Re: font glyphs on different hardware

2010-06-01 Thread Douglas Davidson
Let me second Alastair's recommendations. Our standard developer example for this sort of thing is in the SpeedometerView example code, in the SpeedyCategories.m file; take a look at the BezierConversions category on NSString, and the associated BezierNSLayoutManager. Douglas Davidson On

Re: POST request on iPhone

2010-06-01 Thread Sixten Otto
On Tue, Jun 1, 2010 at 6:03 AM, Joshua Tucker joshualeetuc...@googlemail.com wrote: has anyone got any sample code for a POST request for interfacing with an API such as the DirectAdmin API? I believe the usual StackOverflow answer is to consider ASIHTTPRequest, which gives a somewhat

Re: Writing an NNTP client

2010-06-01 Thread Sixten Otto
On Tue, Jun 1, 2010 at 9:57 AM, Uli Kusterer witness.of.teacht...@gmx.net wrote:  I think there are also some open source NNTP clients out there (Newswatcher for example, but I don't know what license it's under When I was poking around fairly recently, it appeared that most of the Open Source

Re: Core Animation - Animation Sequence

2010-06-01 Thread David Duncan
On May 31, 2010, at 11:51 PM, Tino Rachui wrote: I'm interested in this too so please excuse me for interfering. What is the root cause for Rodolfo's problem? He doesn't seem to set 'removedOnCompletion' to 'NO' (default is 'YES' according to docu) so I'm wondering if this could cause the

Binding SelectedText Background

2010-06-01 Thread Erick Pérez
Hi: I manage to bind the text color to a color well, one of those many tutorials you can find online, but what i want is to change the color of the selected text's background. Can i bind that ? Thxs. -- El derecho de expresar nuestros pensamientos tiene algún significado tan sólo si somos

Re: Managed Object Context Reference

2010-06-01 Thread Richard Somers
On May 31, 2010, at 11:53 PM, Quincey Morris wrote: You've created another scenario by making your view need the managed object context (probably during 'drawRect:' at least?). If the view has to redraw when your application is in the background, you'll hit your assert. I think something

App will not launch

2010-06-01 Thread koko
I have many customers and one is having a problem with my application not launching. The customer tells me that upon double-clicking the app just bounces in the Dock and never finishes launching. The customer must Force Quit. Since many other customers do not have this problem and I

Re: App will not launch

2010-06-01 Thread Nick Zitzmann
On Jun 1, 2010, at 11:47 AM, k...@highrolls.net wrote: I have many customers and one is having a problem with my application not launching. The customer tells me that upon double-clicking the app just bounces in the Dock and never finishes launching. The customer must Force Quit.

Re: App will not launch

2010-06-01 Thread Uli Kusterer
Am Jun 1, 2010 um 7:47 PM schrieb k...@highrolls.net: I have many customers and one is having a problem with my application not launching. The customer tells me that upon double-clicking the app just bounces in the Dock and never finishes launching. The customer must Force Quit. Sounds

Re: App will not launch

2010-06-01 Thread Jean-Daniel Dupas
Le 1 juin 2010 à 19:47, k...@highrolls.net a écrit : I have many customers and one is having a problem with my application not launching. The customer tells me that upon double-clicking the app just bounces in the Dock and never finishes launching. The customer must Force Quit. Since

I need float resolution bitmap data from a JPG using CIImage or similar helper

2010-06-01 Thread Robert Lorentz
I've been struggling with this issue for a long time, and have not found any working/good example on the net or in any chat.. What I REALLY want to achieve (this can be poor performance): take a JPG (or PNG is great too) file on disk, result with a float *bytes; array holding the floating

Monster memory leak and I can't figure out why

2010-06-01 Thread Ken Tozier
Hi I'm trying to write a thumbnailer class that takes a path to a photo and creates a thumbnail at a user specified size. The code creates the thumbnails OK, but there's this monster memory leak, to the tune of about 100 MB every 3-4 seconds, that seems to be related to NSImage. What's

Re: Stealing settings from Mail.app

2010-06-01 Thread Dante Palacios
NSString *GetPassword(NSString *userName, NSString *hostName) { if (!hostName.length || !userName.length) return nil; const char *serviceName = [hostName UTF8String]; const char *serviceUserName = [userName UTF8String]; const char *path = ;

Re: Which color space?

2010-06-01 Thread Simon Raisin
Thank you so much for the responses guys. This is the reason I was confused: NSDeviceWhiteColorSpace Device-dependent color space with white *and alpha components* (pure white is 1.0) Available in Mac OS X v10.0 and later. I thought that NSDeviceWhiteColorSpace had BOTH a white and alpha

Reduce the size of an NSImage

2010-06-01 Thread Simon Raisin
Hi, I am trying to reduce the size of an NSImage by 50% and then save the reduced image out to disk. The following code does not reduce the image. Should I be going about this a different way? Thanks! Simon NSImage* inputImage = [[NSImage alloc] initWithContentsOfFile:[fileNames

Re: Which color space?

2010-06-01 Thread Simon Raisin
Thanks Seth. I haven't been able to find any good docs on this stuff. Do you happen to know where I can read conceptual material about color spaces? On Mon, May 31, 2010 at 1:11 PM, Seth Willits sli...@araelium.com wrote: On May 31, 2010, at 4:06 AM, Simon Raisin wrote: Thank you so much

nibs don't know about protocols?

2010-06-01 Thread Matt Neuburg
Just a minor thing I'm curious about; I'll give a simple example. A UIApplication's delegate property is defined as an id UIApplicationDelegate. But if I hook up the UIApplication proxy object in a nib to another instance as its delegate, and if that other instance does not adopt

Re: App will not launch

2010-06-01 Thread koko
Thanks to all ... I will have the customer get me the log and do the activity monitor sample ... -koko On Jun 1, 2010, at 11:55 AM, Jean-Daniel Dupas wrote: Le 1 juin 2010 à 19:47, k...@highrolls.net a écrit : I have many customers and one is having a problem with my application not

Zooming UIScrollViews

2010-06-01 Thread Development
Ok I have a UIScrollView and I am using a pinch gesture to zoome it, or at least I'm trying too. Basically when I attempt to zoom absolutely nothing happens. the view never gets bigger or smaller it does nothing really. All the numbers are passing correctly according to NSLog but I get no

Re: I need float resolution bitmap data from a JPG using CIImage or similar helper

2010-06-01 Thread Jens Alfke
On May 31, 2010, at 5:40 PM, Robert Lorentz wrote: CGContextRef context = CGBitmapContextCreate(rawData, width, height, bitsPerComponent, bytesPerRow, colorSpace, kCGBitmapFloatComponents); CGColorSpaceRelease(colorSpace); // draw the CIImage to the 'context'... this is probably the

Re: I need float resolution bitmap data from a JPG using CIImage or similar helper

2010-06-01 Thread David Duncan
On May 31, 2010, at 5:40 PM, Robert Lorentz wrote: What I REALLY want to achieve (this can be poor performance): take a JPG (or PNG is great too) file on disk, result with a float *bytes; array holding the floating point precision data from the JPG as R G B A format. Anything that achieves

Re: Monster memory leak and I can't figure out why

2010-06-01 Thread jonat...@mugginsoft.com
On 1 Jun 2010, at 02:41, Ken Tozier wrote: Hi I'm trying to write a thumbnailer class that takes a path to a photo and creates a thumbnail at a user specified size. The code creates the thumbnails OK, but there's this monster memory leak, to the tune of about 100 MB every 3-4 seconds,

Re: Monster memory leak and I can't figure out why

2010-06-01 Thread Jens Alfke
On May 31, 2010, at 6:41 PM, Ken Tozier wrote: What's happening is that if I comment out the line that initializes a new image, the memory leak disappears. I've tried forcibly releasing the images, tried autoreleasing them, tried creating a fixed size buffer into which all the images are

Re: Reduce the size of an NSImage

2010-06-01 Thread Jens Alfke
On May 31, 2010, at 5:38 AM, Simon Raisin wrote: [inputImage setScalesWhenResized:YES]; [inputImage setSize:halfSize]; This just shrinks the image’s bounding box, without actually resampling it. In other words, it doubles its DPI. If you want to create an image with half the pixel

Re: App will not launch

2010-06-01 Thread Charles Srstka
On Jun 1, 2010, at 1:05 PM, k...@highrolls.net wrote: Thanks to all ... I will have the customer get me the log and do the activity monitor sample ... -koko I’d also have them check their /Library folder for APE modules, InputManager hacks, etc. Sometimes if an app does something like

Re: nibs don't know about protocols?

2010-06-01 Thread Kyle Sluder
On Tue, Jun 1, 2010 at 11:00 AM, Matt Neuburg m...@tidbits.com wrote: So... Are nibs just ignorant of protocols? I don't believe the nib loading machinery checks protocol conformance when it hooks up outlets. It certainly doesn't check class identity, so I wouldn't expect it to check protocol

Re: Core Animation - Animation Sequence

2010-06-01 Thread Tino Rachui
THANKS David! I understand and got the code to run smoothly. Again one step towards understanding CA better, I'm happy. :) @Rodolfo: If you are interested I can send you my complete little sample project. Just let me know. Regards, Tino Am 01.06.2010 um 19:08 schrieb David Duncan: On May

Re: Simulating app termination

2010-06-01 Thread has
lorenzo7620 wrote: My question at this point is not about the dialog not displaying, not yet anyway, but how to tell my app to quit without actually restarting or shutting down the computer. Years ago under Classic, I would write an Applescript to do this, but it seems that you don't

Re: Simulating app termination

2010-06-01 Thread John Joyce
On Jun 1, 2010, at 2:09 PM, has wrote: lorenzo7620 wrote: My question at this point is not about the dialog not displaying, not yet anyway, but how to tell my app to quit without actually restarting or shutting down the computer. Years ago under Classic, I would write an Applescript

Re: Re: Simulating app termination

2010-06-01 Thread lorenzo7620
On Jun 1, 2010 2:16pm, John Joyce jjo...@apple.com wrote: On Jun 1, 2010, at 2:09 PM, has wrote: lorenzo7620 wrote: My question at this point is not about the dialog not displaying, not yet anyway, but how to tell my app to quit without actually restarting or shutting

Re: Re: Simulating app termination

2010-06-01 Thread Kyle Sluder
On Tue, Jun 1, 2010 at 12:22 PM, lorenzo7...@gmail.com wrote: Can you elaborate on this? man kill Can you elaborate on why the standard Quit Apple Event isn't working in your app? AppKit understands it and turns it into a regular termination. --Kyle Sluder

Re: Simulating app termination

2010-06-01 Thread Michael Ash
On Tue, Jun 1, 2010 at 3:16 PM, John Joyce jjo...@apple.com wrote: On Jun 1, 2010, at 2:09 PM, has wrote: lorenzo7620 wrote: My question at this point is not about the dialog not displaying, not yet anyway, but how to tell my app to quit without actually restarting or shutting down the

Re: Simulating app termination

2010-06-01 Thread Kyle Sluder
On Tue, Jun 1, 2010 at 12:26 PM, Michael Ash michael@gmail.com wrote: If your goal is to simulate shutdown/restart termination, this won't work; the system does not send signals to your app to kill it during those situations. TN2083 is ambiguous about this. Here's the relevant section:

Re: six things I wasn't able to do with Cocoa

2010-06-01 Thread Matt Neuburg
On Mon, 31 May 2010 18:49:14 +0100, Alastair Houghton alast...@alastairs-place.net said: Out of curiosity, what simpler approach to creating a list have you seen? While I'd be interested to hear from Bill exactly what he was expecting, I *suspect* that he's referring to the style of list control

Re: Core Animation - Animation Sequence

2010-06-01 Thread Rodolfo Niborski
Le 1 juin 2010 à 21:02, Tino Rachui a écrit : THANKS David! I understand and got the code to run smoothly. Again one step towards understanding CA better, I'm happy. :) OK, the same happened to me! My animations now run exactly as intended. The EXC_BAD_ACCESS was due to the fact that I

Re: Help w/ first step of creating Help Book for app

2010-06-01 Thread Matt Neuburg
On Sat, 29 May 2010 07:22:16 -0400, Bill Cheeseman wjcheese...@gmail.com said: The problem with the current version of Apple's document is that it attempts to cover the new kind of Help book that works only in Snow Leopard, as well as the old kind of Help book that works in Leopard and Tiger as

Re: Monster memory leak and I can't figure out why

2010-06-01 Thread Ken Ferry
On Tue, Jun 1, 2010 at 11:22 AM, Jens Alfke j...@mooseyard.com wrote: On May 31, 2010, at 6:41 PM, Ken Tozier wrote: What's happening is that if I comment out the line that initializes a new image, the memory leak disappears. I've tried forcibly releasing the images, tried autoreleasing

Re: I need float resolution bitmap data from a JPG using CIImage or similar helper

2010-06-01 Thread Robert Lorentz
On Jun 1, 2010, at 2:16 PM, David Duncan wrote: On May 31, 2010, at 5:40 PM, Robert Lorentz wrote: What I REALLY want to achieve (this can be poor performance): take a JPG (or PNG is great too) file on disk, result with a float *bytes; array holding the floating point precision data from

Re: Re: Re: Simulating app termination

2010-06-01 Thread lorenzo7620
On Jun 1, 2010 2:26pm, Kyle Sluder kyle.slu...@gmail.com wrote: On Tue, Jun 1, 2010 at 12:22 PM, lorenzo7...@gmail.com wrote: Can you elaborate on this? man kill Can you elaborate on why the standard Quit Apple Event isn't working in your app? AppKit understands it and turns it

Base64 encoding (iPhone)

2010-06-01 Thread Joshua Tucker
Hello, has anyone got any working sample code for encoding an NSString with Base64 on the iPhone? Thanks in advance, Josh ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list.

Re: Base64 encoding (iPhone)

2010-06-01 Thread Alex Kac
Yes. Look at the DDXML from Deusty on Google Code for some categories to do it. On Jun 1, 2010, at 3:13 PM, Joshua Tucker wrote: Hello, has anyone got any working sample code for encoding an NSString with Base64 on the iPhone? Thanks in advance, Josh

Re: Binding SelectedText Background

2010-06-01 Thread Keary Suska
On Jun 1, 2010, at 11:18 AM, Erick Pérez wrote: Hi: I manage to bind the text color to a color well, one of those many tutorials you can find online, but what i want is to change the color of the selected text's background. Can i bind that ? Bookmark this page:

Re: font glyphs on different hardware

2010-06-01 Thread James Maxwell
Ah, sorry I didn't see these posts until now. Sound like good recommendations. For the time being, I don't mind relying on a specific font, but I'll look over the SpeedometerView example, and see about implementing this at a higher level. Thanks for the tips. J. On 2010-06-01, at 9:10 AM,

Re: Base64 encoding (iPhone)

2010-06-01 Thread Jens Alfke
On Jun 1, 2010, at 1:13 PM, Joshua Tucker wrote: has anyone got any working sample code for encoding an NSString with Base64 on the iPhone? There’s one in Google Toolbox For Mac, which is a library written and maintained by Google for their Mac projects:

-[NSDocument fileURL] is observable (KVO). Documented?

2010-06-01 Thread Jerry Krinock
There is no mention in -[NSDocument fileURL] documentation, nor in 10.5 or 10.6 release notes, that this property is observable using KVO. But when I added some code to do this, created a document, and renamed the document in Finder while the document was open, my observer logged a hit. Is

Re: [iPhone] -UIScrollView

2010-06-01 Thread Fritz Anderson
On 31 May 2010, at 11:58 PM, Development wrote: I have a Scroll view that contains a master view. This master view adds page sized views of image data, specifically PDF data. The problem that I am having is that if I load all these pages at once, I run out of memory and the app quits. So I

Re: -[NSDocument fileURL] is observable (KVO). Documented?

2010-06-01 Thread Mike Abdullah
By default Cocoa classes use automatic KVO. So long as Cocoa always changes the URL by calling -setFileURL: you will get proper notifications. On 1 Jun 2010, at 22:02, Jerry Krinock wrote: There is no mention in -[NSDocument fileURL] documentation, nor in 10.5 or 10.6 release notes, that

Re: -[NSDocument fileURL] is observable (KVO). Documented?

2010-06-01 Thread Kyle Sluder
On Tue, Jun 1, 2010 at 2:15 PM, Mike Abdullah cocoa...@mikeabdullah.net wrote: By default Cocoa classes use automatic KVO. So long as Cocoa always changes the URL by calling -setFileURL: you will get proper notifications. This is certainly not the case for a great deal of Cocoa classes,

Re: -[NSDocument fileURL] is observable (KVO). Documented?

2010-06-01 Thread Kyle Sluder
To clarify: Mike is of course correct that any class that doesn't have an override of +automaticallyNotifiesObserversForKey: which returns no for a given key, and that always sets values of that key in a KVC-compliant manner, will generate KVO notifications for that key. And there are many Cocoa

Re: Which color space?

2010-06-01 Thread Steve Christensen
It's available in the documentation that comes with Xcode. If you go to NSColorSpace's class reference, there's an item in the TOC on the left named Color Programming Topics for Cocoa. If you click on that link then on the About Color Spaces link, that will take you to a good overview.

Re: Zooming UIScrollViews

2010-06-01 Thread Fritz Anderson
On 1 Jun 2010, at 1:11 PM, Development wrote: the view never gets bigger or smaller it does nothing really. All the numbers are passing correctly according to NSLog but I get no zoom at all. A review of the documentation would have helped you. .maximumZoomScale and .minimumZoomScale are

Re: -[NSDocument fileURL] is observable (KVO). Documented?

2010-06-01 Thread Mike Abdullah
Precisely my point, but much better put! In this specific case I think you should be OK since -setFileURL: is there for overriding, and AppKit bypassing it would rather miss that goal. Theoretically though, Apple could fairly happily turn off KVO-support, perhaps for performance reasons. I'd

Re: Reduce the size of an NSImage

2010-06-01 Thread Steve Christensen
On May 31, 2010, at 5:38 AM, Simon Raisin wrote: I am trying to reduce the size of an NSImage by 50% and then save the reduced image out to disk. The following code does not reduce the image. Should I be going about this a different way? NSImage* inputImage = [[NSImage alloc]

Re: -[NSDocument fileURL] is observable (KVO). Documented?

2010-06-01 Thread Jerry Krinock
On 2010 Jun 01, at 15:07, Mike Abdullah wrote: I'd advise subclassing to add your own notification posting code. Yuck. Unless someone knows a better way, that means setting up either a kqueue or FSEvents thingy for the document to watch its own path. Does anyone know an easier way?

Re: -[NSDocument fileURL] is observable (KVO). Documented?

2010-06-01 Thread Quincey Morris
On Jun 1, 2010, at 15:25, Jerry Krinock wrote: Yuck. Unless someone knows a better way, that means setting up either a kqueue or FSEvents thingy for the document to watch its own path. Does anyone know an easier way? Because of the way that a document window's title changes instantly

Re: I need float resolution bitmap data from a JPG using CIImage or similar helper

2010-06-01 Thread Steve Christensen
It seems like you're jumping through a lot of hoops. If you picked up where David left off, you could do something like this. (Typed in Mail so YMMV.) CGImageSourceRef source = CGImageSourceCreateWithURL(urlToFile, (CFDictionaryRef)[NSDictionary dictionaryWithObject:[NSNumber

Re: Monster memory leak and I can't figure out why

2010-06-01 Thread Tony Romano
Hi Ken, This code by itself should not be causing a leak. Couple of questions: 1. How do you know you have a memory leak? Sound like a silly question but you didn't tell us anything about what you are using to detect leaks. 2. Who is calling this code, how many times? If you are passing

Re: [iPhone] -UIScrollView

2010-06-01 Thread Hank Heijink (Mailinglists)
On Jun 1, 2010, at 5:09 PM, Fritz Anderson wrote: On 31 May 2010, at 11:58 PM, Development wrote: I have a Scroll view that contains a master view. This master view adds page sized views of image data, specifically PDF data. The problem that I am having is that if I load all these pages

UIWebView Background

2010-06-01 Thread Matt James
I'm integrating a UIWebView directly into a design such that it should just sort of sit on top and look to be a part of an underlying graphic. After a bit of investigation, I finally got my UIWebView drawing without the gray background. Unfortunately, when I scroll around the view, it still

Re: Base64 encoding (iPhone)

2010-06-01 Thread Michael Hall
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Jun 1, 2010, at 3:13 PM, Joshua Tucker wrote: has anyone got any working sample code for encoding an NSString with Base64 on the iPhone? fwiw, Cocoa with Love: Base64 encoding options on the Mac and iPhone

[iPhone] more UIScrollView

2010-06-01 Thread Development
Ok, well I've worked out most of the other issues I've run in to. However the one I am now unable to really figure out has to do with zooming scroll view contents and winding up with a clear image. The problem is that I'm not getting a clear image. Is it possible to use the built in zooming

Best persistence method for a glossary app in iPhone?

2010-06-01 Thread Helder Correia
Hey folks! I'm new to iPhone dev, and I want to build a reference app with a glossary. There will be many terms (let's assume 100), and they'll be in an indexed table. The definitions should open in a web view, since I need bold and italics, for example, and they won't be editable by the app,

populating radio stations like iTunes

2010-06-01 Thread Abhinav Tyagi
I want to know that how can i get the data and populate a list of stations similar to that. I think it sends some request to apple server which returns an xml or a plist which can be further parsed to fetch the stations and their details. But i dont know what actually i need to send and to which

Re: [iPhone] more UIScrollView

2010-06-01 Thread Scott Anguish
The last portion of chapter the Basic Scrolling Using the Pinch Gestures in ScrollView Programming Guide for iPhone is called Ensuring that Zoomed Content is Sharp when Zoomed It has an example (engineering approved) way of handling this. It isn’t the greatest solution available, but it is

Re: Best persistence method for a glossary app in iPhone?

2010-06-01 Thread Scott Anguish
You’ve got a very simple count as far as data goes. If your data is presorted, even a plist stored in the application wrapper containing a simple dictionary with the glossary name as the key, and the description as the data would be easily accessible. On Jun 1, 2010, at 6:30 PM, Helder

Re: -[NSDocument fileURL] is observable (KVO). Documented?

2010-06-01 Thread Scott Anguish
Kyle gave the long answer. But, if it isn’t documented, don’t count on it (although there is some backfill required there). Also, being KVO compliant doesn’t necessarily mean you can simply bind to it, as you can’t be sure that the result will be returned on the main thread. KVO compliance

Re: [iPhone] more UIScrollView

2010-06-01 Thread Development
That's pretty much where I started with this code. However it's still fuzzy. I can scale the view itself and it's perfectly clear but the origin is all messed up and it's offset halfway out of it's parent view. thats what I tried here:CGContextScaleCTM(context, scle,scle); I've attempted to

Re: [iPhone] more UIScrollView

2010-06-01 Thread Scott Anguish
are you using the right kind of view as described in the doc? On Jun 2, 2010, at 12:00 AM, Development wrote: That's pretty much where I started with this code. However it's still fuzzy. I can scale the view itself and it's perfectly clear but the origin is all messed up and it's offset