Re: Loading existing NIB file from Cocoa?

2012-02-23 Thread Fritz Anderson
On 23 Feb 2012, at 10:49 AM, Howard Moon wrote: > Unable to load the Interface Builder file xx.nib because the > object archive is missing. Valid nib files must contain either > keyedobjects.nib, objects.nib, or data.nib. > > I'm not sure how to proceed here. Is it possible t

Re: NSView mouseDown truncated coordinates

2012-02-23 Thread Markus Spoettl
On 23.02.12 21:55, Quincey Morris wrote: Ah, it's clear now. But I still think your theory is flawed. You can't assume that the physical act of pressing the mouse button doesn't change the reading (that is, doesn't possibly move the mouse slightly). I don't think that the rounding in mouseDown ha

Re: Determining user's clock preference on iOS

2012-02-23 Thread Kyle Sluder
On Thu, Feb 23, 2012 at 2:01 PM, Rick Mann wrote: > A little more info. @"j:m" gets written to "h:mm a", which is unfortunate. It > always adds the "a". Hmm, the documentation seems to imply that iOS might do the "right thing" here, and choose the final output format based on the user's preferen

Re: Dumb question about radio buttons

2012-02-23 Thread Graham Cox
On 24/02/2012, at 12:58 AM, William Squires wrote: > I have a custom view with an NSBox containing an NSMatrix of button cells > (radio buttons) When I created the NSMatrix, I told it I wanted 3 of them, > but in the view hierarchy, I can see the NSMatrix under the NSBox, but it has > 4 butto

Re: Was: Re: NSStepper - useless?

2012-02-23 Thread Keary Suska
On Feb 23, 2012, at 10:05 AM, Kyle Sluder wrote: > On Thu, Feb 23, 2012 at 6:16 AM, William Squires wrote: >> From what I've read, the NSStepper has a bug (though practically, you'll >> never see it); if one were to click the up or down arrow on the control 2^32 >> times (assuming it's value is

Re: Dumb question about radio buttons

2012-02-23 Thread Keary Suska
On Feb 23, 2012, at 6:58 AM, William Squires wrote: > I have a custom view with an NSBox containing an NSMatrix of button cells > (radio buttons) When I created the NSMatrix, I told it I wanted 3 of them, > but in the view hierarchy, I can see the NSMatrix under the NSBox, but it has > 4 butto

Re: Determining user's clock preference on iOS

2012-02-23 Thread Rick Mann
A little more info. @"j:m" gets written to "h:mm a", which is unfortunate. It always adds the "a". On Feb 23, 2012, at 11:37 , Dave DeLong wrote: > > On Feb 23, 2012, at 8:21 AM, Kyle Sluder wrote: > >> On Feb 22, 2012, at 10:50 PM, Rick Mann wrote: >> >>> I have a need to format times as e

Re: Semi-Transient NSPopover disappearing when it shouldn't (10.7.3)

2012-02-23 Thread Seth Willits
On Feb 23, 2012, at 9:28 AM, Antonio Nunes wrote: > I have a few popovers that, as far as I'm aware of, were working fine up to > 10.7.2. Now, in 10.7.3, when the popover appears, if a user clicks on it, it > often disappears, whether the click is on the background or on a UI item. Can you repl

Re: Determining user's clock preference on iOS

2012-02-23 Thread Rick Mann
Oh, "j" works on iOS if you pass it to -dateFormatFromTemplate:options:locale:, but only if you pass [NSLocale currentLocale] and not nil. On Mac OS X, the 12/24-hour format in the Clock is different than in the International settings. Changing the clock has no effect, but I haven't verified th

Re: Determining user's clock preference on iOS

2012-02-23 Thread Rick Mann
On Feb 23, 2012, at 11:37 , Dave DeLong wrote: > > On Feb 23, 2012, at 8:21 AM, Kyle Sluder wrote: > >> What happens if you give +[NSDateFormatter >> dateFormatFromTemplate:options:locale:] a template that contains "h:m:s a"? >> Does it rewrite it to "H:m:s" if the current locale uses 24-hour

Re: NSView mouseDown truncated coordinates

2012-02-23 Thread Quincey Morris
On Feb 23, 2012, at 12:09 , Markus Spoettl wrote: > This is what I do: > > 1) On -mouseMoved: locate object under the cursor and highlight it so the > user knows which one of them will be operated on when the mouse goes down. > > 2) On -mouseDown: locate object under the cursor and prepare it f

Re: ImageCapture + ImageKit problem...

2012-02-23 Thread Fritz Anderson
On 23 Feb 2012, at 2:12 AM, Eric Matecki wrote: > Oh, something that may be part of the problem (or of the solution...): > > I don't call run on my app for multiplatform portability reasons. > Instead I call this in a customized event loop: Alas, you are writing an application for Mac OS X. Coco

Re: Loading existing NIB file from Cocoa?

2012-02-23 Thread Howard Moon
Oh well, thanks, guys! -Howard On Feb 23, 2012, at 12:11 PM, Seth Willits wrote: > On Feb 23, 2012, at 8:49 AM, Howard Moon wrote: > >> I'm not sure how to proceed here. Is it possible to modify my .nib file in >> some manner so that it works in Cocoa (and still works in Carbon)? Or, do I

Semi-Transient NSPopover disappearing when it shouldn't (10.7.3)

2012-02-23 Thread Antonio Nunes
I have a few popovers that, as far as I'm aware of, were working fine up to 10.7.2. Now, in 10.7.3, when the popover appears, if a user clicks on it, it often disappears, whether the click is on the background or on a UI item. I haven't figured out the trick exactly of the way in which clicking

Re: Loading existing NIB file from Cocoa?

2012-02-23 Thread Kyle Sluder
On Thu, Feb 23, 2012 at 8:49 AM, Howard Moon wrote: > HI all, > >        I've got an audio plug-in that supports Windows and Carbon, and is > being updated to support Cocoa (when the audio host is Cocoa-based).  On the > Carbon side of things, I've got a .nib file that contains a few dialogs tha

Re: Was: Re: NSStepper - useless?

2012-02-23 Thread Seth Willits
On Feb 23, 2012, at 6:16 AM, William Squires wrote: > From what I've read, the NSStepper has a bug (though practically, you'll > never see it); if one were to click the up or down arrow on the control 2^32 > times (assuming it's value is a 4-byte signed int,and is initialized to 0), > it would

Re: Loading existing NIB file from Cocoa?

2012-02-23 Thread Seth Willits
On Feb 23, 2012, at 8:49 AM, Howard Moon wrote: > I'm not sure how to proceed here. Is it possible to modify my .nib file in > some manner so that it works in Cocoa (and still works in Carbon)? Or, do I > have to make a new .xib for use with Cocoa, essentially doubling the work and > resource

Re: NSView mouseDown truncated coordinates

2012-02-23 Thread Markus Spoettl
On 23.02.12 20:07, Quincey Morris wrote: Up until now (< Lion), it was guaranteed (well, maybe not that, it just happened to work that way) that the -moveMoved: location corresponded to the subsequent -mouseDown: location. That meant that any hover-effects visualized during -mouseMoved: would hav

Re: Dumb question about radio buttons

2012-02-23 Thread Seth Willits
On Feb 23, 2012, at 5:58 AM, William Squires wrote: > I have a custom view with an NSBox containing an NSMatrix of button cells > (radio buttons) When I created the NSMatrix, I told it I wanted 3 of them, > but in the view hierarchy, I can see the NSMatrix under the NSBox, but it has > 4 butto

Re: App Crashing in ARC !!

2012-02-23 Thread Fritz Anderson
On 22 Feb 2012, at 9:31 PM, Naresh Kongara wrote: > I'm creating the alert with class method in NSAlert and running it with > runModal. > > NSAlert *alert =[NSAlert > alertWithMessageText:defaultButton:alternateButton:otherButton:informativeTextWithFormat:]; > if ([alert runModal] == NSAlertDef

Re: Sudden and hard to reproduce crashes in libcache

2012-02-23 Thread Greg Parker
On Feb 21, 2012, at 6:50 AM, Dragan Milić wrote: > First of all, I apologise if this is not the right topic for this list. > > Some beta testers of an application I'm working on experience rather strange > and sudden crashes, very often when the application is doing nothing, just > sitting id

Re: Tab view and radio buttons

2012-02-23 Thread Fritz Anderson
On 22 Feb 2012, at 2:00 PM, McLaughlin, Michael P. wrote: > I am seeing a problem in which I select a radio button in a view, flip to > another tab then back again. When I do this for one of the tabbed views, the > just-selected radio button is not remembered. In fact, all of them are in > the

Re: Determining user's clock preference on iOS

2012-02-23 Thread Rick Mann
On Feb 23, 2012, at 11:37 , Dave DeLong wrote: > > On Feb 23, 2012, at 8:21 AM, Kyle Sluder wrote: > >> On Feb 22, 2012, at 10:50 PM, Rick Mann wrote: >> >>> I have a need to format times as either >>> >>> 24:mm >>> >>> or >>> >>> 12:mm >>>am >>> >>> That is, if the user prefers a 2

Re: Determining user's clock preference on iOS

2012-02-23 Thread Dave DeLong
On Feb 23, 2012, at 8:21 AM, Kyle Sluder wrote: > On Feb 22, 2012, at 10:50 PM, Rick Mann wrote: > >> I have a need to format times as either >> >> 24:mm >> >> or >> >> 12:mm >> am >> >> That is, if the user prefers a 24-hour clock, I want it to appear on a >> single line. If the u

Re: Determining user's clock preference on iOS

2012-02-23 Thread David Duncan
On Feb 22, 2012, at 10:50 PM, Rick Mann wrote: > Unfortunately, there's no format specifier for the hours of the day that > indicates "use the user's preferred format." > > If I could determine the user's preference, then I'd just format it > appropriately. Alternatively, I can use the "short"

Re: NSView mouseDown truncated coordinates

2012-02-23 Thread Quincey Morris
On Feb 23, 2012, at 10:27 , Markus Spoettl wrote: > I'm using a mouse and the cursor doesn't move between -mouseMove: and > -mouseDown: (on screen). If the device would be capable of reporting > sub-pixel movements (which may not be reported by moving the cursor), I guess > it would have done s

Re: text field question

2012-02-23 Thread Michael Babin
On Feb 23, 2012, at 7:24 AM, Michael Babin wrote: > On Feb 22, 2012, at 6:59 PM, Rick C. wrote: > >> I have a panel with a number of text fields where a user should enter >> numeric values. These text fields are setup with Sent on End Editing so >> that if the user presses enter or tabs or ch

Re: Localization for nibs

2012-02-23 Thread Gary L. Wade
What I've done that works for pre-Lion sizing and works for practically all needs for a single NIB is to do this: 1. Devise a specially-designed key path that tells me the following: A. A tag that identifies it's my localized format B. String key C. The string table name (if empty, fall b

Re: NSView mouseDown truncated coordinates

2012-02-23 Thread Markus Spoettl
On 23.02.12 18:53, Quincey Morris wrote: Anyone know how to work out mouseDown coordinates one can expect to get when looking at mouseMove coordinates? I'll ask the stupid question: How do you know (or, why do you assume) that these two sets of coordinates represent the same point? Even if the

Re: NSView mouseDown truncated coordinates

2012-02-23 Thread Quincey Morris
On Feb 23, 2012, at 04:04 , Markus Spoettl wrote: > As an illustration for the list, I have logged coordinates of a mouse move > and a subsequent mouse down event that followed the move event: > > mouseMovedToPoint:NSPoint: {217.15625, 343.3984375} > mouseDownAtPoint:NSPoint: {217, 344} > > It

Re: Determining user's clock preference on iOS

2012-02-23 Thread Nick Zitzmann
On Feb 22, 2012, at 11:50 PM, Rick Mann wrote: > If I could determine the user's preference, then I'd just format it > appropriately. Alternatively, I can use the "short" format style, and then > parse out the AM/PM, but that seems more fragile across locales (are there > locales that use some

Semi-Transient NSPopover disappearing when it shouldn't (10.7.3)

2012-02-23 Thread Antonio Nunes
I have a few popovers that, as far as I'm aware of, were working fine up to 10.7.2. Now, in 10.7.3, when the popover appears, if a user clicks on it, it often disappears, whether the click is on the background or on a UI item. I haven't figured out the trick exactly of the way in which clicking

Re: 10.7 Auto Layout re-sizing question

2012-02-23 Thread Kevin Cathey
Jonathan, >viewController = [[RemindersViewController alloc] > initWithNibName:@"RemindersViewController" bundle:nil]; >self.window.contentView = viewController.view; >[[viewController view] setFrame: [myView bounds]]; Did you mean do make the content view of the window the view contr

Re: text field question

2012-02-23 Thread Kyle Sluder
On Thu, Feb 23, 2012 at 5:24 AM, Michael Babin wrote: >> I have a panel with a number of text fields where a user should enter >> numeric values.  These text fields are setup with Sent on End Editing so >> that if the user presses enter or tabs or changes text fields the value will >> be entere

Re: Was: Re: NSStepper - useless?

2012-02-23 Thread Kyle Sluder
On Thu, Feb 23, 2012 at 6:16 AM, William Squires wrote: > From what I've read, the NSStepper has a bug (though practically, you'll > never see it); if one were to click the up or down arrow on the control 2^32 > times (assuming it's value is a 4-byte signed int,and is initialized to 0), > it wo

Loading existing NIB file from Cocoa?

2012-02-23 Thread Howard Moon
HI all, I've got an audio plug-in that supports Windows and Carbon, and is being updated to support Cocoa (when the audio host is Cocoa-based). On the Carbon side of things, I've got a .nib file that contains a few dialogs that I need to present to users, and I'm wondering if and how I

Re: Sudden and hard to reproduce crashes in libcache

2012-02-23 Thread Fritz Anderson
On 21 Feb 2012, at 8:50 AM, Dragan Milić wrote: > 7 libc++abi.dylib 0x7fff8a1e505c std::terminate() + 16 > 8 libc++abi.dylib 0x7fff8a1e6152 __cxa_throw + 114 > 9 libobjc.A.dylib 0x7fff8a699e7a objc_exception_throw > + 327 > 1

Re: Determining user's clock preference on iOS

2012-02-23 Thread Kyle Sluder
On Feb 22, 2012, at 10:50 PM, Rick Mann wrote: > I have a need to format times as either > >24:mm > > or > >12:mm > am > > That is, if the user prefers a 24-hour clock, I want it to appear on a single > line. If the user prefers a 12-hour clock, I want the AM/PM designator to b

Re: text field question

2012-02-23 Thread Kyle Sluder
On Feb 22, 2012, at 4:59 PM, "Rick C." wrote: > Hi, > > I have a panel with a number of text fields where a user should enter numeric > values. These text fields are setup with Sent on End Editing so that if the > user presses enter or tabs or changes text fields the value will be entered.

Re: text field question

2012-02-23 Thread Jan E. Schotsman
On Feb 23, 2012, at 7:56 AM, Rick C. wrote: I have a panel with a number of text fields where a user should enter numeric values. These text fields are setup with Sent on End Editing so that if the user presses enter or tabs or changes text fields the value will be entered. The problem

Re: Localization for nibs

2012-02-23 Thread Ulf Dunkel
I believe that the "single nib" approach has been made more viable by Auto Layout in Lion, and expect to see more developers using "single nib" in the future. When Auto Layout will auto-adjust the size of text containing objects in each and every NIB by giving us some smart controls how the ad

Was: Re: NSStepper - useless?

2012-02-23 Thread William Squires
>From what I've read, the NSStepper has a bug (though practically, you'll never >see it); if one were to click the up or down arrow on the control 2^32 times >(assuming it's value is a 4-byte signed int,and is initialized to 0), it would >wrap around (or raise an exception for integer overflow).

10.7 Auto Layout re-sizing question

2012-02-23 Thread Jonathan Waddilove
In the past I have managed to add a NSViewController's view to a subView of my window controller, usually something like viewController = [[RemindersViewController alloc] initWithNibName:@"RemindersViewController" bundle:nil]; self.window.contentView = viewController.view; [[viewCont

Dumb question about radio buttons

2012-02-23 Thread William Squires
I have a custom view with an NSBox containing an NSMatrix of button cells (radio buttons) When I created the NSMatrix, I told it I wanted 3 of them, but in the view hierarchy, I can see the NSMatrix under the NSBox, but it has 4 button cells under it, not the three I asked for - Is this an Xco

Re: text field question

2012-02-23 Thread Michael Babin
On Feb 22, 2012, at 6:59 PM, Rick C. wrote: > I have a panel with a number of text fields where a user should enter numeric > values. These text fields are setup with Sent on End Editing so that if the > user presses enter or tabs or changes text fields the value will be entered. > The proble

Re: NSView mouseDown truncated coordinates

2012-02-23 Thread Markus Spoettl
On 28.11.11 15:40, Richard Somers wrote: I'm using a NSTrackingArea in a view to receive mouseMoved events. The cursor location in the mouseMoved and mouseDragged events have non-integer coordinates (as expected). e.g. x:140.601562 y:128.082031 However, the mouseDown and mouseUp events always pr

Re: AXUIElementPostKeyboardEvent - not sending key presses to Safari/TextEdit in Lion

2012-02-23 Thread Bill Cheeseman
On Feb 20, 2012, at 9:29 PM, Mark Munz wrote: > It was later determined that there is no intention of every allowing > any kind of access to usability APIs from a sandboxed app. So they > were apparently to afraid to just come out and say it, but instead > used "internal tracking" option for the

Re: NSView mouseDown truncated coordinates

2012-02-23 Thread Markus Spoettl
Hello, On 28.11.11 15:40, Richard Somers wrote: >> However, the mouseDown and mouseUp events always produce truncated coordinates. >> e.g. x:140.00 y:128.00 >> >> This causes inaccuracy with hit testing between mouseMoved and mouseDown. > > Using floor, ceil, or round on the returned

Re: Can't create window context…crash

2012-02-23 Thread Mike Abdullah
Sent from my iPad On 22 Feb 2012, at 10:17 PM, Gideon King wrote: > Hi all, I am seeing quite a number of reports from users of my software where > on the console, there are errors like the ones below, but I haven't been able > to reproduce the problem here: > > 2012-02-21 23:49:05 +0800[3]

Re: Choosing correct ArrayController depending on active TableView

2012-02-23 Thread Mike Abdullah
The windows's first responder will tell you if one of the table views has focus. If there are other UI elements in the window which can have focus though, this won't be good enough. Instead you'll have to start tracking the first responder yourself and recording which table had it last Sent fro

Re: allow users to opt-out of iCloud

2012-02-23 Thread H. Miersch
On 21. Feb 2012, at 8:13, Martin Hewitson wrote: > Dear list, > > If an app uses iCloud to sync data between machines, should we provide the > user a check-box to opt-out of iCloud syncing? Is there are recommended best > practice here? What are others doing? from a user's point of view, i'd

ImageCapture + ImageKit problem...

2012-02-23 Thread Eric Matecki
Hi, I have a problem with ImageCapture + ImageKit. My IKDeviceBrowserView stays desperately empty. So I added the following code to the start of my app : ICDeviceBrowser* db = [[ICDeviceBrowser alloc] init]; [db setDelegate: (id)self]; db.browsedDeviceTypeMask = db.browsedDevice

Re: NSStepper - useless?

2012-02-23 Thread Martin Hewitson
On Feb 22, 2012, at 09:11 PM, Seth Willits wrote: > On Feb 19, 2012, at 4:11 PM, William Squires wrote: > >> Okay, 'nuther dumb question. How do I hook the different arrows in an >> NSStepper to actions in my view controller? Or how do I ask (id)sender which >> arrow was clicked? > > You don'

Determining user's clock preference on iOS

2012-02-23 Thread Rick Mann
I have a need to format times as either 24:mm or 12:mm am That is, if the user prefers a 24-hour clock, I want it to appear on a single line. If the user prefers a 12-hour clock, I want the AM/PM designator to be rendered underneath the time (in smaller type). Unfo

Re: I added an exception breakpoint to my app...

2012-02-23 Thread Kyle Sluder
On Wed, Feb 22, 2012 at 7:53 AM, R wrote: > and now see: > > Catchpoint 2 (throw)Pending breakpoint 1 - "objc_exception_throw" > resolved > > > No further details.  The app appears to be fine with no errors or > warnings.  Is this a problem? > > (SnowLeopard Xcode 4) This the result of some non-o

Re: help with usb

2012-02-23 Thread Scott Ribe
Your best bet is Apple's USB dev list. On Feb 21, 2012, at 7:59 AM, ronald b. kopelman wrote: > I expect to do this, of course in Obj-C. Can anyone point me in the direction > of some relevant literature regarding usb devices & how to read them -- Scott Ribe scott_r...@elevated-dev.com http:/

Re: help with usb

2012-02-23 Thread Jens Alfke
On Feb 21, 2012, at 6:59 AM, ronald b. kopelman wrote: > This involves learning how to program a usb device. I expect to do this, of > course in Obj-C. I don’t know of any Objective-C USB APIs. I suspect you’re going to have to get jiggy with IOKit… (In general, don't assume there are Objecti

App Crashing in ARC !!

2012-02-23 Thread Naresh Kongara
HI, I'm working on a Cocoa Desktop application, which we recently migrated from Manual memory to ARC. Application is sometimes crashing when the alert is closed. Here is the crash log and stack trace. *** -[NSPanel release]: message sent to deallocated instance 0x111c74a60 #0 0x7fff8ffd

iCal Integration

2012-02-23 Thread Jeremy Matthews
I have a simple app which, as a byproduct, creates tasks and events in iCal. Prior to 10.7, the user would choose from a popup list populated by all calendars within the [CalCalendarStore defaultstore], which worked great and created both events and tasks perfectly fine. Now, in 10.7, it seems

Re: NSStepper - useless?

2012-02-23 Thread John Joyce
On Feb 19, 2012, at 6:11 PM, William Squires wrote: > Okay, 'nuther dumb question. How do I hook the different arrows in an > NSStepper to actions in my view controller? Or how do I ask (id)sender which > arrow was clicked? > Remember that classes tend to inherit from superclasses. Not checkin

Re: NSTextView and -becomeFirstResponder

2012-02-23 Thread Jim McGowan
On 23 Feb 2012, at 08:31, Conrad Shultz wrote: > On 2/19/12 9:29 PM, Jim McGowan wrote: >> Hi, >> >> I have an NSTextView subclass and I need it to inform another object >> of when it becomes first responder - along the lines of overriding >> -becomeFirstResponder something along the lines of th

Re: NSTextView and -becomeFirstResponder

2012-02-23 Thread Jim McGowan
On 23 Feb 2012, at 05:47, Kyle Sluder wrote: > On Sun, Feb 19, 2012 at 9:29 PM, Jim McGowan wrote: >> However, I'm a bit confused by the docs. -becomeFirstResponder is marked as >> being deprecated for NSTextView, but not deprecated in its superclass >> NSResponder. The NSTextView docs for t

text field question

2012-02-23 Thread Rick C.
Hi, I have a panel with a number of text fields where a user should enter numeric values. These text fields are setup with Sent on End Editing so that if the user presses enter or tabs or changes text fields the value will be entered. The problem is sometimes a user just types in a value and

Re: NSStepper - useless?

2012-02-23 Thread Jens Alfke
On Feb 19, 2012, at 4:11 PM, William Squires wrote: > Okay, 'nuther dumb question. How do I hook the different arrows in an > NSStepper to actions in my view controller? Or how do I ask (id)sender which > arrow was clicked? NSStepper is intended to keep track of the value for you, so when the

Re: NSTextView and -becomeFirstResponder

2012-02-23 Thread Conrad Shultz
On 2/19/12 9:29 PM, Jim McGowan wrote: > Hi, > > I have an NSTextView subclass and I need it to inform another object > of when it becomes first responder - along the lines of overriding > -becomeFirstResponder something along the lines of this: Subclassing seems like too much of a sledgehammer.

Re: NSStepper - useless?

2012-02-23 Thread Keary Suska
On Feb 19, 2012, at 5:11 PM, William Squires wrote: > Okay, 'nuther dumb question. How do I hook the different arrows in an > NSStepper to actions in my view controller? Or how do I ask (id)sender which > arrow was clicked? You can't, at least not specifically, on both counts. All the stepper d

Re: How EXC_BAD_ACCESS in objc_msgSend if receiver, parms OK?

2012-02-23 Thread Greg Parker
On Feb 20, 2012, at 10:16 AM, Matt Neuburg wrote: > On Fri, 17 Feb 2012 16:06:01 -0800, Greg Parker said: >> No. objc_msgSend() also reads from the class's method cache and method list. >> It's possible for the receiver object to be valid, but still crash because >> of a memory smasher that hit