Re: Line Drawing problem

2011-07-04 Thread Dale Satterfield
Well, hopefully that code is correct since it is the unmodified code from the book. I have a Davis Weatherstation and the console talks to the Mac via USB. Davis has had very sporadic Mac support, and their application which used to run under Mac OSX, but badly, won't run at all under current ve

Re: Line Drawing problem

2011-07-04 Thread Fritz Anderson
On 4 Jul 2011, at 7:17 AM, Dale Satterfield wrote: > Well, hopefully that code is correct since it is the unmodified code from the > book. The code you are looking to is intended as an example of how to prepare a Mac OS X framework, not as a graphics tutorial. The source had to fit into a reas

Re: How Do I get informed when -showHelp: has been called?

2011-07-04 Thread Ulf Dunkel
Thank you all for pointing me to the solution of my question. My first thought was that you could change the target of the menu item so that it calls your own method, then call the original showHelp method with something like: [NSApp showHelp:sender] This is what I did now, using an own -my

Why is a button in a window not redrawn when I change its state?

2011-07-04 Thread Ulf Dunkel
In my app's main window, I have a button which should kill a process from the running system processes. (Guess what - it is helpd.) In -awakeFromNib:, a private app delegate method -checkHelpd: checks if some other app has already launched helpd. If so, the button will be drawn as enabled, els

Re: Why is a button in a window not redrawn when I change its state?

2011-07-04 Thread Alexander Spohr
Your Button has to draw itself after it called its action. You try to change state while you are still in the action. Did you try to performSelector after 0.0? Am 04.07.2011 um 17:07 schrieb Ulf Dunkel: > In my app's main window, I have a button which should kill a process from the > running

Re: Bundled Image scaled down when displayed (drawAtPoint) - Thank you

2011-07-04 Thread Benjamin Dubois
Jens, Quincey, Thank you for all the valuable info. My image dpi is indeed higher than 72. Combining your info, I elected to use, for now: NSImage* tempImage = [NSImage imageNamed: @"image1"]; NSImageRep *rep = [tempImage bestRepresentationForDevice: nil]; int width = (int)rep.pixelsWide;

Runloop not being stopped by CFRunLoopStop?

2011-07-04 Thread Matt Gough
I have a runloop running in an NSThread. In this thread is a timer which fires every 2 seconds. In the timer, I check [NSThread isCancelled] and if so, stop the runloop via CFRunLoopStop. The runloop is run via runUntilDate:distantFuture. Shouldn't runUntilDate terminate once CFRunLoopStop has

Re: Runloop not being stopped by CFRunLoopStop?

2011-07-04 Thread Jeff Johnson
Hi Matt. Is there a reason that you're using -[NSRunLoop runUntilDate:] instead of CFRunLoopRun()? According to the documentation, runUntilDate: "runs the receiver in the NSDefaultRunLoopMode by repeatedly invoking runMode:beforeDate: until the specified expiration date." So even if CFRunLoopS

Re: Runloop not being stopped by CFRunLoopStop?

2011-07-04 Thread jonat...@mugginsoft.com
On 4 Jul 2011, at 17:36, Matt Gough wrote: > I have a runloop running in an NSThread. In this thread is a timer which > fires every 2 seconds. In the timer, I check [NSThread isCancelled] and if > so, stop the runloop via CFRunLoopStop. > > The runloop is run via runUntilDate:distantFu

Re: Runloop not being stopped by CFRunLoopStop?

2011-07-04 Thread Matt Gough
> Is there a reason that you're using -[NSRunLoop runUntilDate:] instead of > CFRunLoopRun()? Not really, and it was a bit daft to use NSRunLoop to start it off and then CFRunLoop to stop it. Anyway, your solution worked perfectly. Thanks Matt On 4 Jul 2011, at 17:58:31, Jeff Johnson wrote:

Problem when load nib file

2011-07-04 Thread Fernando Aureliano
Hi, I'm working with AQGridView, and when I load the nib file, he also load an square white ahead of elements. In this project, I also implemented - (CGSize) portraitGridCellSizeForGridView: (AQGridView *) gridView; { return CGSizeMake(250, 400); } And when I change this values, the size o

Re: Why is a button in a window not redrawn when I change its state?

2011-07-04 Thread Ulf Dunkel
Thank you for this hint, Alexander. I wasn't aware that I was still inside the action and that the poor button couldn't do then what I asked it to do. I was quite sure that using -setNeedsDisplay:YES would trigger some auto-redraw stuff somewhen later in the application. - - - - - Am 04.07.

Animating a flickering display

2011-07-04 Thread Dr. Scott Steinman
My program needs to display counterphase flickering test, i.e., one display is white text on a black background, and the other is black text on a white background, and the two displays are switched back and forth. I have concluded that there are two options to do this: 1. Draw each display into

Re: Why is a button in a window not redrawn when I change its state?

2011-07-04 Thread Jens Alfke
On Jul 4, 2011, at 8:07 AM, Ulf Dunkel wrote: > This is the method in my AppDelegate.m which should update the button: > > - (void)updateKillHelpdButton > { > [killHelpdButton setEnabled:[self checkHelpd]]; > [killHelpdButton setNeedsDisplay:YES]; > } > > Can someone please tell me what els

Re: Why is a button in a window not redrawn when I change its state?

2011-07-04 Thread Jens Alfke
On Jul 4, 2011, at 10:48 AM, Ulf Dunkel wrote: > Thank you for this hint, Alexander. I wasn't aware that I was still inside > the action and that the poor button couldn't do then what I asked it to do. It’s OK to call -setEnabled: during a button action method. I’ve done it a lot. —Jens___

Re: Animating a flickering display

2011-07-04 Thread Jens Alfke
On Jul 4, 2011, at 11:31 AM, Dr. Scott Steinman wrote: > I have concluded that there are two options to do this: > > 1. Draw each display into two NSViews, then switch back and forth between > between them (via replaceSubview:with:) with an NSTimer to time the switches. > 2. Use Core Animation

finder eject images

2011-07-04 Thread Tony Romano
Not quite a cocoa questionŠ By chance, does somewhere know where the images are for the eject button in finder. I looked in /system/library/coreservices/finder and they are not bundled with it. I'd prefer the Mac OS X versions and not some 3rd party. Thanks in advance. Tony Romano _

Re: finder eject images

2011-07-04 Thread Lee Ann Rucker
Unicode "eject symbol" 23CF, possibly in Apple Symbols font: ⏏ - Original Message - From: "Tony Romano" To: "List Cocoa Developer" Sent: Monday, July 4, 2011 12:16:02 PM Subject: finder eject images Not quite a cocoa questionŠ By chance, does somewhere know where the images are for the

Re: finder eject images

2011-07-04 Thread Patrick Robertson
Lots of system icons are stored in /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/ EjectMediaIcon.icns is in there :) On 4 July 2011 20:21, Lee Ann Rucker wrote: > Unicode "eject symbol" 23CF, possibly in Apple Symbols font: ⏏ > > - Original Message - > From: "Tony Ro

Re: Animating a flickering display

2011-07-04 Thread Kyle Sluder
On Mon, Jul 4, 2011 at 11:31 AM, Dr. Scott Steinman wrote: > My program needs to display counterphase flickering test, i.e., one display > is white text on a black background, and the other is black text on a white > background, and the two displays are switched back and forth. I have > conclud

Re: finder eject images

2011-07-04 Thread Lee Ann Rucker
That's not the Finder sidebar icon, though. I'm not sure I've seen anything use that one. Also I think Apple frowns on copying their icons into your apps. Only the ones you can get through imageNamed: or iconForFileType: are fair game. - Original Message - From: "Patrick Robertson" To:

Re: Animating a flickering display

2011-07-04 Thread Dr. Scott Steinman
The purpose of the program is to compare the visibility of the text when it is static versus when it flickers (so in some ways it's similar to signage). Therefore, I must make the text display switch back and forth between two displays with opposite black/white contrast to produce the flicker -

Re: finder eject images

2011-07-04 Thread Tony Romano
Lee Ann and Patrick, thank you! I suspect the one from ../coreservices/menu extras/Eject.menu uses the character set one as well. They converted to a pdf for displaying as an image. Again, thank you. Tony Romano On 7/4/11 12:52 PM, "Lee Ann Rucker" wrote: >That's not the Finder sidebar icon,

Dumb question about multi-column NSTableViews

2011-07-04 Thread William Squires
Do individual table columns have a 'Tag' value that can be set so I can find out which column the tableview delegate/datasource is working with? (I want to set the tag value to an NSString that's the key value in an NSDictionary, then fetch the value for that key-value pair to set the contents o

Re: Dumb question about multi-column NSTableViews

2011-07-04 Thread Scott Ribe
On Jul 4, 2011, at 5:29 PM, William Squires wrote: > Do individual table columns have a 'Tag' value that can be set so I can find > out which column the tableview delegate/datasource is working with? (I want > to set the tag value to an NSString that's the key value in an NSDictionary, > then f

Literal NSStrings

2011-07-04 Thread William Squires
Okay, sorry about this since I think I asked about it previously, but I forgot... If a method (or even a C-style function) returns (NSString *), and I have a method/function like: -(NSString *)bool2String:(BOOL)b { if (!b) { return @"NO"; } return @"YES"; } is there ever a situation in w

Re: Literal NSStrings

2011-07-04 Thread Scott Ribe
On Jul 4, 2011, at 6:23 PM, William Squires wrote: > ...is a literal NSString autoreleased, or retained? Does it matter? "Does not matter" is the answer. You can retain & release them all you want, they're not going anywhere. -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.co

Re: Literal NSStrings

2011-07-04 Thread Jens Alfke
On Jul 4, 2011, at 5:23 PM, William Squires wrote: > is there ever a situation in which (properly written) client code could call > this and trip over the memory management rules? No, it’s fine. The rule is that if you got it from +alloc or -copy you have to release or autorelease it; but if

selected image in webview

2011-07-04 Thread Amy Heavey
Hi, Is there a way to get the selected item in a webview? I've got a webview in my app, and I'd like to select an image and download it. Many Thanks Amy ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or