Re: Updating an app's help

2011-12-13 Thread Gleb Dolgich
Ah, missed the whole "user" part. If you use a Snow Leo+ help bundle and increment its version for each update, perhaps Help Viewer is smart enough to recognise the update? On 14 Dec 2011, at 02:51, Graham Cox wrote: > Thanks, but that's even worse to ask the user to do on every update. > > I'

Re: Updating an app's help

2011-12-13 Thread Graham Cox
Thanks, but that's even worse to ask the user to do on every update. I'm looking either for a) some way of indicating to the help system that it needs to update the cached copy of our help or b) a way to force it to do so using some API. I'm following up a hint I received offline - looks like o

Re: Updating an app's help

2011-12-13 Thread Gleb Dolgich
This works for me: killall helpd rm -rf ~/Library/Caches/com.apple.help* -- Gleb Dolgich PixelEspresso http://www.pixelespressoapps.com On 13 Dec 2011, at 22:17, Graham Cox wrote: > With each update of our app, we typically change the help book. We're finding > that the system is very poor at

Updating an app's help

2011-12-13 Thread Graham Cox
With each update of our app, we typically change the help book. We're finding that the system is very poor at recognising this and caches old versions of the help which causes new stuff we add to be unavailable. While I can manually trash the help caches and force an update, this isn't something

Re: How select NSTextField programatically?

2011-12-13 Thread Aki Inoue
The validation functionality is provided by NSFormatter. Aki On 2011/12/13, at 8:10, McLaughlin, Michael P. wrote: > I have a Cocoa "dialog" with several textfields for numerical input. When > the user enters a bad value, I want to select that view programatically along > with an NSBeep() so

Re: bindings duplicates object returned

2011-12-13 Thread Eric Slosser
On Dec 13, 2011, at 1:47 PM, Kyle Sluder wrote: > Don't be tempted to add singleton smarts to -[Foo init]. ARC will not > like them. Instead, add a property to File's Owner that just returns > the shared Foo instance. Really? Do you have a reference for that claim? I looked through http://clang

Re: bindings duplicates object returned

2011-12-13 Thread Kyle Sluder
On Tue, Dec 13, 2011 at 10:04 AM, Eric Slosser wrote: > I found the solution, and it's all my fault. > > The object 'foo' was meant to be a singleton instance of class 'Foo'.  I > always access it through [foo instance], which enforces that.  After 'foo' is > created, the nib is loaded in which

Re: bindings duplicates object returned

2011-12-13 Thread Eric Slosser
I found the solution, and it's all my fault. The object 'foo' was meant to be a singleton instance of class 'Foo'. I always access it through [foo instance], which enforces that. After 'foo' is created, the nib is loaded in which the binding was expressed. In the process (see stack below**),

Re: Filling gradient in NSTableHeaderView not working properly

2011-12-13 Thread Nick Zitzmann
On Dec 13, 2011, at 8:09 AM, Devarshi Kulshreshtha wrote: > So earlier it was appearing like this- > > http://db.tt/PVE9rnXu > > > Now it is appearing like this- > > http://db.tt/D1zrJJJa

Re: bindings duplicates object returned

2011-12-13 Thread Eric Slosser
Thanks for the pointers, Quincy. However, I implemented the following accessors, checked I wasn't directly touching m_contents except in my init, and the problem persists. - (void) setContents:(id)newValue - (NSUInteger)countOfContents - (id)objectInContentsAtIndex:(NSUInteger)idx

Re: How select NSTextField programatically?

2011-12-13 Thread Peter
Am 13.12.2011 um 17:15 schrieb Kyle Sluder: > On Tue, Dec 13, 2011 at 8:10 AM, McLaughlin, Michael P. > wrote: >> I have a Cocoa "dialog" with several textfields for numerical input. When >> the user enters a bad value, I want to select that view programatically >> along with an NSBeep() so

Re: How select NSTextField programatically?

2011-12-13 Thread Kyle Sluder
On Tue, Dec 13, 2011 at 8:10 AM, McLaughlin, Michael P. wrote: > I have a Cocoa "dialog" with several textfields for numerical input.  When > the user enters a bad value, I want to select that view programatically along > with an NSBeep() so that the user can fix it. > > What is the best way to

How select NSTextField programatically?

2011-12-13 Thread McLaughlin, Michael P.
I have a Cocoa "dialog" with several textfields for numerical input. When the user enters a bad value, I want to select that view programatically along with an NSBeep() so that the user can fix it. What is the best way to select that subview given that I know its tag? Thanks. -- Michael P. Mc

Re: "byte orders" question

2011-12-13 Thread Clark S. Cox III
On Nov 26, 2011, at 4:23 PM, Kyle Sluder wrote: > On Sat, Nov 26, 2011 at 4:17 PM, Greg Guerin wrote: >> Since you're just doing a memcpy(), you can simply cast the bits and avoid >> the copying. Try this: >> >> float f = *((float*) &res); >> >> Or try defining a C union: >> >> union foo {

Filling gradient in NSTableHeaderView not working properly

2011-12-13 Thread Devarshi Kulshreshtha
Hi all, I am trying to fill gradient in header of tableview. So far I am able to achieve it by subclassing NSTableHeaderView and using this code in it- - (void)drawRect:(NSRect)dirtyRect { // Drawing code here. NSGradient *gradientToFill = [[NSGradient alloc] initWithStartingColo

Re: why does this method return an id?

2011-12-13 Thread Charles Srstka
On Dec 13, 2011, at 12:39 AM, Matt Neuburg wrote: > On Sun, 11 Dec 2011 12:34:57 -0600, Charles Srstka > said: >> On Dec 11, 2011, at 10:58 AM, Matt Neuburg wrote: >> >>> There seems to be a small hole in my understanding of Objective-C. I sort >>> of understand why alloc-init returns an id, b

Re: why does this method return an id?

2011-12-13 Thread Joar Wingfors
On 12 dec 2011, at 22:39, Matt Neuburg wrote: > Also, if that's the right answer (i.e. if it's all about subclassing), then I > don't get why *every* convenience constructor isn't typed as an id. The general rule across Cocoa is that initializers and factory methods return id typed objects (i

Re: why does this method return an id?

2011-12-13 Thread Quincey Morris
On Dec 12, 2011, at 22:39 , Matt Neuburg wrote: > But if you subclassed NSSortDescriptor and didn't override > sortDescriptorWithKey:ascending: and expected [MyFancyEtc. > sortDescriptorEtc.] to magically produce a MyFancyEtc. instead of an > NSSortDescriptor, you'd *deserve* that warning. In f