Re: looking for reference to a dictionary

2008-10-22 Thread Ken Thomases
On Oct 21, 2008, at 11:08 AM, Stefan Wolfrum wrote: 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 exactly the same string, content-wise

Re: Putting an image on a CALayer

2008-10-22 Thread Patrick Mau
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 = CGImageSourceCreateImageAtIndex(source, 0, NULL);

Get text width outside a view

2008-10-22 Thread Christian Giordano
I'm trying to calculate the width of a text and the same code I used in the past in a drawRect routine in a view to its UIGraphicsGetCurrentContext() isn't working. The main difference of course is the context, in this case I created a bitmap context and the code is basically this:

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

2008-10-22 Thread Raphael Sebbe
in the latter, are you in a secondary thread? This could explain your problem.Otherwise, I did not experience that lately. Best, Raphael On Wed, Oct 22, 2008 at 6:05 AM, Chris Idou [EMAIL PROTECTED] wrote: I noticed with the below discussed isEnabled bindings problem that if I do:

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

2008-10-22 Thread Peter Maurer
Hi, I have a QTMovie in a QTMovieView that I'm trying to rotate (during display) via the following code: -- Movie theMovie = [myQTMovie quickTimeMovie]; long theAngle = 90; // using 90 degrees as an example -- rotating by 180 degrees doesn't work either MatrixRecord theMovieMatrix;

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

2008-10-22 Thread dreamcat7
2 methods to try when a programmatic binding isnt working. [self performSelector:@selector(finishInit:) withObject:self afterDelay:0.0]; [[NSRunLoop currentRunLoop] performSelector:@selector(finishAfterLooping:) target:self argument:(id)nil order:0 modes:[NSArray

Re: Cocoa-dev Digest, Vol 5, Issue 1813

2008-10-22 Thread Steve Steinitz
Hello Mr Bumgarner, On 22/10/08, Bill Bumgarner [EMAIL PROTECTED] 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

Memory Leaks in CocoaEcho Sample

2008-10-22 Thread Jens Beuckenhauer
Hello, 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:

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

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 Bindings

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

[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

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 exactly

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: [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 possible to

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

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

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

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

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 some

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

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

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

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

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.

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

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

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

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

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 =

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

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

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

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

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

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

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.

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

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

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.

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.

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

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

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

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

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 not

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

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

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

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

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

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 :-) Humm that

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

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

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 -size

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];

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

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

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 might

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 to

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,

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

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.

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];

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

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

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, but a

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.

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.

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

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

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: 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, or

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. a href=http://my.external.url; title=What the user

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 http://developer.apple.com/documentation/Cocoa/Conceptual/GarbageCollection/Articles/gcUsing.html#//apple_ref/doc/uid/TP40008006-SW3 or wait until someone with some experience in GC can help you out. GC keeps tabs on all your

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)

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

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

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.

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 ___

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

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

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

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

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

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 relationship

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

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

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];

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

/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

  1   2   >