Re: unsleep the display programatically?

2009-10-19 Thread Mark Ritchie
On 18-Oct-2009, at 6:36 PM, David LeBer wrote: On 2009-10-18, at 9:30 PM, jon wrote: Hi David, that would not work, because the display does need to sleep, it would be working a long time, and at nightbut needs to let people know that it is done. i have an alarm go off, but

Custom NSURLProtocol crashes when using Garbage Collection

2009-10-19 Thread Keith Duncan
I wrote a simple NSURLProtocol subclass and started observing crashes in URL Loading code. I've extracted the crasher into a simple test project which loads an image from a URL with custom scheme which I handle every hundredth of a second. When compiled with -fobjc-gc it reliably crashes; w

Binding Enabled property to NSArrayController selection

2009-10-19 Thread Matthew Lindfield Seager
As discussed previously on this list I am using the data source methods of NSOutlineView to display the contents of two separate NSArrayControllers. When an item is selected I use outlineViewSelectionDidChange: to manually update the selection of the appropriate array controller and deselect all it

Re: NSInvocationOperations and background Threads

2009-10-19 Thread John Love
Big thank you's to Ken Thomases, Nick Zitzmann and Quincey Morris (can't seem to find Quincey's email?) Found my stupid mistake .. stupid because you guys individually mentioned it time and time again. Namely, my -startBgThread begins in the main Thread. So when I call -startOperation to

Re: Binding Enabled property to NSArrayController selection

2009-10-19 Thread Stamenkovic Florijan
Hi Matthew, On Oct 19, 2009, at 07:08, Matthew Lindfield Seager wrote: As discussed previously on this list I am using the data source methods of NSOutlineView to display the contents of two separate NSArrayControllers. When an item is selected I use outlineViewSelectionDidChange: to manua

Re: Binding Enabled property to NSArrayController selection

2009-10-19 Thread Matthew Lindfield Seager
2009/10/19 Stamenkovic Florijan > > > I think so... When binding the enabled state of a toolbar item you need to > make sure that the item does not autovalidate. The "Autovalidates" checkbox > can be found in the attributes panel of the inspector for a toolbar item. I > am not sure if this is a bu

Re: Binding Enabled property to NSArrayController selection

2009-10-19 Thread Stamenkovic Florijan
On Oct 19, 2009, at 07:59, Matthew Lindfield Seager wrote: 2009/10/19 Stamenkovic Florijan I think so... When binding the enabled state of a toolbar item you need to make sure that the item does not autovalidate. The "Autovalidates" checkbox can be found in the attributes panel of the i

Re: unsleep the display programatically?

2009-10-19 Thread jon
that will work, because that will remind them to change that preference, thanks for doing that. Jon. On Oct 19, 2009, at 1:13 AM, Mark Ritchie wrote: After a short time of no password being entered, the screen will go back to sleep ___ Coc

Re: Curious about SSH --> actually about: Keychain --> (passive aggressive)

2009-10-19 Thread Stuart Malin
On Oct 18, 2009, at 11:13 PM, Brent Smith wrote: thanks for the help all. Theres no need to be passive aggressive What you perceived as "passive aggressive" is... I.S.'s style, which, if you were a regular reader of the list, you'd be familiar with; a style that (I suspect) ameliorates hi

Re: Curious about SSH --> actually about: Keychain --> (passive aggressive)

2009-10-19 Thread I. Savant
On Oct 19, 2009, at 8:32 AM, Stuart Malin wrote: What you perceived as "passive aggressive" is... I.S.'s style, which, if you were a regular reader of the list, you'd be familiar with; a style that (I suspect) ameliorates his frustration and enables him to answer yet-once-again a query that

Recreating iPhone alarm Picker

2009-10-19 Thread Eric E. Dolecki
I have a fairly noob question in regards to recreating an alarm view using a Picker control. On the iPhone, the values for hours & minutes wrap around - and I was wondering if this is accomplished by repeating values in an NSArray (so many that you're not likely to scroll to them), or are they usin

Re: Recreating iPhone alarm Picker

2009-10-19 Thread Luke the Hiesterman
Just use a UIDatePicker on mode UIDatePickerModeTime or UIDatePickerModeDateAndTime and you should be all set. Luke On Oct 19, 2009, at 6:44 AM, Eric E. Dolecki wrote: I have a fairly noob question in regards to recreating an alarm view using a Picker control. On the iPhone, the values for

Re: Recreating iPhone alarm Picker

2009-10-19 Thread Eric E. Dolecki
Well, kick me in the junk - that's awesome and I can't believe I didn't see that. Thanks Luke,Eric On Mon, Oct 19, 2009 at 9:49 AM, Luke the Hiesterman wrote: > Just use a UIDatePicker on mode UIDatePickerModeTime or > UIDatePickerModeDateAndTime and you should be all set. > > Luke > > > On Oct 1

Re: Recreating iPhone alarm Picker

2009-10-19 Thread Roland King
If I wanted to do something like this myself, not a date but some other rotating list of items, I would probably use a UIPickerViewDataSource to tell the UIPicker it has a vast number of rows and I'd start the picker index 1/2 way through that range. Then I'd return a title from pickerView:

Re: Programming Style: Method Definition with or without a semicolon.

2009-10-19 Thread Uli Kusterer
On 18.10.2009, at 04:35, Ken Thomases wrote: On Oct 17, 2009, at 2:24 AM, Uli Kusterer wrote: What do project templates have to do with code completion? The comments don't mention how to customize code completion stubs either. Did I overlook something? For controlling code completion, searc

Neophyte Question: Connecting to nib objects

2009-10-19 Thread Phil Hystad
I am new to Cocoa and I am wondering how to do something that should be simple and obvious. Given that I have an object defined in the nib (aka xib), for example, an object that responds to a given view, what is the correct way for my running application (if it is in some other state, not

Re: Neophyte Question: Connecting to nib objects

2009-10-19 Thread Mark Ritchie
On 19-Oct-2009, at 8:51 AM, Phil Hystad wrote: Given that I have an object defined in the nib (aka xib), for example, an object that responds to a given view, what is the correct way for my running application (if it is in some other state, not responding to an action) to obtain a pointer to

Re: Neophyte Question: Connecting to nib objects

2009-10-19 Thread Kyle Sluder
On Oct 19, 2009, at 8:51 AM, Phil Hystad wrote: I am new to Cocoa and I am wondering how to do something that should be simple and obvious. Given that I have an object defined in the nib (aka xib), for example, an object that responds to a given view, what is the correct way for my runnin

Re: Custom NSURLProtocol crashes when using Garbage Collection

2009-10-19 Thread Greg Parker
On Oct 19, 2009, at 2:16 AM, Keith Duncan wrote: I wrote a simple NSURLProtocol subclass and started observing crashes in URL Loading code. I've extracted the crasher into a simple test project which loads an image from a URL with custom scheme which I handle every hundredth of a second. W

iPhone: UIDatePicker - setting the time?

2009-10-19 Thread Eric E. Dolecki
I am trying to set a UIDatePicker (in Time mode) to a specific hour, minute and am/pm. I assume that I need to create a NSDate object with said hr, min, ampm & then apply it to my picker, but after some googling and checking APIs I am not seeing a direct way of doing this. I have my hr and mins as

Re: iPhone: UIDatePicker - setting the time?

2009-10-19 Thread Luke the Hiesterman
You're looking for the date property on UIDatePicker. Luke On Oct 19, 2009, at 10:01 AM, Eric E. Dolecki wrote: I am trying to set a UIDatePicker (in Time mode) to a specific hour, minute and am/pm. I assume that I need to create a NSDate object with said hr, min, ampm & then apply it to my

Re: Disk burning virtual folder problem

2009-10-19 Thread David Cake
At 2:58 PM +1100 19/10/09, Graham Cox wrote: On 19/10/2009, at 9:58 AM, David Cake wrote: DRFolder *rootFolder = [DRFolder folderWithPath:[self burnDirPath]] ^^^ rootFolder [rootFolder makeVirtual]; and then I try to add some other files to the contents of this directory NSURL *source = @

Re: OSX have that is equivalent to WaitMessage() Win32 API

2009-10-19 Thread Warren Dodge
On Oct 18, 2009, at 9:43 PM, Mars999 wrote: void CEngine::Start() { m_lLastTick = SDL_GetTicks(); m_bQuit = false; // Main loop: loop forever. while ( !m_bQuit ) { // Handle mouse and keyboard input HandleInput(); if ( m_bMinimized ) { // Release some system

Dirty rects getting merged together makes for inefficient drawing

2009-10-19 Thread Ben Haller
Hi all. I expected this to be an FAQ, but my searches have turned up nothing relevant, so here goes. I've got a window with a view hierarchy like this: 1. Superview that does no drawing and is not opaque A. Subview #1: a tableview that is opaque B. Subview #2: a graph vie

Re: Dirty rects getting merged together makes for inefficient drawing

2009-10-19 Thread Dave Keck
Would NSView's -getRectsBeingDrawn:count: help? ___ 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/U

Re: Dirty rects getting merged together makes for inefficient drawing

2009-10-19 Thread Greg Guerin
Ben Haller wrote: 1. Superview that does no drawing and is not opaque A. Subview #1: a tableview that is opaque B. Subview #2: a graph view that is opaque C. Subview #3: another graph view that is opaque Obvious experiment: set the superview to be opaque. -- GG __

Re: Dirty rects getting merged together makes for inefficient drawing

2009-10-19 Thread Ben Haller
On 19-Oct-09, at 5:27 PM, Dave Keck wrote: Would NSView's -getRectsBeingDrawn:count: help? Well, I'm already using it in my own code where appropriate. (Or actually I'm using -needsToDrawRect:). But the problem is that a whole bunch of NSTableView cells are getting drawn that never got

Re: Handle multiple screens & mouse

2009-10-19 Thread Gabriel Höhener
Hello together I solved this problem, it was because I was mixing up coordinates. But with the origin and framesize information you can do it without any problem. NOW I have another problem and I'm sure this is not that difficult for you guys - it's a beginner question. I can do everything

Re: Why does my font come out looking fuzzy?

2009-10-19 Thread Dalmazio Brisinda
Kyle's explanation #1 was spot on for my application. I had an NSSearchField in a custom window and view which was not displaying quite correctly. It looked as if it was not being anti-aliased. Going into Interface Builder, I noticed I had selected the "Wants core animation layer" switch fo

Re: Why does my font come out looking fuzzy?

2009-10-19 Thread Ben Haller
Yes, it sounds like the suggestions I've gotten for modifying the antialiasing behavior would probably be helpful. I have solved the problem by simply snapshotting the LCD digit images and writing a little control that displays a number using those snap images. Seemed simpler, sadly. Wo

Re: Dirty rects getting merged together makes for inefficient drawing

2009-10-19 Thread Andy Lee
On Monday, October 19, 2009, at 05:58PM, "Ben Haller" wrote: >On 19-Oct-09, at 5:27 PM, Dave Keck wrote: > >> Would NSView's -getRectsBeingDrawn:count: help? > > Well, I'm already using it in my own code where appropriate. (Or >actually I'm using -needsToDrawRect:). But the problem is that

Re: Dirty rects getting merged together makes for inefficient drawing

2009-10-19 Thread Ben Haller
On 19-Oct-09, at 5:58 PM, Greg Guerin wrote: Ben Haller wrote: 1. Superview that does no drawing and is not opaque A. Subview #1: a tableview that is opaque B. Subview #2: a graph view that is opaque C. Subview #3: another graph view that is opaque Obvious experimen

Re: Dirty rects getting merged together makes for inefficient drawing

2009-10-19 Thread Graham Cox
On 20/10/2009, at 8:58 AM, Ben Haller wrote: I think the problem is deeper (based upon what flashes under Quartz Debug): I think the dirty rects are actually getting consolidated such that NSTableView no longer has the information it needs to do minimal drawing. I could be mistaken about

Problem executing lpadmin from NSTask

2009-10-19 Thread Laurent Daudelin
Hello. I'm trying to launch an NSTask to execute /usr/sbin/lpadmin but even though I can do so in the terminal, NSTask refuses to launch it. If I set the launch path to /usr/sbin/lpadmin, NSTask reports that /usr/sbin/lpadmin is a directory? If I set the current directory to /usr/sbin and the l

[Solved] Problem executing lpadmin from NSTask

2009-10-19 Thread Laurent Daudelin
Nevermind. I just realized I had a path set incorrectly for one of the argument to the NSTask. Was misled in thinking it was the launch path but it was that argument path that was wrong. Sorry for wasting bandwidth. -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin

Re: Dirty rects getting merged together makes for inefficient drawing

2009-10-19 Thread Ben Haller
On 19-Oct-09, at 6:53 PM, Andy Lee wrote: On Monday, October 19, 2009, at 05:58PM, "Ben Haller" > wrote: I think the problem is deeper (based upon what flashes under Quartz Debug): I think the dirty rects are actually getting consolidated such that NSTableView no longer has the information i

Re: Problem executing lpadmin from NSTask

2009-10-19 Thread Dave Keck
Strange; does this occur in a brand new new project, where the only thing you do is this: [NSTask launchedTaskWithLaunchPath: @"/usr/sbin/lpadmin" arguments: [NSArray array]]; And how about this: system("/usr/sbin/lpadmin"); ___ Cocoa-dev mailing

Re: Dirty rects getting merged together makes for inefficient drawing

2009-10-19 Thread Andy Lee
Come to think of it, another experiment would have been to add logging to the cells used for the other table columns, to see if their drawing code was actually being called.q Sorry if I missed this, but is the string-drawing overhead noticeable to the user? If so, and it's because you're r

NSTableView weird behavior

2009-10-19 Thread Symadept
Hi, I am implementing the functionality of the NSTableview in such a way that once a cell is selected the background image shall be shown as some image, HighlightedCell.png otherwise DefaultCell.png. If both the images are solid(Opaque) coloured then there is no issue. If the DefaultCell.png happen

Re: Dirty rects getting merged together makes for inefficient drawing

2009-10-19 Thread Ben Haller
On 19-Oct-09, at 10:40 PM, Andy Lee wrote: Come to think of it, another experiment would have been to add logging to the cells used for the other table columns, to see if their drawing code was actually being called. Yeah, I did that. See my previous post. The upshot is that the table

Re: Dirty rects getting merged together makes for inefficient drawing

2009-10-19 Thread Andy Lee
On Oct 19, 2009, at 11:00 PM, Ben Haller wrote: Well, I'm curious about the coalesced update thing. The only ref I find through Google is here: http://developer.apple.com/mac/library/documentation/Performance/Conceptual/Drawing/Articles/CocoaDrawingTips.html and I don't think that's what yo

Re: Getting a view's size?

2009-10-19 Thread Andrew Farmer
On 18 Oct 2009, at 22:45, patrick wrote: Thank you! That was exactly the problem. :) While we're at it, don't forget about NSStringFromRect(). No need to write format strings yourself when Apple's done it for you -- and written a parser to go with (NSRectFromString). __

Re: CPU utilization in Snow Leopard

2009-10-19 Thread Shashanka L
Hello Joar Wingfors, I am performing some operation by detaching the thread and waiting for some process to complete. I am using runloop for waiting purpose. NSDate instance taking lots of Memory when thread is alive (ie till mShouldThreadAlive set to YES). This can be seen only in snow l

GC Basic questions

2009-10-19 Thread Nick Rogers
Hi, Since the methods -release, -retain and -autorelease are no-ops with GC only enabled, How do I release everything associated with an ivar (pointer to a class) in AppController? Currently I'm doing it by setting this pointer as nil. Is it ok? Also when I follow certain steps, this pointer

Re: CPU utilization in Snow Leopard

2009-10-19 Thread Graham Cox
On 20/10/2009, at 5:28 PM, Shashanka L wrote: Autoreleased object from [NSDate dateWithTimeIntervalSinceNow: 0.1] is not getting released and taking lots of memory. Does any one came across this issue in snow leopard?? Or any solution? Since there's no autorelease pool inside your do

Re: CPU utilization in Snow Leopard

2009-10-19 Thread Graham Cox
On 20/10/2009, at 5:28 PM, Shashanka L wrote: -(void)newThread { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc]init]; //Some operations... do //Keeps thread alive till date { [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate d

Re: GC Basic questions

2009-10-19 Thread Quincey Morris
On Oct 19, 2009, at 23:35, Nick Rogers wrote: Since the methods -release, -retain and -autorelease are no-ops with GC only enabled, How do I release everything associated with an ivar (pointer to a class) in AppController? Currently I'm doing it by setting this pointer as nil. Is it ok? Als