Re: Swift program termination...

2015-05-26 Thread Randy Widell
) if (dispatch_semaphore_wait(done, wait) == 0) { break } } while(true) > On May 24, 2015, at 09:58, Randy Widell wrote: > > Ah, interesting. I'll give that a shot, thanks. > >> On May 24, 2015, at 08:58, Stephen J. Butler >&

Re: Swift program termination...

2015-05-24 Thread Randy Widell
, and then resume it. > >> On Sun, May 24, 2015 at 10:40 AM, Randy Widell >> wrote: >> I’m messing around with Swift to create a network server daemon. Maybe I am >> thinking too much like a C / C++ programmer, but I am trying to figure out >> how to gracefully exit

Swift program termination...

2015-05-24 Thread Randy Widell
I’m messing around with Swift to create a network server daemon. Maybe I am thinking too much like a C / C++ programmer, but I am trying to figure out how to gracefully exit when launchd unloads the daemon. Normally, you would just trap SIGTERM, but I’m just not finding anything online about h

Re: Toolbar icons, yosemite

2014-10-18 Thread Randy Widell
> > I second this site. It’s really useful for finding icons. Just be warned that > some of them don’t look like Apple icons and may feel out of place, even with > the new flat design style. > Agreed. They work well for the application I am working on, but, yeah, that might not be the case f

Re: Toolbar icons, yosemite

2014-10-18 Thread Randy Widell
not display in the menu during run time. > On Oct 18, 2014, at 17:31, Randy Widell wrote: > > 1) This is pretty easy. Just create a Pop Up Button, then switch its style > to “Pull Down”. This will give you a push button with the single down arrow > on the right. Then just

Re: Toolbar icons, yosemite

2014-10-18 Thread Randy Widell
1) This is pretty easy. Just create a Pop Up Button, then switch its style to “Pull Down”. This will give you a push button with the single down arrow on the right. Then just edit the Pop Up Button’s menu. You can give it an icon, and then size it down horizontally so that only the icon is v

Re: Clear NSSearchField

2014-10-18 Thread Randy Widell
the search field. > On Oct 18, 2014, at 15:19, Kyle Sluder wrote: > > On Sat, Oct 18, 2014, at 04:51 PM, Randy Widell wrote: >> That works somewhat, but not really. Half the time the search field >> remains the first responder as if the call to set the outline view as t

Re: Clear NSSearchField

2014-10-18 Thread Randy Widell
Yeah, I tried that initially. An invalid parameter exception comes flying out of NSCell’s setStringValue. > On Oct 18, 2014, at 14:59, Gerd Knops wrote: > > Did you try to set it ti nil instead of an empty string? > > Gerd > >> On Oct 18, 2014, at 4:51 PM, Randy

Clear NSSearchField

2014-10-18 Thread Randy Widell
It looks like a couple of people have asked about this in the past, but none of the answers are working for me. I am trying to clear the contents of a NSSearchField and have it go back to its empty state. I don’t have a pre-Yosemite Mac handy to check if this is a bug / new behavior in Yosemit

Re: Self KVO...

2014-10-09 Thread Randy Widell
> On Oct 9, 2014, at 21:13, Ken Thomases wrote: > > On Oct 9, 2014, at 10:56 PM, Randy Widell wrote: > >> I’m not sure I am having a hard time figuring this out and I am just not >> finding anything via Google. I am writing a NSTextFieldCell subclass and I >>

Self KVO...

2014-10-09 Thread Randy Widell
I’m not sure I am having a hard time figuring this out and I am just not finding anything via Google. I am writing a NSTextFieldCell subclass and I want to recalculate the size whenever the string value changes via a binding. What I can’t seem to figure out is how to observe the change. I cou

Re: Question about docs / window controllers...

2012-11-28 Thread Randy Widell
Yep. Cool, thanks. On Nov 28, 2012, at 10:23 AM, Kyle Sluder wrote: > On Wed, Nov 28, 2012, at 10:09 AM, Randy Widell wrote: >> Ah, ok. So, just make the sheet another window in the same XIB and use >> the same window controller. Makes sense. > > Or in a different n

Question about docs / window controllers...

2012-11-28 Thread Randy Widell
What are the best practices concerning connecting documents and window controllers? I understand that when I pop up a window related to a document, I need to add the window controller to the document with addWindowController:. One thing I am not clear on is how to handle a modal sheet in within

Re: NSArrayController KVO question...

2012-11-23 Thread Randy Widell
n "action" menu, it may be better to use the title property of the menu to switch the title between "Archive" and "Unarchive" rather than display a check mark next to "Archive". Anyway, thanks again for your help. On Nov 22, 2012, at 12:16 PM, jonat...@m

Re: NSArrayController KVO question...

2012-11-22 Thread Randy Widell
.com wrote: > On 22 Nov 2012, at 18:57, Randy Widell wrote: > >> Right, and in other places it works for me. For instance, I have a window >> with text fields bound to a model object through an object controller. >> Updating properties of the model updates the text fiel

Re: NSArrayController KVO question...

2012-11-22 Thread Randy Widell
then iterating over selectedObjects and changing the property on each. On Nov 22, 2012, at 1:36, "jonat...@mugginsoft.com" wrote: > On 21 Nov 2012, at 22:19, Randy Widell wrote: > >> Hmm. Well, I am updating the model (and the database that backs it). I >&g

Re: NSArrayController KVO question...

2012-11-21 Thread Randy Widell
tedObjects. Not sure I want to re-query the database to update the full contents of the array controller either...unless it's necessary. On Nov 21, 2012, at 13:46, "jonat...@mugginsoft.com" wrote: > > On 21 Nov 2012, at 20:42, Randy Widell wrote: > >> Searc

NSArrayController KVO question...

2012-11-21 Thread Randy Widell
Searching around the Internet, I see a lot of questions and answers about how to observe changes to properties of objects in a NSArrayController. Everything I have seen, though, relates to a third object doing the observing. For instance: [arrayController addObserver: viewObject forKeyPath:

Re: IBOutlet & NSNumber

2012-11-21 Thread Randy Widell
m the user's selection. Thanks for the help. On Oct 13, 2012, at 10:38 PM, Ken Thomases wrote: > On Oct 13, 2012, at 11:17 PM, Randy Widell wrote: > >> Wow. Woah. OK, sorry my ignorance offends. > > I didn't express offense. At least, I didn't intend to. >

Re: IBOutlet & NSNumber

2012-10-13 Thread Randy Widell
2, at 8:52 PM, Ken Thomases wrote: > On Oct 13, 2012, at 9:49 PM, Randy Widell wrote: > >> Quick question… For some reason I cannot find an answer. >> >> I have a NSWindowController subclass and I want to bind the selection index >> of a NSComboBox

IBOutlet & NSNumber

2012-10-13 Thread Randy Widell
Quick question… For some reason I cannot find an answer. I have a NSWindowController subclass and I want to bind the selection index of a NSComboBox to a NSNumber that is an IBOutlet of the NSWindowController subclass. I have a NSNumber object in the window's XIB and the object is linked to t

Re: File types...

2012-03-27 Thread Randy Widell
that again. So, all is right with the world, I guess. On Mar 27, 2012, at 9:13 AM, Randy Widell wrote: > Yup, that was it. public.data has to be the first item in the array. I > tried: > > * public.database (item 0) only: fail. > * public.database (item 0), public.data (i

Re: File types...

2012-03-27 Thread Randy Widell
) only: success. Thanks so much. That was driving me crazy. Randy Widell On Mar 27, 2012, at 7:50 AM, Kyle Sluder wrote: > On Mar 26, 2012, at 11:14 PM, Randy Widell wrote: > >> It is a custom UTI, so, of course, I export it: >> >> UT

File types...

2012-03-26 Thread Randy Widell
OK, this is killing me…primarily because I have had this working in other applications and cannot find the difference between this current application and others where it works. I have an application that opens one file type, and I have the following document type declaration (anonymized):

Re: Key equivalents for non-menu items

2011-02-15 Thread Randy Widell
On 2/15/11 8:20 PM, mlist0...@gmail.com wrote: On Feb 15, 2011, at 7:36 PM, Randy Widell wrote: I would like to have a keyboard shortcut that tags a location on the waveforms at the location of the mouse cursor. These commands do not make any sense in the main menu...they could go there

Re: Key equivalents for non-menu items

2011-02-15 Thread Randy Widell
On 2/15/11 7:49 PM, Graham Cox wrote: On 16/02/2011, at 2:36 PM, Randy Widell wrote: I have a view displaying waveforms. I would like to have a keyboard shortcut that tags a location on the waveforms at the location of the mouse cursor. These commands do not make any sense in the main menu

Re: Key equivalents for non-menu items

2011-02-15 Thread Randy Widell
On 2/15/11 6:11 PM, Kyle Sluder wrote: On Tue, Feb 15, 2011 at 5:40 PM, Randy Widell wrote: I am trying to wrap my mind around something and the Apple docs are just not helping. I am not sure if I am looking in the wrong places or what, but I am just not getting it. Binding a menu item to

Key equivalents for non-menu items

2011-02-15 Thread Randy Widell
I am trying to wrap my mind around something and the Apple docs are just not helping. I am not sure if I am looking in the wrong places or what, but I am just not getting it. Binding a menu item to First Responder and setting a key equivalent for the menu item is trivial. However, what if I

IB Scroll View position problem

2008-12-10 Thread Randy Bradley
I have two scroll views in my application, each with a table view, in addition to a bunch of other items. Everything is locked to the upper left corner of the window view. When the window is resized, I would like the scroll views to expand and shrink along with the window. The smaller scrol

Re: Special Characters Edit Menu Item

2008-12-03 Thread Randy Bradley
David, I think there must be a way since this menu item doesn¹t show up in my Entourage compose mail window.To be honest, I never noticed this before. It seems to me that there are many cases where special characters are not appropriate. If it really bothered me I guess I would try to del

using copy in nested NSMutableArrays gives immutable objects?

2008-11-15 Thread Randy
ray *) [[walkerArray objectAtIndex:lastNodeInCurrent] copy]; NSMutableArray *fixError = [[NSMutableArray alloc] init]; int k; for (k = 0; k < [copyOfCurrent count]; k++) { fixError[k] = copyOfCurrent[k]; } But that seems hokey and I would like to understand the cause of the original

NSDistributedNotificationCenter in a prefpane?

2008-10-14 Thread randy chapel
Hi, has anyone been able to get a NSDistributedNotificationCenter (send/rec) to work within a prefpane? Randy ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list

NSDistributedNotificationCenter

2008-10-14 Thread randy chapel
nterest, I need to communicate back and forth. Nothing is working either sending from the pref pane or receiving to it (at least in what I have tried). (see http://developer.apple.com/documentation/UserExperience/Conceptual/PreferencePanes/PreferencePanes.pdf) Has anyone else had luck with su

Re: Next Key View doesn't "go to" pushbutton

2008-10-07 Thread Randy Bradley
You could override the controlTextDidEndEditing method: - (void)controlTextDidEndEditing:(NSNotification *)aNotification{ ... if([[[aNotification userInfo] valueForKey:@"NSTextMovement"] intValue] == NSReturnTextMovement) { // invoke whatever button pressed code.

RE: synthesised variables on 64-bit

2008-10-06 Thread Randy Widell
> Are you running the app in the debugger? If you're building a 4-way > universal binary, then the debugger will always launch the 32-bit > version of the executable, even if you're using a 64-bit Mac. > > If you want to build the app for 64-bit only, then you have to > manually set the architectu

Re: Trying to compile an ObjectiveC and C++ program in XCode 3.1

2008-09-11 Thread Randy Bradley
> The ³.mm² extension is required for source that contains both C++ and Objective-C, thus called Objective-C++. Not required for pure C++ source. A couple ideas: 1. Be sure to add the C++ source files to your target. (ie, look for the checkmark in the target column) 2. Any objective-c source t

User input while reading document

2008-09-07 Thread Randy Widell
I am writing an application that supports a couple of different document types. One of the document types is a subset of another, so I am using the same document class for both. When opening the subset type, however, I need the user to specify a few things about how to import the data. As for th

Interface Builder changing size of controls...

2008-09-07 Thread Randy Widell
I cannot seem to find any documentation on this behavior and I really do not understand what Interface Builder is doing and why. Sometimes, when I add a control to a window, it automatically sets the control size to "mini." For instance, I added a multiline label to a new window to advise the use

Re: Oracle and Objective C++

2008-09-05 Thread Bradley Randy
> But I get the following errors when I try to compile it. > > Line Location occiAQ.h:280: error: > 'oracle::occi::aq::Subscription::Protocol' has a previous declaration here > Line Location occiAQ.h:280: error: > 'oracle::occi::aq::Subscription::Protocol' has a previous declaration here > Li

Oracle and Objective C++

2008-09-03 Thread Randy Bradley
I'm having difficulty importing data from an Oracle database into a Cocoa application. I've installed the Oracle client and OCCI examples. The example occidml.cpp seemed to make and run just fine from the command line. Now, I would like to get some data from Oracle into my Cocoa appli

How to get the file path to my application

2008-07-30 Thread Randy Canegaly
If I have a Cocoa application named Fred, how do programmatically (in Fred's code) get the path to the directory where Fred.app is stored? Thanks ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Compiler error when trying to catch a NSRangeException

2008-07-27 Thread Randy
to catch that exception type Any help or suggestions would be appreciated Thanks Randy Canegaly ___ 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

Adding Unit Tests to iPhone applications for use with the iPhone Simulator

2008-07-15 Thread Randy
eedless to say) the test code does not get injected into the app and the test case methods don't run. Has anybody tried this? Can you point me to some updated instructions? Thanks; Randy Canegaly ___ Cocoa-dev mailing list (Cocoa-dev@lists.app

archive only what changed?

2008-07-07 Thread Randy Canegaly
I have an application whose data model is an NSMutableArray with elements that could be pointers other NSMutableArrays, much like what you would navigate with a NSIndexPath. I am using NSKeyedArchiver to archive the data model to a file. Right now I archive the entire top level array obje