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, Qu

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 will

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 n

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 stro

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 mutableAr

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 fu

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 wh

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 mi

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

2008-08-03 Thread MAGDELENAT Philippe
Hi, I am wondering how to see the value of a NSNumber in XCode debugger using a formatter when the said NSNumber is in a NSMutableArray ? To sum it up: - When I look at a NSNumber with the following formatter "{(int)[$VAR intValue]}" everything works fine and the debugger shows in the su

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

2008-08-03 Thread Jens Alfke
On 3 Aug '08, at 11:36 AM, MAGDELENAT Philippe wrote: - When I put 10 NSNumber in a NSMutableArray and look at it in the debugger (displaying the content of the array with the little arrow), no way to display the value. The formatter seems ignored or invalid. Use the gdb command line:

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

2008-08-03 Thread Daniel Richman
If your array is called myArray, type po myArray in the debugger, and it will print the value of all objects in the array. Daniel MAGDELENAT Philippe wrote: Hi, I am wondering how to see the value of a NSNumber in XCode debugger using a formatter when the said NSNumber is in a NSMutableArr

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

2008-08-03 Thread Kyle Sluder
On Sun, Aug 3, 2008 at 2:58 PM, Daniel Richman <[EMAIL PROTECTED]> wrote: > If your array is called myArray, type > > po myArray > > in the debugger, and it will print the value of all objects in the array. More specifically, it will send -description to all the objects in the array, and print the

Want to save the content of a NSView with CALayer embedded.

2008-08-03 Thread Leopard x86
Hi everyone. I am ordered to save a NSView hosting the arbitrary number of core animation layers. Although there are many tutorials about how to save the content of a NSView, I can find nothing about saving the content of the layer embedded in a NSVIew. First I tried to use the following c

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 w

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 t

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 setEntity:

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 a

Does migratePersistentStore not overwrite?

2008-08-03 Thread Eric Crichlow
I've spent... wasted the weekend trying to figure out what was wrong with my code or with Core Data. The symptom seemed to be that I could create entities in my app, and do a "Save As..." and everything worked right. but when I then added another entity or 2, and did a "Save", quit the

[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 -- To

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 Culvers

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 alre

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 t

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 requ

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 (Leopa

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 te

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 Condi

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 do

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

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 co

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 ". Honestly I found that most of my biggest gripes I had in XCode

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 c

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 seeing

Re: Irritating Problem with NSString Method and File Paths

2008-08-03 Thread Phil
On Mon, Aug 4, 2008 at 4:43 PM, Patrick Walker <[EMAIL PROTECTED]> wrote: > 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 a

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 (Coco

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. T

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: http://learning-pyobjc.googlegroups.com/web/iTunes.h?gda=z7l7PjkAAAC7wq-sNkQs4RaD

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 vie

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 t

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

2008-08-03 Thread Steve Cronin
Andrew; OK for the sake of the group I will parade my ignorance so that perhaps others can learn too... First I do understand your point that using AppleScript is using an unnecessary high-level tool when a lower-level tool will do! Thanks for keeping me on-point there!! Good old-school un

Re: pointers in objective-c?

2008-08-03 Thread Negm-Awad Amin
Am Sa,02.08.2008 um 22:53 schrieb Keary Suska: 8/2/08 1:09 AM, also sprach [EMAIL PROTECTED]: This is important for encapsulation. Every change of an object made through a pointer will change the object for every other user of this object, who refers using a different pointer. Person* person

Re: NSSplitView Question

2008-08-03 Thread Negm-Awad Amin
Am Mo,04.08.2008 um 07:35 schrieb 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

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

2008-08-03 Thread Kyle Sluder
On Mon, Aug 4, 2008 at 12:22 AM, Andrew Farmer <[EMAIL PROTECTED]> wrote: > The double-fork is to fully detach the child process from the parent - note > that all of the parent processes immediately die, because fork() returns > nonzero. But you've still introduced a race condition. You can more

Re: How to get music list?

2008-08-03 Thread Bob Warwick
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? I wrote some sample code a couple months ago to read in the playlist names from the iTunes XML file. It might help get you

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

2008-08-03 Thread Kyle Sluder
On Mon, Aug 4, 2008 at 2:15 AM, Steve Cronin <[EMAIL PROTECTED]> wrote: > I have 4 questions > 1) Given that it is higher-level than necessary, I would still appreciate > understanding why it doesn't work. Race conditions, waiting on the child task to complete, reliance on shell parsing semantics.