NSDate to month, year etc.

2008-08-03 Thread Trygve Inda
I am using: [[myNSDate dateWithCalendarFormat:nil timeZone:nil] monthOfYear]; But the docs say: Important: NSCalendarDate is slated for deprecation, and its use is strongly discouraged. So what should I be using to get the month, year etc as ints out of an NSDate? Thanks, Trygve

Re: -[NSBrowser scrollToVisible] not making all of the column visible

2008-08-03 Thread Bill Cheeseman
on 2008-08-02 8:58 PM, Martin Redington at [EMAIL PROTECTED] wrote: Is the behaviour I'm seeing (not all column made visible if any is already visible) the expected behaviour? I filed a bug about 4 years ago, but nothing came of it. -- Bill Cheeseman - [EMAIL PROTECTED] Quechee Software,

Re: reloading an NSTreeController

2008-08-03 Thread Jonathan Dann
On 3 Aug 2008, at 04:35, Gerriet M. Denkmann wrote: On 3 Aug 2008, at 05:51, Jonathan Dann wrote: On 1 Aug 2008, at 14:04, Gerriet M. Denkmann wrote: But all disclosure triangels are now closed. Is there some way to reopen them to the previous state? I have the strong feeling that I

Re: NSDate to month, year etc.

2008-08-03 Thread mmalc crawford
On Aug 3, 2008, at 1:28 AM, Trygve Inda wrote: Important: NSCalendarDate is slated for deprecation, and its use is strongly discouraged. So what should I be using to get the month, year etc as ints out of an NSDate? Seriously? Important: Use of NSCalendarDate strongly discouraged. It is

Re: NSDate to month, year etc.

2008-08-03 Thread Trygve Inda
On Aug 3, 2008, at 1:28 AM, Trygve Inda wrote: Important: NSCalendarDate is slated for deprecation, and its use is strongly discouraged. So what should I be using to get the month, year etc as ints out of an NSDate? Seriously? Important: Use of NSCalendarDate strongly discouraged.

Re: Some crash.

2008-08-03 Thread Clark Cox
On Sat, Aug 2, 2008 at 9:15 PM, Sandro Noel [EMAIL PROTECTED] wrote: Chris. Thank you for the explaination!! but it leaves me with a question, where should i use it. I'm actually adding objects to the array, using addObject message, in the model, where should i use the

Re: Some crash.

2008-08-03 Thread Sandro Noel
Clark, thank you! Great Example. I just find it sad, that implementing KVC-KVO, is not enough to get the ball rolling, and that i have to proxy my model classes to make it work. :( I guess i'll have to rethink my Model classes :) and really separate functionality from data. even if that

CoreData fetched property: one-to-one-to-many relationship

2008-08-03 Thread James Gregurich
greetings! I'm trying to figure out how to dynamically (in code) set up a fetched property with a Coredata in-memory store. The documentation is not detailed enough for me to quite see what the correct way to set the code up is and I'm not finding much in the way of useful sample code

Re: CoreData fetched property: one-to-one-to-many relationship

2008-08-03 Thread Omar Qazi
Create an NSFetechedPropertyDescription by setting up a fetch request in code, then add the property using the setProperties method of NSEntityDescription. It is only possible to edit an NSEntityDescription if you are not associated with a persistent store coordinator, so be careful. You

Re: How to get the value of a NSNumber contained in an array while debugging ?

2008-08-03 Thread MAGDELENAT Philippe
Yep found that but I want so see the value of my NSNumber in the GUI debgger (in XCode). I want to see my array (it shows something like 10 objects for the summary) and then, if I open the array I want the summary to work for each of the NSNumber inside. Bellow you can see that aNumber is

Re: How to get the value of a NSNumber contained in an array while debugging ?

2008-08-03 Thread Alex Kac
I'm also fond of simply hovering over the variable and tapping on the popup menu indicator and then clicking Print Description. Just depends on whether I'm already in the console or not. On Aug 3, 2008, at 2:00 PM, [EMAIL PROTECTED] wrote: Message: 12 Date: Sun, 3 Aug 2008 11:55:50 -0700

Re: How to get the value of a NSNumber contained in an array while debugging ?

2008-08-03 Thread MAGDELENAT Philippe
Yep found that but I want so see the value of my NSNumber in the GUI debgger (in XCode). I want to see my array (it shows something like 10 objects for the summary) and then, if I open the array I want the summary to work for each of the NSNumber inside. I tried to send a small screenshot

Restarting an app -- AppleScript 'launch' in a detached shell

2008-08-03 Thread Steve Cronin
Folks; I am trying to simply restart my app. To my dismay, I cannot find a way to do this in Cocoa. Please enlighten me if I have failed to understand something!! After perusing the archives, what makes the most sense to me is to launch a detached shell that executes a simple AppleScript.

Re: Restarting an app -- AppleScript 'launch' in a detached shell

2008-08-03 Thread Andrew Farmer
On 03 Aug 08, at 14:00, Steve Cronin wrote: I am trying to simply restart my app. To my dismay, I cannot find a way to do this in Cocoa. Please enlighten me if I have failed to understand something!! After perusing the archives, what makes the most sense to me is to launch a detached shell

Re: How to get the value of a NSNumber contained in an array while debugging ?

2008-08-03 Thread Nick Zitzmann
On Aug 3, 2008, at 1:39 PM, MAGDELENAT Philippe wrote: Yep found that but I want so see the value of my NSNumber in the GUI debgger (in XCode). I want to see my array (it shows something like 10 objects for the summary) and then, if I open the array I want the summary to work for each of

Re: CoreData fetched property: one-to-one-to-many relationship

2008-08-03 Thread James Gregurich
thanks for the response. Adding the property is straight forward. The key parts that are not clear to me are: 1) how exactly do you set up a predicate to walk an extra entity to get to the target entity. 2) how do you specify the destination entity. pass it to [NSFetchRequest

Re: How to get the value of a NSNumber contained in an array while debugging ?

2008-08-03 Thread MAGDELENAT Philippe
That's what I start to understand... Quite strange when used to Java (and java ide) for the last decade :o) Found a guy bothered with the same problem about a year ago (http://briksoftware.com/blog/?p=24 ). Still I am not sure to get why XCode can't do what seems (to me :o) a fairly simple

[MEET] CocoaHeads Frankfurt, TONIGHT 8PM

2008-08-03 Thread Torsten Curdt
Tonights it's on again! Drop by if you are around. More information at http://upcoming.yahoo.com/event/871648/ http://vafer.org/blog/20080729104806 iCal: webcal://upcoming.yahoo.com/calendar/v2/group/4810/9266a3a167 RSS: http://upcoming.yahoo.com/syndicate/v2/group/4810/9266a3a167 cheers --

Interface Builder, tree view like Mac Mail or itunes

2008-08-03 Thread Sandro Noel
Hello! I would like to know how to design an interface that resembles the Mac Mail application most specifically, the tree view, I cant seem to set the proper properties in interface builder to achieve the same thing... so far, i've got the split view, and the right pane, just liek i want

Re: [MEET] CocoaHeads Frankfurt, TONIGHT 8PM

2008-08-03 Thread Steve Bird
On Aug 3, 2008, at 8:05 PM, Torsten Curdt wrote: Tonights it's on again! Drop by if you are around. More information at http://upcoming.yahoo.com/event/871648/ 8 PM - isn't that 5 hours ago, Frankfurt time? Steve Bird

Re: [MEET] CocoaHeads Frankfurt, TONIGHT 8PM

2008-08-03 Thread Torsten Curdt
On Aug 4, 2008, at 02:14, Steve Bird wrote: On Aug 3, 2008, at 8:05 PM, Torsten Curdt wrote: Tonights it's on again! Drop by if you are around. More information at http://upcoming.yahoo.com/event/871648/ 8 PM - isn't that 5 hours ago, Frankfurt time? Nope :) In Frankfurt today is

Re: Interface Builder, tree view like Mac Mail or itunes

2008-08-03 Thread Marcelo Alves
look at [1] in NSOutlineView Class Reference and use an attributed string to draw the icon or use a custom NSCell. [1]: - (BOOL)outlineView:(NSOutlineView *)outlineView isGroupItem: (id)item :: marcelo.alves On 03/08/2008, at 21:11, Sandro Noel wrote: Hello! I would like to know how

How to get music list?

2008-08-03 Thread Eric Lee
I have a problem getting the iTunes list, and then making the tableview display the iTunes list. The problem, is actually getting started. Which class should I use? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: How to get music list?

2008-08-03 Thread Kyle Sluder
On Sun, Aug 3, 2008 at 8:41 PM, Eric Lee [EMAIL PROTECTED] wrote: The problem, is actually getting started. Which class should I use? Break it down. By far the more challenging part is actually getting the iTunes data. There are a few ways of going about this: 1) Use Scripting Bridge (Leopard

Terminate App While NSSheet Is Visible?

2008-08-03 Thread Chunk 1978
hi there. i've noticed on some applications that it's possible to quit an app while an NSSheet is present, but i can't seem to correctly add this functionality into my own app. an example: open Safari View Customize Toolbar Quit Safari. you'll notice that the sheet ends and then safari

Re: Non-editable TableView and the Evil NSEditorBinder

2008-08-03 Thread Gerriet M. Denkmann
On 3 Aug 2008, at 12:02, Ken Thomases wrote: On Aug 2, 2008, at 10:00 PM, Gerriet M. Denkmann wrote: Well, I looked at the nib again, and the only binding I can see is the value of the TableColumn bound to arrangedObjects.Values of some NSArrayController. What is the setting of the

Cocoa / AppleScript Folder Action

2008-08-03 Thread John Joyce
I know I can do awkward things with AppleScript and Folder Action scripts, but is there a strictly Cocoa/Objective-C way to do something like Folder Action scripts short of a daemon? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: Restarting an app -- AppleScript 'launch' in a detached shell

2008-08-03 Thread Michael Ash
On Sun, Aug 3, 2008 at 5:12 PM, Andrew Farmer [EMAIL PROTECTED] wrote: On 03 Aug 08, at 14:00, Steve Cronin wrote: I am trying to simply restart my app. To my dismay, I cannot find a way to do this in Cocoa. Please enlighten me if I have failed to understand something!! After perusing the

Re: [Q] is NSFileHandle's writeData method faster than the FSWriteFork?

2008-08-03 Thread JongAm Park
Thank you very much for the valuable information. I will try the 1st and the 3rd options, because the 2nd option will not be easily applicable withouth refactoring the current code a lot. Thank you again, Regards, JongAm Park On Aug 2, 2008, at 7:51 AM, James Bucanek wrote: JongAm Park

Re: How to get music list?

2008-08-03 Thread Dave DeLong
And having experimented with this myself, AppleScript can be horrendously slow if you need to get information on more than about 50 tracks. I personally don't have much experience with SB, so I would recommend parsing the xml file. Even if it is unsupported, the xml file format has stayed very

Re: Restarting an app -- AppleScript 'launch' in a detached shell

2008-08-03 Thread Andrew Farmer
On 03 Aug 08, at 19:53, Michael Ash wrote: On Sun, Aug 3, 2008 at 5:12 PM, Andrew Farmer [EMAIL PROTECTED] wrote: On 03 Aug 08, at 14:00, Steve Cronin wrote: I am trying to simply restart my app. To my dismay, I cannot find a way to do this in Cocoa. Please enlighten me if I have failed

Re: How to get the value of a NSNumber contained in an array while debugging ?

2008-08-03 Thread Alex Kac
Using what version of XCode? I've found that in XCode 3.1 its been pretty darn excellent and the few times it wasn't, I was able to just do a Print Description from the data formatter into the console (just a shortcut to po var name. Honestly I found that most of my biggest gripes I had in

Re: NSImage size vs. representations' sizes

2008-08-03 Thread Marcel Weiher
On Aug 2, 2008, at 14:19 , Jacob Bandes-Storch wrote: I'm trying to use my application icon (icns) in a custom view to be draw in the background of a window, like Installer.app does. I can do all this just fine, but when I draw the image using - drawInRect:fromRect:operation:fraction:, it

Irritating Problem with NSString Method and File Paths

2008-08-03 Thread Patrick Walker
It seems that whenever I use Xcode to spawn the program, it is able to find the file but when spawning the program from Finder, it can never, ever find the file. I've been looking online and no one seems to have come across this before or maybe it's because it's so late that I'm not

How to get the current affine transform

2008-08-03 Thread Oleg Krupnov
Hi, Is there a way to get the current affine transform (NSAffineTransform) set in the current graphics context? What I need to do is to PREpend (not append or concat) the current transform with a new transform. Thanks! ___ Cocoa-dev mailing list

Re: How to get the current affine transform

2008-08-03 Thread Graham Cox
CGContextGetCTM hth, Graham On 4 Aug 2008, at 3:10 pm, Oleg Krupnov wrote: Hi, Is there a way to get the current affine transform (NSAffineTransform) set in the current graphics context? What I need to do is to PREpend (not append or concat) the current transform with a new transform.

Re: How to get music list?

2008-08-03 Thread keegan3d
I've been playing around with the ScriptingBridge and am really happy with the speed, but as mentioned before this limits your app to Leopard. Here is the header file for iTunes if you want to know what SB exposes:

NSSplitView question

2008-08-03 Thread Eric Lee
I have two table views with two different data, and I have two buttons so that when you press one button, something is added to the first table view, and when you press the second button, some info is added to the second table view. You can't press the 1st one to add it to the 2nd table

NSSplitView Question

2008-08-03 Thread Eric Lee
Sorry, I accidently did something wrong on that message. Here's the one I'm actually asking... How do you make a NSSplitView so that when you click something on one side, the other side is updated. For example, take the mail application. When you click trash, the other side is updated to

Re: NSSplitView Question

2008-08-03 Thread Graham Cox
This is not any thing to do with NSSplitView as such. You're asking how to implement a master-detail interface. Try doing searching on those terms, phrase or a variation of it, I'm sure it's been well- covered. The essentials are - detect the selection change in the master view, use it to