super respondsToSelector

2008-05-31 Thread Russ McBride
Anyone want to take a stab at explaining to me as thoroughly as possible why [super respondsToSelector: aSelector] doesn't actually do what it looks like it should do? Bonus points if you can explain why I can override the respondsToSelector:(SEL)aSelector method in my object and

Re: super respondsToSelector

2008-05-31 Thread stephen joseph butler
On Sat, May 31, 2008 at 1:22 AM, Russ McBride [EMAIL PROTECTED] wrote: It seems like either an infinite loop should occur if respondsToSelector is really being called on self, or it should return NO if it's called on super, in which case my delegate method in self should never get called. If

How can i get current system time?

2008-05-31 Thread haresh vavdiya
Hi team, Thank for giving me answer. I want to do one small clock for my iPhone but i can't understand how can i get current system time? I have read about NSDate, NSTimer but i can't understand how to use that class for getting current system time? Please guide

Re: super respondsToSelector

2008-05-31 Thread Andrew Farmer
On 30 May 08, at 23:22, Russ McBride wrote: Anyone want to take a stab at explaining to me as thoroughly as possible why [super respondsToSelector: aSelector] doesn't actually do what it looks like it should do? Keep in mind that, ordinarily, respondsToSelector: is implemented on

Re: How can i get current system time?

2008-05-31 Thread Jens Alfke
On 30 May '08, at 11:40 PM, haresh vavdiya wrote: I want to do one small clock for my ** but i can't understand If you keep using that word here even after repeated warnings, the moderator is going to ban you. I am not kidding. I have read about NSDate, NSTimer but

Re: How can i get current system time?

2008-05-31 Thread Andrew Farmer
On 30 May 08, at 23:40, haresh vavdiya wrote: Thank for giving me answer. I want to do one small clock for my iPhone but i can't understand how can i get current system time? I have read about NSDate, NSTimer but i can't understand how to use that class for

Re: How can i get current system time?

2008-05-31 Thread j o a r
On May 30, 2008, at 11:40 PM, haresh vavdiya wrote: I have read about NSDate, NSTimer but i can't understand how to use that class for getting current system time? You could use +[NSDate date], as it according to the documentation: Creates and returns a new date set to the current

Re: RESTful API's - Easy way to interact?

2008-05-31 Thread Jens Alfke
On 30 May '08, at 7:16 PM, Jeremy wrote: Now, I need to figure out how to use set GET, but I think that is working. The problem and it is crashing is because it is being encoded by every other method. What? That sentence was incomprehensible. Apologies if you're not a native English

Re: super respondsToSelector

2008-05-31 Thread Bill Bumgarner
On May 30, 2008, at 11:43 PM, Jens Alfke wrote: If you actually want to ask a question of your class's superclass, you have to do so directly: [[[self class] superclass] instancesRespondToSelector: aSelector] Well... yeah... you *can* do that. But *don't do that*. (And I know Jens

Re: super respondsToSelector

2008-05-31 Thread Ken Thomases
On May 31, 2008, at 1:22 AM, Russ McBride wrote: Anyone want to take a stab at explaining to me as thoroughly as possible why [super respondsToSelector: aSelector] doesn't actually do what it looks like it should do? Bonus points if you can explain why I can override the

Re: super respondsToSelector

2008-05-31 Thread Jens Alfke
On 30 May '08, at 11:55 PM, Bill Bumgarner wrote: On May 30, 2008, at 11:43 PM, Jens Alfke wrote: If you actually want to ask a question of your class's superclass, you have to do so directly: [[[self class] superclass] instancesRespondToSelector: aSelector] Well... yeah... you

Re: super respondsToSelector

2008-05-31 Thread Ken Thomases
Responding to myself: On May 31, 2008, at 1:52 AM, Ken Thomases wrote: To do what you want, you can use [MySuperClass instancesRespondToSelector:aSelector]. Note, you have to name the specific class you want to check. You can't use [self superclass] because that's dynamic -- the result

Re: super respondsToSelector

2008-05-31 Thread Michael Ash
On Sat, May 31, 2008 at 3:16 PM, j o a r [EMAIL PROTECTED] wrote: On May 31, 2008, at 12:10 AM, Michael Ash wrote: If you're adventurous and foolish you can extract your superclass without needing to hard-code any class names: #import objc/objc-runtime.h ... Class superclass = ((struct

Re: KVO: I get called on change, but then can't get the object

2008-05-31 Thread j o a r
On May 31, 2008, at 12:21 AM, Rick Mann wrote: I registered to observe changes in the number column of my tree controller: [mItemsController addObserver: self forKeyPath: @selection.number options: (NSKeyValueObservingOptionNew)

Re: super respondsToSelector

2008-05-31 Thread j o a r
On May 31, 2008, at 12:23 AM, Michael Ash wrote: Assume the following class hierarchy: A - B - C - D - E In the implementation of B, you write [self superclass]. Now your method executes with self set to an instance of E. What do you get? I would propose that you should re-examine your

Re: KVO: I get called on change, but then can't get the object

2008-05-31 Thread Rick Mann
On May 31, 2008, at 00:32:30, j o a r wrote: Search for NSKeyValueObservingOptionNew here: Already using that: [mItemsController addObserver: self forKeyPath: @selection.number options: (NSKeyValueObservingOptionNew)

Defaulting new entity fields to be same as current selection?

2008-05-31 Thread Rick Mann
I've got an NSTreeController and associated view. I use - awakeFromInsert to set default values for the entities created as a result of calling -add. I'd like for one of the fields to take on the same value as the currently-selected entity. Can I get at that from within -awakeFromInsert?

Problem in continuing display time

2008-05-31 Thread haresh vavdiya
Hi Friends, I have got current system time but it is not refreshed automatically means whenever i run the application it will give me cuurent time but then after i have to again refresh my application then it display current time. But i want to do it display time like digital clock. So what

Re: super respondsToSelector

2008-05-31 Thread Ken Thomases
On May 31, 2008, at 2:43 AM, j o a r wrote: On May 31, 2008, at 12:23 AM, Michael Ash wrote: Assume the following class hierarchy: A - B - C - D - E In the implementation of B, you write [self superclass]. Now your method executes with self set to an instance of E. What do you get? I

Weird NSInvocationOperation init behavior

2008-05-31 Thread Markus Spoettl
Hello List, I just came across a strange thing with initializing an NSInvocationOperation object that I wanted to share and see if this is a bug in either the docs or the framework: I had this NSInvocationOperation *theOp = [[NSInvocationOperation alloc]

Re: super respondsToSelector

2008-05-31 Thread Michael Ash
On Sat, May 31, 2008 at 3:43 PM, j o a r [EMAIL PROTECTED] wrote: On May 31, 2008, at 12:23 AM, Michael Ash wrote: Assume the following class hierarchy: A - B - C - D - E In the implementation of B, you write [self superclass]. Now your method executes with self set to an instance of E.

Re: warning: 'NSEntityDescription' may not respond to

2008-05-31 Thread Chris Hanson
On May 30, 2008, at 11:16 AM, Fritz Anderson wrote: On 30 May 2008, at 4:17 AM, Steven Hamilton wrote: Also, any warnings or errors I get in xcode appear twice in the bubbles. Anyone know why that is? By default, new Xcode projects are set to the Release configuration (because all

Re: Problem in continuing display time

2008-05-31 Thread Mike Abdullah
Keeping the clock display updated is not Cocoa's responsibility; it is yours. I would personally suggest that after each update of the display you set a timer for when the next update is due. On 31 May 2008, at 09:01, haresh vavdiya wrote: Hi Friends, I have got current system time but

Re: Weird NSInvocationOperation init behavior

2008-05-31 Thread Michael Vannorsdel
If you method is something like: - (void)func1 then you should use @selector(func1) without the colon. On May 31, 2008, at 2:06 AM, Markus Spoettl wrote: NSInvocationOperation *theOp = [[NSInvocationOperation alloc] initWithTarget:self

Re: Problem in continuing display time

2008-05-31 Thread Nathan Kinsinger
On May 31, 2008, at 2:01 AM, haresh vavdiya wrote: Hi Friends, I have got current system time but it is not refreshed automatically means whenever i run the application it will give me cuurent time but then after i have to again refresh my application then it display current time.

Re: KVO: I get called on change, but then can't get the object

2008-05-31 Thread Hamish Allan
On Sat, May 31, 2008 at 8:48 AM, Rick Mann [EMAIL PROTECTED] wrote: On May 31, 2008, at 00:32:30, j o a r wrote: Search for NSKeyValueObservingOptionNew here: Already using that: Read it again: The change dictionary doesn't contain old and new values. This is not your fault, it's due to a

Re: Finding the largest value in an NSTreeController?

2008-05-31 Thread Jonathan Dann
To get all the nodes in the tree I do a depth-first search (10.5 only). Add the first method in an NSTreeNode category and the second to a category on NSTreeController. // NSTreeNode_Extensions - (NSArray *)descendants; { NSMutableArray *array = [NSMutableArray array]; for

Re: KVO: I get called on change, but then can't get the object

2008-05-31 Thread Jonathan del Strother
On Sat, May 31, 2008 at 10:03 AM, Hamish Allan [EMAIL PROTECTED] wrote: On Sat, May 31, 2008 at 8:48 AM, Rick Mann [EMAIL PROTECTED] wrote: On May 31, 2008, at 00:32:30, j o a r wrote: Search for NSKeyValueObservingOptionNew here: Already using that: Read it again: The change dictionary

Displaying current time using NSCalenderDAte

2008-05-31 Thread haresh vavdiya
Hi Friends, I have successfully get current time but now i want to to digital clock but for that i need to have current minute and hours, so how can i get this? I found some method of NSCalenderDate which give us hours and minutes i can't get current time and date it display

Re: runloops and NSURLConnection

2008-05-31 Thread Michael Vannorsdel
I think you want to schedule the connection for the NSModalPanelRunLoopMode runloop mode. This is the mode that is used for modal windows. On May 31, 2008, at 7:28 AM, Torsten Curdt wrote: A bit puzzled ...seems like I need some advise here. From a NSWindowController I create a modal

Re: Changing button title based on single or multiple selection?

2008-05-31 Thread I. Savant
I have a button Print Label. I would like it to say Print Labels when more than one label is selected in the Tree Controller view. Is it possible to do this with Alt. Titles and bindings in IB? Or must I write code? Since Stephen's value transformer reply answers your question from

Re: Opening column for edit after adding to tree controller?

2008-05-31 Thread I. Savant
On May 31, 2008, at 4:27 AM, Rick Mann wrote: After adding a new entity to my tree controller, how can I programmatically open the first column (a text cell) Again, this is confusing - entity is not the same as instance. Also, I assume by 'column' you mean that of a table view or outline

Re: RESTful API's - Easy way to interact?

2008-05-31 Thread Jeremy
Jens, Thanks for that bit. And I am a native english speaker. It was late when I typed that. :D But Thanks for NSURLConnection suggestion and will look into it. Jeremy I have often felt that programming is an art form, whose real value can only be appreciated by another versed in the

Re: runloops and NSURLConnection

2008-05-31 Thread Torsten Curdt
On May 31, 2008, at 16:09, Michael Vannorsdel wrote: I think you want to schedule the connection for the NSModalPanelRunLoopMode runloop mode. This is the mode that is used for modal windows. You mean with scheduleInRunLoop:forMode: ? ...but that's only available since 10.5 cheers --

Re: Alert Sheets hard wired in Interface Builder

2008-05-31 Thread John Love
On Fri, May 30, 2008 at 3:33 PM, John Love [EMAIL PROTECTED][EMAIL PROTECTED] wrote: Here's some code snippets that I'm having problems with .. the code is sorta working in that an alert *window* appears, but not as a drop-down sheet as I think the following calls for: (and even when

USB drive

2008-05-31 Thread Толя Макаров
HI. Obj-C, Cocoa. 1) How to mount USB drive from folder /dev/ by means of API? FSMountServerVolumeSync, FSMountLocalVolumeSync, other method. Utilits are not used. Please example. 2) Why USB drive is not mounted when the screensaver is on?

Re: Alert Sheets hard wired in Interface Builder

2008-05-31 Thread John Love
More NSLog data: 2008-05-31 12:33:51.001 Calculate Medical[1926:10b] NSWindow does not support utility styleMask 0x10 2008-05-31 12:33:51.023 Calculate Medical[1926:10b] NSWindow does not support utility styleMask 0x10 2008-05-31 12:33:55.434 Calculate Medical[1926:10b] *** -[NSAlert

Re: runloops and NSURLConnection

2008-05-31 Thread Jens Alfke
On 31 May '08, at 8:07 AM, Torsten Curdt wrote: I think you want to schedule the connection for the NSModalPanelRunLoopMode runloop mode. This is the mode that is used for modal windows. You mean with scheduleInRunLoop:forMode: ? ...but that's only available since 10.5 I don't know

Re: runloops and NSURLConnection

2008-05-31 Thread Michael Vannorsdel
I saw you using that in your included code so I thought you were ok with it. For Tiger I can only suggest using secondary thread processing as the cleanest approach. Or you can reconsider using a modal window. On May 31, 2008, at 9:07 AM, Torsten Curdt wrote: You mean with

Re: Alert Sheets hard wired in Interface Builder

2008-05-31 Thread Keary Suska
5/31/08 10:40 AM, also sprach [EMAIL PROTECTED]: - (void) endCalculateSheet:(NSWindow*)theSheet code:(int)returnCode info:(void*)contextInfo { if (returnCode == NSAlertDefaultReturn) { // Good Bye! NSLog(@Default Button clicked); // does not log this entry }

Re: RESTful API's - Easy way to interact?

2008-05-31 Thread Jens Alfke
On 31 May '08, at 9:31 AM, Peter Burtis wrote: Question: Is there a way to set the credentials before you initiate the request? Or a way to force the request to use credentials even if the site doesn't return an Authentication Required response? I can't find one. IIRC, there isn't one.

Re: runloops and NSURLConnection

2008-05-31 Thread Torsten Curdt
On May 31, 2008, at 18:55, Jens Alfke wrote: On 31 May '08, at 8:07 AM, Torsten Curdt wrote: I think you want to schedule the connection for the NSModalPanelRunLoopMode runloop mode. This is the mode that is used for modal windows. You mean with scheduleInRunLoop:forMode: ? ...but that's

Re: Alert Sheets hard wired in Interface Builder

2008-05-31 Thread Jens Alfke
On 31 May '08, at 9:40 AM, John Love wrote: 2008-05-31 12:33:55.434 Calculate Medical[1926:10b] *** -[NSAlert endErrorSheet:code:info:]: unrecognized selector sent to instance 0x16ed20 That's an exception being thrown. There's no such (public) Cocoa method -endErrorSheet:code:info:, so

Graphing With Google Charts API

2008-05-31 Thread Jamie Phelps
I am writing an application that could seriously benefit from a good graphing API. Of course, the simplest solution to this would be if Apple opened up GraphKit for Cocoa developers. Sadly, that seems not to be in the near future, so I'm looking at alternatives. While there are some

Re: KVO: I get called on change, but then can't get the object

2008-05-31 Thread Hamish Allan
On Sat, May 31, 2008 at 11:11 AM, Jonathan del Strother [EMAIL PROTECTED] wrote: On Sat, May 31, 2008 at 10:03 AM, Hamish Allan [EMAIL PROTECTED] wrote: On Sat, May 31, 2008 at 8:48 AM, Rick Mann [EMAIL PROTECTED] wrote: On May 31, 2008, at 00:32:30, j o a r wrote: Search for

Re: KVO: I get called on change, but then can't get the object

2008-05-31 Thread Rick Mann
On May 31, 2008, at 03:11:51, Jonathan del Strother wrote: I could've sworn that was fixed in Leopard, actually. Anyone tried it? I have ;-) -- Rick ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

Re: Defaulting new entity fields to be same as current selection?

2008-05-31 Thread Rick Mann
On May 31, 2008, at 07:30:16, I. Savant wrote: Can I get at that from within -awakeFromInsert? Yes, through some incredible acrobatics, you probably could, but then that would be like walking right up to the MVC design pattern and b**ch-slapping it right in the face. ;-) Yes, of

Re: runloops and NSURLConnection

2008-05-31 Thread Jens Alfke
On 31 May '08, at 10:14 AM, Torsten Curdt wrote: Indeed - modal is smelly ...and I have considered non-modal. It would make my life easier. But since I have just integrated your exception handling into the FeedbackReporter framework ...wouldn't you expect the dialog that pops up in case

Re: runloops and NSURLConnection

2008-05-31 Thread Jean-Daniel Dupas
Le 31 mai 08 à 19:14, Torsten Curdt a écrit : On May 31, 2008, at 18:55, Jens Alfke wrote: On 31 May '08, at 8:07 AM, Torsten Curdt wrote: I think you want to schedule the connection for the NSModalPanelRunLoopMode runloop mode. This is the mode that is used for modal windows. You

Re: Weird NSInvocationOperation init behavior

2008-05-31 Thread Markus Spoettl
On May 31, 2008, at 1:19 AM, Michael Vannorsdel wrote: If you method is something like: - (void)func1 then you should use @selector(func1) without the colon. Indeed. Thank you. Regards Markus -- __ Markus Spoettl smime.p7s Description: S/MIME

Saving NSTextField value

2008-05-31 Thread vince
I have a current date and time method that returns a result in an NSTextField. -(IBAction)returnCurrentDateAndTime:(id)sender { NSCalendarDate *current; current = [NSCalendarDate calendarDate]; [mDateReceiver setObjectValue:current]; } I need the date to remain static indefinitely

Re: Saving NSTextField value

2008-05-31 Thread Jens Alfke
On 31 May '08, at 11:14 AM, vince wrote: What's the best way to maintain the value of the textField using Bindings? I've never worked with user defaults using bindings, but it's really easy to do programmatically: To store: [[NSUserDefaults standardUserDefaults] setObject: [textfield

Re: Finding the largest value in an NSTreeController?

2008-05-31 Thread Rick Mann
Jonathan, thank you for the excellent example on working with the containers. That will certainly be useful. On May 31, 2008, at 02:57:36, Jonathan Dann wrote: If you're using Core Data, can't you fetch all your managed objects and determine the one with the max vaule? Well, I would

Re: Displaying current time using NSCalenderDAte

2008-05-31 Thread mmalc crawford
On May 31, 2008, at 4:22 AM, haresh vavdiya wrote: I have successfully get current time but now i want to to digital clock but for that i need to have current minute and hours, so how can i get this? I found some method of NSCalenderDate which give us hours and minutes i

Re: Finding the largest value in an NSTreeController?

2008-05-31 Thread I. Savant
Well, I would have thought so, but I don't know enough about CoreData to actually get at the objects without the tree controller. I would've thought I could do that just off the tree controller, using @max, too. 1 - Create a fetch request for your desired entity. 2 - Create a sort

incorporating mail

2008-05-31 Thread Nathan
Is there a way to send an email from me to someone else programatically, and also to see how many unread emails you have? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list.

Re: Finding the largest value in an NSTreeController?

2008-05-31 Thread Rick Mann
On May 31, 2008, at 12:05:58, I. Savant wrote: 1 - Create a fetch request for your desired entity. 2 - Create a sort descriptor for the key whose max value you're interested in. 3 - Set the fetch request's sort descriptor to the above. 4 - Create any predicates needed for filtration (ie,

Re: Opening column for edit after adding to tree controller?

2008-05-31 Thread Rick Mann
On May 31, 2008, at 07:34:30, I. Savant wrote: NSTableView and NSOutlineView have a method - editColumn:row:withEvent:select: ... Make sure your tree controller has fetched and rearranged its objects (and if your view is an outline view, the corresponding item for your new instance is

Re: Finding the largest value in an NSTreeController?

2008-05-31 Thread Jonathan Dann
On 31 May 2008, at 19:47, Rick Mann wrote: Jonathan, thank you for the excellent example on working with the containers. That will certainly be useful. You're welcome, but I apologise, I forgot the -rootNodes method that one of the tree controller methods I sent you calls! This method

Re: Opening column for edit after adding to tree controller?

2008-05-31 Thread I. Savant
The problem is, I don't know how to determine to which row that newly-added object corresponds in the table view. If you're targeting Leopard, you can force the tree controller to - fetch: (so it's updated) then I believe you can ask the outline view for its -rowForItem: ... if you're

Re: Opening column for edit after adding to tree controller?

2008-05-31 Thread Jonathan Dann
The problem is, I don't know how to determine to which row that newly-added object corresponds in the table view. Is there any way? I suppose it's the current-selected row, since it's set up to select on add. Is there a more elegant way to find out, though (i.e., what if adding didn't

Re: Opening column for edit after adding to tree controller?

2008-05-31 Thread Rick Mann
On May 31, 2008, at 13:31:10, I. Savant wrote: That's one way, so long as you force a fetch first. So, I'm not really sure what fetch does. In my case, I either a new document or one that was opened, and the instances are all loaded and managed by the tree controller, and the UI is in

Re: Finding the largest value in an NSTreeController?

2008-05-31 Thread I. Savant
Wow, really? No way to just get at all the items in the tree controller with some key path, then use @max? It seems that this would be possible with an NSArray: In addition to Jonathan's comments, to be fair, you did ask, ... I don't know enough about CoreData to actually get at the

Leak when animating Core Animation Superlayer

2008-05-31 Thread Stéphane Droux
Hi, I'm currently writing an app that creates a complex hierarchy of CALayers. Everytime I animate one of the layers, I get a memory leak. In order to investigate the issue, I created a simple Cocoa project in which I only added a CustomView and the following code for this view : @implementation

Predicate expressions

2008-05-31 Thread Fabian
Hello, I'm trying to figure out how to use NSExpressions in a predicate but find the documentation a bit deficient. Here is what I want to do: I have an array - array A - containing objects with a title and subtitle property. I want to filter this array so it only contains the objects in array

ScriptingBridge to access Mail Messages?

2008-05-31 Thread Thomas Wickl
Hello, first of all, I´m new to Cocoa and I need some Informations about the possibilities in Cocoa to plan a new Project of mine. I want to access all Messages of my Mail.app Account. So, there is no API for Mail.app but I´ve read something about the ScriptingBridge and found that

Re: Finding the largest value in an NSTreeController?

2008-05-31 Thread Jonathan Dann
On 31 May 2008, at 21:43, Rick Mann wrote: Can category methods act as KVC properties? Yep, the -flattenedObjects method I gave you asks the array of tree nodes valueForKey:@descendants. -descendants was the NSTreeNode method I posted. Jon smime.p7s Description: S/MIME

Re: Possible Bug in NSFileManager -moveItemAtPath:toPath:error:

2008-05-31 Thread Jonathan Dann
On 31 May 2008, at 17:37, Torsten Curdt wrote: On May 31, 2008, at 18:27, Jonathan Dann wrote: Hi Guys, Just a quick one. I would expect renaming a file named HELLO.TXT to hello.txt (or another variant where the case of a few letters change) with -moveItemAtPath:toPath:error: to be

Re: Possible Bug in NSFileManager -moveItemAtPath:toPath:error:

2008-05-31 Thread Jonathan Dann
On 31 May 2008, at 18:17, Jens Alfke wrote: On 31 May '08, at 9:27 AM, Jonathan Dann wrote: Just a quick one. I would expect renaming a file named HELLO.TXT to hello.txt (or another variant where the case of a few letters change) with -moveItemAtPath:toPath:error: to be allowed. As it

Re: Opening column for edit after adding to tree controller?

2008-05-31 Thread Rick Mann
On May 31, 2008, at 13:31:10, I. Savant wrote: If you're targeting Leopard, you can force the tree controller to - fetch: (so it's updated) then I believe you can ask the outline view for its -rowForItem: ... if you're targeting Tiger, it's not as straightforward due to proxy objects.

Re: Possible Bug in NSFileManager -moveItemAtPath:toPath:error:

2008-05-31 Thread stephen joseph butler
On Sat, May 31, 2008 at 4:35 PM, Jonathan Dann [EMAIL PROTECTED] wrote: On 31 May 2008, at 18:17, Jens Alfke wrote: Try using the system call rename. (Use man 2 rename to see the documentation.) Call -fileSystemRepresentation on your path strings to convert them to appropriate C strings.

Re: Leak when animating Core Animation Superlayer

2008-05-31 Thread Brian Christensen
On May 31, 2008, at 16:39, Stéphane Droux [EMAIL PROTECTED] When I run the program in MallocDebug, the memory usage goes up every time the timer function is executed. If I change the animation to be on l2 instead of l1, or if I create l2 as a sublayer of mainLayer, the memory usage

Re: ScriptingBridge to access Mail Messages?

2008-05-31 Thread has
Thomas Wickl wrote: first of all, I´m new to Cocoa and I need some Informations about the possibilities in Cocoa to plan a new Project of mine. I want to access all Messages of my Mail.app Account. So, there is no API for Mail.app but I´ve read something about the ScriptingBridge and found

Re: Possible Bug in NSFileManager -moveItemAtPath:toPath:error:

2008-05-31 Thread Jonathan Dann
On 31 May 2008, at 22:51, stephen joseph butler wrote: On Sat, May 31, 2008 at 4:35 PM, Jonathan Dann [EMAIL PROTECTED] wrote: On 31 May 2008, at 18:17, Jens Alfke wrote: Try using the system call rename. (Use man 2 rename to see the documentation.) Call -fileSystemRepresentation on your

Re: PDFDocuments and CGPDFDocuments

2008-05-31 Thread Kevin Ross
Whoops, I sent this yesterday but didn't hit reply-all... Thanks Joel, I just took a look at the PDFAnnotationEditor example. It seems to be doing all of it's transformations in the PDFView subclass. I'm not sure if I am able to do this since I would like to perform the impositions by

Re: Copying NSTextStorage

2008-05-31 Thread Gordon Apple
New attempt. Instead of intercepting the text key in my shape CopyWithZone, I tried the obvious thing of subclassing NSTextStorage, adding the copying/mutablecopying protocols using the same copy technique of creating a new object initialized with the original. Even without the protocols,

Re: KVO: I get called on change, but then can't get the object

2008-05-31 Thread Scott Anguish
array controllers are not fully KVO compliant. they don't return change values. On May 31, 2008, at 3:21 AM, Rick Mann wrote: I registered to observe changes in the number column of my tree controller: [mItemsController addObserver: self forKeyPath:

Re: incorporating mail

2008-05-31 Thread Scott Anguish
On May 31, 2008, at 4:00 PM, Nathan wrote: Is there a way to send an email from me to someone else programatically, and also to see how many unread emails you have? the first part is asked here often. search the archives at www.cocoabuilder.com if there is no API (and there isn't) you need

Re: sorting an NSTableView

2008-05-31 Thread James W. Walker
On May 30, 2008, at 5:04 AM, Vijay Malhan wrote: An Example: mTable = member instance for your TableView mData = member array which provides the data-objects. Put the following code at a place where your table and data-source array is initialized. Like in awakeFromNib: method. Here I'm

Re: KVO: I get called on change, but then can't get the object

2008-05-31 Thread Scott Anguish
On May 31, 2008, at 6:11 AM, Jonathan del Strother wrote: On Sat, May 31, 2008 at 10:03 AM, Hamish Allan [EMAIL PROTECTED] wrote: On Sat, May 31, 2008 at 8:48 AM, Rick Mann [EMAIL PROTECTED] wrote: On May 31, 2008, at 00:32:30, j o a r wrote: Search for NSKeyValueObservingOptionNew

How do I use Sort Descriptor binding in IB on my array controller?

2008-05-31 Thread Rick Mann
I have an array controller in IB that is used by a popup menu in a table view column. I would like those menu items to be sorted. Is there a quick, mostly-IB way to configure that? The presence of a sort descriptor binding for the NSArrayController makes me think it should be pretty

Re: email

2008-05-31 Thread Chris Page
On May 28, 2008, at 08:02 AM, Jens Alfke wrote: Importing messages from Mail via AppleScript may not be fast enough — my highly scientific estimate* is a couple of messages a second. Importing someone's entire mail archive would take a long time. I just did a test and it's quite fast if

Re: email

2008-05-31 Thread Jens Alfke
On 31 May '08, at 6:19 PM, Chris Page wrote: I'm seeing average times of one to two milliseconds per message (e.g., 7 seconds for a mailbox with 4,660 messages) on a 2.5GHz Quad G5. When I run that, Script Editor and Mail both lock up for quite a while (and Script Editor's RPRVT grows

Re: ScriptingBridge to access Mail Messages?

2008-05-31 Thread Jens Alfke
On 31 May '08, at 2:07 PM, Thomas Wickl wrote: Where can I find information what is possible with Mail.app and the Scripting Bridge? Is there a description or referenz about all scripting possibilities in Mail.app? In the Script Editor appplication, choose Open Dictionary... from the

Re: Converting string to double: NSString or NSScanner

2008-05-31 Thread Michael Vannorsdel
Basically NSString's floatValue and doubleValue methods only work when the numbers use the US style dot separator (as opposed to other locale separators such as a comma). If your NSString might contain non-US separators (or other formatting differences) you'll have to use NSScanner to do

Converting string to double: NSString or NSScanner

2008-05-31 Thread Markus Spoettl
Hello List, I'm having troubles deciphering the documentation. I have doubles stored in a text file which always use the dot . as decimal separator. When converting the strings to doubles the conversion to be locale independent. The NSString:doubleValue documentation says: This method