Re: NSArrayController - compound values vs Select Inserted Objects

2009-08-17 Thread Jonathan del Strother
On Thu, Aug 13, 2009 at 12:11 PM, Jonathan del Strother wrote: > Heya, > I'm struggling a bit with an NSArrayController with content bound to > NSUserDefaultsController. > > The NSArrayController manages dictionaries, and so it appears that I > need to select 'Handles Content as Compound Value'.  W

Re: Printing Multiple-Pages Issue

2009-08-17 Thread Alastair Houghton
On 17 Aug 2009, at 06:39, Renzil D'Souza wrote: So if I print a really large view, it will print on multiple pages - is this what is meant by 'Collated' ? No. Collated means that if you print several copies of a given document, the pages will come out like this: 1, 2, 3, 4, 5, ..., 1,

Re: iPhone: detect if docked?

2009-08-17 Thread Eric E. Dolecki
I want to disable the sleep timer, so any charging I'll do that, if not I will restore the sleep timer Thanks, E. On Aug 17, 2009, at 12:33 AM, David Duncan wrote: More than likely yes. But I'm not certain you can use the EA framework to detect such a situation anyway (if someone knows

looking for System APIs for load monitoring

2009-08-17 Thread Marc Lohse
I am developing an application that needs to monitor the system's CPU and IO load while it's running to be able to identify a low system load and only do it's resource-hungry work while the system is not busy doing other things. I've been searching for the low-level system API that would give me ac

Re: looking for System APIs for load monitoring

2009-08-17 Thread Dave Keck
> P.S.: My apologies if this question is not exactly Cocoa-related... You're probably better off taking this to darwin-dev. There was also a discussion related to this a few weeks ago on darwin-kernel: http://lists.apple.com/archives/darwin-kernel/2009/Jul/msg00080.html __

Re: looking for System APIs for load monitoring

2009-08-17 Thread Mike Abdullah
If you can design to its paradigm, NSOperationQueue is almost exactly what you want. By default it will dynamically adjust the number of running operations to match the system load. Also, read up on Grand Central Dispatch which is coming in Snow Leopard. Mike. On 17 Aug 2009, at 12:13, Mar

[SOLVED, with reservations] Re: Turn off menu highlight in outline view?

2009-08-17 Thread Graham Cox
On 17/08/2009, at 10:21 AM, Graham Cox wrote: I have an outline view using source list style. When I right-click on the view, the item under the mouse highlights with a blue outline independent of the current selection. This gives the impression that the menu command applies to that item,

Re: [SOLVED, with reservations] Re: Turn off menu highlight in outline view?

2009-08-17 Thread I. Savant
On Aug 17, 2009, at 7:49 AM, Graham Cox wrote: This indicates that the NSOutlineView's implementation of this highlight is being done in a dubiously skanky way Unfortunately this can describe numerous parts of NSTableView & NSOutlineView. Not a knock against the engineers, but this is one

Re: observeValueForKeyPath returns null in the change directory???

2009-08-17 Thread Sean McBride
On 8/15/09 3:18 PM, Sandro Noel said: >I do successfully receive the notification for my key path. >but the change directory only returns null values for the old and the >new values, I do not know what i'm doing wrong. "The change di

Re: initWithCoder but I do not have nib file

2009-08-17 Thread Scott Ribe
I think what you want to do is override +buttonWithType in your CustomButton class, but it's not entirely clear from your message. -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567 voice ___ Cocoa-dev mailing list (C

Re: Printing Multiple-Pages Issue

2009-08-17 Thread Jeffrey Oleander
> On Mon, 2009/08/17, Renzil D'Souza wrote: > From: Renzil D'Souza > Subject: Re: Printing Multiple-Pages Issue > To: "Graham Cox" > Cc: cocoa-dev@lists.apple.com > Date: Monday, 2009 August 17, 12:39 AM > > No, I want control over how many pages I'm dividing my > view into, and precisely how I

Re: Trying to track down error in NSPersistentDocument when saving

2009-08-17 Thread Sean McBride
On 8/16/09 9:47 PM, Gideon King said: >Cool - haven't used conditional breakpoints before, and didn't realize >about objc_exception_throw... Then you probably don't know about the ".gdbinit" file either (google it), it's quite handy. Mine contains the following, which I suggest you add to yours:

Re: observeValueForKeyPath returns null in the change directory???

2009-08-17 Thread Kyle Sluder
On Mon, Aug 17, 2009 at 9:20 AM, Sean McBride wrote: > This bug has been there since 10.3.  I wish the documentation mentioned this. http://developer.apple.com/releasenotes/Cocoa/AppKitOlderNotes.html#X10_3Notes "NSControllers ignore the options that can be passed to the -addObserver:forKeyPath:o

Re: [SOLVED, with reservations] Re: Turn off menu highlight in outline view?

2009-08-17 Thread Corbin Dunn
...then I get the highlight back again! This indicates that the NSOutlineView's implementation of this highlight is being done in a dubiously skanky way, drawing directly as part of the -menuForEvent: method, rather than flagging the menu tracking and drawing as part of the standard draw

Re: [SOLVED, with reservations] Re: Turn off menu highlight in outline view?

2009-08-17 Thread Corbin Dunn
On Aug 17, 2009, at 6:24 AM, I. Savant wrote: On Aug 17, 2009, at 7:49 AM, Graham Cox wrote: This indicates that the NSOutlineView's implementation of this highlight is being done in a dubiously skanky way Unfortunately this can describe numerous parts of NSTableView & NSOutlineView. No

Notification for launch of root daemon process?

2009-08-17 Thread Dave DeLong
Hi everyone, Is there some notification that's posted by the OS when a root daemon process is launched? Here's what I've tried: 1. Carbon Events - I tried creating a CarbonEventHandler to listen for kEventAppLaunched, but I did not observe any events come through after running backupd.

Audio CD Subchannel Info

2009-08-17 Thread bryscomat
Hey everyone, is there any way to tell if an audio track on a CD contains CDG subchannel info? Currently, I am using a the following code to read the subchannel info: dk_cd_read_tcd_read; unsigned char *buffer = (unsigned char*)malloc(capacity); memset(&cd_read, 0, sizeof(cd_read)); cd_

Re: Notification for launch of root daemon process?

2009-08-17 Thread Todd Heberlein
Is there some notification that's posted by the OS when a root daemon process is launched? Here's what I've tried: Off the Cocoa topic, but I track processes using the BSM audit trail. Todd ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) P

"too many nested undo groups" -- What does that mean?

2009-08-17 Thread Jerry Krinock
I'm getting a reproducible "too many nested undo groups" message logged. But I don't know what to look for because I don't know what that means. How many is "too many"? Of what? Is there any way to see the number? Here is what I have found by experiment: Whenever I -beginUndoGrouping,

Re: [SOLVED, with reservations] Re: Turn off menu highlight in outline view?

2009-08-17 Thread Quincey Morris
On Aug 17, 2009, at 09:30, Corbin Dunn wrote: Hopefully customization has become easier, and frequently less required (ie: the "source list" highlighting style, proper drag and drop feedback, etc). Do you have specific examples of things that are difficult to do which should be easier? I'm

Re: [SOLVED, with reservations] Re: Turn off menu highlight in outline view?

2009-08-17 Thread I. Savant
-- I.S. On Aug 17, 2009, at 12:30 PM, Corbin Dunn wrote: Hopefully customization has become easier, and frequently less required (ie: the "source list" highlighting style, proper drag and drop feedback, etc). Do you have specific examples of things that are difficult to do which should

Re: [SOLVED, with reservations] Re: Turn off menu highlight in outline view?

2009-08-17 Thread I. Savant
On Aug 17, 2009, at 1:48 PM, Quincey Morris wrote: My guess is that I. S. wasn't referring to specific defects (though there are those) but to the "Frankenstein's monster" nature of NSTableView/NSOutlineView -- a lot of not-quite-matching pieces bolted onto the corpse of a much simpler clas

Re: [SOLVED, with reservations] Re: Turn off menu highlight in outline view?

2009-08-17 Thread Quincey Morris
On Aug 17, 2009, at 11:14, I. Savant wrote: I'm not sure what you mean here, but I'm fairly sure I disagree. :-D This is one step in the right direction. One. At least, insofar as "we heard a very common request and, in the interests of consistency and promoting good-looking apps on our p

[OT] Re: Audio CD Subchannel Info

2009-08-17 Thread Alastair Houghton
On 17 Aug 2009, at 17:47, bryscomat wrote: Hey everyone, is there any way to tell if an audio track on a CD contains CDG subchannel info? This isn't Cocoa-related and so it isn't the right mailing list. Please go to http://lists.apple.com and select a more appropriate list. Kind rega

Re: "too many nested undo groups" -- What does that mean?

2009-08-17 Thread Alastair Houghton
On 17 Aug 2009, at 18:08, Jerry Krinock wrote: I'm getting a reproducible "too many nested undo groups" message logged. But I don't know what to look for because I don't know what that means. How many is "too many"? Of what? Is there any way to see the number? Here is what I have fou

Re: Changing NSSliderCell's knob thickness [SOLVED]

2009-08-17 Thread Brandon Walkin
Returning the smaller knob rect in -knobRectFlipped: seems to do the trick. Brandon ___ 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-admin

Re: Displaying an animated graph (= nodes and edges)

2009-08-17 Thread Kaspar Fischer
Any ideas? Kaspar On 16.08.2009, at 12:43, Kaspar Fischer wrote: Dear list, After some hours of research I realise that I need some advice on how to tackle this: My goal is to render a graph [1] consisting of at most 100 nodes and 300 edges (most of the time the graph will be much small

Re: Displaying an animated graph (= nodes and edges)

2009-08-17 Thread I. Savant
On Aug 17, 2009, at 4:18 PM, Kaspar Fischer wrote: Any ideas? If there were, someone would have replied. Bumping your own message without adding new information to help clarify your question or goals is considered poor list etiquette. Especially when you've only allowed a day. -- I.S

Re: Displaying an animated graph (= nodes and edges)

2009-08-17 Thread David Duncan
If you can require iPhone OS 3.0 then you can experiment with the CAShapeLayer which will automatically rerender when zoomed. -- David Duncan @ My iPhone On Aug 17, 2009, at 4:18 PM, Kaspar Fischer wrote: Any ideas? Kaspar On 16.08.2009, at 12:43, Kaspar Fischer wrote: Dear list, Af

Re: "too many nested undo groups" -- What does that mean?

2009-08-17 Thread Jerry Krinock
On 2009 Aug 17, at 12:50, Alastair Houghton wrote: All this makes sense. Then, by extension, "too many nested undo groups" implies that -groupingLevels is too high. But by default, -levelsOfUndo is inifinite. Levels of undo and nested undo groups are separate things, I think. The mes

RE: Cleaning "garbage" in Core Data

2009-08-17 Thread Ben Trumbull
Squ, You're basically saying you don't want to model your data formally, but you do want to write your own relationship maintenance and delete propagation system. That is a lot of work. At this point, your problem doesn't have anything to do with Core Data. You have NSDictionaries wit

Overriding NSCollectionView's selection: a good idea?

2009-08-17 Thread Andrew McClain
I've been reading docs and looking at IconCollection for the last week and I still can't really figure this out. Here's the behavior I want to model: pretend I'm making poker dice game (I'm using this as an example to help me understand cocoa programming). I have a visual representation of the dice

int to bytes(value in NSString)

2009-08-17 Thread bosco fdo
Hi I dont understand of the below case of converting int to byte , the below java code can able to print the byte value as below System.out.println("binary output ::: "+Byte.toString(bo[0])); System.out.println("binary output ::: "+Byte.valueOf(bo[1])); System.out.println("binary output ::: "+By

How to manage NSArray, NSDictionary, ... description encoding for non ascii characters?

2009-08-17 Thread Gernot A . Pohl
--- #import int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; NSString *halo = @"Hello, Wörld!"; NSArray *array = [NSArray arrayWithObject:halo]; NSDictionary *dictionary = [NSDictionary dictionaryWithObject:halo forKe

Mac access to iPhone Document Directory

2009-08-17 Thread The Grand Poohbah
I'm writing a Mac application to process data for use with my iPhone app. It would be handy for development purposes to directly read from and write to my connected iPhone app's document directory. I know the Organizer can read my app's document directory and have used that, but I want to d

Memory management issues/leaks

2009-08-17 Thread PCWiz
Hi, I have an Objective-C/Cocoa app with garbage collection enabled. To check for memory leaks I first ran it through Instruments and it did find some leaks. There was no information on where the leaks were coming from, so I used another tool, AnalysisTool (basically a front end for the C

Custom grid view

2009-08-17 Thread Georg Seifert
Hi, I try to implement a control with several NSTextCells in it. I have problems starting the edit mode. So fare I tried this (in the control’s mouseDown): NSText * textObj = [[self window] fieldEditor:YES forObject:_editCell]; [textObj setEditable:YES]; [textObj setFie

Re: Mac access to iPhone Document Directory

2009-08-17 Thread Clark Cox
On Mon, Aug 17, 2009 at 2:12 PM, The Grand Poohbah wrote: > I'm writing a Mac application to process data for use with my iPhone app. It > would be handy for development purposes to directly read from and write to > my connected iPhone app's document directory. I know the Organizer can read > my ap

Re: How to manage NSArray, NSDictionary, ... description encoding for non ascii characters?

2009-08-17 Thread Adam R. Maxwell
On Aug 17, 2009, at 9:46 AM, Gernot A.Pohl wrote: NSString *halo = @"Hello, Wörld!"; NSArray *array = [NSArray arrayWithObject:halo]; NSDictionary *dictionary = [NSDictionary dictionaryWithObject:halo forKey:@"halo"]; NSLog(@"%...@\narray=%@\ndictionary=%@", halo, arr

Re: [SOLVED, with reservations] Re: Turn off menu highlight in outline view?

2009-08-17 Thread Graham Cox
On 18/08/2009, at 2:27 AM, Corbin Dunn wrote: Copied below is the pertinent information: NSTableView/NSOutlineView - Contextual menu support NSTableView and NSOutlineView now have better contextual menu support. Please see the DragNDropOutlineView demo application for an example of how t

Re: "too many nested undo groups" -- What does that mean?

2009-08-17 Thread Graham Cox
On 18/08/2009, at 7:43 AM, Jerry Krinock wrote: On 2009 Aug 17, at 12:50, Alastair Houghton wrote: All this makes sense. Then, by extension, "too many nested undo groups" implies that -groupingLevels is too high. But by default, -levelsOfUndo is inifinite. Levels of undo and nested un

Re: int to bytes(value in NSString)

2009-08-17 Thread Graham Cox
On 17/08/2009, at 5:07 PM, bosco fdo wrote: I need NSString in binary format how do i print NSString in binary format instead of "0001" obj-c code is uint8 barr[4]; barr[0] =(uint8)num; barr[1] =(uint8)num>>8; barr[2] =(uint8)num>>16; barr[3] =(uint8)num>>24; i am using [NSString stringwith

Re: [SOLVED, with reservations] Re: Turn off menu highlight in outline view?

2009-08-17 Thread Adam R. Maxwell
On Aug 17, 2009, at 11:54 AM, Quincey Morris wrote: On Aug 17, 2009, at 11:14, I. Savant wrote: I'm not sure what you mean here, but I'm fairly sure I disagree. :-D This is one step in the right direction. One. At least, insofar as "we heard a very common request and, in the interests of

Re: [SOLVED, with reservations] Re: Turn off menu highlight in outline view?

2009-08-17 Thread Graham Cox
On 18/08/2009, at 2:27 AM, Corbin Dunn wrote: It seems strange to me that this method is doing highlighting duty when all it's meant for is to return a property. To me, it doesn't seem strange. It is AppKit that displays the menu, and it allows a consistent user interface to be used throug

Read last x bytes of a text file?

2009-08-17 Thread Alex Kac
I'm sure there is a great way to do this, but I seem to not find it. I have a potentially large text file that I wish to only show the last 32k worth - it could be 200MB. So I was looking at NSInputStream, but perhaps I'm being dense or its the wrong tool for the job, but I cannot find a wa

Re: Read last x bytes of a text file?

2009-08-17 Thread Adam R. Maxwell
On Aug 17, 2009, at 7:57 PM, Alex Kac wrote: I'm sure there is a great way to do this, but I seem to not find it. I have a potentially large text file that I wish to only show the last 32k worth - it could be 200MB. So I was looking at NSInputStream, but perhaps I'm being dense or its the

Re: Memory management issues/leaks

2009-08-17 Thread Quincey Morris
On Aug 17, 2009, at 15:15, PCWiz wrote: I have an Objective-C/Cocoa app with garbage collection enabled. To check for memory leaks I first ran it through Instruments and it did find some leaks. There was no information on where the leaks were coming from, so I used another tool, AnalysisToo

Re: int to bytes(value in NSString)

2009-08-17 Thread bosco fdo
Hi graham Thanks for the reply. I have tried %i.1 but i am getting 0.10.10.10.1 , but i need it in binary byte value bos On Tue, Aug 18, 2009 at 10:06 AM, Graham Cox wrote: > > On 17/08/2009, at 5:07 PM, bosco fdo wrote: > > I need NSString in binary format how do i print NSString in binar

Re: int to bytes(value in NSString)

2009-08-17 Thread Andrew Farmer
On 17 Aug 2009, at 23:21, bosco fdo wrote: Hi graham Thanks for the reply. I have tried %i.1 but i am getting 0.10.10.10.1 , but i need it in binary byte value Wait, you're trying to construct a NSString with null bytes in it? I'm pretty sure that doesn't work correctly in a lot of circum