Re: Best class for pixel-level image processing?

2010-02-12 Thread Trygve Inda
> I am writing an application that wants to perform some basic computer vision > computation, and I want a class that offers pixel-level access to an image. > What would be the best way to approach this? > Do something like: MyImageRep = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL

Re: get the list of controls in a NSView

2010-02-12 Thread Jonathan Chacón
Hello Thank you. I will try a new way to make connections between Interface builder and xCode Regards Saludos desde mi iPhone Jonathan Chacón Consultor de accesibilidad, usabilidad y nuevas tecnologías Teléfono: 679953948 E-mail: jonathan.cha...@telefonica.net Blog: http://programa

Re: get the list of controls in a NSView

2010-02-12 Thread Roland King
and as I believe I mentioned before, you can assign a numeric 'tag' to each view and control in interface builder and you can use the viewWithTag: method of UIView to search for a specific view with a specific tag. That's not a way of coding I think people usually use, you have to manage your ow

Re: get the list of controls in a NSView

2010-02-12 Thread Jonathan Chacón
Hello, Thanks for the information about tags identification but I've two questions: How to fetch each control into a NSView array? Can I identify a control using value of name field in the identity tab of the inspector in IB? Saludos desde mi iPhone Jonathan Chacón Consultor de

Validating unique objects in CoreData

2010-02-12 Thread malcom
Hello, I would use CoreData in order to mantain an archive of objects: each object contains an attribute called "uuid"; in the same db only one object can have the same attribute value. This mean I should validate the proposed new object to insert and check if the another object with the same uu

Re: Best class for pixel-level image processing?

2010-02-12 Thread Ken Ferry
First: None of the Mac OS X image APIs are set up around completely bare access to pixels. Bare pixel access is at odds with performance. Take caching: In order to cache effectively, the frameworks needs to understand what's changing when, and that cannot happen when people have unmediated pixel

Re: get the list of controls in a NSView

2010-02-12 Thread Roland King
I don't understand what you mean by 'how to fetch each control into an NSView array'. You can get the subviews of the main view and keep going down finding all views that way recursively calling subviews on each, but it won't really help you as some of the controls make a collection of views up

Re: Validating unique objects in CoreData

2010-02-12 Thread Roland King
two questions, neither of which actually answers yours I think. 1) does this uuid need to be something you generate externally and then set onto the object? Each core data object already has an objectID which is guaranteed unique in the database, can you make use of that one instead? You are a

Re: Validating unique objects in CoreData

2010-02-12 Thread malcom
On Feb 12, 2010, at 2:05 PM, Roland King wrote: > 1) does this uuid need to be something you generate externally and then set > onto the object? Each core data object already has an objectID which is > guaranteed unique in the database, can you make use of that one instead? You > are allowed t

iPhone: MPMediaPlayerContoller questions (2)

2010-02-12 Thread Eric E. Dolecki
1. I have a bunch of UI living in UIViews that were created in IB. Now a movie needs to run beneath it all. Is there a way I can move those elements above the video easily (I don't want to have to recreate all the UI in code unless I have to)? 2. My app runs in landscape... when the movie plays an

Guidance on use of Application Support folder

2010-02-12 Thread Stuart Malin
The recent post regarding "Creating an Application Support folder" made me think about that folder. My understanding is that this folder is to be used for information generically usable by the application, but not specific to a g

Re: Guidance on use of Application Support folder

2010-02-12 Thread Jens Alfke
On Feb 12, 2010, at 8:05 AM, Stuart Malin wrote: > I am building an app that needs to store per-user data that is not document > specific. I have created a folder under ~/Library for this, and am not using > ~/Library/Application Support. Is there guidance from Apple on where such > per-user,

Re: Creating an Application Support folder

2010-02-12 Thread Sean McBride
On 2/10/10 10:44 PM, Paul Johnson said: >I'm trying to find a best way to create the Application Support >folder. I'm rather new at Cocoa so it's taking me a while to do even >this simple thing. Since you're new to Cocoa, I'm guessing all the other replies have probably provided the real answers

Re: Guidance on use of Application Support folder

2010-02-12 Thread Stuart Malin
I sorta would agree, Jens, and certainly many apps do put user-specific files here, but the Apple docs specifically say this is NOT how the Application Support folder should be used. ~~~ "A support file is any type of file that supports the application but is not required for the application

Re: Validating unique objects in CoreData

2010-02-12 Thread Jerry Krinock
On 2010 Feb 12, at 03:45, malcom wrote: > Any idea to improve performance of this check? Well, 30,000 uuid is only a megabyte or so. I really hate to say this, but, just as a wild and crazy experiment, fetch the uuids from those 30,000 into a giant NSSet, and determine uniqueness by seeing if

Cocoa-based GPS framework?

2010-02-12 Thread Jonathon Kuo
There used to be an open source Cocoa-based GPS framework for OSX called FourCoordinates, but I can't find it anywhere on the web anymore, just dead links. Is there something more modern that has replaced it? ___ Cocoa-dev mailing list (Cocoa-dev@

Re: Validating unique objects in CoreData

2010-02-12 Thread Sean McBride
On 2/12/10 9:05 PM, Roland King said: >2) Where does the uuid on the object you are inserting come from? If you >are setting a UUID on the objects when you are creating them then using >one of the uuid_generate functions the UUID generated can be 'reasonably >considered unique Or instead of those

Re: Cocoa-based GPS framework?

2010-02-12 Thread Steven Degutis
If you can support 10.6, I would recommend using Core Location, which is pretty solid from my understanding. -Steven On Fri, Feb 12, 2010 at 11:57 AM, Jonathon Kuo < newsli...@autonomy.caltech.edu> wrote: > There used to be an open source Cocoa-based GPS framework for OSX called > FourCoordinate

Re: Guidance on use of Application Support folder

2010-02-12 Thread Kyle Sluder
On Fri, Feb 12, 2010 at 8:27 AM, Stuart Malin wrote: > I sorta would agree, Jens, and certainly many apps do put user-specific files > here, but the Apple docs specifically say this is NOT how the Application > Support folder should be used. I think you're misreading the documentation. It seem

Re: iPhone: MPMediaPlayerContoller questions (2)

2010-02-12 Thread Kyle Sluder
On Fri, Feb 12, 2010 at 5:52 AM, Eric E. Dolecki wrote: > 1. I have a bunch of UI living in UIViews that were created in IB. Now a > movie needs to run beneath it all. Is there a way I can move those elements > above the video easily (I don't want to have to recreate all the UI in code > unless I

Re: Guidance on use of Application Support folder

2010-02-12 Thread Lightning Duck
What has confused me about this is why does CoreDate store it's data in the Application Support folder be default then? On Feb 12, 2010, at 9:27 AM, Stuart Malin wrote: > I sorta would agree, Jens, and certainly many apps do put user-specific files > here, but the Apple docs specifically say t

Re: Guidance on use of Application Support folder

2010-02-12 Thread Paul Sanders
Licenses belong in /Library/Application Support (no squiggle), IMO. Plugins too, probably. But templates, yes, although perhaps they might be stored in /Library/Application Support at the user's option ('make this template available to all users of this Macintosh'). Depending on what you wan

Re: Guidance on use of Application Support folder

2010-02-12 Thread Kyle Sluder
On Fri, Feb 12, 2010 at 9:35 AM, Paul Sanders wrote: > Licenses belong in /Library/Application Support (no squiggle), > IMO.  Plugins too, probably.  But templates, yes, although > perhaps they might be stored in /Library/Application Support at > the user's option ('make this template available to

Re: MPMediaPlayerContoller questions (2)

2010-02-12 Thread Matt Neuburg
On Fri, 12 Feb 2010 09:16:28 -0800, Kyle Sluder said: >On Fri, Feb 12, 2010 at 5:52 AM, Eric E. Dolecki wrote: >> 1. I have a bunch of UI living in UIViews that were created in IB. Now a >> movie needs to run beneath it all. Is there a way I can move those elements >> above the video easily (I do

Re: Guidance on use of Application Support folder

2010-02-12 Thread Paul Sanders
We do use a Package Maker package, despite the numerous bugs in Package Maker (grr!) How would I set bits in the BOM for a folder created by my postinstall script? Is it important to do it that way? I just do a chmod, currently, after I create the folder. Paul Sanders. - Original M

Re: Guidance on use of Application Support folder

2010-02-12 Thread Sean McBride
On 2/12/10 9:51 AM, Kyle Sluder said: >Plea from a former sysadmin: *please* use a PackageMaker package, with >the permissions bits set appropriately in the BOM, *not* an installer >application! Could you elaborate? We have been thinking to switch AWAY from PackageMaker because it is such a bugg

Re: Validating unique objects in CoreData

2010-02-12 Thread malcom
I've tried to make an alternative method. I'll try to describe it. I would to use a second an auxiliary index where to save my uuid<->objectURI; results are better, so I try to make a summary of the problem and the solution. If anyone have a better idea I'll be happy to talk about it :) I've abou

Re: Guidance on use of Application Support folder

2010-02-12 Thread Kyle Sluder
On Fri, Feb 12, 2010 at 10:02 AM, Sean McBride wrote: > On 2/12/10 9:51 AM, Kyle Sluder said: > >>Plea from a former sysadmin: *please* use a PackageMaker package, with >>the permissions bits set appropriately in the BOM, *not* an installer >>application! > > Could you elaborate?  We have been thi

NSDateFormatter returns nil

2010-02-12 Thread Kristof Van Landschoot
Why is lDateFormatted nil on iPhone simulator 3.1.2 after executing this piece of code? NSString *lDateString = @"Wed, 17 Feb 2010 16:02:01"; NSDateFormatter* dateFormatter = [[[NSDateFormatter alloc] init] autorelease]; [dateFormatter setDateFormat:@"EEE, dd MMM hh:mm:ss"];

Re: Guidance on use of Application Support folder

2010-02-12 Thread Jean-Daniel Dupas
Le 12 févr. 2010 à 19:02, Sean McBride a écrit : > On 2/12/10 9:51 AM, Kyle Sluder said: > >> Plea from a former sysadmin: *please* use a PackageMaker package, with >> the permissions bits set appropriately in the BOM, *not* an installer >> application! > > Could you elaborate? We have been th

Re: Guidance on use of Application Support folder

2010-02-12 Thread Paul Sanders
Elaborate on the bugs? Well, we're getting a bit off topic for this list but it's mainly to do with relocation which we want to disable because it does things like update a copy of the application that has been dragged to the Trash and other such nonsense. PM also throws a wobbly (with no usef

Re: Guidance on use of Application Support folder

2010-02-12 Thread Paul Sanders
That looks very interesting, thank you, I will take a look. As you say, it's the package format that matters. You don't seem to be charging a fee. Any licensing issues? Maybe an acknowledgement in the About box. And do the packages it builds install on Tiger? Thanks. Paul Sanders. -

Re: NSDateFormatter returns nil

2010-02-12 Thread Fritz Anderson
On 12 Feb 2010, at 12:16 PM, Kristof Van Landschoot wrote: > Why is lDateFormatted nil on iPhone simulator 3.1.2 after executing > this piece of code? > > NSString *lDateString = @"Wed, 17 Feb 2010 16:02:01"; > NSDateFormatter* dateFormatter = [[[NSDateFormatter alloc] init] > autorelease

Noon question about Bonjour

2010-02-12 Thread Eric E. Dolecki
Goal: to have a touch on wifi (the router running out the back of my Mac) running an app. I have a Mac desktop app running. I'd like to send strings back and forth as commands. Now, I checked out the WiTap application. If I run the app on Touches, they see one another (both connected to the same r

Re: Validating unique objects in CoreData

2010-02-12 Thread Jerry Krinock
On 2010 Feb 12, at 10:06, malcom wrote: > A first solution is ... 60k+ queries takes ... a minute or more. > > My second solution is to create a second auxiliary NSMutableDictionary ... > the entire process takes about 5 seconds to finish So you confirmed what I what I was loathe to say, which

Re: Cocoa-based GPS framework?

2010-02-12 Thread Jonathon Kuo
Googling around, I see Core Location usage in reference only to the iPhone... Is it only part of the iPhone SDK? Would there be a problem using it in building a MacBook application? Jon On Feb 12, 2010, at 9:11 AM, Steven Degutis wrote: If you can support 10.6, I would recommend using Core L

Re: Cocoa-based GPS framework?

2010-02-12 Thread Eric Gorr
It's available for a regular Mac application in the 10.6 SDK. Check your Xcode documentation, you will see it there. On Feb 12, 2010, at 3:46 PM, Jonathon Kuo wrote: > Googling around, I see Core Location usage in reference only to the iPhone... > Is it only part of the iPhone SDK? Would ther

Connected Objects being allocated

2010-02-12 Thread Donald Klett
Once again, I am not understanding some aspect of Objective C and/or Cocoa. I created a simple class that contains two NSTextField objects. I used IB to connect the Controller object with the two text fields. The code follows. This example runs correctly and does copy the value from one text

@distinctUnionOfArrays problem

2010-02-12 Thread Trygve Inda
I am trying to get @distinctUnionOfArrays to work with bindings. I have a Master NSArrayController. This contains an array of NSMutableDictionary objects. Each Dictionary has three NSString keys/fields: Genre, Artist, Album. I set the content of the Master Controller to my NSMutableArray and all

Re: get the list of controls in a NSView

2010-02-12 Thread Graham Cox
On 12/02/2010, at 11:48 PM, Roland King wrote: > That's why I suggested viewWithTag: method, if you give the text view tag > number 1 and the two buttons tags 2 and 3, you can easily find them by > calling viewWithTag: with each tag from 1 to 3. I can't really see the benefit of this - you're

Re: Connected Objects being allocated

2010-02-12 Thread Henry McGilton (Boulevardier)
On Feb 12, 2010, at 1:31 PM, Donald Klett wrote: > Once again, I am not understanding some aspect of Objective C and/or Cocoa. > > I created a simple class that contains two NSTextField objects. I used IB to > connect the Controller object with the two text fields. The code follows. > This

Re: Connected Objects being allocated

2010-02-12 Thread Steven Degutis
Don, Your first snippet of code is great and follows MVC just fine. However, your second snippet breaks away from proper MVC, in the vein of over-thinking your architecture. When in doubt, start simple and extend as needed. In your first snippet, your Controller class is a valid Controller in the

Re: @distinctUnionOfArrays problem

2010-02-12 Thread Trygve Inda
> I am trying to get @distinctUnionOfArrays to work with bindings. > > I have a Master NSArrayController. This contains an array of > NSMutableDictionary objects. Each Dictionary has three NSString keys/fields: > Genre, Artist, Album. > > I set the content of the Master Controller to my NSMutable

NSTokenField: binding + disappearing tokens

2010-02-12 Thread Andrew Shamel
Hi there! I am having a bizarre problem with NSTokenField. In Interface Builder, having bound the field's "value" binding to an NSArrayController containing NSManagedObjects, and passing the value through a ValueTransformer, the field's tokens show up, displaying the proper values. However, w

Youtube video upload ussue

2010-02-12 Thread Damien Cooke
Hi All, I have got a very frustrating problem. I am trying to upload video to youtube using GData APIs and am having significant issues. I am sure one of you will have done this previously and I hope you can assist me. I have copied the cocoa sample and just put it in my code to get something

Re: @distinctUnionOfArrays problem

2010-02-12 Thread Trygve Inda
> Did you try: > > @distinctUnionOfObjects.Genre > > since valueForKey:@"Genre" returns an NSString object, not an array. > > -aaron Same results more-or-less: I set the secondary NSArrayController to be bound to the master with arrangesObjects and @distinctUnionOfObjects.Genre I wish there w

Re: get the list of controls in a NSView

2010-02-12 Thread Roland King
Remember the original poster is blind. He can use interface builder to create and position widgets and it seems that the dialogs allowing you to set position and other attributes (like tag) are accessible but the control drag to hook objects up to outlets or set actions is not accessible, so he

Re: @distinctUnionOfArrays problem

2010-02-12 Thread Trygve Inda
> It sounds like you are using an NSTreeController as the master not an > NSArrayController, so you'll want to do: > > valueForKeyPath:@"childnod...@distinctunionofobjects.genre" > > at least I think so. childNodes will give you an array for all the > nodes in your tree. Ok - so I did manage to

Re: NSDateFormatter returns nil

2010-02-12 Thread Kristof Van Landschoot
On Fri, Feb 12, 2010 at 8:21 PM, Fritz Anderson wrote: > On 12 Feb 2010, at 12:16 PM, Kristof Van Landschoot wrote: > >> Why is lDateFormatted nil on iPhone simulator 3.1.2 after executing >> this piece of code? >> >>     NSString *lDateString = @"Wed, 17 Feb 2010 16:02:01"; >>     NSDateFormatter

warning when setting the delegate of SpeechSynthesizer

2010-02-12 Thread Martin Beroiz
Hello everybody, I'm having a difficult time trying to figure out why cocoa gives me a warning when trying to implement a delegate method in my class. I'm writing the SpeakLine application from Aaron Hillegass' book in which the user enters a line of text and there's 2 buttons: "Stop" and "Speak

RE: warning when setting the delegate of SpeechSynthesizer

2010-02-12 Thread Martin Beroiz
OMG, I'm sorry I just found that I should add next to the class definition. Disregard my last message. (I wonder why he doesn't mention that in the book). Begin forwarded message: > From: Martin Beroiz > Date: February 12, 2010 8:19:04 PM CST > To: Cocoa Dev > Subject: warning when settin

Re: warning when setting the delegate of SpeechSynthesizer

2010-02-12 Thread Steven Degutis
Aaron's book came out before Snow Leopard, back when @optional was not available; thus any protocol which declared at least 1 optional method must be an informal protocol. This is not so anymore ever since 10.6's SDK. Thus, NSSpeechSynthesizerDelegate did not exist when the book was written. Steve

Re: Replacing model objects using an NSArrayController

2010-02-12 Thread William Peters
On Feb 11, 2010, at 10:33 PM, Quincey Morris wrote: > There isn't a "replace" method for an array controller. If you must do it as > a single operation, then solution would be to fetch the original object at > the end of editing, update its properties to match the (edited) properties of > the c

Re: Validating unique objects in CoreData

2010-02-12 Thread Roland King
That's not a horrible solution, except for the feeling that core data ought to let you do what you want without having to implement your own UUID cache. I'm still a bit surprised that a lookup for an object by one attribute is taking so long, over just 30,000 objects. You do have the uuid attrib

Re: Indexed Attributes in Core Data (was Validating unique objects)

2010-02-12 Thread Jerry Krinock
On 2010 Feb 12, at 19:06, Roland King wrote: > http://cocoawithlove.com/2008/03/testing-core-data-with-very-big.html > This guy was working on sets of 1 million objects and doing fetches with > indexed properties was taking about 2 seconds, vs non-indexed, 600 seconds. Damn. I never knew that

Re: Indexed Attributes in Core Data (was Validating unique objects)

2010-02-12 Thread Roland King
On 13-Feb-2010, at 12:01 PM, Jerry Krinock wrote: > > On 2010 Feb 12, at 19:06, Roland King wrote: > >> http://cocoawithlove.com/2008/03/testing-core-data-with-very-big.html > >> This guy was working on sets of 1 million objects and doing fetches with >> indexed properties was taking about 2 s

UINavigationController inside a TabBarController

2010-02-12 Thread Laurent Daudelin
I'm not sure what I'm missing but I know it must be big. I started the design of a TabBar-style app and now, I want one of the view to be a navigation one. I did drag a UINavigationController to my xib, put it inside the TabBarView and put my tableview under the navigation controller. When I ope

Re: UINavigationController inside a TabBarController

2010-02-12 Thread Dave DeLong
Here's a blog post I wrote last year on how to do this programmatically (which I find much easier to understand than doing it in Interface Builder): http://www.davedelong.com/blog/2009/05/13/adding-uinavigationuitableview-controllers-uitabbarcontroller There's also a sample project and a PDF in

Re: Cocoa-based GPS framework?

2010-02-12 Thread Bill Cheeseman
On Feb 12, 2010, at 12:11 PM, Steven Degutis wrote: > If you can support 10.6, I would recommend using Core Location, which is > pretty solid from my understanding. But does Core Location on the Mac (10.6) support hardware GPS? I think not. I have written Lucubrator, a free Snow Leopard app for

Re: UINavigationController inside a TabBarController

2010-02-12 Thread Laurent Daudelin
Thanks, Dave. I'll have a look though I would prefer to keep as much the UI into IB. -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin http://nemesys.dyndns.org Logiciels Nemesys Software laurent.daude...@

Re: UINavigationController inside a TabBarController

2010-02-12 Thread Henry McGilton (Boulevardier)
On Feb 12, 2010, at 8:34 PM, Laurent Daudelin wrote: > I'm not sure what I'm missing but I know it must be big. I started the design > of a TabBar-style app and now, I want one of the view to be a navigation one. > I did drag a UINavigationController to my xib, put it inside the TabBarView > a

Re: UINavigationController inside a TabBarController

2010-02-12 Thread Kevin Callahan
On Feb 12, 2010, at 8:34 PM, Laurent Daudelin wrote: > I'm not sure what I'm missing but I know it must be big. I started the design > of a TabBar-style app and now, I want one of the view to be a navigation one. > I did drag a UINavigationController to my xib, put it inside the TabBarView > a

Re: UINavigationController inside a TabBarController

2010-02-12 Thread Laurent Daudelin
Thanks, that was helpful but I had already figured it out. After examining the "Recipes" sample, which does exactly what I wanted to do, I did notice that the sample didn't have a pre-configured tableview. So, I removed my tableview from the view hierarchy and, in viewDidLoad, I did set the tabl

Re: UINavigationController inside a TabBarController

2010-02-12 Thread Roland King
What's the 'style' on the segmented control set to? The 'bar' style is smaller than the 'plain' or 'bordered' styles. On 13-Feb-2010, at 1:54 PM, Laurent Daudelin wrote: > Thanks, that was helpful but I had already figured it out. After examining > the "Recipes" sample, which does exactly what