Re: I am trying to update the cfbundleversion key with agvtool and it does not seem to work

2008-11-28 Thread Jean-Daniel Dupas
agvtool update the CURRENT_PROJECT_VERSION of your Xcode project. To reflect this change in CFBundleVersion, set CFBundleVersion to $ {CURRENT_PROJECT_VERSION} (and make sure the "Expand Build Settings in Info.plist File" build setting is not disabled) CFBundleVersion ${CURRENT_PROJECT_VERSIO

Re: Quick Look with native types?

2008-11-28 Thread Julien Jalon
On Fri, Nov 28, 2008 at 5:50 AM, Rob Keniger <[EMAIL PROTECTED]> wrote: > > There's no public API to do this at present. You'd need to create a > temporary file and use the "qlmanage -p /path/to/thefile" tool via NSTask. > I strongly discourage using qlmanage to display the Quick Look panel. "ql

Re: Quick Look with native types?

2008-11-28 Thread Jean-Nicolas Jolivet
Thanks for the info, that's what i wanted to know! Somehow I assumed that there was a public Quick Look API when I saw that there was a QuickLook programming guide... I realized only later that the guide was basically to explain how to write QuickLook providers (or generators), and not how

Re: NSTrackingArea strange requirement

2008-11-28 Thread rajesh
On Nov 28, 2008, at 4:36 AM, Rob Keniger wrote: On 27/11/2008, at 10:22 PM, rajesh wrote: but I see a kind of problem with above approach as well. Since we are updating the TrackingAreas in updateTrackingAreas (removing and adding track areas) , my cursor (which is set to "resizeUpDownCu

-[NSWindowController window] fails

2008-11-28 Thread Alexander Shmelev
Hello, I have NSWindowController which loads nib with following code: - (id) init { if (![super initWithWindowNibName:@"Dialog"]) return nil; [self window]; } I use [self window] to force nib load. This code perfectly works on Leopard(Intel), but [self window]

Text blurred in application

2008-11-28 Thread Adil Saleem
Hi, I am having a problem with the way my application displays text. In my application, i have some NSTextFields (static text) on a custom window of mine. But the static text is not readable when application is launched. It is too blurred. At first i thought it was because the text size is smal

Re: Garbage collection leak in simple Core Data application

2008-11-28 Thread Mathieu Coursolle
Hi, Here is the result from gc-roots for a window controller that was not collected: (gdb) info gc-roots 0x1048c10 Number of roots: 1 Root: 0 Kind: stack rc: 0 Address: 0xbfffee24 Frame level: 3 Symbol: 1 Kind: object rc: 0 Address: 0x01047be0 Class: NSWindow ivar: NSR

... not sure if this is a KVO or a Core Audio problem with my code

2008-11-28 Thread John Zorko
Hello, all ... I'm experiencing a hang in my app when I do things too quickly. When I pause the app and examine the callstack, I see this: #0 0x31467b18 in semaphore_timedwait_signal_trap () #1 0x3145e984 in semaphore_timedwait_signal () #2 0x3145b104 in _pthread_cond_wait () #3 0x3145b

Garbage collection and root objects

2008-11-28 Thread Thomas Davie
Hi, I'm having a problem with a simple garbage collected app in which my NSDocument subclass appears to be becoming invalid (without the finalizer being called though). This only happens on the release build, so I guess it's something to do with the optimizing compiler using a less cons

question re: mem leak analysis and RSIZE

2008-11-28 Thread John Clayton
Hi All, I'm at the stage of performing a bit of leak analysis on my program, and I find something weird happening. Specifically: 1. the program, as reported by both Instruments w/Leaks and Mallog Debug isn't leaking more than 1.3k per document open/close cycle 2. multiple document open/clo

Re: -[NSWindowController window] fails

2008-11-28 Thread Kyle Sluder
On Fri, Nov 28, 2008 at 5:06 AM, Alexander Shmelev <[EMAIL PROTECTED]> wrote: > - (id) init > { >if (![super initWithWindowNibName:@"Dialog"]) >return nil; >[self window]; > } 1) You never set self. Inside an initializer, you must always set self to the result of t

Re: IKImageBrowserView and mouseDragged event

2008-11-28 Thread douglas welton
Sandeep, Did you set the dragging destination delegate using - setDraggingDestinationDelegate:? more info here: regar

Re: IKImageBrowserView and mouseDragged event

2008-11-28 Thread Sandeep Chayapathi
I did try the -setDraggingDestinationDelegate: , but it is meant for a drag destination and not drag source. From the documentation (here: http://developer.apple.com/documentation/Cocoa/Conceptual/DragandDrop/Concepts/dragsource.html#//apple_ref/doc/uid/2976-CJBFBADF ) I have to implement dr

Re: Using a string as filepath

2008-11-28 Thread Scott Ribe
> To make things worse, there's no way to query a filesystem and ask it > what characters it doesn't like (as far as I know). Worse yet, you > can't even reliably query a filesystem and find out what kind of > filesystem it actually *is*. Which, just for the purposes of illustration, can show up i

Re: question re: mem leak analysis and RSIZE

2008-11-28 Thread John Clayton
Update to problem: it turns out, that I wasn't even bothering to free one of my texture generators (built on quicktime, takes up a ton of ram). freeing that object in turn made the program memory footprint much more stable - pretty obvious. BUT: why would Instruments not pick this up? I

Re: IKImageBrowserView and mouseDragged event

2008-11-28 Thread Thomas Goossens
Sandeep, If your datasource returns paths, your view should be automatically a drag source. If your datasource returns images, I think the only thing you have to do is to implement - (NSUInteger) imageBrowser:(IKImageBrowserView *) aBrowser writeItemsAtIndexes:(NSIndexSet *) itemIndexes t

Re: Library Woes

2008-11-28 Thread Fritz Anderson
On 27 Nov 2008, at 8:17 PM, Kaluriel Hargrove wrote: I've been trying to add the freeimage library to my application but i keep getting this error. any ideas? dyld: Library not loaded: libfreeimage-3.11.0.dylib-i386 Referenced from: /Users/bob1/Documents/Quickpic/build/Debug/ Quickpic.app/Co

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

2008-11-28 Thread Scott Ribe
> Now, my EUID is the same as that of the "user logged in via the GUI", so > the application (OpenOffice) should be launched in the context of that > user's GUI login process. But you said you're launching at boot time, which means that when your daemon is launched, there is not yet a user logged

Re: -[NSWindowController window] fails

2008-11-28 Thread Alexander Shmelev
Hello, 1) I tried to load nib outside class using [NSBundle loadNibNamed:@"Dialog" owner:theDialog], but it loads window only when called twice. @interface Dialog : NSObject { } @end ... @interface AppController { Dialog* theDialog } - (void)foo; @end - (void) foo { if (!theDialog

Effectively fetching console messages

2008-11-28 Thread Luke the Hiesterman
[Resending to this this. Sorry for anybody who is reading it twice]. I have an app that wants to continually fetch console messages, much like the Console app itself. The problem I'm having is that the act of performing and asl_search every second, or even every 5 seconds makes syslogd go n

Re: -[NSWindowController window] fails

2008-11-28 Thread j o a r
On Nov 28, 2008, at 2:06 AM, Alexander Shmelev wrote: I have NSWindowController which loads nib with following code: - (id) init { if (![super initWithWindowNibName:@"Dialog"]) return nil; [self window]; } I use [self window] to force nib load. This code perfec

Re: Garbage collection and root objects

2008-11-28 Thread Raphael Sebbe
Hi, what makes you think the document is becoming invalid? You don't have to mark it in any way, if the document is open, it is stored in the documentController which is itself hooked by some GC root. Can you give more information? Raphael On Fri, Nov 28, 2008 at 3:56 PM, Thomas Davie <[EMAIL P

Re: Effectively fetching console messages

2008-11-28 Thread Martin Stoufer
Couldn't you open a StreamReader object to the file itself (or perhaps from the out end of an NSTask that has the filtering already in place)? I'm thinking some type of grep with the appropriate expression. This task could be left open and simply keep reading in a worker thread in your app. If

Re: NSTrackingArea strange requirement

2008-11-28 Thread Quincey Morris
On Nov 28, 2008, at 01:57, rajesh wrote: On 27/11/2008, at 10:22 PM, rajesh wrote: but I see a kind of problem with above approach as well. Since we are updating the TrackingAreas in updateTrackingAreas (removing and adding track areas) , my cursor (which is set to "resizeUpDownCursor" mous

Re: Effectively fetching console messages

2008-11-28 Thread Luke the Hiesterman
One problem with reading the file directly is that system.log is owned by root:admin with no read permission granted to other users. Ideally, I wouldn't want my app to require special privilege elevation to run on a standard user's account. Luke On Nov 28, 2008, at 9:48 AM, Martin Stoufer

Re: Garbage collection leak in simple Core Data application

2008-11-28 Thread Bill Bumgarner
On Nov 28, 2008, at 8:49 AM, Mathieu Coursolle wrote: Here is the result from gc-roots for a window controller that was not collected: (gdb) info gc-roots 0x1048c10 Number of roots: 1 Root: 0 Kind: stack rc: 0 Address: 0xbfffee24 Frame level: 3 Symbol: 1 Kind: object rc: 0

Re: -[NSWindowController window] fails

2008-11-28 Thread Alexander Shmelev
Hello, I cut off code after [self window], originally it looks like following: - (id) init { if (![super initWithWindowNibName:@"Dialog"]) return nil; [self window]; // there is a lot of code here return self; } I tried to call [NSWindowControl

Re: Using a string as filepath

2008-11-28 Thread Tommy Nordgren
On Nov 27, 2008, at 1:09 AM, Knut Lorenzen wrote: Dear list, I would like to name a file according to an user defined entry. However, the user's name entry might be illegal as a filepath, containing illegal characters for a pathname like "." or "-" as 1st character, "/", ":", etc. I've

Re: -[NSWindowController window] fails

2008-11-28 Thread j o a r
On Nov 28, 2008, at 9:12 PM, Alexander Shmelev wrote: I cut off code after [self window], originally it looks like following: I suspected that you might have. In the future, please indicate this more clearly. I tried to call [NSWindowController window] outside init, but it fails.

Re: -[NSWindowController window] fails

2008-11-28 Thread Alexander Shmelev
On 28.11.2008, at 21:46, j o a r wrote: On Nov 28, 2008, at 9:12 PM, Alexander Shmelev wrote: I cut off code after [self window], originally it looks like following: I suspected that you might have. In the future, please indicate this more clearly. Sorry, I promise to write code more

Re: -[NSWindowController window] fails

2008-11-28 Thread Alexander Shmelev
Also using gdb I have found that awakeFromNib of TwainDialog is never called. On 28.11.2008, at 21:58, Alexander Shmelev wrote: On 28.11.2008, at 21:46, j o a r wrote: On Nov 28, 2008, at 9:12 PM, Alexander Shmelev wrote: I cut off code after [self window], originally it looks like fol

Re: Using a string as filepath

2008-11-28 Thread Clark Cox
On Fri, Nov 28, 2008 at 10:22 AM, Tommy Nordgren <[EMAIL PROTECTED]> wrote: > > On Nov 27, 2008, at 1:09 AM, Knut Lorenzen wrote: > >> Dear list, >> >> I would like to name a file according to an user defined entry. However, >> the user's name entry might be illegal as a filepath, containing illega

Main Thread stoppin Background Thread

2008-11-28 Thread John Love
Reference page 43 of Apple's MultiThreading.pdf. I conclude from this page that the preferred, if not only, way to have the main thread stop the background thread is through KVC. Before I continue to inflict more pain on myself, why can't I simply toggle the value of an instance variable of

Re: Using a string as filepath

2008-11-28 Thread Knut Lorenzen
Am 28.11.2008 um 19:22 schrieb Tommy Nordgren: try using -[NSString fileSystemRepresentation] Actually, that was my 1st attempt :) Meanwhile I have a solution better than replacing all potentially "evil" characters with an underscore: for( i = 0; i < [temporaryPath length]; i++)

Re: ... not sure if this is a KVO or a Core Audio problem with my code

2008-11-28 Thread Ken Thomases
On Nov 28, 2008, at 8:48 AM, John Zorko wrote: I'm experiencing a hang in my app when I do things too quickly. When I pause the app and examine the callstack, I see this: #0 0x31467b18 in semaphore_timedwait_signal_trap () #1 0x3145e984 in semaphore_timedwait_signal () #2 0x3145b104 in _p

Re: question re: mem leak analysis and RSIZE

2008-11-28 Thread Ken Thomases
On Nov 28, 2008, at 11:10 AM, John Clayton wrote: it turns out, that I wasn't even bothering to free one of my texture generators (built on quicktime, takes up a ton of ram). freeing that object in turn made the program memory footprint much more stable - pretty obvious. BUT: why would I

Re: Main Thread stoppin Background Thread

2008-11-28 Thread Jason Coco
On Nov 28, 2008, at 14:48 , John Love wrote: Reference page 43 of Apple's MultiThreading.pdf. I conclude from this page that the preferred, if not only, way to have the main thread stop the background thread is through KVC. Before I continue to inflict more pain on myself, why can't I simp

Re: -[NSWindowController window] fails

2008-11-28 Thread Ken Thomases
On Nov 28, 2008, at 12:58 PM, Alexander Shmelev wrote: [[TwainDialog alloc] init] returns not nil value, but when I call [theDialog window], there is error inside this method. Care to tell us what the error is? That is probably central to the issue. Regards, Ken ___

Re: Garbage collection leak in simple Core Data application

2008-11-28 Thread Mathieu Coursolle
Hi, Thanks for your reply, Even if I create other windows and delete them after, the lost controllers seem to be lost forever. I tried to select menu items and it actually speeds up the collection of some, but some are still lost forever. I waited for a while, continued to create/close windo

Re: Garbage collection leak in simple Core Data application

2008-11-28 Thread Bill Bumgarner
On Nov 28, 2008, at 3:10 PM, Mathieu Coursolle wrote: Thanks for your reply, Even if I create other windows and delete them after, the lost controllers seem to be lost forever. I tried to select menu items and it actually speeds up the collection of some, but some are still lost forever. I w

Re: Core Data modeling question

2008-11-28 Thread Markus Schneider
Am 28.11.2008 um 07:06 schrieb Jerry Krinock: On 2008 Nov, 27, at 8:11, Alexander Spohr wrote: Am 26.11.2008 um 22:08 schrieb Markus Schneider: Shall I use a MO class "DAY" and model the list as a to-many relationship? TASK

Re: Main Thread stoppin Background Thread

2008-11-28 Thread Ken Thomases
On Nov 28, 2008, at 1:48 PM, John Love wrote: Reference page 43 of Apple's MultiThreading.pdf. For what it's worth, a reference to a page in a PDF isn't a convenient way to direct folks to a part of the docs. If I were to try to direct somebody to the same docs, I would have directed them

Re: -[NSWindowController window] fails

2008-11-28 Thread Alexander Shmelev
Source: - (IBAction) showUi:(id)sender { if (!theDialog) { // BREAKPOINT 1 theDialog = [[TwainDialog alloc] init]; [theDialog window]; // I use this only to force nib load } [theDialog showWindow:self]; /

Re: -[NSWindowController window] fails

2008-11-28 Thread Andy Lee
On Nov 28, 2008, at 10:12 AM, Alexander Shmelev wrote: - (id) init { if (![super initWithWindowNibName:@"Dialog"]) return nil; [self window]; // there is a lot of code here return self; } I haven't been following this thread, but I believe some

Re: Main Thread stoppin Background Thread

2008-11-28 Thread Gregory Weston
John Love wrote: Reference page 43 of Apple's MultiThreading.pdf. I'm assuming you mean: I conclude from this page that the preferred, if not only, way to have the main thread stop the background

Re: Main Thread stoppin Background Thread

2008-11-28 Thread Joseph Kelly
Go back in your email and look for the last message I sent in response to your threading issues. You can in fact use an instance variable to tell a worker thread to quit (I do it all the time for very simple threads), and the fact that you're setting the variable and yet you do not see the

Re: Main Thread stoppin Background Thread

2008-11-28 Thread Joseph Kelly
I mean KVC... bleah... On Nov 28, 2008, at 13:00, Joseph Kelly <[EMAIL PROTECTED]> wrote: Go back in your email and look for the last message I sent in response to your threading issues. You can in fact use an instance variable to tell a worker thread to quit (I do it all the time for ve

Re: IKImageBrowserView and mouseDragged event

2008-11-28 Thread douglas welton
Sandeep, Sorry, I misread your question. I have an application that implements dragging from an IKImageBrowserView and when I was testing it initially, I experienced a similar issue (no dragging being initiated on mouse down) when I forgot to connect the datasource outlet on my IKImageBrow

Re: Text blurred in application

2008-11-28 Thread Benjamin Dobson
On 28 Nov 2008, at 10:06:28, Adil Saleem wrote: Hi, I am having a problem with the way my application displays text. In my application, i have some NSTextFields (static text) on a custom window of mine. But the static text is not readable when application is launched. It is too blurred. A

NSButton with PDF Image

2008-11-28 Thread Richard Somers
Has anyone had success using a pdf file for a NSButton image? At first all seemed to be going well. PDF providing a single resolution independent vector representation for the image. Then flaky things started happening like in the Interface Builder Simulator no image is drawn. Richard __

Problem with binding of @count

2008-11-28 Thread Mikael Wämundson
I have some problem binding the number of objects in an array to a text label in app. Just binding the label to my array controller (Controller Key = arrangedObjects and Model Key Path = @count) works fine and the value is updated when a change is made to the array. But I want the number

Re: Problem with binding of @count

2008-11-28 Thread j o a r
On Nov 28, 2008, at 11:41 PM, Mikael Wämundson wrote: -(NSString *) numberOfStudents { return [NSString stringWithFormat:@"The number of students is: %@", [theStudentArrayController valueForKeyPath:@"[EMAIL PROTECTED]"]]; } I think that it would be more straight forward and efficient t

Re: Text blurred in application

2008-11-28 Thread Adil Saleem
I am running it on Leopard and Core animation is turned off. --- On Fri, 11/28/08, Benjamin Dobson <[EMAIL PROTECTED]> wrote: > From: Benjamin Dobson <[EMAIL PROTECTED]> > Subject: Re: Text blurred in application > To: cocoa-dev@lists.apple.com > Date: Friday, November 28, 2008, 1:54 PM > On

Re: Problem with binding of @count

2008-11-28 Thread j o a r
On Nov 28, 2008, at 2:49 PM, j o a r wrote: I think that it would be more straight forward and efficient to write that: [NSString stringWithFormat:@"The number of students is: %lu", ((unsigned long)[theStudentArrayController count])]; Crap, typo: You'd get the count from the array, and

Re: Problem with binding of @count

2008-11-28 Thread j o a r
On Nov 28, 2008, at 11:41 PM, Mikael Wämundson wrote: But I want the number of objects to be part of a text string ("The number of students is: "). Thus I put this code into myDocument.m: -(NSString *) numberOfStudents { return [NSString stringWithFormat:@"The number of students is: %@",

Re: Core Data modeling question

2008-11-28 Thread Jerry Krinock
On 2008 Nov, 28, at 12:15, Markus Schneider wrote: thanks for your advice. I will go with the relationships model. Well, one more thing, and this is directed to others, not you Markus. In a project I am working on, I too have an managed object Foo with a property that is a set in my case

NSMutableArray vs NSArrayController

2008-11-28 Thread Mike Chambers
I have a simple app that uses an NSArrayController to bind data to an NSTableView. The NSArrayController is bound to a NSMutableArray. When the app loads I load data from a file, and add it to the NSMutableArray. However, the data does not appear in the NSTableView until I click one of the headers

Re: Text blurred in application

2008-11-28 Thread Richard Somers
On Nov 28, 2008, at 3:06AM, Adil Saleem wrote: But the static text is not readable when application is launched. It is too blurred. I have been using pdf files for NSButton images. Sometimes the images will be blurred. I have not figured it out yet. Richard _

NSMutableDictionary Leak

2008-11-28 Thread dct
I've started using Instruments/Leaks on a project that has been building and running as expected. It has identified a goodly number of CFDictionary leaks (a Malloc leak followed by an Autorelease leak) associated with lines that, in one typical case, reads: [tmp setObject:[NSDictionary di

Re: Sort Through Commas in Cocoa

2008-11-28 Thread Pierce Freeman
Would this still work for a NSMutable array? Sincerely, Pierce F -- Pierce Freeman [EMAIL PROTECTED] On 11/26/08 6:40 PM, "Nick Zitzmann" <[EMAIL PROTECTED]> wrote: > > On Nov 26, 2008, at 7:28 PM, Pierce Freeman wrote: > >> Thanks for your reply. I understand how you would do that muc

Re: Sort Through Commas in Cocoa

2008-11-28 Thread Nick Zitzmann
On Nov 28, 2008, at 5:12 PM, Pierce Freeman wrote: Would this still work for a NSMutable array? If you need a mutable version, then you need to make a mutable copy of the components array. Nick Zitzmann ___ Coco

Re: NSMutableDictionary Leak

2008-11-28 Thread Bill Bumgarner
On Nov 28, 2008, at 4:04 PM, dct wrote: The MutableDictionary object "tmp" is instantiated at the beginning of this particular method by: NSMutableDictionary *tmp = [[NSMutableDictionary dictionaryWithCapacity:4] autorelease]; You need to review the Cocoa memory management documentation:

Re: NSMutableDictionary Leak

2008-11-28 Thread Dave DeLong
This may not fix your problem, but it doesn't look like you're using the convenience methods correctly. NSMutableDictionary *tmp = [NSMutableDictionary dictionaryWithCapacity:4]; tmp comes back with a retain count of 1, but it is already autoreleased. You don't need to do any sort of re

Re: NSMutableDictionary Leak

2008-11-28 Thread dct
Thanks for the reply. Turns out I added that autorelease after Leaks pointed to the line NSMutableDictionary *tmp = [NSMutableDictionary dictionaryWithCapacity:4] (and to several other lines involving "tmp") as a leak source. Either way, the program runs without crashing. And I still don

Re: NSMutableDictionary Leak

2008-11-28 Thread dct
Dave, Thanks for your reply. Believe your points re autoreleasing match those of Bill Bumgarner -- as I replied to him I originally didn't autorelease in the lines in question which seemed to run nicely but which seemed to be the cause of Instruments/Leaks identified leaking. Re your warn

NSArray to NSMutableArray

2008-11-28 Thread Pierce Freeman
Hi everyone. I am wondering the correct/recommended technique to make a NSMutableArray out of a NSArray. I see online that there are ways to do this, but am not sure what is the best way. Sincerely, Pierce F. -- Pierce Freeman [EMAIL PROTECTED]

Re: NSArray to NSMutableArray

2008-11-28 Thread Dave DeLong
How about -mutableCopy? HTH, Dave On 28 Nov, 2008, at 6:29 PM, Pierce Freeman wrote: Hi everyone. I am wondering the correct/recommended technique to make a NSMutableArray out of a NSArray. I see online that there are ways to do this, but am not sure what is the best way. ___

Re: NSArray to NSMutableArray

2008-11-28 Thread Charles Steinman
--- On Fri, 11/28/08, Pierce Freeman <[EMAIL PROTECTED]> wrote: > I am wondering the correct/recommended technique to make a > NSMutableArray > out of a NSArray. I see online that there are ways to do > this, but am not > sure what is the best way. I'm not sure why you'd do it any other way than

Simple Core Animation Problem

2008-11-28 Thread Ulai Beekam
I want to create this user interface element: A rounded rectangle somewhere on the window (it should be able to be created through code, not inside the NIB). If I double click it, it should increase its height using animation. But here is the catch: When the heigh is increased, a text field is re

Re: NSArray to NSMutableArray

2008-11-28 Thread Jerry Krinock
On 28 Nov, 2008, at 6:29 PM, Pierce Freeman wrote: I am wondering the correct/recommended technique to make a NSMutableArray out of a NSArray. On 2008 Nov, 28, at 17:30, Dave DeLong wrote: How about -mutableCopy? which gives you a retained object, and then there is +[NSMutableArray a

Re: NSMutableDictionary Leak

2008-11-28 Thread Michael Ash
On Fri, Nov 28, 2008 at 7:04 PM, dct <[EMAIL PROTECTED]> wrote: > I've started using Instruments/Leaks on a project that has been building and > running as expected. It has identified a goodly number of CFDictionary leaks > (a Malloc leak followed by an Autorelease leak) associated with lines that,

Checking One Array Against Another?

2008-11-28 Thread Pierce Freeman
Hi everyone. I am attempting to check one array's contents against another's, but so far it hasn't been working. In the actual application, I am checking the current open applications against an "okay" application list, and just thought of another problem: If the user chooses only has some open

Re: NSMutableArray vs NSArrayController

2008-11-28 Thread Jerry Krinock
On 2008 Nov, 28, at 15:36, Mike Chambers wrote: 1. Is there any reason I shouldnt just get rid of the NSMutableArray and add / remove data from the NSArrayController directly? I believe that you should get rid of the NSMutableArray. 2. Anyone know why my table view is not updating when addi

analysing image to find blobs

2008-11-28 Thread Roland King
I have an image, it's PNG in this case although GIF/JPG are possible. It's got a transparent background and a few well-spaced coloured circles on it. Most of the image is blank. I want to search the image and find the locations of the circles. My first thought was to convert to some kind of

Checking One Array Against Another

2008-11-28 Thread Pierce Freeman
Hi everyone. I am attempting to check one array's contents against another's, but so far it hasn't been working. In the actual application, I am checking the current open applications against an "okay" application list, and just thought of another problem: If the user doesn't have an application

Re: Checking One Array Against Another

2008-11-28 Thread Pierce Freeman
Adam: Would this work even if the two arrays weren't in the same order? Sincerely, Pierce F -- Pierce Freeman [EMAIL PROTECTED] On 11/28/08 8:35 PM, "Adam R. Maxwell" <[EMAIL PROTECTED]> wrote: > > On Nov 28, 2008, at 8:25 PM, Pierce Freeman wrote: > >> Hi everyone. >> >> I am attempt

Re: analysing image to find blobs

2008-11-28 Thread j o a r
On Nov 29, 2008, at 12:18 PM, Roland King wrote: If someone has something like 'read about these two classes, take a look at these 4 methods and you probably want this kind of transform', that would get me going in the right direction. You can probably assume that if I get to the point I h

Re: analysing image to find blobs

2008-11-28 Thread Andrew Farmer
On 28 Nov 08, at 20:18, Roland King wrote: I have an image, it's PNG in this case although GIF/JPG are possible. It's got a transparent background and a few well-spaced coloured circles on it. Most of the image is blank. I want to search the image and find the locations of the circles. The

Re: Checking One Array Against Another

2008-11-28 Thread Adam R. Maxwell
On Nov 28, 2008, at 8:41 PM, Pierce Freeman wrote: Adam: Would this work even if the two arrays weren't in the same order? The documentation for NSSet explains this. http://developer.apple.com/documentation/cocoa/conceptual/collections/Articles/Sets.html smime.p7s Description: S/MIME cry

Still unable to work out mouse position

2008-11-28 Thread Christian Graus
Thanks to the person who answered yesterday, but I am no closer to a solution. I have an NSTableView, and it contains NSTextAttachmentCell rows. There's only one column in the table view. Basically, when a user clicks on a row, I am getting the shouldSelectRow event, which gives me a row index.

Re: Checking One Array Against Another

2008-11-28 Thread Pierce Freeman
Thanks for the help, and for the link. Just wondering though, how could I tell it to run a script if they were not equal, and if the open list is lacking some of the ones in the okay list? Sincerely, Pierce Freeman -- Pierce Freeman [EMAIL PROTECTED] On 11/28/08 9:05 PM, "Adam R. Maxwell"

Re: Checking One Array Against Another

2008-11-28 Thread Adam R. Maxwell
On Nov 28, 2008, at 9:21 PM, Pierce Freeman wrote: Thanks for the help, and for the link. Just wondering though, how could I tell it to run a script if they were not equal, and if the open list is lacking some of the ones in the okay list? How could you tell /what/ to run a script? If y

Re: Checking One Array Against Another

2008-11-28 Thread Pierce Freeman
Adam: Sorry, I think that I didn't clearly state what I was asking. ;) My problem, not yours... Anyway, I am wondering if NSSet could deal with the fact that there wasn't an entry in one array that is in the other array. Example: The user has open Safari, Firefox, and Mail The allowed applicati

Re: Checking One Array Against Another?

2008-11-28 Thread Rob Keniger
On 29/11/2008, at 1:53 PM, Pierce Freeman wrote: Hi everyone. I am attempting to check one array's contents against another's, but so far it hasn't been working. In the actual application, I am checking the current open applications against an "okay" application list, and just thought of a

Re: Checking One Array Against Another

2008-11-28 Thread Pierce Freeman
Would there be some way using the NSSet method to output a list of the applications that the user needs to close in order for the current applications to be "in the good list"? Sincerely, Pierce Freeman -- Pierce Freeman [EMAIL PROTECTED] On 11/28/08 9:28 PM, "Adam R. Maxwell" <[EMAIL PROT

Co-ordinate conversion question

2008-11-28 Thread Christian Graus
OK, I managed to find the answer to my main question on google ( not for want of trying previously ). NSPoint pt = [NSEvent mouseLocation]; NSRect rcTV = [tableView bounds]; pt = [tableView convertPoint:pt fromView:nil]; So, now the first line gives me the mouse position on the screen. The

Re: Still unable to work out mouse position

2008-11-28 Thread John Joyce
On Nov 28, 2008, at 11:23 PM, [EMAIL PROTECTED] wrote: From: "Christian Graus" <[EMAIL PROTECTED]> Subject: Still unable to work out mouse position To: cocoa-dev@lists.apple.com Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=ISO-8859-1 Thanks to the person who answer

Re: Checking One Array Against Another

2008-11-28 Thread Graff
On Nov 28, 2008, at 8:25 PM, Pierce Freeman wrote: I am attempting to check one array's contents against another's, but so far it hasn't been working. In the actual application, I am checking the current open applications against an "okay" application list, and just thought of another problem

Unicode in constant @"" NSStrings

2008-11-28 Thread John Engelhart
This message is mostly for edification and mailing-list / searching posterity. Hopefully others will find it useful. There has been support for Unicode in constant @"" NSStrings since Xcode 3.0, but it wasn't a widely known nor well documented feature (at least, that's my impression). Prior to X

UIViewController memory warnings | didReceiveMemoryWarning | setView | releasing outlets | releasing properties

2008-11-28 Thread Glenn Bloom
In the course of trying to understand UIViewController memory warnings on the iPhone, I've found various useful threads online, and in particular, was very glad to follow the numerous recent posts in this forum with the subject 'Outlets / IBOutlet declarations'. In response, I've written a test ap

Re: Co-ordinate conversion question

2008-11-28 Thread Rob Keniger
On 29/11/2008, at 4:01 PM, Christian Graus wrote: NSPoint pt = [NSEvent mouseLocation]; NSRect rcTV = [tableView bounds]; pt = [tableView convertPoint:pt fromView:nil]; So, now the first line gives me the mouse position on the screen. The second gives me the bounds of my control, becaus

Re: Checking One Array Against Another

2008-11-28 Thread Graff
On Nov 28, 2008, at 9:59 PM, Pierce Freeman wrote: Would there be some way using the NSSet method to output a list of the applications that the user needs to close in order for the current applications to be "in the good list"? You can use the NSMutableSet method minusSet: NSSet *allo

Re: Simple Core Animation Problem

2008-11-28 Thread Matt Long
- Layers can have rounded rects by setting the layer's cornerRadius property. BTW, you can't create layers in a NIB. The *must* be created in code. - Layers do not inherit from NSResponder so clicks (and double-clicks) must be registered through a backing layer - You can easily hide a view su

MVC question

2008-11-28 Thread Michael A. Crawford
When implementing the MVC pattern, is it inappropriate or bad-form for views and layers to have direct read-only access to the model? Currently I'm using KVO to have the different views and layers get notification of state changes in the model. Since the drawing of the views and layers is

Re: UIViewController memory warnings | didReceiveMemoryWarning | setView | releasing outlets | releasing properties

2008-11-28 Thread Ashley Clark
On Nov 28, 2008, at 11:44 PM, Glenn Bloom wrote: In the course of trying to understand UIViewController memory warnings on the iPhone, I've found various useful threads online, and in particular, was very glad to follow the numerous recent posts in this forum with the subject 'Outlets / IB