• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: (no subject)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (no subject)


  • Subject: Re: (no subject)
  • From: Ondra Cada <email@hidden>
  • Date: Fri, 28 Apr 2006 17:17:07 +0200

Daniel,

On 28.4.2006, at 17:06, Daniel Steward wrote:

I'm trying to add some test cases to look at undo/redo in my OCUnit tests. I don't want to start the application to do this, I just want to test the data model. What I've discovered is that using [[NSUndoManager alloc] init] in the context of a running application produces the desired NSUndoManager. The same code running in a test case will produce an NSDictionary.

The problem does not seem to lay in the undo manager or application:

165 /tmp> >q.m
#import <Cocoa/Cocoa.h>
int main() {
[NSAutoreleasePool new];
id um=[[NSUndoManager alloc] init];
NSLog(@"we got a %@ (%@)",[um class],um);
return 0;
}
166 /tmp> cc -Wall q.m -framework Cocoa && ./a.out
2006-04-28 17:14:59.557 a.out[10334] we got a NSUndoManager (<NSUndoManager: 0x5068d0>)
167 /tmp>


Perhaps there is some OCUnit trickery there--dunno, I haven't switched to it from my own testing suite yet, though I intend to (ars longa, vita brevis, ya know... :))
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc



_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >(no subject) (From: Daniel Steward <email@hidden>)

  • Prev by Date: getting an NSUndoManager in an OCUnit test case
  • Next by Date: Re: Standard authentication interface
  • Previous by thread: (no subject)
  • Next by thread: (no subject)
  • Index(es):
    • Date
    • Thread