Re: Using CALayer to display a PDF ?

2025-01-05 Thread James Walker via Cocoa-dev
On 1/5/25 9:47 AM, Gabriel Zachmann via Cocoa-dev wrote: Thanks a lot to both of you! I'm sure there's more than one way to do it, but one way is to create an NSPDFImageRep. You can then get a CGImageRef from that, or on macOS, create an NSImage and set that as the layer contents. I forget to

Re: Using CALayer to display a PDF ?

2025-01-04 Thread James Walker via Cocoa-dev
On 1/4/25 4:30 AM, Gabriel Zachmann via Cocoa-dev wrote: I am using CALayer's to display images with some animations. Now, I would like to display PDFs (just the first page). Could some kind soul please explain to me how to load PDFs? And would I then just add such a PDF object as layer.conten

Re: Substitute for kill(2)?

2023-07-25 Thread James Walker via Cocoa-dev
On 7/25/23 7:38 AM, Rob Petrovec via Cocoa-dev wrote: NSDistributedNotificationCenter is a way to send a notification out across the system. Only processes that are listening for the notification will receive it and have a chance to do something with it. It’s like yelling out in a crowded room

Re: Code signing checking

2023-01-06 Thread James Walker via Cocoa-dev
On 1/6/23 12:28 PM, Aandi Inston via Cocoa-dev wrote: Is there any API for doing the following activities related to code signing? - Check that the signature on the running codesigned executable is from the same company as the signature on a bundle? OR - Get the company from the codesigned runnin

Re: Cocoa framework or Object class to uncompress files

2022-10-25 Thread James Walker via Cocoa-dev
On 10/24/22 6:45 PM, Carl Hoefs via Cocoa-dev wrote: My iOS app downloads a gzip'd data file into its sandbox that the app needs to unzip and process. I don't see anything in Cocoa (such as NSFileManager) that addresses uncompressing files. Is there a way? (BTW, I tried some ancient 3rd party

NSSplitView layout problem

2022-09-08 Thread James Walker via Cocoa-dev
I have an editable text view and a combo box that I want to lay out horizontally in a split view. The regular size of a combo box defaults to 25 points high, while the regular size of an edit field defaults to 21 points high. But NSSplitView with horizontal layout sets its subviews to the sam

Re: Building for 10.12

2022-03-18 Thread James Walker via Cocoa-dev
On 3/18/22 1:03 PM, Gabriel Zachmann via Cocoa-dev wrote: Make sure you have the 10.12 SDK installed in your Xcode. To find out what Actually, it seems I wouldn't need older SDK's any more, see, for instance: https://developer.apple.com/forums/thread/82518 And some people even say

Is a HUD panel supposed to be translucent?

2022-03-17 Thread James Walker via Cocoa-dev
I was under the impression that a HUD panel (NSWindowStyleMaskHUDWindow) was supposed to be dark and translucent. But for me it's dark but not at all translucent. Am I just mis-remembering? I'm running Monterey. ___ Cocoa-dev mailing list (Cocoa-de

Re: Distributing Mac App to Registered Devices

2021-06-23 Thread James Walker via Cocoa-dev
On 6/23/21 9:33 AM, Richard Charles via Cocoa-dev wrote: How do you distribute software (not on app store) to Mac beta testers and not be presented with a malicious software warning? Notarize your beta builds, just like you should be doing with your release builds. When upgrading a project

Re: NSExceptionHandler and "Internal Error" dialog

2021-05-28 Thread James Walker via Cocoa-dev
On 5/28/21 4:21 PM, Matt Jacobson wrote: On May 28, 2021, at 6:54 PM, James Walker via Cocoa-dev wrote: When an uncaught exception is raised, I want to log some information about it but let it continue on as normal. But when I use NSExceptionHandler, an uncaught exception displays an

NSExceptionHandler and "Internal Error" dialog

2021-05-28 Thread James Walker via Cocoa-dev
When an uncaught exception is raised, I want to log some information about it but let it continue on as normal. But when I use NSExceptionHandler, an uncaught exception displays an "Internal Error" modal dialog with buttons "Show Details", "Crash", and "Continue". I don't see any explicit men

Re: MacOS: nonmodal NSAlert panel

2021-05-12 Thread James Walker via Cocoa-dev
On 5/12/21 11:17 AM, Carl Hoefs via Cocoa-dev wrote: I had thought it was possible on MacOS to run an NSAlert panel nonmodally... I'd like to present an informational alert for n seconds then dismiss it without user interaction. But I don't see any way to dismiss, terminate, cancel, invalidate

Re: How to parse a log file

2020-10-26 Thread James Walker via Cocoa-dev
On 10/26/20 3:31 PM, Alex Zavatone via Cocoa-dev wrote: As a note to Jens’s tip, it’s important to keep the .dSWM files for your releases so that you can symbolicate your crash logs. Crashlytics does this for you, but the debug symbols are stripped from released builds to try and prevent peop

Re: Drag and Drop of NSTokenField stopped working in Catalina

2020-06-30 Thread James Walker via Cocoa-dev
On 6/30/20 3:32 AM, Michael Kloske via Cocoa-dev wrote: In my window controller, which implements I have the following code: - (BOOL)tokenField:(NSTokenField *)tokenField writeRepresentedObjects:(NSArray *)objects toPasteboard:(NSPasteboard *)pboard { return [pboard writeObjects:ob

Re: Can't delete file on external disk

2020-03-12 Thread James Walker via Cocoa-dev
On 3/12/20 9:55 AM, Gabriel Zachmann via Cocoa-dev wrote: In my app, I collect lists of files that reside on an external disk. When the user opens the directory of the files, I create a security-scoped bookmark like this: directoryBookmark_ = [dir bookmarkDataWithOptions: NSURLBookmarkCre

Detect when a process has stopped responding?

2019-12-30 Thread James Walker via Cocoa-dev
Some Apple utilities such as Activity Monitor can detect when a process has stopped responding to events. Is there any way to do that using public APIs? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mode

Re: NSWorkspace notifications related to time change

2019-12-18 Thread James Walker via Cocoa-dev
On 12/18/19 9:55 AM, Carl Hoefs via Cocoa-dev wrote: However, I cannot get this notification to fire on system time changes. My other notifications (such as sleep wake, etc) do fire. -Carl [[[NSWorkspace sharedWorkspace] notificationCenter] addObserver: self selector: @sel

Re: Fullscreen window problems

2019-10-24 Thread James Walker via Cocoa-dev
On 10/24/19 8:45 AM, Ray, Jeffrey R. {Jeff} (AFRC-630) via Cocoa-dev wrote: I have a multi-platform OpenGL app (most code is c++, a tiny bit is Obj-C++). It switches between windowed and full screen mode by having an allocated-once window, and an allocated-and-destroyed full screen that comes

Re: Thoughts on productivity

2019-10-24 Thread James Walker via Cocoa-dev
On 10/24/19 3:57 PM, Rob Petrovec via Cocoa-dev wrote: On Oct 24, 2019, at 4:50 PM, Stephane Sudre wrote: On Fri, Oct 25, 2019 at 12:38 AM Rob Petrovec via Cocoa-dev wrote: If its a ranty bug report, which apparently happens a lot, it goes into a black-hole never to see the light of day i

Re: Questions regarding release

2019-09-26 Thread James Walker via Cocoa-dev
On 9/26/19 4:20 PM, Gabriel Zachmann via Cocoa-dev wrote: The issue in the below code to my eye is that you allocate a path with CGPathCreateWithRect (+1) but then don't release it. In that case, I am wondering: doesn't ownership pass to the textlayer ? If yes, shouldn't textlayer release the p

Re: Xcode 11 can't make an objective-C subclass any more?

2019-09-23 Thread James Walker via Cocoa-dev
On 9/23/19 2:23 PM, Jens Alfke wrote: On Sep 23, 2019, at 2:19 PM, James Walker via Cocoa-dev mailto:cocoa-dev@lists.apple.com>> wrote: Am I losing my mind, or is there no longer a good way to create a new Objective-C subclass?  If I go to create a new Objective-C file, I am offer

Xcode 11 can't make an objective-C subclass any more?

2019-09-23 Thread James Walker via Cocoa-dev
Am I losing my mind, or is there no longer a good way to create a new Objective-C subclass? If I go to create a new Objective-C file, I am offered the file type options: Empty File, Category, Protocol, Extension. No subclass. ___ Cocoa-dev mailing

Re: Views without any layout constraints may clip their content or overlap other views

2019-09-23 Thread James Walker via Cocoa-dev
On 9/23/19 8:30 AM, Richard Charles via Cocoa-dev wrote: On Sep 23, 2019, at 8:06 AM, Gabriel Zachmann via Cocoa-dev wrote: Recently, I am getting lots of warnings saying "Views without any layout constraints may clip their content or overlap other views" when I build my screen saver. Try

Re: Crashing in NSTabView

2019-05-22 Thread James Walker
On 5/22/19 11:20 AM, Casey McDermott wrote: Instruments shows the child view controller being deallocated improperly after a tab switch. Unfortunately it's either run the debugger or run Instruments, but not both. So it doesn't help narrow down to when the release happens, exactly. Instrument

Re: Crashing in NSTabView

2019-05-22 Thread James Walker
On 5/22/19 7:26 AM, Casey McDermott wrote: Our Mac app adds tabs to a NSTabView programmatically.  After switching tabs a  few times, one of the NSTabViewItems would release prematurely, causing a crash.  So we switched it to using a  NSTabViewController.  Tab switching still crashes, but now it 

Tool tips for column headers of NSTableView not showing

2019-03-29 Thread James Walker
I have a view-based NSTableView with column headers, and I have assigned tool tips to all the columns in the nib. The problem is that if I pause the mouse over column headers, the tool tips don't appear. In contrast, tool tips for controls within table rows work fine. However, if I click one

Re: Crash in terminate: on Mavericks [SOLVED]

2019-01-22 Thread James Walker
I narrowed the problem down to a plug-in bundle being unloaded using CFBundleUnloadExecutable. (I know, that's not the recommended approach, but this is legacy code.) So I looked into the plug-in. It's mostly C++, but there was one Objective-C++ source file that wasn't being used and didn't

Re: Crash in terminate: on Mavericks

2019-01-21 Thread James Walker
it over to the test machine along with the app. As for stripping, DEPLOYMENT_POSTPROCESSING = NO should make STRIP_INSTALLED_PRODUCT = YES do nothing. Georg Am 21.01.2019 um 18:39 schrieb James Walker : On 1/18/19 6:30 PM, Ken Thomases wrote: You haven't included the nature of t

Re: Crash in terminate: on Mavericks

2019-01-21 Thread James Walker
On 1/21/19 10:07 AM, Quincey Morris wrote: On Jan 21, 2019, at 09:39 , James Walker <mailto:jam...@frameforge3d.com>> wrote: I used LLDB, and said env NSZombieEnabled=YES before starting the process. You should turn on zombies from the Diagnostics panel of your target’s scheme, o

Re: Crash in terminate: on Mavericks

2019-01-21 Thread James Walker
On 1/21/19 9:43 AM, Sean McBride wrote: On Fri, 18 Jan 2019 16:48:37 -0800, James Walker said: When my app runs in Mavericks (10.9.5), it crashes on quit, but in High Sierra it's fine. The backtrace doesn't show any of my code, so I'm not sure how to proceed. I don'

Re: Crash in terminate: on Mavericks

2019-01-21 Thread James Walker
, 2019, at 6:48 PM, James Walker wrote: When my app runs in Mavericks (10.9.5), it crashes on quit, but in High Sierra it's fine. The backtrace doesn't show any of my code, so I'm not sure how to proceed. I don't suppose this means anything to anyone? Application Specifi

Crash in terminate: on Mavericks

2019-01-18 Thread James Walker
When my app runs in Mavericks (10.9.5), it crashes on quit, but in High Sierra it's fine. The backtrace doesn't show any of my code, so I'm not sure how to proceed. I don't suppose this means anything to anyone? Application Specific Information: Performing @selector(terminate:) from sender NS

Re: Why would a view be asked to draw after its window has been ordered out?

2018-12-13 Thread James Walker
On 12/13/18 1:35 PM, Rob Petrovec wrote: On Dec 13, 2018, at 2:26 PM, James Walker wrote: On 12/13/18 11:05 AM, Matt Jacobson wrote: The buffered nature of the Mac OS X window system means that windows can “display” (i.e., go through the process of updating) even when ordered out

Re: Why would a view be asked to draw after its window has been ordered out?

2018-12-13 Thread James Walker
start playing with the order of destruction, I'm likely to break something else. But I can be more precise about when I decline to draw, by having my document post a notification when it starts to shut down. Thanks for the reply. On Dec 13, 2018, at 10:44 AM, James Walker <mailto:jam...@fra

Why would a view be asked to draw after its window has been ordered out?

2018-12-13 Thread James Walker
I was getting a crash on quit resulting from a drawRect: method being called on a window that had been ordered out. I can solve the immediate problem just by bailing out of drawRect: if the window is invisible, but I wish I understood what's going on. The call stack shows a run loop observer

Re: Dealing with an @available warning

2018-10-23 Thread James Walker
On 10/23/18 5:36 PM, Saagar Jha wrote: Saagar Jha On Oct 23, 2018, at 17:15, James Walker <mailto:jam...@frameforge3d.com>> wrote: On 10/23/18 3:12 PM, Saagar Jha wrote: What build command are you using? I’m not seeing any warnings with this code, compiled with clang -x ob

Re: Dealing with an @available warning

2018-10-23 Thread James Walker
___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.c

Re: Dealing with an @available warning

2018-10-23 Thread James Walker
___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.c

Dealing with an @available warning

2018-10-23 Thread James Walker
I had some code like this pInfo.orientation = NSPaperOrientationPortrait; where pInfo is of type NSPrintInfo*. When compiling with -Wunguarded-availability, I got a warning saying that NSPaperOrientationPortrait is only available on macOS 10.9 and later. So I wanted to change it to: if (@a

Re: C++ pointer to Cocoa object

2018-09-07 Thread James Walker
On 9/7/18 10:46 AM, Casey McDermott wrote: We need to link some of our C++ classes to a matching Cocoa class. It's easy for Cocoa to reference C++ objects. Going the other way is harder. We have been using a linker class that has a void pointer to the Obj-C object in the C++ header.  We then ca

Re: Delayed perform never performing

2018-08-24 Thread James Walker
On 8/24/18 11:21 AM, James Walker wrote: What could cause a delayed perform (using -[NSObject performSelector: withObject: afterDelay:]) to never happen?  The requested delay is 0.175. I've checked that it's being issued from the main thread, and I'

Delayed perform never performing

2018-08-24 Thread James Walker
What could cause a delayed perform (using -[NSObject performSelector: withObject: afterDelay:]) to never happen? The requested delay is 0.175. I've checked that it's being issued from the main thread, and I've checked that cancelPreviousPerformRequestsWithTarget: is not being called. I wonder

Re: Carbon -> Cocoa

2018-08-16 Thread James Walker
On 8/16/18 4:54 AM, Casey McDermott wrote: I am curious, are there other developers on this list working on conversions from C++ Carbon to Cocoa? If so, how is it going? (Sorry about the empty post; the list server eats my messages if I try to post in HTML.) I'm working on it. I have conve

Re: Carbon -> Cocoa

2018-08-16 Thread James Walker
___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.c

Re: purpose of asking to access contacts

2018-06-13 Thread James Walker
On 6/13/2018 12:58 PM, Sean McBride wrote: On Wed, 13 Jun 2018 11:01:40 -0700, James Walker said: On iOS, you can give the user a hint of why you need access to contacts by putting a purpose string in the Info.plist. There isn't any way to do that on macOS, is there? The

Re: purpose of asking to access contacts

2018-06-13 Thread James Walker
___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.c

purpose of asking to access contacts

2018-06-13 Thread James Walker
On iOS, you can give the user a hint of why you need access to contacts by putting a purpose string in the Info.plist. There isn't any way to do that on macOS, is there? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: problem getting CALayer to draw an image

2018-04-05 Thread James Walker
Sorry about the mysterious blank posts. Let's see if I can do it with plain text rather than HTML. On 4/5/2018 11:05 AM, David Duncan wrote: >> On Apr 5, 2018, at 10:53 AM, James Walker wrote: >> >> I have a generic NSView that contains some subviews, and I'

Re: problem getting CALayer to draw an image (repost)

2018-04-05 Thread James Walker
___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.co

Re: problem getting CALayer to draw an image

2018-04-05 Thread James Walker
___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.co

Re: problem getting CALayer to draw an image

2018-04-05 Thread James Walker
___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.co

problem getting CALayer to draw an image

2018-04-05 Thread James Walker
I have a generic NSView that contains some subviews, and I'd like to add a background image. I tried code like this: NSImage* backgroundImage = [NSImage imageNamed: @"blueprint controls.png"]; CALayer* holderLayer = [CALayer layer]; _throttleHolder.layer = holderLayer; _throttleHolder.wantsLaye

scrolling problem with window resize

2017-02-27 Thread James Walker
I have a cell-based outline view with one column, rows of variable height, and a vertical scroll bar. I'm trying to restore the previous window size, either by specifying an auto-save name in the nib, or by calling -[NSWindow setFrameUsingName:] after loading the nib, or by calling -[NSWindow

makeKeyAndOrderFront not working

2017-02-14 Thread James Walker
I have a situation where makeKeyAndOrderFront is making a window visible but not key. Just before this call, [theWindow canBecomeKeyWindow] returns YES, and just after, [NSApp keyWindow] returns nil. Clicking on the window title bar does not make it key. However, if I bring some other app to

Re: NSComboBoxCell subclass pointers?

2016-11-21 Thread James Walker
On 11/20/2016 8:15 PM, Robert Monaghan wrote: I have been working on a custom UI for my Cocoa application. By looking around the internet, I have managed to learn how to subclass a large number of UI objects on MacOSX. In many cases I could make the appearance work the way I want. The last UI

Re: Substituting instance of cell subclass for instance of superclass

2016-11-15 Thread James Walker
On 11/11/2016 6:27 PM, Kyle Sluder wrote: On Fri, Nov 11, 2016, at 07:34 PM, James Walker wrote: I want to replace (for example) an instance of NSButtonCell with an instance of my own subclass of NSButtonCell on the fly. Now, I know that's not a common thing to want to do; normally, you&#

Substituting instance of cell subclass for instance of superclass

2016-11-11 Thread James Walker
I want to replace (for example) an instance of NSButtonCell with an instance of my own subclass of NSButtonCell on the fly. Now, I know that's not a common thing to want to do; normally, you'd edit the nib to use whatever cell class you want. But I'd like to be able to do it to an NSAlert, fo

Re: Package installation on MacOS Sierra

2016-09-19 Thread James Walker
On 9/18/2016 3:36 PM, Graham Cox wrote: I have the classic .dmg approach to installation, where a disk image includes an alias for /Applications and the user drags the app icon to it. On 10.12, the alias appears to point to nothing, and has a generic file icon. The disk image should contain a s

Re: How to cancel a print operation?

2016-03-25 Thread James Walker
Never mind, I found it. [[[NSPrintOperation currentOperation] printInfo] setJobDisposition: NSPrintCancelJob] ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the mode

How to cancel a print operation?

2016-03-25 Thread James Walker
The standard print progress panel has a Cancel button, but there does not seem to be any way to customize that panel, so I want to use my own progress panel. But I don't see any method in NSPrintOperation to cancel the operation. My printing view could cease to draw content, but printing a bu

Re: assertion failure from NSScrollView

2013-06-14 Thread James Walker
On 6/12/2013 6:51 PM, James Walker wrote: In Lion 10.7.4, if the General preference pane has set "Show scroll bars" to "Automatically based on input device", then when my window appears I see the following mess in the log. The other two preference alternatives don't cau

assertion failure from NSScrollView

2013-06-12 Thread James Walker
In Lion 10.7.4, if the General preference pane has set "Show scroll bars" to "Automatically based on input device", then when my window appears I see the following mess in the log. The other two preference alternatives don't cause this. Any idea what's going on? (The input device is a mouse,

Re: Weird NSTextField behavior on MBA.

2011-11-22 Thread James Walker
On 11/21/2011 2:08 PM, Gustavo Pizano wrote: So im wondering what its going on because I have tried the behavior on 2 iMacs, 2 MPB and 2 MBA, on the latest one is the only one that doesn't behave as expected. What can it be? Did you compare the OS versions? -- James W. Walker, Innoventi

Re: How to get key code from "SysDefined" Carbon Event

2011-10-18 Thread James Walker
On 10/18/2011 1:00 PM, Jerry Krinock wrote: I've registered a handler for global hot keys with the Carbon Event Manager, using InstallEventHandler(). However, I'd like the user to be able to specify *two* different global hot key functions. Thus, in my callback/handler, I need the key code and

Re: Launching 10.5 app on 10.4

2011-10-18 Thread James Walker
On 10/18/2011 12:33 PM, Nick Zitzmann wrote: On Oct 18, 2011, at 12:37 PM, livinginlosange...@mac.com wrote: What is the canonical method of alerting a user that an application is built for a newer version of OSX? You need to set the LSMinimumSystemVersion or LSMinimumSystemVersionByArchit

Re: What does CMDeviceMotion do if there is no gyro?

2011-09-14 Thread James Walker
On 9/14/2011 11:46 AM, Matt Neuburg wrote: On Tue, 13 Sep 2011 14:39:29 -0700, James Walker said: The CMDeviceMotion Class Reference says "Because Core Motion is able to track a device’s attitude using both the gyroscope and the accelerometer, it can differentiate between gravity and

What does CMDeviceMotion do if there is no gyro?

2011-09-13 Thread James Walker
The CMDeviceMotion Class Reference says "Because Core Motion is able to track a device’s attitude using both the gyroscope and the accelerometer, it can differentiate between gravity and user acceleration." But what does it do if the device does not have a gyroscope... use low-pass and high-pa

Replacement for MethodReplacement?

2011-09-01 Thread James Walker
The sample code page describes it as "Objective C 2.0 compatible class_poseAs() replacement. This demonstrates how to replace a method in an existing Objective C class, and how to call the old versi

Re: altering an NSImage by access to pixels

2011-08-18 Thread James Walker
On 8/18/2011 4:23 PM, David Duncan wrote: On Aug 18, 2011, at 4:16 PM, James Walker wrote: Let's say I have an NSImage that contains some representation other than an NSBitmapImageRep, and I want to play with the pixel values. Create your NSBitmapImageRep Create a NSGraphicsContext

altering an NSImage by access to pixels

2011-08-18 Thread James Walker
Let's say I have an NSImage that contains some representation other than an NSBitmapImageRep, and I want to play with the pixel values. My plan was like this: Create a NSBitmapImageRep of the same size as my source image. Make a new NSImage and add my new representation to it. Lock focus on th

Re: Find a frame of an item in an NSOutlineView?

2011-08-18 Thread James Walker
On 8/18/2011 12:54 PM, Quincey Morris wrote: 'frameOfCellAtColumn:row:', 'rectOfColumn:', 'rectOfRow:'? (Don't forget NSOutlineView is a subclass of NSTableView.) Thanks. That seems to work, though what I'm ultimately trying to do (get an image of a row from an outline view) doesn't. I ca

Find a frame of an item in an NSOutlineView?

2011-08-18 Thread James Walker
Is there a way to find the frame rectangle of an item/row in an NSOutlineView? Looking through the table of contents of the NSOutlineView reference, I saw Getting the Frame for a Cell – frameOfOutlineCellAtRow: which sounded like what I wanted, but it turns out that it just gets the fra

Re: File Copy With Progress?

2011-08-15 Thread James Walker
On 8/14/2011 1:34 PM, Seth Willits wrote: On Aug 12, 2011, at 3:03 PM, Charles Srstka wrote: You could use the copyfile() API. It’s not Cocoa, but it might be a little cleaner than FSCopyObjectAsync. It appears copyfile() doesn't give progress callbacks during a single file's copy? The m

Re: programmatically sorting an NSTableView

2011-07-13 Thread James Walker
On 7/12/2011 11:43 PM, Ken Thomases wrote: On Jul 12, 2011, at 9:24 PM, James Walker wrote: On 7/12/2011 6:14 PM, Ken Thomases wrote: On Jul 12, 2011, at 5:36 PM, James Walker wrote: On 7/12/2011 2:04 PM, Ken Thomases wrote: Invoking -setSortDescriptors: on the array controller does sort

Re: programmatically sorting an NSTableView

2011-07-12 Thread James Walker
On 7/12/2011 6:14 PM, Ken Thomases wrote: On Jul 12, 2011, at 5:36 PM, James Walker wrote: On 7/12/2011 2:04 PM, Ken Thomases wrote: Invoking -setSortDescriptors: on the array controller does sort it (or should). Back on 10.4, it may have been necessary to follow that with a call to

Re: programmatically sorting an NSTableView

2011-07-12 Thread James Walker
> Am 12.07.2011 um 22:43 schrieb James Walker: > >> I have an NSTableView containing one column, which is bound to an >> NSArrayController. I've set a sort key and selector for the column >> in IB, and I've called setSortDescriptors: on the array controller. &

programmatically sorting an NSTableView

2011-07-12 Thread James Walker
I have an NSTableView containing one column, which is bound to an NSArrayController. I've set a sort key and selector for the column in IB, and I've called setSortDescriptors: on the array controller. Clicking the column header sorts it, but how can I sort programmatically? It seems odd that

Re: Properly comparing file NSURLs for equality?

2011-05-27 Thread James Walker
On 5/27/2011 4:35 PM, Jens Alfke wrote: Comparing paths has its own set of pitfalls: even if you’re not concerned about symlinks, there’s case-insensitivity to deal with. I’m not sure what the best way is to deal with that. You could canonicalize each path; or you could convert each URL to an FS

NSDrawer dealloc causes kCGErrorIllegalArgument

2011-02-07 Thread James Walker
I have a dialog with a drawer, and when the dialog closes, my console log contains these error messages: : kCGErrorIllegalArgument: _CGSFindSharedWindow: WID 583 : kCGErrorIllegalArgument: CGSGetWindowTags: Invalid window 0x247 I set a breakpoint at CGErrorBreakpoint, and when this breakpoint i

Re: label color

2010-12-10 Thread James Walker
On 12/9/2010 4:25 PM, Kyle Sluder wrote: [back on list] On Thu, Dec 9, 2010 at 4:22 PM, Ariel Feinerman wrote: Don`t worry, I know the C ;-) I mean scheme of colors (where 0x000E is green, blue, so on) Ohh. Sorry, can't help ya there. :) I'm sure someone's figured it out, though. It also wou

Re: App Store code signing

2010-11-18 Thread James Walker
On 11/18/2010 3:43 PM, Chris Idou wrote: Is this the right forum to ask about the whole business of verifying signatures etc for apps in the app store for Mac? I've been trying to get the code to work, but I'm stumped. If you log in at devforums.apple.com, you'll find a folder devoted to the

Re: Make NSTextField register changes immediately

2010-10-26 Thread James Walker
On 10/26/2010 12:24 PM, Keary Suska wrote: On Oct 26, 2010, at 1:14 PM, James Walker wrote: I have an NSTextField with its value bound to a numeric property, and I'd like that value to change as soon as any typing occurs, without forcing the user to type enter or tab. Here's what

Make NSTextField register changes immediately

2010-10-26 Thread James Walker
I have an NSTextField with its value bound to a numeric property, and I'd like that value to change as soon as any typing occurs, without forcing the user to type enter or tab. Here's what I've tried: Check the "Continuous" control attribute. No effect. Check "Validates Immediately" on the b

Re: Hidden file and 64bits Cocoa

2010-08-23 Thread James Walker
On 8/23/2010 6:57 AM, Olivier Tristan wrote: I'm looking for a way to get the hidden attribute of a file using cocoa as my applications is going to be ported to 64bits. I've took a look to NSFileManager and it do not seems to provide such facility. I used to do this |FSRef ref; OSStatus err =

Re: Set the Cursor Position

2010-08-19 Thread James Walker
On 8/19/2010 5:30 PM, k...@highrolls.net wrote: I haven't seen anything in the docs ... is there a way to set the cursor position? Do you mean the mouse cursor or the text insertion cursor? It's unusual to set the mouse cursor, since that's normally under user control, unless you're writing

Re: NSPropertyListSerialization and string encoding

2010-07-22 Thread James Walker
On 7/22/2010 6:25 PM, Joe Turner wrote: I'm having an issue with NSPropertyListSerialization, where I will call dataWithPropertyList:format:options:error:, to get the data from a property list–this part goes fine. However, then I need the data as a string, so I can upload it to a web service. Ho

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

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

2010-05-28 Thread James Walker
On 5/28/2010 11:18 AM, Alastair Houghton wrote: On 28 May 2010, at 18:25, James Walker wrote: On 5/27/2010 12:43 PM, Bill Appleton wrote: *1) I can't hide a file, or test if a file is hidden* I had to resort to FSGetCatalogInfo -- there is no way to do it through NSFileManager, etc.

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

2010-05-28 Thread James Walker
On 5/27/2010 12:43 PM, Bill Appleton wrote: *1) I can't hide a file, or test if a file is hidden* I had to resort to FSGetCatalogInfo -- there is no way to do it through NSFileManager, etc. Right? Since there are several ways to hide a file, I don't think FSGetCatalogInfo will necessarily tel

Re: NSMovieView -> QTMovieView; rate problems...

2010-05-24 Thread James Walker
On 5/24/2010 11:50 AM, Matthew Weinstein wrote: Okay I'm confused. How do I set the attributes when I init and initWithURL at the same time. I can't seem to find a method to do both. The problem is that when I first init withURL and then use setAttribute, it doesn't take. I check right away and t

How does NSSavePanel support UTIs?

2010-05-20 Thread James Walker
The Uniform Type Identifiers Overview claims that NSSavePanel supports UTIs, but the NSSavePanel class reference makes absolutely no mention of UTIs. What's up with that? I thought maybe there's be something like setAllowedFileTypes: but with UTIs instead of extensions. -- James W. Walker,

Re: Finder refresh issue in Mac OS 10.5

2010-05-11 Thread James Walker
On 5/10/2010 7:36 AM, Sachin Porwal wrote: I also tried using noteFileSystemChanged after creating the shortcut : Try sending a kAESync event to the Finder. Here's my code to do it. Note that although this is Carbon code, it will compile for the x86_64 architecture. Use CFURLGetFSRef to go

Re: showing a list of mounted volumes with icon

2010-04-23 Thread James Walker
On 4/23/2010 5:47 PM, Angelo Chen wrote: > I'd just like show a collection of mounted volumes in a sheet and let user choose one of them. Carbon has a call just for this (NavCreateChooseVolumeDialog) but I don't see anything so easy for Cocoa. You can get a list of volumes with NSFileManager, ge

Updating parameters of a CI filter on a CA layer

2010-04-12 Thread James Walker
The documentation for the filters property of the CALayer class says: "Filter properties should be modified by calling setValue:forKeyPath: on each layer that the filter is attached to." But I don't understand exactly how to write the key path, since the filters property is an array rather tha

Re: How to save and restore NSScrollView scroll position?

2010-04-02 Thread James Walker
On 4/2/2010 1:47 PM, Quincey Morris wrote: On Apr 2, 2010, at 13:15, James Walker wrote: I have an NSScrollView containing an NSTableView whose content is managed by an NSArrayController. I have a situation where I need to temporarily set the array controller's content to nil, mess wit

How to save and restore NSScrollView scroll position?

2010-04-02 Thread James Walker
I have an NSScrollView containing an NSTableView whose content is managed by an NSArrayController. I have a situation where I need to temporarily set the array controller's content to nil, mess with the content, and then hand it back to the array controller, and I'd like to preserve the scroll

Re: NSIsNilTransformerName exception

2010-03-30 Thread James Walker
rprised NSIsNil didn't show up in the binding's popup list. Me too. I'm sure I've seen all the standard value transformers there before. Now all I see in the transformer list are NSKeyedUnarchiveFromData and NSUnarchiveFromData. On Mar 30, 2010, at 12:11 PM, James W

NSIsNilTransformerName exception

2010-03-30 Thread James Walker
I'm trying to make a button be disabled if an array controller is being filtered. So in IB I bound the enabled state of the button to the array controller, with controller key "filterPredicate" and value transformer "NSIsNilTransformerName". At run time, an exception is thrown, and the log ha

Re: Real-Time Validation in a NSTextField.

2010-02-19 Thread James Walker
On 2/18/2010 2:18 PM, Abhinay Kartik Reddyreddy wrote: I was wondering if there is any alternative / better approach for validating text in a textfield?? I've done this by writing a custom subclass of NSFormatter that overrides isPartialStringValid:newEditingString:errorDescription:. --

Re: What classes have -init?

2010-02-11 Thread James Walker
On 2/10/2010 8:38 PM, Quincey Morris wrote: On Feb 10, 2010, at 12:23 PM, James Walker wrote: I think at times I've written things like [[NSMutableArray alloc] init] with no apparent ill effects, but now I notice that the docs for NSMutableArray and NSArray don't say that there

  1   2   >