Re: /Library/Logs vs. user/Library/Logs

2008-10-22 Thread Neil
I'm inclined to go with ~/Library/Logs as well. As a user, I tend to be annoyed by apps that drop files outside of my home directory. And please don't take the route of putting logs in ~/Documents, as a some programs do (though I suspect your app isn't writing those sort of logs). There

Re: KVO and lazy loading

2008-10-22 Thread Ashley Clark
On Oct 23, 2008, at 12:42 AM, Ron Lue-Sang wrote: Hey Ashley, On Oct 21, 2008, at 12:23 AM, Ashley Clark wrote: I'm pretty sure I've got this worked out and it seems to be working, BUT I thought that before and when I turned on Auto Arrange Content on my NSArrayController's this bug popped

Re: /Library/Logs vs. user/Library/Logs

2008-10-22 Thread Kiel Gillard
Hi Chris and welcome to Mac OS X development, The only helpful suggestion I can think of is to have a read of the following document: It *may* help you determine where you want to sto

Re: KVO and lazy loading

2008-10-22 Thread Ron Lue-Sang
Hey Ashley, On Oct 21, 2008, at 12:23 AM, Ashley Clark wrote: I'm pretty sure I've got this worked out and it seems to be working, BUT I thought that before and when I turned on Auto Arrange Content on my NSArrayController's this bug popped up. So I wanted to make sure I'm doing this right

/Library/Logs vs. user/Library/Logs

2008-10-22 Thread Chris Markle
New to OS X development here... I see some things log to /Library/Logs and others to user/Library/Logs (user=an individual account). I'm thinking my app, which is a user-oriented app (not a system app) would log to the user-specific location. Unless it's bad form to log there and there is some othe

Re: commitEditing

2008-10-22 Thread Ron Lue-Sang
The only reason a controller would return NO for commitEditing is that one of *its* editors refused to commitEditing. Up the chain somewhere, there must be a textField bound to the controller or one of its detail controllers and a formatter or validation method is saying that the current va

Re: Memory Leaks in CocoaEcho Sample

2008-10-22 Thread Jens Beuckenhauer
Hello, Then the bug is somewhere in your changes. The only thing you should do is remove the retain calls. If you also remove the release calls, you will still have the memory leaks. Here's what openStreams should look like: - (void)openStreams { [inputStream setDelegate:self]; [ou

Re: CGPoint wrapper?

2008-10-22 Thread Graff
On Oct 22, 2008, at 5:49 PM, DKJ wrote: Is there some straightforward way of wrapping a CGPoint so I can put it in an NSArray? I don't want to use a C array because I want to have fast enumeration available. Or should I just write a simple NSPoint - CGPoint conversion method? NSPoint and CGPoi

Persistent Connection to Web Server in cocoa, emulating AJAX

2008-10-22 Thread Jack Carbaugh
What is the best way to emulate, with cocoa, an AJAX persistent connection to a web server. I've reviewed NSURLConnection, but am not sure if it what i need. Thank you! Jack ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post

Re: Core data one-to-many: how to set relationship for newly added 'many' objects?

2008-10-22 Thread Sean McBride
Jerry Krinock ([EMAIL PROTECTED]) on 2008-10-22 8:31 PM said: >> A basic question: >> I have a Core Data model which has a one-to-many relationship, say >> one Department and several Employees. > >> When an Employee is added using the 'add' button of the standard >> interface, how can I set the re

problem with [NSImage drawAtPoint:fromRect:operation:fraction:]

2008-10-22 Thread Kenny Leung
Hi All. I just want to check with the populous to make sure I have not gone stupid or insane. The documentation for [NSImage drawAtPoint:fromRect:operation:fraction:] states: "The image content is drawn at its current resolution and is not scaled unless the CTM of the current coordinate s

Re: Creating Toolbar Items in IB

2008-10-22 Thread John Joyce
It is still buggy. Sometimes arrangements and sizes stick. Sometimes they don't. Use list/tree view in the "document" window of IB. This is the easy to forget about, but very useful way to be sure you're connecting outlets. Particularly, with toolbar items. __

Re: CGPoint wrapper?

2008-10-22 Thread Kiel Gillard
Use NSValue's valueWithPoint class method. Kiel On 23/10/2008, at 1:06 PM, DKJ wrote: I've just found NSPointFromCGPoint() etc,. On 22 Oct, 2008, at 18:49, DKJ wrote: Is there some straightforward way of wrapping a CGPoint so I can put it in an NSArray? I don't want to use a C array beca

Re: Creating Toolbar Items in IB

2008-10-22 Thread Kiel Gillard
On 23/10/2008, at 12:33 PM, Quincey Morris wrote: On Oct 22, 2008, at 17:39, Graham Cox wrote: I can place a toolbar in my window, and I can add items to it. I can set the delegate outlet of the toolbar to my document controller. What I can't do is to tie any outlets to the toolbar items or

Re: CGPoint wrapper?

2008-10-22 Thread DKJ
I've just found NSPointFromCGPoint() etc,. On 22 Oct, 2008, at 18:49, DKJ wrote: Is there some straightforward way of wrapping a CGPoint so I can put it in an NSArray? I don't want to use a C array because I want to have fast enumeration available. Or should I just write a simple NSPoint

Re: Unregistered weak referrer

2008-10-22 Thread Bill Bumgarner
On Oct 22, 2008, at 4:48 PM, Ross Carter wrote: Yes, GC is enabled. I get the message when I remove a subview from a NSScrollView's documentView. The removed subview contains 3 NSTextViews, 2 of which have their own layoutManager and textStorage. A lot of code fires at that time. Without kno

CGPoint wrapper?

2008-10-22 Thread DKJ
Is there some straightforward way of wrapping a CGPoint so I can put it in an NSArray? I don't want to use a C array because I want to have fast enumeration available. Or should I just write a simple NSPoint - CGPoint conversion method? dkj ___ C

Re: Creating Toolbar Items in IB

2008-10-22 Thread Quincey Morris
On Oct 22, 2008, at 18:33, Quincey Morris wrote: There were some bugs in IB's toolbar handling, where it wouldn't save the toolbar after you changed it. I'm not sure if that bug is still in the shipping 3.1 version. Sorry, I meant "... in the shipping 3.1.1 version." _

Re: Creating Toolbar Items in IB

2008-10-22 Thread Quincey Morris
On Oct 22, 2008, at 17:39, Graham Cox wrote: I can place a toolbar in my window, and I can add items to it. I can set the delegate outlet of the toolbar to my document controller. What I can't do is to tie any outlets to the toolbar items or set any actions or targets for the items. IB's in

Re: Creating Toolbar Items in IB

2008-10-22 Thread Rob Keniger
On 23/10/2008, at 10:39 AM, Graham Cox wrote: I can place a toolbar in my window, and I can add items to it. I can set the delegate outlet of the toolbar to my document controller. What I can't do is to tie any outlets to the toolbar items or set any actions or targets for the items. IB's

Creating Toolbar Items in IB

2008-10-22 Thread Graham Cox
Hi all, I'm getting myself thoroughly confused about setting up toolbar items in IB. Previously I've never bothered - just handled the whole toolbar thing in code. But the new IB seems to support setting this up in the nib. I can place a toolbar in my window, and I can add items to it. I

Re: Core data one-to-many: how to set relationship for newly added 'many' objects?

2008-10-22 Thread Jerry Krinock
On 2008 Oct, 22, at 13:55, Arthur C. wrote: A basic question: I have a Core Data model which has a one-to-many relationship, say one Department and several Employees. When an Employee is added using the 'add' button of the standard interface, how can I set the relationship to the (one) ins

Re: Unregistered weak referrer

2008-10-22 Thread Kiel Gillard
I don't have much experience with GC, so I'd suggest you check out or wait until someone with some experience in GC can help you out. GC keeps tabs on all your

Re: WebView: Open new windows in default browser

2008-10-22 Thread Philippe.Casgrain
> I've been trying to get a WebView to open in the user's default browser. In > fact, I've succeeded, but it's rather clunky, > and I'm wondering if there's a better way. Why not simply add "target=_'blank'" to your URLs? No WebView hacking needed. http://my.external.url"; title="What the user s

Re: Unregistered weak referrer

2008-10-22 Thread Ross Carter
Yes, GC is enabled. I get the message when I remove a subview from a NSScrollView's documentView. The removed subview contains 3 NSTextViews, 2 of which have their own layoutManager and textStorage. A lot of code fires at that time. Without knowing what "unregistered weak referrer" means, o

Re: Drawing an image via 9 slices?

2008-10-22 Thread Randall Meadows
On Oct 22, 2008, at 5:41 PM, mmalc crawford wrote: On Oct 22, 2008, at 4:33 PM, Randall Meadows wrote: And yes, it appears to be completely UNdocumented, except for the header file. Thanks for the heads up -- bug filed. No, thank *you*! Now I can scratch that off my list. __

Re: Drawing an image via 9 slices?

2008-10-22 Thread mmalc crawford
On Oct 22, 2008, at 4:33 PM, Randall Meadows wrote: And yes, it appears to be completely UNdocumented, except for the header file. Thanks for the heads up -- bug filed. mmalc ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: Unregistered weak referrer

2008-10-22 Thread Kiel Gillard
Hi Ross, Do you have garbage collection enabled? Can you give us any hints as to why you'd be getting that message? Kiel On 23/10/2008, at 10:31 AM, Ross Carter wrote: What does this console message mean? malloc: auto malloc[542]: attempted to remove unregistered weak referrer 0x128538c

Re: Drawing an image via 9 slices?

2008-10-22 Thread Randall Meadows
On Oct 22, 2008, at 5:26 PM, Ashley Clark wrote: On Oct 22, 2008, at 6:21 PM, Randall Meadows wrote: I'd have sworn in times past I've run across a Cocoa method that takes 9 "slice" of an image, and expands the middle piece while retaining the outer 8 pieces to create an "expandable" image.

Unregistered weak referrer

2008-10-22 Thread Ross Carter
What does this console message mean? malloc: auto malloc[542]: attempted to remove unregistered weak referrer 0x128538c ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Cont

Re: Drawing an image via 9 slices?

2008-10-22 Thread Ashley Clark
On Oct 22, 2008, at 6:21 PM, Randall Meadows wrote: I'd have sworn in times past I've run across a Cocoa method that takes 9 "slice" of an image, and expands the middle piece while retaining the outer 8 pieces to create an "expandable" image. (Imagine a button image with a custom border, bu

Re: LSUIElement application and coming to the front

2008-10-22 Thread Nick Beadman
Following up on my own post. Off list some suggested that I implement - [NSWindow canBecomeKeyWindow] returning NO. Unfortunately, this stops any keyboard entry in the window which I need. I know this is possible as the Help Viewer application allows for keyboard entry but doesn't stop keybo

Drawing an image via 9 slices?

2008-10-22 Thread Randall Meadows
I'd have sworn in times past I've run across a Cocoa method that takes 9 "slice" of an image, and expands the middle piece while retaining the outer 8 pieces to create an "expandable" image. (Imagine a button image with a custom border, but a plain gray middle. using this alleged method, y

Re: Memory Leaks in CocoaEcho Sample

2008-10-22 Thread Gary L. Wade
Then the bug is somewhere in your changes. The only thing you should do is remove the retain calls. If you also remove the release calls, you will still have the memory leaks. Here's what openStreams should look like: - (void)openStreams { [inputStream setDelegate:self]; [outputStream

Re: When does Cocoa fall apart? (Run loops)

2008-10-22 Thread Chris Idou
I think bindings don't merely avoid glue code, it also provides a separation of concerns. For example, I can do something to my document which changes the isEnabled status of a dozen toolbar buttons. Rather than the procedure which changes the document trying to anticipate every button that cou

Re: Memory Leaks in CocoaEcho Sample

2008-10-22 Thread Jens Beuckenhauer
Hello, To move beyond the memory leaks in an untouched version of EchoClient, the only thing you need to do is remove the retain calls in openStreams. The call to -[NSNetService getInputStream:outputStream:] calls CFStreamCreatePairWithSocketToNetService, which is a "create" function.

commitEditing

2008-10-22 Thread Chris Idou
I'm calling commitEditing on a NSObjectController, and its returning NO, for no apparent or obvious reason. How am I supposed to debug these things? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests o

Re: Memory Leaks in CocoaEcho Sample

2008-10-22 Thread Gary L. Wade
To move beyond the memory leaks in an untouched version of EchoClient, the only thing you need to do is remove the retain calls in openStreams. The call to -[NSNetService getInputStream:outputStream:] calls CFStreamCreatePairWithSocketToNetService, which is a "create" function. To verify this,

Re: Increment object property

2008-10-22 Thread Charles Steinman
--- On Wed, 10/22/08, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Newbie question, Is it possible to have an object property > that > increments everytime an object is instantiated? Simplest solution: Just increment a static int and insert that into your string. Fancy it up as appropriate t

Re: Rotating a QTMovie doesn't work the way it used to

2008-10-22 Thread E. Wing
> So does anyone know whether this is a problem that's specific for > dealing with QuickTime movies from a cocoa app? Or is there a more > elegant way of rotating movies? > I don't know anything about the old QuickTime APIs. But I would suggest the new way to do this is use Core Animation. You mig

Re: another n00b question -- how to find a memory leak

2008-10-22 Thread Shawn Erickson
On Wed, Oct 22, 2008 at 2:21 PM, John Zorko <[EMAIL PROTECTED]> wrote: > >appDelegate.playbackThreadFinished = false; >appDelegate.playbackThreadFinished = true; ... > ... and I have this KVO handler: > > - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object >

Adding QTMovie to directory wrapper

2008-10-22 Thread Matt Crocker
Folks, I have an application that saves several pieces of data, most of which are simple NSMutableArrays. To keep things tidy and flexible, I encode all of these into separate file wrappers within a directory file wrapper. This works fine. Now, I have a QTMovie that I would also like to s

Re: another n00b question -- how to find a memory leak

2008-10-22 Thread John Zorko
Shawn, I'm using KVO in this case as a means to only do certain processing when a thread really exits. I start my Core Audio thread like this: - (void)start { streamerThread = [[NSThread alloc] initWithTarget:self selector:@selector(startInternal) object:nil]; [[NSNotif

Re: Get text width outside a view

2008-10-22 Thread Christian Giordano
Probably my method was working but sizeWithFont is definitely the one to be used. Thanks a lot! chr On Wed, Oct 22, 2008 at 7:27 PM, Marco Masser <[EMAIL PROTECTED]> wrote: >> I'm trying to calculate the width of a text > > Cocoa: NSAttributedString(AppKitAdditions) implements a method named

Localized pdf (and other) documents/files

2008-10-22 Thread Sjur Moshagen
Hello, Way back in 2002, there was a short discussion about the idea of providing localized readme files as part of an improved software delivery experience (http://lists.apple.com/archives/cocoa-dev/2002/Mar/msg00301.html ). Later Apple has used the same idea to provide pdf files as bundl

Re: Memory Leaks in CocoaEcho Sample

2008-10-22 Thread Marco Masser
Sorry about any confusion that I may have caused! The color I got from the NSGradient's -getColor:location:atIndex: actually was autoreleased, but the NSGradient was not. Therefore, the color always had an retain count of 1. Sorry about that. If you are trying to find a leak, then use one

Re: another n00b question -- how to find a memory leak

2008-10-22 Thread Shawn Erickson
On Wed, Oct 22, 2008 at 1:46 PM, John Zorko <[EMAIL PROTECTED]> wrote: > > Bill, > > Alas, I found it 10 minutes after I posted the message *sigh* ... I forgot > the autorelease pool in my override of > -observeValueForKeyPath:ofObject:change:contet: ... the console message is > gone now :-) > Hum

Re: Memory Leaks in CocoaEcho Sample

2008-10-22 Thread Jens Beuckenhauer
Hello, The retains in -openStreams are balanced by the releases in - closeStreams. Similarly, the streams are retained/released in a balanced fashion within the server. So, unless the server is never shutting down, that isn't the source of your leak -- there must be an unbalanced -r

Core data one-to-many: how to set relationship for newly added 'many' objects?

2008-10-22 Thread Arthur C .
A basic question: I have a Core Data model which has a one-to-many relationship, say one Department and several Employees. When an Employee is added using the 'add' button of the standard interface, how can I set the relationship to the (one) instance of Department? It means you need access to t

Re: Memory Leaks in CocoaEcho Sample

2008-10-22 Thread Bill Bumgarner
On Oct 22, 2008, at 1:35 PM, Jens Beuckenhauer wrote: Hello, In general, the retain count is entirely meaningless. The retain count of any given object, especially objects that were created by or have passed through the Apple provided frameworks, may be seemingly random due to the internal

Re: another n00b question -- how to find a memory leak

2008-10-22 Thread John Zorko
Bill, Alas, I found it 10 minutes after I posted the message *sigh* ... I forgot the autorelease pool in my override of - observeValueForKeyPath:ofObject:change:contet: ... the console message is gone now :-) Many thanks anyway, though! Do this in your callback: { NSAutoreleas

Re: another n00b question -- how to find a memory leak

2008-10-22 Thread Bill Bumgarner
On Oct 22, 2008, at 1:15 PM, John Zorko wrote: I've found a few leaks in my app using Instruments, and it works well, but i've this message that appears in the console window when I run the app under XCode, and i'm not sure how to find the cause: 2008-10-22 13:06:57.998 Magnatune[1956:dc23]

Re: Memory Leaks in CocoaEcho Sample

2008-10-22 Thread Jens Beuckenhauer
Hello, In general, the retain count is entirely meaningless. The retain count of any given object, especially objects that were created by or have passed through the Apple provided frameworks, may be seemingly random due to the internal implementation details of the class or of the frame

Re: Increment object property

2008-10-22 Thread Keary Suska
On Oct 22, 2008, at 2:10 PM, [EMAIL PROTECTED] wrote: Newbie question, Is it possible to have an object property that increments everytime an object is instantiated? You can have a static variable defined in the implementation file, and it will be persistent across the class, but will be i

another n00b question -- how to find a memory leak

2008-10-22 Thread John Zorko
Hello, all ... I've found a few leaks in my app using Instruments, and it works well, but i've this message that appears in the console window when I run the app under XCode, and i'm not sure how to find the cause: 2008-10-22 13:06:57.998 Magnatune[1956:dc23] *** _NSAutoreleaseNoPool():

Re: Memory Leaks in CocoaEcho Sample

2008-10-22 Thread Clark Cox
On Wed, Oct 22, 2008 at 12:54 PM, Marco Masser <[EMAIL PROTECTED]> wrote: >>> P.S.: I just tested NSGradient's -getColor:location:atIndex: method (the >>> only one I could find that returns an object by reference) and here too, the >>> first parameter (an NSColor **) has a retain count of 1 and is

Re: Memory Leaks in CocoaEcho Sample

2008-10-22 Thread Nick Zitzmann
On Oct 22, 2008, at 1:54 PM, Marco Masser wrote: I don't know of any way to look into an autorelease pool, if you mean that : ) I just made an NSColor ivar and retained it after calling - getColor:location:atIndex: and took a look on its retain count in a second method that was called aft

Increment object property

2008-10-22 Thread gumboots
Newbie question, Is it possible to have an object property that increments everytime an object is instantiated? @interface foo : NSObject { NSString*name; } @property (copy,readwrite) NSString *name; @end #import "foo.h" @implementation foo - (id) init { self = [super i

Re: Memory Leaks in CocoaEcho Sample

2008-10-22 Thread Bill Bumgarner
On Oct 22, 2008, at 12:54 PM, Marco Masser wrote: I don't know of any way to look into an autorelease pool, if you mean that : ) I just made an NSColor ivar and retained it after calling - getColor:location:atIndex: and took a look on its retain count in a second method that was called afte

Re: Memory Leaks in CocoaEcho Sample

2008-10-22 Thread Marco Masser
P.S.: I just tested NSGradient's -getColor:location:atIndex: method (the only one I could find that returns an object by reference) and here too, the first parameter (an NSColor **) has a retain count of 1 and is not autoreleased. How do you know that it isn't autoreleased? I don't know o

Re: Memory Leaks in CocoaEcho Sample

2008-10-22 Thread Nick Zitzmann
On Oct 22, 2008, at 1:05 PM, Marco Masser wrote: P.S.: I just tested NSGradient's -getColor:location:atIndex: method (the only one I could find that returns an object by reference) and here too, the first parameter (an NSColor **) has a retain count of 1 and is not autoreleased. How do

Re: Memory Leaks in CocoaEcho Sample

2008-10-22 Thread Marco Masser
I'm just building my own application based on the CocoaEcho sample from Apple. But the CocoaEcho Client is full of memory leaks. These leaks occur, when you select and deselect a CocoaEchoServer some times by clicking on them and again next to them Leaked Objects are: SCNetworkReachability

Re: How to use third-party library in cocoa program?

2008-10-22 Thread Nick Zitzmann
On Oct 22, 2008, at 3:38 AM, Venture Lee wrote: 1. How to use the library in my program? Just link to it. Mind you, legally, you can only link to the MySQL libraries directly if your software is free/open source, or if you've bought a commercial license from the MySQL people. Other

LSUIElement application and coming to the front

2008-10-22 Thread Nick Beadman
I am working on an application which is a floating palette that only appears when another application is frontmost. I have set LSUIElement in the Info.plist but when the palette comes to the front my application becomes active keyboard shortcuts no longer work in the other application. In

Re: [Q] Hiding zoom & minimize buttons

2008-10-22 Thread glenn andreas
On Oct 22, 2008, at 10:13 AM, Eric Gorr wrote: On Oct 22, 2008, at 10:53 AM, Michael Ash wrote: On Wed, Oct 22, 2008 at 10:36 AM, Eric Gorr <[EMAIL PROTECTED]> wrote: I found this old thread: http://lists.apple.com/archives/cocoa-dev/2006/Mar/msg01864.html and I would like to know the sa

Re: Get text width outside a view

2008-10-22 Thread Marco Masser
I'm trying to calculate the width of a text Cocoa: NSAttributedString(AppKitAdditions) implements a method named - size which gives you the size as if the string was drawn with the attributes set. Cocoa Touch: NSString(UIStringDrawing) has some methods starting with - sizeWithFont... which

Re: NSInMemoryStoreType: Not really "persistent", is it?

2008-10-22 Thread Jerry Krinock
On 2008 Oct, 21, at 16:53, Bill Bumgarner wrote: Well, it is persistent. Just don't turn off your machine or shut down the app. In all seriousness, a persistent store the interface between the coordinator and the permanent state of your object graph -- both for reading and writing. Whe

Re: what do you use to make icons and similar?

2008-10-22 Thread Chris Paveglio
Adobe Illustrator CS3 and up has a feature called "live trace" which is like the old Streamline program, to trace raster images into vector format. There is also an app called Vector Magic that can vectorize images, there is a demo online somewhere. As a professional graphic designer breaking in

Re: Using Core Animation to animate view properties?

2008-10-22 Thread Jim Correia
On Oct 22, 2008, at 12:54 PM, Matt Long wrote: 1. If you want to know whether an animation is still running, just check to see if it is still in the animations dictionary in the layer. A call like this would do it: [...] How you apply this to view properties, I'm not sure, but this is how

Re: [Q] Hiding zoom & minimize buttons

2008-10-22 Thread Gordon Apple
Here is what I do in the window controller or in the code that loads the window: - (void)windowDidLoad { //Hiding the disabled window buttons (removing them is deadly -- don't do it!) [[[self window] standardWindowButton:NSWindowMiniaturizeButton] setFrame:NSZeroRect]; [[[self wind

Re: [Q] Hiding zoom & minimize buttons

2008-10-22 Thread Joe Strout
On Oct 22, 2008, at 8:36 AM, Eric Gorr wrote: While it is possible to obtain the button by doing: NSButton *miniaturizeButton = [myWindow standardWindowButton:NSWindowMiniaturizeButton]; [miniaturizeButton removeFromSuperview]; this results in a crash. Also, how can one create a window wit

How to use third-party library in cocoa program?

2008-10-22 Thread Venture Lee
Hello guys: I have a program written by cocoa, I would like to use the mysql c client library, it's in /usr/local/mysql/include and /usr/local/mysql/lib. These are two questions: 1. How to use the library in my program? 2. How to link the library statically? because this pro

Infinite scrolling with CALayer

2008-10-22 Thread Fabrizio Guglielmino
Hi all, I'm trying to simulate an endless vertical scrolling using CALayer. In my first test I made a simple texture (it's a street asphalt) and I create a CALayer with this texture as content. I made also a socond layer with same content attached on top to the main layer, simply incrementing the p

WebView: Open new windows in default browser

2008-10-22 Thread Benjamin Dobson
Hi all, I've been trying to get a WebView to open in the user's default browser. In fact, I've succeeded, but it's rather clunky, and I'm wondering if there's a better way. At the moment, this is what I do: My main WebView's method for opening windows is controlled via UIDelegate. These

Re: Putting an image on a CALayer

2008-10-22 Thread David Duncan
On Oct 22, 2008, at 12:09 AM, Patrick Mau wrote: On 22.10.2008, at 02:54, DKJ wrote: Me again. I've been using this code: NSURL *url = [NSURL fileURLWithPath:fname]; CGImageSourceRef source = CGImageSourceCreateWithURL((CFURLRef)url, NULL); CGImageRef image = CGImageSourceCreateIm

Re: Yet another CALayer puzzle

2008-10-22 Thread DKJ
That did the trick! Thanks. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscr

Single Bit editable Image Mask (and other strangeness)

2008-10-22 Thread Development
Good day! I am working on pixel based drawing tool, and could use some hint on how to handle selection areas. In the program, each document has a couple different Bitmap context (24 bit RGP space CGBitmapContext ) at the same time. I draw into a scroll view using a Layer (CGLayer). Whenev

Re: NSInMemoryStoreType: Not really "persistent", is it?

2008-10-22 Thread Bill Bumgarner
On Oct 22, 2008, at 9:05 AM, Houdah - ML Pierre Bernard wrote: (I did a little demo app at one point long ago that used an in memory store to cache results from Amazon's web services API. The front end was all pure Cocoa / bindings / CD with a minimal amount of additional code to pull data

Re: Yet another CALayer puzzle

2008-10-22 Thread Ken Ferry
You need to override -initWithCoder: in addition to -initWithFrame:. NSView has two designated initializers. -Ken On Wed, Oct 22, 2008 at 9:48 AM, DKJ <[EMAIL PROTECTED]> wrote: > I've got myView and myController objects in my nib file. myView is an > IBOutlet of myController. I put this in the

Re: Yet another CALayer puzzle

2008-10-22 Thread David Duncan
On Oct 22, 2008, at 9:48 AM, DKJ wrote: I've got myView and myController objects in my nib file. myView is an IBOutlet of myController. I put this in the initWithFrame: method of myView: CALayer *rootLayer = [CALayer layer]; [self setLayer:rootLayer]; [self setWantsL

Re: Using Core Animation to animate view properties?

2008-10-22 Thread Matt Long
Hey Jim, I don't know much about NSAnimation as I haven't used it, however, I can try to answer your three questions from a Core Animation standpoint. 1. If you want to know whether an animation is still running, just check to see if it is still in the animations dictionary in the layer.

Yet another CALayer puzzle

2008-10-22 Thread DKJ
I've got myView and myController objects in my nib file. myView is an IBOutlet of myController. I put this in the initWithFrame: method of myView: CALayer *rootLayer = [CALayer layer]; [self setLayer:rootLayer]; [self setWantsLayer:YES]; But when I read myView's wants

Re: CALayer graphics context

2008-10-22 Thread David Duncan
On Oct 22, 2008, at 8:00 AM, Patrick Mau wrote: A CALayer itself is not associated with a context. The NSView owns the graphics context. Actually when your in layer backing mode, the CALayer owns the graphics context. The context you are looking for is passed to the "drawLayer:inContext

Re: What is _NSViewAuxiliary?

2008-10-22 Thread Gregory Weston
On Oct 22, 2008, at 11:39 AM, Ken Ferry wrote: On Wed, Oct 22, 2008 at 8:29 AM, Gregory Weston <[EMAIL PROTECTED]> wrote: I've got a view registered as an observer for a certain notification, and very sporadically I see a message indicating that in the course of trying to post a notificati

Re: NSInMemoryStoreType: Not really "persistent", is it?

2008-10-22 Thread Houdah - ML Pierre Bernard
(I did a little demo app at one point long ago that used an in memory store to cache results from Amazon's web services API. The front end was all pure Cocoa / bindings / CD with a minimal amount of additional code to pull data from amazon and push it into the local store). Is that demo

Re: What is _NSViewAuxiliary?

2008-10-22 Thread Ken Ferry
On Wed, Oct 22, 2008 at 8:29 AM, Gregory Weston <[EMAIL PROTECTED]> wrote: > I've got a view registered as an observer for a certain notification, and > very sporadically I see a message indicating that in the course of trying to > post a notification an exception is raised because an instance of

What is _NSViewAuxiliary?

2008-10-22 Thread Gregory Weston
I've got a view registered as an observer for a certain notification, and very sporadically I see a message indicating that in the course of trying to post a notification an exception is raised because an instance of some class called _NSViewAuxiliary is being sent the message corresponding

Re: [Q] Hiding zoom & minimize buttons

2008-10-22 Thread Eric Gorr
On Oct 22, 2008, at 10:53 AM, Michael Ash wrote: On Wed, Oct 22, 2008 at 10:36 AM, Eric Gorr <[EMAIL PROTECTED]> wrote: I found this old thread: http://lists.apple.com/archives/cocoa-dev/2006/Mar/msg01864.html and I would like to know the same thing. Unfortunately, the old thread did not

Re: Core Data: The file is not in the right format - sometimes!

2008-10-22 Thread I. Savant
Robert: > this bug drives me crazy for a long time now. I hope someone has another > hint what I could try out to fix it. In the five days since you first posted this same message, nobody has responded. Rather than re-post the same message, you might try adding a bit more detail. For example:

Re: When does Cocoa fall apart? (Run loops)

2008-10-22 Thread dreamcat7
On 22 Oct 2008, at 14:56, Chris Idou wrote: Nope, just one thread. I'm finding KVO and bindings to be extremely flakey. Maybe I'm pushing them harder than other folks, I don't know, because I'm starting to use them all over the place. I'll try the finishInit mentioned by dreamcat, and s

Re: CALayer graphics context

2008-10-22 Thread Patrick Mau
Hi dkj A CALayer itself is not associated with a context. The NSView owns the graphics context. The context you are looking for is passed to the "drawLayer:inContext" message. Simply set a delegate of your layer and send 'setNeedsDisplay' once to setup your content. Here's an example: -

Re: NSInMemoryStoreType: Not really "persistent", is it?

2008-10-22 Thread Dave Dribin
On Oct 21, 2008, at 6:53 PM, Bill Bumgarner wrote: The in memory store is actually extremely useful for caches and as a backing store for applications that read/write to/from some kind of server -- typically an XML RPC of some type -- that wants to take full advantage of CD's object graph ma

Re: [Q] Hiding zoom & minimize buttons

2008-10-22 Thread Michael Ash
On Wed, Oct 22, 2008 at 10:36 AM, Eric Gorr <[EMAIL PROTECTED]> wrote: > I found this old thread: > > http://lists.apple.com/archives/cocoa-dev/2006/Mar/msg01864.html > > and I would like to know the same thing. Unfortunately, the old thread did > not conclude with an answer. > > While it is possib

CALayer graphics context

2008-10-22 Thread DKJ
Is there a quick way to get a CGContextRef for a CALayer? I don't see anything obvious in the documentation for the CALayer class. dkj ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to

Re: looking for reference to a dictionary

2008-10-22 Thread Michael Ash
On Tue, Oct 21, 2008 at 12:08 PM, Stefan Wolfrum <[EMAIL PROTECTED]> wrote: > Hi all, > > I have an array. Each array entry is a dictionary. Each dictionary has two > key/value pairs (all are strings). > > Now I get from somewhere else the value (a string) corresponding to one of > the keys. It's e

[Q] Hiding zoom & minimize buttons

2008-10-22 Thread Eric Gorr
I found this old thread: http://lists.apple.com/archives/cocoa-dev/2006/Mar/msg01864.html and I would like to know the same thing. Unfortunately, the old thread did not conclude with an answer. While it is possible to obtain the button by doing: NSButton *miniaturizeButton = [myWindow sta

Re: @property and HeaderDoc

2008-10-22 Thread Jason Stephenson
Jerry Krinock wrote: If anyone has written any Xcode user scripts for inserting Doxygen templates, to replace those useless "HeaderDoc Insert" templates, let me know. You might want to look at this: http://brianray.chipy.org/doxygen/ (Although it does not appear to be working at the momen

Core Data: The file is not in the right format - sometimes!

2008-10-22 Thread Robert Fischer
Hi, this bug drives me crazy for a long time now. I hope someone has another hint what I could try out to fix it. My application writes and opens Core Data files in XML format. Sometimes I can't find any way to open an existing file. After spinning wheel for a minute (!), the app states:

Re: When does Cocoa fall apart? (Run loops)

2008-10-22 Thread I. Savant
On Wed, Oct 22, 2008 at 9:56 AM, Chris Idou <[EMAIL PROTECTED]> wrote: > The problem I reported recently where NSObjectController screws up KVO has > been confirmed by Apple as a real bug as well. I'm not too impressed with > Cocoa at the moment. I can understand "not too impressed with Bind

Re: When does Cocoa fall apart? (Run loops)

2008-10-22 Thread Chris Idou
Nope, just one thread. I'm finding KVO and bindings to be extremely flakey. Maybe I'm pushing them harder than other folks, I don't know, because I'm starting to use them all over the place. I'll try the finishInit mentioned by dreamcat, and see if that helps. The problem I reported recently

  1   2   >