Printing and Segmented Control state

2010-06-07 Thread James Merkel
I have a view that has among other things a segmented control. In the printing code I want to print a string that represents the current state of the segmented control. However, whenever I query the segmented control with -selectedSegment in the print code, I get a value of 0. On the other

Re: Printing and Segmented Control state [Solved]

2010-06-08 Thread James Merkel
I can print out the correct string. Jim Merkel On Jun 7, 2010, at 10:28 PM, James Merkel wrote: I have a view that has among other things a segmented control. In the printing code I want to print a string that represents the current state of the segmented control. However, whenever I query

NSImageView vs IKImageView

2011-08-05 Thread James Merkel
As a follow on to a previous thread on thumbnails, I finally settled on using Image I/O for creating a thumbnail from a file using a CGImageRef. However I could still use an NSImageView or an IKImageView to display the image. NSImageView requires converting the CGImageRef to an NSImage, with

Re: NSImageView vs IKImageView

2011-08-06 Thread James Merkel
On Aug 6, 2011, at 3:58 AM, Graham Cox wrote: On 06/08/2011, at 7:07 AM, James Merkel wrote: In my app, I accept edits in a window, save the edits to a file, close the window, then reopen the window to show the changes. With an NSImageView, you get an annoying flash when the window

Re: NSImageView vs IKImageView

2011-08-06 Thread James Merkel
On Aug 6, 2011, at 6:26 PM, Graham Cox wrote: On 06/08/2011, at 10:44 PM, James Merkel wrote: True, I could just update the window. But that seemed like more work than just going through the closing/opening cycle. If this seems even remotely true, you're surely doing it

Re: NSImageView vs IKImageView

2011-08-07 Thread James Merkel
On Aug 7, 2011, at 5:17 AM, Graham Cox wrote: On 07/08/2011, at 4:56 PM, James Merkel wrote: updating of some text boxes in the same window. But I have fixed that. I just needed an update method for the window No you don't. Updating a text box is also automatic. There's almo

Future for Mac applications

2011-10-29 Thread James Merkel
As of November, all applications submitted to the App store must be sandboxed and signed. Not too difficult to forecast the future here. Will it be for an application to run on a Mac it will need to sandboxed and signed ? Jim Merkel ___ Cocoa-dev mai

Re: Future for Mac applications

2011-10-29 Thread James Merkel
Kyle Sluder wrote: > We all know that Apple will not comment on future plans. It might not be a > good idea to encourage rampant speculation on this list. > > But as it stands right now, it's worth remembering that code signing and > sandboxing are orthogonal technologies, and sandboxing clear

C struct and __unsafe_unretained

2011-10-30 Thread James Merkel
The document on ARC talks about problematic C structs like: struct x { NSString *S; int X; } StaticArray[] = { @"foo", 42, @"bar, 97, ... }; I use that pattern quite a bit in my code and haven't had any problems with it. These are basically constant strings that never change. With ARC, the

Re: C struct and __unsafe_unretained

2011-10-30 Thread James Merkel
On Oct 30, 2011, at 10:41 AM, Charles Srstka wrote: > On Oct 30, 2011, at 12:32 PM, James Merkel wrote: > >> struct x { NSString *S; int X; } StaticArray[] = { >> @"foo", 42, >> @"bar, 97, >> ... >> }; >> >> I use that pattern

Re: C struct and __unsafe_unretained

2011-10-30 Thread James Merkel
Ok thanks. Not changing anything is the easiest and safest approach. Jim Merkel On Oct 30, 2011, at 10:52 AM, Dave Zarzycki wrote: > On Oct 30, 2011, at 10:32 AM, James Merkel wrote: > >> The document on ARC talks about problematic C structs like: >> >> struct

Write to file Entitlement

2011-10-30 Thread James Merkel
Reading the sandboxing documents, it looks like in order to write to a file you need to use the save dialog. My app updates files without the save dialog. Will that be permitted in a sandboxed app ? Jim Merkel ___ Cocoa-dev mailing list (Cocoa-dev@list

Re: Write to file Entitlement

2011-10-31 Thread James Merkel
nd write > freely, but if outside, then you have to go through the save panel, which > behind the scenes stretches your sandbox to include that file. > > Regards > > Gideon > > > > On 31/10/2011, at 3:27 PM, James Merkel wrote: > >> Reading the sandboxin

Re: Write to file Entitlement

2011-11-01 Thread James Merkel
gt; Here is an example to read and write any files inside the user home: > > > com.apple.security.temporary-exception.files.home-relative-path.read-write > > / > > > Regards, Laurent Etiemble. > > 2011/10/31 James Merkel > Reading t

Re: Write to file Entitlement

2011-11-01 Thread James Merkel
On Nov 1, 2011, at 11:37 AM, Laurent Daudelin wrote: > On Nov 1, 2011, at 11:00, James Merkel wrote: > >> Why would someone want to base their application on the tenuous availability >> of a temporary exception ? >> >> Jim Merkel >> >> On Nov 1,

Re: In Praise of ARC

2011-11-06 Thread James Merkel
On Sat, 05 Nov 2011 15:39:01 -0600 Philip McIntosh wrote: > I am impressed with the implementation of Automatic Reference Counting (ARC) > in iOS 5 and the conversion tool built into XCode 4.2. I have an app that > generated a small leak each time I ran a "cycle" of the app. This was no > doubt

NSBitmapImageRep and alpha channel

2011-11-12 Thread James Merkel
The document for NSBitmapImageRep says the following: "Alpha Premultiplication If a coverage (alpha) plane exists, a bitmap’s color components are premultiplied with it. If you modify the contents of the bitmap, you are therefore responsible for premultiplying the data. For this reason, though, i

Re: NSBitmapImageRep and alpha channel

2011-11-12 Thread James Merkel
On Nov 12, 2011, at 3:29 PM, Quincey Morris wrote: > On Nov 12, 2011, at 14:01 , James Merkel wrote: > >> d' = a * s + (1 - a) * d >> All premultiplication does is precalculate a * s." >> >> First question -- what is d' in that equation? > &

Re: NSBitmapImageRep and alpha channel

2011-11-13 Thread James Merkel
On Nov 12, 2011, at 4:34 PM, James Merkel wrote: > > On Nov 12, 2011, at 3:29 PM, Quincey Morris wrote: > >> On Nov 12, 2011, at 14:01 , James Merkel wrote: >> >>> d' = a * s + (1 - a) * d >>> All premultiplication does is precalculate a * s.&qu

Re: NSBitmapImageRep and alpha channel

2011-11-13 Thread James Merkel
On Nov 13, 2011, at 12:34 PM, Quincey Morris wrote: > On Nov 13, 2011, at 11:11 , James Merkel wrote: > >> This is kind of interesting -- if I rotate the image in Preview (rather than >> Image Capture), then the histogram looks normal. >> Looking at the NSBitmapImageRep

Cocoa Resources

2011-11-28 Thread James Merkel
For what it's worth, a couple of resources that I have recently run across that might be useful for Cocoa developers are: 1) An itunes video course on development for the iPhone by Dr Brad Larson: http://itunes.apple.com/itunes-u/advanced-iphone-development/id407243032 Although a year old it ha

Respecting tabs across applications

2012-01-10 Thread James Merkel
In my application I tab text (Helvetica 12 font) so that things line up in my application window. If I copy a text selection out of my app window and then look at the clipboard, the text looks the same as in my window. If the clipboard is then pasted into a new TextEdit window or a new TextWran

Re: Respecting tabs across applications

2012-01-10 Thread James Merkel
On Jan 10, 2012, at 1:20 PM, Jens Alfke wrote: > > On Jan 10, 2012, at 12:49 PM, James Merkel wrote: > >> In my application I tab text (Helvetica 12 font) so that things line up in >> my application window. >> If I copy a text selection out of my app window and the

Re: Respecting tabs across applications

2012-01-10 Thread James Merkel
On Jan 10, 2012, at 4:52 PM, Jens Alfke wrote: > > On Jan 10, 2012, at 2:00 PM, James Merkel wrote: > >> In fact, I am using multiple consecutive tab characters to force things to >> line up -- i.e. a sure recipe for disaster. > > The trouble with that is that the

Re: Respecting tabs across applications

2012-01-10 Thread James Merkel
On Jan 10, 2012, at 6:54 PM, Jens Alfke wrote: > I *think* what you mean there is that the layout works with whatever > NSParagraphStyle’s default tab stops are Ok, there's something I didn't understand -- the default NSParagraphStyle is being applied to my string. So, I am supposed to modify

Re: Respecting tabs across applications

2012-01-11 Thread James Merkel
On Jan 11, 2012, at 8:39 AM, Ross Carter wrote: > On Jan 10, 2012, at 10:14 PM, James Merkel wrote: > >> the default NSParagraphStyle is being applied to my string. > > To be precise, a NSParagraphStyle is being applied to your attributed string. > The NSString does not c

Re: Respecting tabs across applications

2012-01-12 Thread James Merkel
On Jan 11, 2012, at 2:40 PM, James Merkel wrote: > > On Jan 11, 2012, at 8:39 AM, Ross Carter wrote: > >> On Jan 10, 2012, at 10:14 PM, James Merkel wrote: >> >>> the default NSParagraphStyle is being applied to my string. >> >> To be precise, a

Re: Recently Opened in Doc

2012-01-27 Thread James Merkel
On 27 Jan 2012 10:20:37 Brad Stone wrote: > I'd like to > 1) change the menu titles of the recently opened documents listed in the dock > menu > > if I can't do that I'd like to > > 2) remove the list of recently opened documents all together. > > I haven't been able to find a way to do this.

Re: Recently Opened in Doc

2012-01-28 Thread James Merkel
On 28 Jan 2012 08:46:48 -0800 Quincey Morris wrote: > On Jan 28, 2012, at 08:19 , Brad Stone wrote: > >> I have a shoebox app like iPhoto where the actual filename is irrelevant to >> the user. I control the file name. >> >> What I'd like to do is just capture the menu items before they're

Sensitivity of swipe gesture

2012-01-29 Thread James Merkel
Somewhat off-topic for Cocoa -- but In Lion 10.7, the swipe gesture is a nice feature of the mouse. However I find that frequently the mouse wants to swipe pages when I just want to scroll the page. When that happens the page has to "settle down" before anything else can be done. Kind of annoy

Re: Xcode - An Apple Embarrassment

2012-03-02 Thread James Merkel
Fri, 02 Mar 2012 16:00:41 +0900 On John Joyce wrote: > I have to agree with Gene. I wasn't going to acknowledge this thread, but it > is good to hear more than just people moaning. > > The initial adjustment to 4.x was jarring, but once you get used to the > changes, they're mostly great! > To

Recursive search for files

2011-05-22 Thread James Merkel
I would like to add a capability to an application to search directories and sub-directories eventually opening all image files (basically using NSDirectoryEnumerator). Obviously, I can't allow the user to start at say the volume level and do the search. However as far as I can tell, there is

Re: Cocoa-dev Digest, Vol 8, Issue 367

2011-05-24 Thread James Merkel
On May 24, 2011, at 5:15 AM, cocoa-dev-requ...@lists.apple.com wrote: James Merkel wrote: I was trying to come up with a way to prevent the user from starting at the wrong place. (Putting up an Alert that says you can't start there). There's a method in the NSFileManager cl

Re: Recursive search for files

2011-05-24 Thread James Merkel
On May 24, 2011, at 5:15 AM, cocoa-dev-requ...@lists.apple.com wrote: James Merkel wrote: I was trying to come up with a way to prevent the user from starting at the wrong place. (Putting up an Alert that says you can't start there). There's a method in the NSFileManager cl

Re: Recursive search for files

2011-05-25 Thread James Merkel
On Wed, 25 May 2011 08:52:31 ronald b. kopelman wrote: On May 22, 2011, at 11:52 AM, James Merkel wrote: I would like to add a capability to an application to search directories and sub-directories eventually opening all image files (basically using NSDirectoryEnumerator). Obviously, I can&#

Re: Recursive search for files

2011-05-25 Thread James Merkel
On May 25, 2011, at 8:18 PM, Kyle Sluder wrote: On Wed, May 25, 2011 at 7:34 PM, James Merkel wrote: Security shouldn't be an issue -- this application is for home use only. Unless by "home use" you mean "my own personal home use," then you're taking

Re: Recursive search for files

2011-05-25 Thread James Merkel
On May 25, 2011, at 8:27 PM, Jens Alfke wrote: On May 25, 2011, at 7:34 PM, James Merkel wrote: Security shouldn't be an issue -- this application is for home use only. Allowing searches only of the home directory might be a reasonable approach. Seems like a bad restriction. Peopl

Malformed URL string in openURL

2011-06-07 Thread James Merkel
I am sending a URL string to NSWorkspace's openURL method that has the bracket characters ( ) in it. The URL can't be opened by NSWorkspace. If I take out the ( ) characters NSWorkspace then opens the URL, so I guess NSWorkspace considers the string with ( ) a malformed URL. Note, the (

Re: Malformed URL string in openURL

2011-06-07 Thread James Merkel
On Jun 7, 2011, at 5:06 PM, Jeffrey Walton wrote: On Tue, Jun 7, 2011 at 8:03 PM, Jeffrey Walton wrote: On Tue, Jun 7, 2011 at 7:42 PM, James Merkel wrote: I am sending a URL string to NSWorkspace's openURL method that has the bracket characters ( ) in it. The URL can't be

Re: Malformed URL string in openURL

2011-06-07 Thread James Merkel
On Jun 7, 2011, at 5:39 PM, Jens Alfke wrote: On Jun 7, 2011, at 4:42 PM, James Merkel wrote: I am sending a URL string to NSWorkspace's openURL method that has the bracket characters ( ) in it. The URL can't be opened by NSWorkspace. If I take out the ( ) characters NSWork

Re: Malformed URL string in openURL

2011-06-07 Thread James Merkel
On Jun 7, 2011, at 6:20 PM, Jens Alfke wrote: On Jun 7, 2011, at 6:17 PM, James Merkel wrote: The following works ok: NSString * mapquestURLString; mapquestURLString = [NSString stringWithString:@"http://mapq.st/?maptype=hybrid&q=39.7452,-104.98916 "]; (Just FYI, the -st

Re: Malformed URL string in openURL

2011-06-07 Thread James Merkel
On Jun 7, 2011, at 9:52 PM, Steve Christensen wrote: stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding Yeah, I just found that method about an hour ago! Not related to Cocoa -- but It turns out after playing around with this with mapquest and google maps, adding a label can ch

Progress Indicators Spin vs Bar

2011-06-19 Thread James Merkel
I am trying to do an indeterminate progress indicator in a small NSPanel window similar to that shown in Figure 15-57 of the OSXHIGuidelines. The NSPanel and NSProgresssIndicator are in a nib file and I'm pretty sure the IB connections are correct. If I use a spin progress indicator, I can

Re: Progress Indicators Spin vs Bar

2011-06-19 Thread James Merkel
On Jun 19, 2011, at 1:27 PM, Quincey Morris wrote: On Jun 19, 2011, at 13:14, James Merkel wrote: ProgressController * progressController = nil; progressController =[[ProgressController alloc] init]; NSLog(@"Progress window: %@\n", [progressControl

Re: Progress Indicators Spin vs Bar

2011-06-20 Thread James Merkel
cel button will work. Of course putting the code in another thread would be a big change. Jim Merkel On Jun 20, 2011, at 1:14 AM, Kyle Sluder wrote: On Jun 20, 2011, at 12:36 AM, James Merkel wrote: It turns out if I use setUsesThreadedAnimation:YES on the progress indicator, the bar indic

Re: Progress Indicators Spin vs Bar

2011-06-20 Thread James Merkel
is performed in a separate thread. Jim Merkel On Jun 19, 2011, at 1:38 PM, James Merkel wrote: On Jun 19, 2011, at 1:27 PM, Quincey Morris wrote: On Jun 19, 2011, at 13:14, James Merkel wrote: ProgressController * progressController = nil; progressController

Re: Progress Indicators Spin vs Bar

2011-06-20 Thread James Merkel
On Jun 20, 2011, at 2:01 AM, Mike Abdullah wrote: On 20 Jun 2011, at 09:31, James Merkel wrote: Yeah, I just kind of avoided the basic problem. The app isn't receiving at least some events -- for example the menus can't be pulled down. On the other hand, the spinning beach ba

Re: Progress Indicators Spin vs Bar

2011-06-20 Thread James Merkel
On Jun 20, 2011, at 12:05 PM, Conrad Shultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 6/20/11 11:47 AM, James Merkel wrote: On Jun 20, 2011, at 2:01 AM, Mike Abdullah wrote: On 20 Jun 2011, at 09:31, James Merkel wrote: Yeah, I just kind of avoided the basic problem. The

Re: Progress Indicators Spin vs Bar

2011-06-20 Thread James Merkel
On Jun 20, 2011, at 2:05 PM, Greg Parker wrote: On Jun 20, 2011, at 11:47 AM, James Merkel wrote: Another question -- when should a progress indicator be put up? The length of time in my processing loop can very greatly. I could be processing 3 files or 300 files. It seems a waste to flash

Re: Progress Indicators Spin vs Bar

2011-06-20 Thread James Merkel
On Jun 20, 2011, at 3:33 PM, Conrad Shultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 6/20/11 3:17 PM, James Merkel wrote: I am trying to come up with a way of not using threads (because of the potential problems). All I really want to do is give the user a way of canceling

Re: Progress Indicators Spin vs Bar

2011-06-20 Thread James Merkel
On Jun 20, 2011, at 7:23 PM, Conrad Shultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 6/20/11 3:54 PM, James Merkel wrote: I'm opening all digital camera files in a folder (JPEG, TIF, etc), extracting a thumbnail and some Exif data, and putting the data in a TableView

Re: Progress Indicators Spin vs Bar

2011-06-20 Thread James Merkel
On Jun 20, 2011, at 8:43 PM, James Merkel wrote: On Jun 20, 2011, at 7:23 PM, Conrad Shultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 6/20/11 3:54 PM, James Merkel wrote: I'm opening all digital camera files in a folder (JPEG, TIF, etc), extracting a thumbnail and

Re: Progress Indicators Spin vs Bar

2011-06-21 Thread James Merkel
Thanks to all that provided code examples and suggestions on programming for concurrency. I am reading the docs to learn more on this subject. Jim Merkel ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mod

Re: Reading Adobe Photoshop header, Obj-C

2011-06-28 Thread James Merkel
Kevin, As others have suggested you probably want to step down to more basic C coding to handle this task. You can just use C library functions to read data from the file: fopen(), fseek(), fread(), fgetc(), fclose() etc. as discussed in Kernighan and Ritchie. As far as big endian, litt

Re: Reading Adobe Photoshop header, Obj-C

2011-06-28 Thread James Merkel
On Jun 28, 2011, at 4:35 PM, John Joyce wrote: On Jun 28, 2011, at 6:18 PM, James Merkel wrote: Kevin, As others have suggested you probably want to step down to more basic C coding to handle this task. You can just use C library functions to read data from the file: fopen(), fseek

dealloc and scarce resources

2011-06-29 Thread James Merkel
In another thread, someone referenced the Memory Management Programming Guide: http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/ MemoryMgmt/Articles/mmPractical.html%23//apple_ref/doc/uid/ TP40004447-1000922-BABBFBGJ In the Guide it says: "You should typically not manag

Re: dealloc and scarce resources

2011-06-29 Thread James Merkel
On Jun 29, 2011, at 7:17 PM, Wim Lewis wrote: On 29 Jun 2011, at 5:43 PM, James Merkel wrote: In the [Memory Management Programming Guide] it says: "You should typically not manage scarce resources such as file descriptors, network connections, and buffers or caches in a dealloc m

Re: dealloc and scarce resources

2011-06-29 Thread James Merkel
On Jun 29, 2011, at 9:47 PM, Quincey Morris wrote: On Jun 29, 2011, at 17:43, James Merkel wrote: "You should typically not manage scarce resources such as file descriptors, network connections, and buffers or caches in a dealloc method. In particular, you should not design class

Re: dealloc and scarce resources

2011-06-29 Thread James Merkel
On Jun 29, 2011, at 11:07 PM, Kyle Sluder wrote: On Wed, Jun 29, 2011 at 10:38 PM, James Merkel wrote: Ok, thanks. For what I'm doing file descriptors are not a scarce resource. File descriptors are almost always a scarce resource. By default, each process only gets 256 of them. -

Re: dealloc and scarce resources

2011-06-30 Thread James Merkel
On Jun 30, 2011, at 2:01 AM, Ken Thomases wrote: On Jun 30, 2011, at 3:02 AM, Jean-Daniel Dupas wrote: Le 30 juin 2011 à 08:19, James Merkel a écrit : Ok, I'm looking at my application in Instruments File Activity. The column labeled FD I assume means file descriptors. Is that the

Re: dealloc and scarce resources

2011-06-30 Thread James Merkel
On Jun 30, 2011, at 9:20 AM, James Merkel wrote: On Jun 30, 2011, at 2:01 AM, Ken Thomases wrote: On Jun 30, 2011, at 3:02 AM, Jean-Daniel Dupas wrote: Le 30 juin 2011 à 08:19, James Merkel a écrit : Ok, I'm looking at my application in Instruments File Activity. The column label

Re: dealloc and scarce resources

2011-06-30 Thread James Merkel
On Jun 30, 2011, at 12:04 PM, Kyle Sluder wrote: On Thu, Jun 30, 2011 at 9:20 AM, James Merkel wrote: After a fair amount of application warm-up the FD shows 25 to 26. So, I assume I'm ok. And what happens when (not if) you introduce a leak, and these objects live longer than you e

Re: dealloc and scarce resources

2011-06-30 Thread James Merkel
On Jun 30, 2011, at 12:21 PM, Kyle Sluder wrote: On Thu, Jun 30, 2011 at 12:12 PM, James Merkel wrote: Ok, I don't know what an -invalidate method is, but I'll look it up. It's the thing Wim talked about. An explicit way to release the scarce resource you're holding

Re: dealloc and scarce resources

2011-06-30 Thread James Merkel
Not to beat this subject to death, but I just realized that what Kyle Sluder and Wlm Lewis were saying is very easy to implement. All I need is a method that just closes the file -- one line of code. Then wherever I was sending the -release, I need to also send a separate -close. it could be

Re: dealloc and scarce resources

2011-06-30 Thread James Merkel
On Jun 30, 2011, at 6:39 PM, Kyle Sluder wrote: On Thu, Jun 30, 2011 at 6:34 PM, James Merkel wrote: Then wherever I was sending the -release, I need to also send a separate -close. it could be before or after the release, it doesn't really matter. No, it really needs to be befor

Re: Adding Spotlight comment data to folder/file

2011-07-11 Thread James Merkel
On Mon, 11 Jul 2011 19:51:28 -0700 Kyle Sluder wrote: Like I said, Apple designed that field for the sole use of the user. Not that your intended feature wouldn't be helpful, but a user who stumbled upon the output of your program occupying that slot might wrongly conclude that it exists for

Fastest high-quality thumbnail display

2011-07-25 Thread James Merkel
What is the fastest way to generate and display a thumbnail from a digital camera file? In the past I used NSImage -- however the quality (with JPEG files) leaves something to be desired. Now I am using CIImage with Lanczos scale transform -- quality is very good but it is slow (particularly

Re: Fastest high-quality thumbnail display

2011-07-25 Thread James Merkel
2011, at 3:58 PM, Mike Abdullah wrote: On 25 Jul 2011, at 20:04, James Merkel wrote: What is the fastest way to generate and display a thumbnail from a digital camera file? In the past I used NSImage -- however the quality (with JPEG files) leaves something to be desired. Now I am using CI

Re: Fastest high-quality thumbnail display

2011-07-26 Thread James Merkel
On Jul 26, 2011, at 1:39 AM, Mike Abdullah wrote: On 26 Jul 2011, at 01:55, James Merkel wrote: Well, I see I have a huge memory leak in CIImage. However, I don't see where my code is in error. Also, according to Instruments Object Allocation, ImageIO is holding this memory. So I

Re: Fastest high-quality thumbnail display

2011-07-26 Thread James Merkel
On Jul 26, 2011, at 7:34 AM, Kyle Sluder wrote: On Jul 26, 2011, at 7:04 AM, James Merkel wrote: Yeah, it looks like I can't use CIImage because of the memory leak. Every time an image is opened, the memory footprint increases by the size of the image. Using CIImage was kind of a c

Re: Fastest high-quality thumbnail display

2011-07-30 Thread James Merkel
ul 25, 2011, at 3:04 PM, James Merkel wrote: What is the fastest way to generate and display a thumbnail from a digital camera file? In the past I used NSImage -- however the quality (with JPEG files) leaves something to be desired. Now I am using CIImage with Lanczos scale transform -- quality is

Re: Fastest high-quality thumbnail display

2011-07-30 Thread James Merkel
very good compared to the screen rendition. Never understood why that is. Jim Merkel On Jul 30, 2011, at 8:12 AM, James Merkel wrote: Thanks, I'll take a look at IK. I also found an Apple example application called ImageApp. It seems to work fine. No memory leaks. The approach for u

Re: Fastest high-quality thumbnail display

2011-07-31 Thread James Merkel
On Jul 31, 2011, at 4:32 AM, Michael Babin wrote: On Jul 30, 2011, at 9:10 PM, James Merkel wrote: I tried ImageKit and it works great. Excellent quality. Thanks for the suggestion, Scott. I didn't have to do much more than change an NSImageView to an IKImageView in InterfaceBuilde

Thousands separators added to number fields

2012-08-10 Thread James Merkel
As of 10.8, it looks like thousands separators are automatically added to numbers displayed in text boxes. Can this be disabled? In some places it doesn't make sense like in a display of a year. TIA, Jim Merkel ___ Cocoa-dev mailing list (Cocoa-dev@l

Re: Thousands separators added to number fields

2012-08-10 Thread James Merkel
> As of 10.8, it looks like thousands separators are automatically added to > numbers displayed in text boxes. > Can this be disabled? In some places it doesn't make sense like in a display > of a year. Ok, I see from: https://developer.apple.com/library/mac/#releasenotes/CoreFoundation/CoreFou

Re: Thousands separators added to number fields

2012-08-10 Thread James Merkel
On Aug 10, 2012, at 1:17 PM, James Merkel wrote: > +[NSString localizedStringWithFormat:] Never mind -- I see I can use +[NSString stringWithFormat:] rather than +[NSString localizedStringWithFormat:] to avoid the thousand separators. Jim Mer

Re: Thousands separators added to number fields

2012-08-10 Thread James Merkel
Ok, I could do it that way also. Jim Merkel On Aug 10, 2012, at 1:28 PM, Kyle Sluder wrote: > On Fri, Aug 10, 2012, at 01:17 PM, James Merkel wrote: >>> As of 10.8, it looks like thousands separators are automatically added to >>> numbers displayed in text boxes. >>

Re: Cocoa-dev Digest, Vol 9, Issue 569

2012-08-10 Thread James Merkel
On Fri, 10 Aug 2012 13:47:48 -0600 mail...@ericgorr.net wrote: > For a JPG image, I can just use CGImageSourceCopyPropertiesAtIndex to > obtain the various bits of EXIF information from the image. However, > this API does not work with quicktime movie files. > > What similar Cocoa APIs can I u

Window Title drop-down menu in 10.8

2012-08-15 Thread James Merkel
In 10.8, what capabilities does a window need in order for it to have the window title drop down menu? My windows don't seem to have this feature. Does the window need to be document based? Thanks, Jim Merkel ___ Cocoa-dev mailing list (Cocoa-dev@list

Re: Speed up image display for large raw images?

2012-08-15 Thread James Merkel
On Tue, 14 Aug 2012 21:58:38 Marco S Hyman wrote: > The images are typically 25 MB Canon 7D raw image files that have > been pre-alloc'ed and initWithContentsOfFile: > The NSImageView is about 600x400 pixels. You could try to get to a reduced resolution image (preview image). Usually Raw files

Re: Window Title drop-down menu in 10.8

2012-08-16 Thread James Merkel
On Aug 15, 2012, at 11:25 PM, Mike Abdullah wrote: > > On 14 Aug 2012, at 05:29, James Merkel wrote: > >> In 10.8, what capabilities does a window need in order for it to have the >> window title drop down menu? My windows don't seem to have this feature. >

Re: Sandboxing die.die.die

2012-08-22 Thread James Merkel
Why not just codeSign an application? It will still will be able to be downloaded by anyone using the default security setting: "Mac App Store and identified developers". It just won't be able to be in the App store (I guess). Jim Merkel ___ Cocoa-de

Re: Sandboxing die.die.die

2012-08-22 Thread James Merkel
nice to be able to use those features. > > On Aug 22, 2012, at 2:42 PM, James Merkel wrote: > >> Why not just codeSign an application? It will still will be able to be >> downloaded by anyone using the default security setting: "Mac App Store and >> identified

Re: Sandboxing die.die.die

2012-08-22 Thread James Merkel
On Aug 22, 2012, at 1:27 PM, Kyle Sluder wrote: > On Wed, Aug 22, 2012, at 01:02 PM, Lee Ann Rucker wrote: >> Notification Center is usable by any app; I'm using it and App Store >> isn't even a possibility at this point. > > I believe your app has to be code-signed. But any valid code signatur

Re: Window Title drop-down menu in 10.8

2012-09-01 Thread James Merkel
On Sep 1, 2012, at 10:30 AM, Mike Abdullah wrote: > > On 16 Aug 2012, at 14:52, James Merkel wrote: > >> >> On Aug 15, 2012, at 11:25 PM, Mike Abdullah >> wrote: >> >>> >>> On 14 Aug 2012, at 05:29, James Merkel wrote: >>>

Sandboxing not so bad

2012-09-13 Thread James Merkel
Sandboxing is not as restrictive than I though it would be. For example, the documentation for the entitlement: com.apple.security.files.user-selected.read-write says this entitlement provides: "Read/write access to files the user has selected using an Open or Save dialog" . I was reading more

Re: Sandboxing not so bad

2012-09-15 Thread James Merkel
On Sep 13, 2012, at 12:45 PM, James Merkel wrote: > Sandboxing is not as restrictive than I though it would be. > > For example, the documentation for the entitlement: > com.apple.security.files.user-selected.read-write says this entitlement > provides: "Read/write acce

Re: Sandboxing not so bad

2012-09-17 Thread James Merkel
> > The sandbox is like a cat box … to be avoided at all costs. > > -koko > > On Sep 15, 2012, at 3:01 PM, James Merkel wrote: > >> >> On Sep 13, 2012, at 12:45 PM, James Merkel wrote: >> >>> Sandboxing is not as restrictive than I though it w

Re: Guidance for Cocoa's steep learning curve

2008-05-15 Thread James Merkel
Regarding the question on how NSTableView works -- there are examples of Table Views in the Aaron Hillegass book "Cocoa programming for Mac OS X". Also, there are literally hundreds of questions and answers on Table Views in the archives of this mailing list. When I get stuck on how to do s

Re: File's Owner

2008-05-25 Thread James Merkel
On May 25, 2008, at 12:02 PM, Hamish Allan wrote: What this thread has reminded me of is an ongoing conversation I have with a friend of mine, who refuses to countenance the square root of minus one, because he doesn't think it means anything. I explain to him how useful it can be to admit comp

Bit maps from raw camera files

2008-07-05 Thread James Merkel
I notice there are now about 120 Digital camera raw formats supported by Mac OS X as of system 10.5.4. I am trying to get a bit map from these camera files so I am using: NSBitmapImageRep * imageBitMap = [NSBitmapImageRep imageRepWithContentsOfFile:theFile] For some raw files (Nikon NEF and

Re: Bit maps from raw camera files

2008-07-05 Thread James Merkel
On Sat, 05 Jul 2008 14:16:46 -0700 Chris Hanson wrote: On Jul 5, 2008, at 2:00 PM, James Merkel wrote: So the question is how to go about reliably getting a bit map reliably form these camera raw files? Try getting a CGImageRef using ImageIO. On Jul 5, 2008, at 2:00 PM, James Merkel wrote: I

Re: Using deprecated methods

2008-07-05 Thread James Merkel
On Sat, 5 Jul 2008 05:08:45 -0700 (PDT) Keith Blount wrote: Hi, Something that has bothered me for ages in Cocoa, but which I've always put to one side, is how to handle certain deprecated methods when supporting more than one OS. In some instances it's as simple as checking at runtime whi

Re: Bit maps from raw camera files

2008-07-07 Thread James Merkel
wrote: Remember that some raw files contain multiple resoltions (i.e. a thumbnail and the main image), so you may not always want the first one. On 6 Jul 2008, at 04:29, James Merkel wrote: Will look into CGImageRef using ImageIO. However, I found that if I use: imageRepsWithContentsO

Re: Southern California Coders?

2008-04-01 Thread James Merkel
On Tue, 1 Apr 2008 15:23:40, Casey Becking wrote: Sorry to take any ones time if this has been discussed before. I was curious if there was any group meeting for Southern California coders to get together? Well, Southern California is a pretty big area. I have seen reference to Lake Forest

Re: Southern California Coders?

2008-04-02 Thread James Merkel
a San Diego area group. At one point, a fair number of San Diego folks drove up for the Lake Forest meetings. The drive got to them about a year ago, and I have not heard whether they have started their own group. Scott On Apr 1, 2008, at 4:46 PM, James Merkel wrote: On Tue, 1 Apr 2008 15:23:4

Notarization porcess

2018-10-24 Thread James Merkel
Has anyone actually been able to get an App notarized in Xcode? After I upload the App to Apple for notarization, I get an e-mail from Apple after a few minutes that says the App has been notarized and I can now Export it. However, back in Xcode in the Organizer window it says “Processing” and th

MKLaunchOptionsMapTypeKey in OS X Mavericks

2013-10-25 Thread James Merkel
In OS X Mavericks, has anyone used MKLaunchOptionsMapTypeKey to open a map in Hybrid mode, for example: NSDictionary *options = @{MKLaunchOptionsMapTypeKey: [NSNumber numberWithUnsignedInteger:MKMapTypeHybrid]}; followed by openInMapsWithLaunchOptions: ? The map opens in Hybrid mode, however