Re: stopping an application

2009-04-12 Thread Arjun SM
Use the 'do shell script' command do shell script kill -9 PID That should work. On Mon, Apr 13, 2009 at 10:08 AM, James W. Walker wrote: > > On Apr 12, 2009, at 8:55 PM, Greg Guerin wrote: > > Bill Janssen wrote: >> >> I was afraid of that... Is there an easy way to do that from the >>> comm

Re: Best way to pass large objects between tasks?

2009-04-12 Thread Graham Cox
On 13/04/2009, at 4:26 PM, Oleg Krupnov wrote: what I have tried is I created NSData from the large object by using NSKeyedArchiver. It has taken forever, so that I had to force-quit the process. Well, maybe you should concentrate on fixing this. It's hard to see what could be taking so mu

Re: Best way to pass large objects between tasks?

2009-04-12 Thread Oleg Krupnov
Thanks Graham. I haven't tried either of the methods I mentioned so far (because I'm lazy, sorry:), but what I have tried is I created NSData from the large object by using NSKeyedArchiver. It has taken forever, so that I had to force-quit the process. That's why I am asking if the same thing is g

Re: Display NSTextView as Label - without InterfaceBuilder

2009-04-12 Thread Graham Cox
On 13/04/2009, at 4:22 PM, Graham Cox wrote: On 13/04/2009, at 4:17 PM, Manuel wrote: With this code it doesn't work. It is still displayed as a Textfield. [label setBordered:NO]; or perhaps: [label setBezeled:NO]; not sure what the difference between a border and a bezel is, but you

Re: Display NSTextView as Label - without InterfaceBuilder

2009-04-12 Thread Graham Cox
On 13/04/2009, at 4:17 PM, Manuel wrote: With this code it doesn't work. It is still displayed as a Textfield. [label setBordered:NO]; --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or modera

Re: Best way to pass large objects between tasks?

2009-04-12 Thread Graham Cox
On 13/04/2009, at 4:09 PM, Oleg Krupnov wrote: I need to pass objects from one task (child) to another (parent) on the same machine. Currently I am considering two alternatives: Pipes vs Distributed Objects, and my main concern is performance, because the object is really large. How large is

Display NSTextView as Label - without InterfaceBuilder

2009-04-12 Thread Manuel
Hello I would like to draw an NSTextField to an NSView but it should be displayed as a label. In InterfaceBuilder it is no problem but how can I do that in sourcecode? With this code it doesn't work. It is still displayed as a Textfield. NSTextField *label = [[NSTextField alloc] init]; [la

Best way to pass large objects between tasks?

2009-04-12 Thread Oleg Krupnov
I need to pass objects from one task (child) to another (parent) on the same machine. Currently I am considering two alternatives: Pipes vs Distributed Objects, and my main concern is performance, because the object is really large. With pipes, I need to serialize (archive) the object into NSData

Re: stopping an application

2009-04-12 Thread James W. Walker
On Apr 12, 2009, at 8:55 PM, Greg Guerin wrote: Bill Janssen wrote: I was afraid of that... Is there an easy way to do that from the command line given its PID? Use the osascript command. Form a query using a 'whose' clause to select the process ID. I forget what the exact wording is,

Re: stopping an application

2009-04-12 Thread Greg Guerin
Bill Janssen wrote: I was afraid of that... Is there an easy way to do that from the command line given its PID? Use the osascript command. Form a query using a 'whose' clause to select the process ID. I forget what the exact wording is, or whether to ask Finder or System Events, so you

Re: How to open two nibs at app launch ? Beginners question

2009-04-12 Thread Quincey Morris
On Apr 12, 2009, at 07:49, Mario Kušnjer wrote: The problem is: I have MainMenu.xib with only main menu whose File's Owner is NSApplication. I want to have MainWindow.xib with only a window but that will be launched also when the application starts. Now you will ask why separate nibs ? Nev

NSDocument reference held by NSSavePanel?

2009-04-12 Thread Quincey Morris
Here's something strange. I have a NSDocument-based GC app whose data model contains an object that uses a resource. (The resource is actually exclusive access to a MMC-controlled device, but that's not really relevant.) The object has a finalize method in which the resource is released.

Re: Converting String Representations at Runtime

2009-04-12 Thread Adam R. Maxwell
On Apr 12, 2009, at 3:01 PM, John Joyce wrote: Is there an easy way to take input (user or file based) at runtime and convert unicode strings such as \u8D64 (UTF8 character) or a whole series of these to the human-readable characters they represent? I imagine I should be using NSScanner, but

How to open two nibs at app launch ? Beginners question

2009-04-12 Thread Mario Kušnjer
My regards to all on the list My name is Mario and I am now to Cocoa and Objective-C so I have some questions which will sound trivial to those with more experience. Please don't refer me to documentations because I have read them and looked for an answer and I tried to do it according to d

[ANN] FeedParser released - an open source Cocoa RSS parser

2009-04-12 Thread Kevin Ballard
FeedParser, a brand new NSXMLParser-based RSS parser for Cocoa, has been released as an open source project on GitHub[1]. The goal of this project is to provide an extensible RSS/Atom parser that works on both the iPhone and the desktop. To that end, it is based on NSXMLParser instead of NSXMLDocum

Re: Converting String Representations at Runtime

2009-04-12 Thread Michael Ash
On Sun, Apr 12, 2009 at 10:51 PM, Ken Thomases wrote: > The above is failing to take into account the assumed knowledge that the > code points won't be more than 4 characters long.  What if you follow a > \u sequence with characters (not intended to be part of the \u sequence) > in the [0-9a-f

Re: Converting String Representations at Runtime

2009-04-12 Thread Ken Thomases
On Apr 12, 2009, at 9:21 PM, Michael Ash wrote: On Sun, Apr 12, 2009 at 6:01 PM, John Joyce wrote: Is there an easy way to take input (user or file based) at runtime and convert unicode strings such as \u8D64 (UTF8 character) or a whole series of these to the human-readable characters they

MJPEG streams, webkit, and NSImage

2009-04-12 Thread Brad Peterson
Hi all, I recently got a wireless security camera, and although I can view it in Safari just fine, I was hoping to be able to integrate the feed into some existing code I have. I've seen a couple of posts on this list about webkit, and how difficult it was (is?) to use webkit to work with MJ

Re: stopping an application

2009-04-12 Thread Nick Zitzmann
On Apr 12, 2009, at 7:48 PM, Bill Janssen wrote: I was afraid of that... Is there an easy way to do that from the command line given its PID? Not really. First, you need a window server connection; you cannot send Apple events without one. Second, you need to get a PSN for the PID. Thir

Re: Converting String Representations at Runtime

2009-04-12 Thread Michael Ash
On Sun, Apr 12, 2009 at 6:01 PM, John Joyce wrote: > Is there an easy way to take input (user or file based) at runtime and > convert unicode strings such as \u8D64 (UTF8 character) or a whole series of > these to the human-readable characters they represent? > I imagine I should be using NSScanne

Re: stopping an application

2009-04-12 Thread Bill Janssen
Nick Zitzmann wrote: > > On Apr 12, 2009, at 11:21 AM, Bill Janssen wrote: > > > What's the right way to have another process stop an application? > > > Send it the "quit" Apple event. > > Nick Zitzmann > I was afraid of that... Is there an easy way to do that

How to create an ISO disc image

2009-04-12 Thread David
How can I create an ISO disc image. Can the disc recording framework do it? What about the DiskImages framework? I can't find an API for it. Thanks Sent from my iPhone ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin re

Re: Build Settings for Release: App/Library is bloated

2009-04-12 Thread WT
You're welcome. It seems to me that storing your dictionary in a trie is a good idea anyway. Tries are compact and very fast for many kinds of string matching queries. Incidentally, here's an excellent implementation of tries, by the great OMNI folks: OFTrie - Implementation of the popula

Re: NSLog with %f and comparisons using ==

2009-04-12 Thread Ken Thomases
Chiming in late-ish... On Apr 11, 2009, at 12:26 PM, James Maxwell wrote: oooh, damn... I was afraid someone was going to say that. I just hoped there might be some way to force a float to conform to what NSLog %f prints... That seems like it might be a useful function - something like pro

Converting String Representations at Runtime

2009-04-12 Thread John Joyce
Is there an easy way to take input (user or file based) at runtime and convert unicode strings such as \u8D64 (UTF8 character) or a whole series of these to the human-readable characters they represent? I imagine I should be using NSScanner, but is there not some simple function or method to

Re: Build Settings for Release: App/Library is bloated

2009-04-12 Thread Miles
Thanks Wagner. I'm actually just needing to verify if a word is in the dictionary, but maybe this is still a good choice? If I don't need to search for shared prefixes would I be better off using sqlite so i don't have to load it all into memory? On Sun, Apr 12, 2009 at 2:34 PM, WT wrote: > I

Re: Build Settings for Release: App/Library is bloated

2009-04-12 Thread WT
I you're trying to search for shared prefixes, you might want to store your data in a data structure better suited for such tasks, such as a Trie . Tries are fast and compact. Implementing a Trie isn't very difficult and, since it's such a commonly used da

Re: Build Settings for Release: App/Library is bloated

2009-04-12 Thread Miles
And BTW, my app is back down to 3.4MB after removing those classes and adding the dictionary in as a text file! That issue is now solved -- now I just need to figure out how to go about this approach :) awesome, thanks. On Sun, Apr 12, 2009 at 2:19 PM, Miles wrote: > > OK, it's gradually makin

Re: Build Settings for Release: App/Library is bloated

2009-04-12 Thread Miles
OK, it's gradually making sense, but i still have some questions. I started trying to do something like this a while back -- storing it all in one file, then loading it, but I think after that is where I went wrong. I created an array out of the contents and used it searched it way. I then decided

Re: Build Settings for Release: App/Library is bloated

2009-04-12 Thread Kyle Sluder
On Sun, Apr 12, 2009 at 1:19 PM, Miles wrote: > In the meantime if you have a good link handy about how to do this I would > appreciate it. If you put something in the Resources directory of the app bundle, you can use NSBundle's -pathForResource:ofType: and related methods to get their paths. S

Obvious NSSegmentedControl Bug?

2009-04-12 Thread Seth Willits
I need a sanity check before I file a bug report. sc is a 3-segment NSSegmentedControl with either Select One or Select Any as its mode. Segment 1 (the middle one) is selected in IB. Triggered as an action: NSLog(@"Before:"); NSLog(@" %d", [sc selectedSegment]); NSLog(@" %@", [sc isS

Re: Build Settings for Release: App/Library is bloated

2009-04-12 Thread Miles
Thanks a lot, guys. I wasn't aware of this option, but I am going to look into it right now. In the meantime if you have a good link handy about how to do this I would appreciate it. Thanks again, and if there are any other suggestions I'm welcoming those as well. On Sun, Apr 12, 2009 at 1:1

Re: Build Settings for Release: App/Library is bloated

2009-04-12 Thread Kyle Sluder
On Sun, Apr 12, 2009 at 12:11 PM, Miles wrote: > I'm having similar issues in the application itself, but I'm currently > working on the static library so those are the numbers I have handy. Does > that add up? Is there something else I'm missing? 12MB seems pretty > ridiculous for this. In addit

Re: Build Settings for Release: App/Library is bloated

2009-04-12 Thread Miles
Thanks for the response. Under my release configuration where I'm currently building it just shows 'Standard (iPhone OS: armv6)' under 'Architectures', and 'Build Active Architecture Only' is checked. On Sun, Apr 12, 2009 at 1:08 PM, Dave Keck wrote: > You might be compiling for four archite

Re: Build Settings for Release: App/Library is bloated

2009-04-12 Thread Dave Keck
You might be compiling for four architectures - PPC 32/64, Intel 32/64. Compiling for each of these can of course greatly increase your app's size, since you're essentially combining four versions of your app into one binary file. Check your release target to see what architectures it's compiling f

Re: Build Settings for Release: App/Library is bloated

2009-04-12 Thread Miles
Yes, the size is in the executable which is about 8MB. It doesn't feel like this app should be that big considering the size of the files, but again I don't really know what all goes into making an app grow like this during compile. Any thoughts? On Sun, Apr 12, 2009 at 12:42 PM, I. Savant wrote

Re: Build Settings for Release: App/Library is bloated

2009-04-12 Thread I. Savant
On Apr 12, 2009, at 3:11 PM, Miles wrote: My .app file and library file have both quickly grown to be 13MB in disk size and I'm having a hard time figuring out why. The .app bundle usually contains more than just your code. Have you examined it to see where the size is? Is it the executa

Re: stopping an application

2009-04-12 Thread Nick Zitzmann
On Apr 12, 2009, at 11:21 AM, Bill Janssen wrote: What's the right way to have another process stop an application? Send it the "quit" Apple event. Nick Zitzmann ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.co

Build Settings for Release: App/Library is bloated

2009-04-12 Thread Miles
My .app file and library file have both quickly grown to be 13MB in disk size and I'm having a hard time figuring out why. I've been reading about build settings and anything else I can get my hands on but I can't seem to make significant improvements. I don't know a ton about what happens in the c

Re: @selector not working with (id)anObject

2009-04-12 Thread Scott Ribe
> Basically I just need to use a function pointer. How does Cocoa do this? Put a function pointer member in your class and set it before you call detachNewThreadSelector on it... -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567 voice _

stopping an application

2009-04-12 Thread Bill Janssen
What's the right way to have another process stop an application? Sending a SIGTERM doesn't seem to invoke the application shutdown dance; and signal handlers don't seem to establish themselves. Bill ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.co

Re: NSPredicateEditorTemplateRow , pop up with Core Data objects

2009-04-12 Thread mmalc Crawford
On Apr 10, 2009, at 2:37 PM, Dan Waltin wrote: But here the studyVisitsController always contains 0 (zero) objects, although there ought to be a handful objects. Which means that I'm never adding any items to the menu. When is the templateViews method invoked? If your array controller is

Re: Core Data done loading

2009-04-12 Thread mmalc Crawford
On Apr 12, 2009, at 8:23 AM, Ivan C Myrvold wrote: I have a document-based Core Data application, and I want to do some initializing when the application is done loading data from the persistent store. The document doesn't "load" anything from the persistent store unless you tell it to f

Core Data done loading

2009-04-12 Thread Ivan C Myrvold
I have a document-based Core Data application, and I want to do some initializing when the application is done loading data from the persistent store. I couldn't find any notifications in NSManagedContext for this. Ivan ___ Cocoa-dev mailing lis

Re: NSPredicateEditorTemplateRow , pop up with Core Data objects

2009-04-12 Thread Daniel Vollmer
Hello, On Apr 10, 2009, at 23:37 , Dan Waltin wrote: I'm trying to create a NSPredicateEditorTemplateRow where the last view is a popup, containing every item of a particular CoreData entity (named StudyVisit). I'm doing something similar (and it's working fine for me). Then I override t

[Partial Solution] Getting an UISwitch in a table view cell to send an action message

2009-04-12 Thread WT
Hello again, it turns out that the standard behavior of rows with UISwitch instances is NOT to treat equally a tap on the switch itself and a tap on the part of the row rectangle that does not include the switch. Apple's iPhone Settings application ignores taps on the row itself and only

Getting an UISwitch in a table view cell to send an action message

2009-04-12 Thread WT
Hello list, The iPhone app I'm working on has an in-app settings manager, wich is just a table view showing the various settings the user can change, and they're all booleans, so each row has a UISwitch instance as the cell's accessory view. In order to treat equally (a) tapping the switc

Re: NSString camel case

2009-04-12 Thread jonat...@mugginsoft.com
On 12 Apr 2009, at 07:46, Dave Keck wrote: Cocoa has always been lacking in the RegEx department (at least the 'built-in' Cocoa classes, NSPredicate can handle ICU regex expressions. Jonathan Mitchell Central Conscious Unit http://www.mugginsoft.com