Re: Core Animation: How to swicth off all implicit animations?

2008-11-22 Thread Matt Long
Ok. This is interesting. I wrote a little code to see what might be going on. Whatever was true when the AppKit release notes were published has either changed or the term "supported" has a loose definition. Thanks for pointing that out, Mike, but I don't think it's accurate or I've misun

Re: NSPopupUpButton not showing checked menu items

2008-11-22 Thread Steve Christensen
On Nov 22, 2008, at 6:38 PM, Kyle Sluder wrote: On Sat, Nov 22, 2008 at 9:20 PM, Steve Christensen <[EMAIL PROTECTED]> wrote: In IB I created a NSPopUpButton configured as pulldown with a static menu. I bound its selectedTag binding to a method on my window controller. (I also tried binding

Re: How do I get a CGContextRef?

2008-11-22 Thread DKJ
On 22-Nov-08, at 19:07 , Henry McGilton (Developer) wrote: That's the standard way to obtain the current context within drawRect OK, I wasn't doing it within drawRect... silly me. I'll give it a try and see what happens. dkj ___ Cocoa-dev ma

Re: Facile Core Data Question

2008-11-22 Thread Jamie Hardt
Maybe a poor choice of words on my part. s/God Object/Any old model object/ Just with the understanding that this object not be a controller. On Nov 22, 2008, at 7:07 PM, Kyle Sluder wrote: I don't see why this requires a god object; why can't your model-controller (NSPersistentDocument sub

Re: How do I get a CGContextRef?

2008-11-22 Thread Henry McGilton (Developer)
On Nov 22, 2008, at 5:48 PM, DKJ wrote: On 22-Nov-08, at 17:40 , Ken Ferry wrote: Take a look here: Thanks for the reference, but I'm doing this for iPhone, and the procedure seems to be different. The compiler doesn't recognise the NSGraphicsContext class. I tried using the UIGraphic

Re: Facile Core Data Question

2008-11-22 Thread Kyle Sluder
On Sat, Nov 22, 2008 at 9:37 PM, Jamie Hardt <[EMAIL PROTECTED]> wrote: > How to I cause a managed object to perform a certain action upon deletion? > If I were working with Ruby On Rails or some other ORMs, I'd be able to > define an on_delete method or action that would automatically be invoked.

Re: How do I get a CGContextRef?

2008-11-22 Thread Roland King
well where are you calling it? That's the correct function, but only works when there is a graphics context set, and that's only inside drawRect: in a UIView. I wandered through the documentation a little and got reasonably lost, it does talk about NSGraphicsContext in there, but remember a

Re: NSPopupUpButton not showing checked menu items

2008-11-22 Thread Kyle Sluder
On Sat, Nov 22, 2008 at 9:20 PM, Steve Christensen <[EMAIL PROTECTED]> wrote: > In IB I created a NSPopUpButton configured as pulldown with a static menu. I > bound its selectedTag binding to a method on my window controller. (I also > tried binding selectedIndex with the same results.) When I run

Facile Core Data Question

2008-11-22 Thread Jamie Hardt
How to I cause a managed object to perform a certain action upon deletion? If I were working with Ruby On Rails or some other ORMs, I'd be able to define an on_delete method or action that would automatically be invoked. In core data, it seems that the best thing to do is to have a godlik

NSPopupUpButton not showing checked menu items

2008-11-22 Thread Steve Christensen
In IB I created a NSPopUpButton configured as pulldown with a static menu. I bound its selectedTag binding to a method on my window controller. (I also tried binding selectedIndex with the same results.) When I run my code and select various of the items in the button's menu, none of the it

Re: Core Animation: How to swicth off all implicit animations?

2008-11-22 Thread Michael Ash
On Sat, Nov 22, 2008 at 2:41 PM, Wolf Hauser <[EMAIL PROTECTED]> wrote: > Hello, > > Background: the application I am trying to build consists mainly of a > WebView. And I need to perform some custom drawing in front of that WebView. > First, I simply placed (in IB) a custom view in front of the We

Re: what does FAILED TO GET ASN FROM CORESERVICES mean?

2008-11-22 Thread Michael Ash
On Sat, Nov 22, 2008 at 4:20 PM, Bill Janssen <[EMAIL PROTECTED]> wrote: > [I originally sent this, erroneously, to darwin-development. It's > failing in NSApplication.init(), so it belongs here. -- wcj] > > What's an "ASN"? How does a system daemon ever get one? > > I'm running a daemon, starte

Re: How do I get a CGContextRef?

2008-11-22 Thread DKJ
On 22-Nov-08, at 17:40 , Ken Ferry wrote: Take a look here: Thanks for the reference, but I'm doing this for iPhone, and the procedure seems to be different. The compiler doesn't recognise the NSGraphicsContext class. I tried using the UIGraphicsGetCurrentContext function, but that doesn

Re: How do I get a CGContextRef?

2008-11-22 Thread Ken Ferry
Hi DKJ, Take a look here: . -Ken On Sat, Nov 22, 2008 at 5:31 PM, DKJ <[EMAIL PROTECTED]> wrote: > The Overview section of CGContext Reference says "You can obtain a graph

How do I get a CGContextRef?

2008-11-22 Thread DKJ
The Overview section of CGContext Reference says "You can obtain a graphics context by using Quartz graphics context creation functions...". But it doesn't say where to find these functions. They don't appear to be listed in CGContext Reference itself, as far as I can see. I know there ar

Re: Core Animation: How to swicth off all implicit animations?

2008-11-22 Thread Wolf Hauser
Hi Matt, thank you for your help. [CATransaction begin]; [CATransaction setValue:(id)kCFBooleanTrue forKey:kCATransactionDisableActions]; // Your code here [CATransaction commit]; I had tried to use this, however I was not sure where to put it. My problem is with the "Your c

Re: Cocoa "canvas" view ?

2008-11-22 Thread Guillaume Laurent
On Nov 21, 2008, at 17:20 , Kyle Sluder wrote: On Fri, Nov 21, 2008 at 9:50 AM, Guillaume Laurent <[EMAIL PROTECTED]> wrote: Indeed I could :-). This is a very impressive work, thank you for it. Can you tell me more about its scalability ? What I'm planning to write is a music classical not

Re: Core Animation: How to swicth off all implicit animations?

2008-11-22 Thread Matt Long
Have you tried : [CATransaction begin]; [CATransaction setValue:(id)kCFBooleanTrue forKey:kCATransactionDisableActions]; // Your code here [CATransaction commit]; See also: http://developer.apple.com/documentation/Cocoa/Conceptual/CoreAnimation_guide/Articles/Transactions.html

Special Characters... menu item

2008-11-22 Thread jeffs87
Hi, Is there a way to keep "Special Characters..." from being added to the end of the Edit menu? thanks Jeff ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the m

what does FAILED TO GET ASN FROM CORESERVICES mean?

2008-11-22 Thread Bill Janssen
[I originally sent this, erroneously, to darwin-development. It's failing in NSApplication.init(), so it belongs here. -- wcj] What's an "ASN"? How does a system daemon ever get one? I'm running a daemon, started by SystemStarter at boot time, and running as me (an admin account), which period

Re: Fastest way to resize an image?

2008-11-22 Thread Heinrich Giesen
Hi, On 22.11.2008, at 19:36, Jean-Nicolas Jolivet wrote: Problem is... the ImageRep technique works well when I'm just scaling an image..it's quite fast too, however I am also cropping (in some cases)... and unfortunately, without the "fromRect" parameter, it's pretty much impossible to cr

Core Animation: How to swicth off all implicit animations?

2008-11-22 Thread Wolf Hauser
Hello, Background: the application I am trying to build consists mainly of a WebView. And I need to perform some custom drawing in front of that WebView. First, I simply placed (in IB) a custom view in front of the WebView. Unfortunately, my drawing always took place behind the WebView. A

Re: Fastest way to resize an image?

2008-11-22 Thread Michael Ash
On Sat, Nov 22, 2008 at 1:36 PM, Jean-Nicolas Jolivet <[EMAIL PROTECTED]> wrote: > While we're on the subject, I was wondering... does NSBitmapImageRep has an > equivalent to NSImage's > > drawInRect: fromRect: operation: fraction: > > > Problem is... the ImageRep technique works well when I'm just

Re: Testing components within an application

2008-11-22 Thread Andre Masse
Hi Frank, I used to do this back in my Java days: put a main function in the class and just run it. That was a quick way to test a class, but I don't think you can do that as easily in Cocoa. I maybe wrong though, still a noob here :-). Andre Masse On Nov 22, 2008, at 08:08, Frank Wilso

Re: bug in NSGradient?

2008-11-22 Thread Stephen J. Butler
On Sat, Nov 22, 2008 at 4:12 AM, Graham Cox <[EMAIL PROTECTED]> wrote: > Just noticed this, not what I was expecting. I'll file a bug unless someone > can convincingly explain it's correct behaviour... > > [NSGradient interpolatedColorAtLocation:]; [snip] > For the case above this depends on whet

Re: bug in NSGradient?

2008-11-22 Thread Gregory Weston
Graham Cox wrote: Just noticed this, not what I was expecting. I'll file a bug unless someone can convincingly explain it's correct behaviour... [NSGradient interpolatedColorAtLocation:]; If the gradient has stops that run from, say, 0.5 to 1.0, but is less than 0.5, this method returns nil.

Re: Fastest way to resize an image?

2008-11-22 Thread Jean-Nicolas Jolivet
Well, by digging a bit on cocoabuilder, I found about this cropping method which is really fast (enough for my needs anyway!) (imageRep is my BitmapImageRep, fromRect is the rectangle I want to crop to) CGImageRef cgImg = CGImageCreateWithImageInRect([imageRep CGImage], NSRectToCGRect(fromR

Re: Fastest way to resize an image?

2008-11-22 Thread Jean-Nicolas Jolivet
While we're on the subject, I was wondering... does NSBitmapImageRep has an equivalent to NSImage's drawInRect: fromRect: operation: fraction: Problem is... the ImageRep technique works well when I'm just scaling an image..it's quite fast too, however I am also cropping (in some cases)...

CocoaHeads Cork, Ireland

2008-11-22 Thread David Murphy
hi folks, I have set up a chapter of CocoaHeads in Cork, Ireland. If anyone in the vicinity is interested in participating (meting up) please drop me a line. cheers rgds Dave __ David Murphy Department of Computer Science University College Cork Ireland p: 00353 (

Re: Fastest way to resize an image?

2008-11-22 Thread Jean-Nicolas Jolivet
Thanks a lot for that! I'm implementing it right now and I'll do some benchmarking ! :) Just one thing, when you write: [self drawInRect:NSMakeRect( 0, 0, [sourceRep pixelsWide], [sourceRep pixelsHigh])]; Do you mean [[sourceRep drawInRect:NSMakeRect( 0, 0, [sourceRep pixelsWide], [sour

Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)

2008-11-22 Thread Alexander Spohr
Am 22.11.2008 um 01:53 schrieb mmalcolm crawford: - (void)dealloc { // release outlets and set variables to nil [anOutlet release], anOutlet = nil; [super release]; } [super dealloc] ? ;) atze ___ Cocoa-dev mailing list (Cocoa-de

Re: Fastest way to resize an image?

2008-11-22 Thread Heinrich Giesen
Hi, On 20.11.2008, at 09:05, Jean-Nicolas Jolivet wrote: I have a bunch of images to resize. anyway, right now I am loading an NSBitmapImageRep with the imageRepFromFile: method... then creating a new, empty NSImage based on the image size that I want to resize to (using initWithSize:) and

Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)

2008-11-22 Thread James Montgomerie
On 22 Nov 2008, at 16:29, mmalcolm crawford wrote: On Nov 22, 2008, at 8:16 AM, mmalcolm crawford wrote: [...] Sorry, pressed Deliver on the wrong message by mistake. Let me check on this one. Oops, sorry, looks like we're mailing around each other now... Jamie. ___

Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)

2008-11-22 Thread James Montgomerie
But I'm assuming that self.anOutlet will be valid if and only if self.view is already valid (in which case the call to self.view.superview should be safe, no?). Under this assumption, if self.anOutlet is nil, the && be short- circuited and self.view never called; if it is valid, it's safe to

Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)

2008-11-22 Thread mmalcolm crawford
On Nov 22, 2008, at 8:16 AM, mmalcolm crawford wrote: [...] Sorry, pressed Deliver on the wrong message by mistake. Let me check on this one. mmalc ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moder

Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)

2008-11-22 Thread mmalcolm crawford
On Nov 22, 2008, at 7:58 AM, James Montgomerie wrote: if(self.anOutlet && !self.view.superview) { On Nov 19, 2008, at 12:59 AM, mmalcolm crawford wrote: You could invoke 'view': - (void)didReceiveMemoryWarning { if ([self.view superview] == nil) { // set outlets to nil

Re: Responding to view controller memory warnings (was Re: Outlets / IBOutlet declarations)

2008-11-22 Thread James Montgomerie
On 22 Nov 2008, at 00:53, mmalcolm crawford wrote: Context: UIViewController provides a method, didReceiveMemoryWarning, which is invoked on view controllers when the amount of memory available to the application is severely constrained. The goal of the method is to allow view controller

Re: NSCollectionView woes

2008-11-22 Thread Cem
Thanks, that worked! I do try to read the examples and CocoaDev, but I've found that after I've read the examples, the only way I really learn is by trying and sometimes failing. I appreciate the help and the quick response. Thanks, Cem Karan On Nov 21, 2008, at 1:55 PM, Volker in Lists

Re: Testing components within an application

2008-11-22 Thread Graham Cox
On 23 Nov 2008, at 12:08 am, Frank Wilson wrote: Is there a way that seasoned cocoa (Obj-C) programers test particular parts of their code without running the whole application? For instance if I have built a particular interface component I would like to interact with it and verify that t

Testing components within an application

2008-11-22 Thread Frank Wilson
Is there a way that seasoned cocoa (Obj-C) programers test particular parts of their code without running the whole application? For instance if I have built a particular interface component I would like to interact with it and verify that the model is being changed correctly or simply demons

bug in NSGradient?

2008-11-22 Thread Graham Cox
Just noticed this, not what I was expecting. I'll file a bug unless someone can convincingly explain it's correct behaviour... [NSGradient interpolatedColorAtLocation:]; If the gradient has stops that run from, say, 0.5 to 1.0, but is less than 0.5, this method returns nil. I would have exp