Re: Using NSPredicateEditor with core data

2010-08-13 Thread Gustavo Pizano
Peter. Thank you very much. On Aug 14, 2010, at 12:27 AM, Peter Ammon wrote: > You can get the left and right expressions, etc. by calling through to super: > > NSComparisonPredicate *superPredicate = [super > predicateWithSubpredicates:subpredicates]; > NSExpression *lhs = [superPred

Recursive file remove

2010-08-13 Thread Tom Jones
Hello, What is the best way to recursively remove a directory and all of it's sub directories and files, BTW I need to support 10.4 systems. Thanks, tom___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or modera

Clarification on Associated Objects

2010-08-13 Thread Dave DeLong
Hi everyone, I'm adding an associated object (an NSMutableArray) to an NSView with a policy of OBJC_ASSOCIATION_RETAIN. If I'm reading the documentation correctly, I don't have to worry about clearing the associated object when the view is deallocated, because it will be taken care of for me,

va_list customize strings and objects.

2010-08-13 Thread Mr . Gecko
Hello, I'm wanting to let's say escape strings and objects in a va_list before I use NSString to place the format together into one string. I know that on OS X va_list is just a char * that is an array, so I know I should be able to make one manually in code, but how is the question. I read htt

Get an escape sequence out of an NSString

2010-08-13 Thread Alex Kac
Given an NSString @"\ue001" like this, how does one get the value into an NSInteger so that its equal to 0xe001? I've tried converting it to an NSData with an encoding of NSUTF16BigEndianStringEncoding, but I'm not getting what I expect. Experience has taught me that usually its because I'm bein

url scheme for plugin

2010-08-13 Thread Russell Gray
I am building a plugin application and are currently setting up potionstore, which emails out a license and a custom registration link. My question is: Is it possible to add a custom url scheme for plugins? I havnt been able to find a way to make my app plugin respond to my custom url scheme. a

initWithNibName:nil not working for UITableViewController?

2010-08-13 Thread Matt Neuburg
I asked for a new file which was a UITableViewController along with the corresponding nib file. But when I instantiated my controller and presented it, the table was not taking on any of the characteristics I was specifying in the nib file. After some experimentation (subtext: this took all day to

Re: Unzip class/lib

2010-08-13 Thread John Ackert
you can also use the standard zlib library and create a category for NSData by using the 'bytes' of NSData and the inflate() and deflate() functions of the zlib library. ~John Ackert On Aug 13, 2010, at 8:56 PM, Kyle Sluder wrote: > On Fri, Aug 13, 2010 at 11:39 AM, Tom Jones wrote: >> I have

Re: NSCountedSet and NSString values question

2010-08-13 Thread Greg Guerin
Philip Mobley wrote: The author of the article is somewhat unsure whether using - isEqual: is safe, but after looking at the [NSString hash] documentation I feel confident in my current implementation. That author is confused, and should consult some reference documentation. It's really q

Re: NSCountedSet and NSString values question

2010-08-13 Thread Quincey Morris
On Aug 13, 2010, at 17:13, Philip Mobley wrote: > I guess the issue is really more related to the fact that I didn't understand > how NSStrings work with the -isEqual: function. I have been reading up on > it, and have read some interesting things including: > > http://www.drobnik.com/touch/2

Re: NSCountedSet and NSString values question

2010-08-13 Thread Philip Mobley
On Aug 13, 2010, at 4:14 PM, Greg Guerin wrote: >> My question is basically how does NSCountedSet handle string values, are >> they interpreted by their string values or by their object values? If they >> are by object, then I need to do more work to pull the exact key object from >> the NSDic

Re: How to assure NSTask termination when parent dies

2010-08-13 Thread jonat...@mugginsoft.com
On 13 Aug 2010, at 22:32, Greg Guerin wrote: >> Process group code: >> >> // launch the task >> [task launch]; >> >> pid_t group = setsid(); >> if (group == -1) { >>NSLog(@"setsid() == -1"); >> group = getpgrp(); >> } >> if (setpgid([task processId

Re: NSCountedSet and NSString values question

2010-08-13 Thread Greg Guerin
Philip Mobley wrote: My question is basically how does NSCountedSet handle string values, are they interpreted by their string values or by their object values? If they are by object, then I need to do more work to pull the exact key object from the NSDictionary. NSCountedSet inherits f

Re: Unzip class/lib

2010-08-13 Thread Sean McBride
Tom Jones (tjo...@acworld.com) on 2010-08-13 14:39 said: >I have been googling for a little while now and I'm not finding the >answers. Does Mac OS X have a unzip library to unzip the archives >created in the GUI. I guess I could do the NSTask thing but I would >rather not. I would also like to av

NSOutlineView Drop

2010-08-13 Thread koko
When dragging into an NSOutlineView if I drop all is well. If in the same drag operation I continue out of the NSOutlineView cells remain highlighted. How should I keep this from happening? -koko ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.

Re: Storing objects in NSMutableDictionary

2010-08-13 Thread Michael Ash
On Fri, Aug 13, 2010 at 4:22 PM, Greg Parker wrote: > On Aug 13, 2010, at 1:09 PM, Geoffrey Holden wrote: >> Is it possible to store a class object in NSMutableDictionary? > > Class objects cannot be used as dictionary keys, because NSDictionary copies > its keys and class objects can't be copied

Re: Using NSPredicateEditor with core data

2010-08-13 Thread Peter Ammon
You can get the left and right expressions, etc. by calling through to super: NSComparisonPredicate *superPredicate = [super predicateWithSubpredicates:subpredicates]; NSExpression *lhs = [superPredicate leftExpression], *rhs = [superPredicate rightExpression]; ... You would ret

Re: Using NSPredicateEditor with core data

2010-08-13 Thread Gustavo Pizano
Peter hello, first of all thanks for the reply. So yes, I need to cross a to-many relationship. let me see if I got this straight because my mind was heading in that same direction you commented, just I didn't know what to use or what was the name of the artifact, in this case the NSComparasion

NSCountedSet and NSString values question

2010-08-13 Thread Philip Mobley
I am keeping track of the number of times an object is accessed by key value within a NSDictionary. I am using a manager type class where I request the object from the manager, and it accesses the NSDictionary for the object, therefore I am using a method such as this: - (CGImageRef) imageName

Re: Using NSPredicateEditor with core data

2010-08-13 Thread Peter Ammon
On Aug 13, 2010, at 8:45 AM, Gustavo Pizano wrote: > Hello all once again. > > I have been searching but I hadn't found something useful, so please before > if you know a place I can look at let me know. > > I have these 3 Entities > > ExpenditureGroup: > name > icon. >

Re: How to assure NSTask termination when parent dies

2010-08-13 Thread Greg Guerin
Process group code: // launch the task [task launch]; pid_t group = setsid(); if (group == -1) { NSLog(@"setsid() == -1"); group = getpgrp(); } if (setpgid([task processIdentifier], group) == -1) { NSLog(@"unable to pu

Re: iPhone app with searchable text that highlights

2010-08-13 Thread Conrad Shultz
On Aug 12, 2010, at 17:31, Jonathan Schmidt wrote: > At its most basic level, I am creating an iPhone app that displays textual > information. When searching, I want the app to highlight the matching text. > I'm using Core Data with SQLite. The text is stored in a string attribute > right n

SMTP Framework for Cocoa

2010-08-13 Thread Tony S. Wu
Hi, Is there a easy to use framework for sending email via SMTP authentication? I did a some searchings and found MailCore, Pantomime, EdMessage, but they all seem quite out-dated to me. Thanks. Tony S. Wu tonyswu@gmail.com___ Cocoa-dev mailing l

Re: How to assure NSTask termination when parent dies

2010-08-13 Thread jonat...@mugginsoft.com
On 13 Aug 2010, at 19:29, Michael Ash wrote: > > I'm not sure why your setpgid doesn't work. You might try a more > UNIX-oriented mailing list, such as darwin-dev. > > There are a couple of other things you could try. > > If your subprocess reads from standard input and exits on EOF, set its >

Re: Storing objects in NSMutableDictionary

2010-08-13 Thread Greg Parker
On Aug 13, 2010, at 1:09 PM, Geoffrey Holden wrote: > Is it possible to store a class object in NSMutableDictionary? Class objects cannot be used as dictionary keys, because NSDictionary copies its keys and class objects can't be copied. Class objects can be used as dictionary values. > [cur

Re: Storing objects in NSMutableDictionary

2010-08-13 Thread Brian Postow
On Aug 13, 2010, at 4:09 PM, Geoffrey Holden wrote: > Is it possible to store a class object in NSMutableDictionary? I want to do > something like the following - but it doesn't seem to work! > > NewMessage* message = [[NewMessage alloc] initWithApp:@"Messenger" :self]; > //initWithApp passes

Re: Storing objects in NSMutableDictionary

2010-08-13 Thread Kyle Sluder
On Fri, Aug 13, 2010 at 1:09 PM, Geoffrey Holden <45rpmli...@googlemail.com> wrote: > Is it possible to store a class object in NSMutableDictionary?  I want to do > something like the following - but it doesn't seem to work! > > NewMessage* message = [[NewMessage alloc] initWithApp:@"Messenger" :s

Storing objects in NSMutableDictionary

2010-08-13 Thread Geoffrey Holden
Is it possible to store a class object in NSMutableDictionary? I want to do something like the following - but it doesn't seem to work! NewMessage* message = [[NewMessage alloc] initWithApp:@"Messenger" :self]; //initWithApp passes in the nib name and a reference to itself (wonder where I got

MOC Migrations Using .xcdatamodeld

2010-08-13 Thread Brad Gibbs
I'm having some real problems performing my first migration. I'm trying to add a single attribute to two entities in my model. I created a new version of the model using Design > Data Model > Add Model Version. This converted the .xcdatamodel into a .xcdatamodeld with two model versions. I r

Re: Unzip class/lib

2010-08-13 Thread Kyle Sluder
On Fri, Aug 13, 2010 at 11:39 AM, Tom Jones wrote: > I have been googling for a little while now and I'm not finding the answers. > Does Mac OS X have a unzip library to unzip the archives created in the GUI. > I guess I could do the NSTask thing but I would rather not. I would also like > to a

Unzip class/lib

2010-08-13 Thread Tom Jones
Hello, I have been googling for a little while now and I'm not finding the answers. Does Mac OS X have a unzip library to unzip the archives created in the GUI. I guess I could do the NSTask thing but I would rather not. I would also like to avoid a framework as well as my app is a Foundation to

Re: How to assure NSTask termination when parent dies

2010-08-13 Thread Michael Ash
On Fri, Aug 13, 2010 at 9:13 AM, jonat...@mugginsoft.com wrote: > My app generates a task using NSTask(). > > If my app is killed or calls abort() - which equates to raise(SIGABRT) - then > it would be desirable that the child die too. > > If I have the code for the launched task then a kqueue co

Re: Does autoreleased NSURLConnection object guarantee job completion?

2010-08-13 Thread Michael Ash
On Thu, Aug 12, 2010 at 10:51 PM, yanghb wrote: > if the instance is released in delegate, what to perform the following > code?OK, maybe code segment will always be there, but if the code > access some instance vairable, it just will cause EXEC_ACCESS_BAD, > isn't it? This is absolutely correct.

controlling keyboard cursor on NSTextFieldCell

2010-08-13 Thread Abdullah Sowayan
Hi folks, I am developing against Mac OSX 10.5. I have an NSMatrix that has a bunch of NSTextFieldCell cells. I would like to programmatically control the position of the keyboard cursor within a NSTextFieldCell, but unfortunately I have not been able to figure out a way to do that. Any suggestion

Re: Does autoreleased NSURLConnection object guarantee job completion?

2010-08-13 Thread yanghb
In my self-defined network handler function, I use a instance variable "connection" to hold NSURLConnection alloced instance, when I will use to load request, so the instance variable can be canceled some where. and the instance will be released before next request performs. that is, if(connection

iPhone app with searchable text that highlights

2010-08-13 Thread Jonathan Schmidt
At its most basic level, I am creating an iPhone app that displays textual information. When searching, I want the app to highlight the matching text. I'm using Core Data with SQLite. The text is stored in a string attribute right now. The strings can be up to a few kilobytes in size. I thi

Re: Does autoreleased NSURLConnection object guarantee job completion?

2010-08-13 Thread Conrad Shultz
On Aug 12, 2010, at 11:06, Keary Suska wrote: > If you really don't want (or can't have) an instance variable, you can > init/alloc then release in connectionDidFinishLoading: and > connection:didFailWithError:. I wouldn't recommend this though, as it is > probably "bad form", but as long you

Re: [BYUCH] CocoaHeads meeting tonight!

2010-08-13 Thread Cory Kilger
I think Dave's really excited because I'll be using his StackOverflow framework, StackKit. Also, for those iOS developers (like me) I hope to show you why Quartz Composer can still be relevant to you, and not just some cool Mac thing. Cory On Aug 12, 2010, at 10:53 AM, Dave DeLong wrote: > Hi

Re: who stole my UIView?

2010-08-13 Thread David Duncan
On Aug 12, 2010, at 5:53 PM, Matt Neuburg wrote: > Where are the warnings? -[UIView layer] has this to say: "Warning: Since the view is the layer’s delegate, you should never set the view as a delegate of another CALayer object. Additionally, you should never change the delegate of this layer."

Using NSPredicateEditor with core data

2010-08-13 Thread Gustavo Pizano
Hello all once again. I have been searching but I hadn't found something useful, so please before if you know a place I can look at let me know. I have these 3 Entities ExpenditureGroup: name icon. --- toExpenditures. ->> Expenditure creationDate

Re: Can't resize Floating-Number NSTextfield in NSPredicateEditor.

2010-08-13 Thread Gustavo Pizano
Dave: Thanks worked like charm! . Gustavo On Aug 13, 2010, at 3:39 PM, Dave DeLong wrote: > NSPredicateEditorRowTemplate ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Con

Memory Management

2010-08-13 Thread Richard Somers
I had a nasty memory bug. I spent hours and hours on it with nothing but increasing frustration as a result. Then I went back to basics and read Apple's "Memory Management Programming Guide". The problem was now readily apparent and easily fixed. This is an excellent document. I have read

Re: Can't resize Floating-Number NSTextfield in NSPredicateEditor.

2010-08-13 Thread Gustavo Pizano
Dave thanks for the reply Im gonna try it right away. Gustavo. On Aug 13, 2010, at 3:39 PM, Dave DeLong wrote: > This is only resizing the textfield of the row *template*, not the row > itself. I've found that the easiest way to do what you're wanting is to > subclass NSPredicateEditorRowTem

Re: Can't resize Floating-Number NSTextfield in NSPredicateEditor.

2010-08-13 Thread Dave DeLong
This is only resizing the textfield of the row *template*, not the row itself. I've found that the easiest way to do what you're wanting is to subclass NSPredicateEditorRowTemplate and override the templateViews method. In that method you'll invoke super's implementation, then alter the frame of

Can't resize Floating-Number NSTextfield in NSPredicateEditor.

2010-08-13 Thread Gustavo Pizano
Hello all, I come to you asking for humble guidance. after reading the way to resize the TextFields in some other topic, I tried myself, without success.. This is what I have. A parent view which display the panel that contains the predicate editor, this predicate editor controller (NSWindowC

Question about UIScrollviews

2010-08-13 Thread Eric E. Dolecki
I have a UIScrollView that is serving to hold my own contra logic - that looks much like a UITableView and only scrolls vertically. When one of the items in the main UIScrollView is toggle tapped, I slide open a space below it and the slide in another UIScrollView full of different items. The prob

How to assure NSTask termination when parent dies

2010-08-13 Thread jonat...@mugginsoft.com
My app generates a task using NSTask(). If my app is killed or calls abort() - which equates to raise(SIGABRT) - then it would be desirable that the child die too. If I have the code for the launched task then a kqueue comes to the rescue: http://old.nabble.com/Ensure-NSTask-terminates-when-pare