Re: Cocoa daemon

2008-08-01 Thread Negm-Awad Amin
Hi, I agree! Even agents can take advantage of some frameworks, it is definetly no good idea to do any application (i.g. "ui-programm") stuff. Amin Am Fr,01.08.2008 um 21:52 schrieb Charles Srstka: On Aug 1, 2008, at 2:28 PM, Jens Alfke wrote: That class is in the AppKit framework. Daem

Re: Putting a spinning progress indicator in a outline

2008-08-01 Thread Markus Spoettl
On Aug 1, 2008, at 4:42 PM, Markus Spoettl wrote: Thanks, that looks pretty good. I can't get it to work with binding right now, not sure why that is. When I bind to a bool property of the item object (which is KVC compliant) I get this logged: 8/1/08 4:06:37 PM myApp[1280] [ valueForUndef

Re: NSDate, NSTimer, NSTimeInterval combined question

2008-08-01 Thread Ron Fleckner
Hi Eric, The best thing to tell you to do, I think, is to read, or re-read, the documentation for NSTimer. A timer (ie, an NSTimer instance) will fire when you tell it to. In your startWatch: method, you've told it to fire every 0 (zero) seconds. I don't think that's what you want. I

re: NSDate, NSTimer, NSTimeInterval combined question

2008-08-01 Thread Allison Newman
Eric, Without looking too closely, I see several problems, there may be others. Firstly, in your updateTextfield method, you are using startTimewithout initialising it. Secondly, in your timer callback (updateTextfield), you never update the value of your clock gadget, so of course it d

IKImageBrowser drag reordering question/problem

2008-08-01 Thread c. mendoza
Hey All, I've successfully managed to use an IKImageBrowser in an app I am developing. My IKImageBrowserItem imageRepresentationType is IKImageBrowserPathRepresentationType, and everything works as advertised: I can drag-reorder and delete the images. However, when I try to use IKImage

NSDate, NSTimer, NSTimeInterval combined question

2008-08-01 Thread Eric Lee
I'm making a StopWatch, and I'm just a beginner, so please be patient with me. I have two tabs. The first tab is a timer, while the second tab is a clock in string format. I have a few problems with both of them. The problem with the timer is that it starts from January 1st, 2001. How can

Re: NSPopupButton and Interface Builder

2008-08-01 Thread Jens Alfke
On 1 Aug '08, at 9:46 PM, Andrew Zahra wrote: I have an NSPopupButton in my user interface. I notice that Interface Builder populates it with Item 1, 2, 3 - but where do I edit these values? Double-click the pop-up view in IB and its menu will appear. Then you can edit it just like the me

NSPopupButton and Interface Builder

2008-08-01 Thread Andrew Zahra
I have an NSPopupButton in my user interface. I notice that Interface Builder populates it with Item 1, 2, 3 - but where do I edit these values? I have looked at the various tabs for the objects in its hierarchy, but I can't find where they are specified. Can someone point me in the right direction

2 outline views, selection changes

2008-08-01 Thread Jack Carbaugh
I've been wracking my brain over this and after having too much caffeine and little results ... I have 2 outline views and I'd like to have them operate such that selecting an item in OV#1, deselects any item(s) in OV#2 and vice versa. I have tried many things in - (void)outlineViewSelecti

NSArrayController and NStableView Binding

2008-08-01 Thread Revant Jain
Hi, I have created a NSArrayController object which has the following attributes: Class Name: Person Keys: personName, expectedRaise ContentArray: employees employees is a NSMutableArray contains references to Person objects. employee is part of MyDocument class(subclass of NSDocument). Now my

Re: [Q] is NSFileHandle's writeData method faster than the FSWriteFork?

2008-08-01 Thread Jens Alfke
On 1 Aug '08, at 7:27 PM, JongAm Park wrote: I measured the performance and found out that the most of the time were spent with the FSWriteFork() function. Probably other parts should be streamlined also, but it would impact significantly if the file write can be faster. You should sample

Re: Core Data saved doc compatibility issues ...

2008-08-01 Thread mmalc crawford
On Aug 1, 2008, at 8:27 PM, vince wrote: Is this typical? IIf so my guess is potential customers will encounter major problems as I distribute application updates. I'm not sure how to address this.

Core Data saved doc compatibility issues ...

2008-08-01 Thread vince
I'm building a doc based Core Data application using bindings. Question about this error: "The document "New-db.sqlite" could not be opened. The managed object model version used to open the persistent store is incompatible with the one that was used to create the persistent store." I receive thi

Re: [Q] is NSFileHandle's writeData method faster than the FSWriteFork?

2008-08-01 Thread JongAm Park
Thank you, Jens Alfke for your reply. The function will write about 19200 bytes per every call. I'm going to write XDCAM 35 or 50 video data. What is curious was that saving files as QuickTime movie format from the Final Cut Pro takes about 20 secs for 1 minutes of XDCAM 35 video source, bu

Re: [Q] is NSFileHandle's writeData method faster than the FSWriteFork?

2008-08-01 Thread Jens Alfke
On 1 Aug '08, at 3:33 PM, JongAm Park wrote: I have some codes which were written in Carbon and we want to make its performance faster. I found out that most of the time is spent by a series of FSWriteFork() function. So, I would like to use any method which is faster than that. fwrite is

Re: NSDistributedNotifications and scripting languages

2008-08-01 Thread Jens Alfke
On 1 Aug '08, at 3:11 PM, Recent Chaos Software wrote: I was wondering if anyone had any ideas about sending notifications to Cocoa applications using either Ruby, or PHP? I want to send notifications using a cocoa application to another cocoa application and / or send notifications from a

Re: [Q] is NSFileHandle's writeData method faster than the FSWriteFork?

2008-08-01 Thread Nick Zitzmann
On Aug 1, 2008, at 4:33 PM, JongAm Park wrote: Hello.. Ahnyong haseo, I have some codes which were written in Carbon and we want to make its performance faster. I found out that most of the time is spent by a series of FSWriteFork() function. So, I would like to use any method which is

Re: Putting a spinning progress indicator in a outline

2008-08-01 Thread Markus Spoettl
On Aug 1, 2008, at 2:55 PM, Jens Alfke wrote: I'm trying to figure out how I might be able to do something like Mail.app does displaying a spinning progress indicator as part of an outline item. Is this a custom cell type that AppKit doesn't have or is it something that's already there waiti

[Q] is NSFileHandle's writeData method faster than the FSWriteFork?

2008-08-01 Thread JongAm Park
Hello.. I have some codes which were written in Carbon and we want to make its performance faster. I found out that most of the time is spent by a series of FSWriteFork() function. So, I would like to use any method which is faster than that. fwrite is one option but I also looked up a Cocoa me

Re: pointers in objective-c?

2008-08-01 Thread Daniel Staal
--As of August 1, 2008 4:47:11 PM -0400, Michael Ash is alleged to have said: A *pointer* to an object is just an address, like 0x12345678. This is the address of the first byte in that blob of memory. A pointer essentially lets you find that object in memory, but it is not the object. Think of

NSDistributedNotifications and scripting languages

2008-08-01 Thread Recent Chaos Software
Hello Everyone, I was wondering if anyone had any ideas about sending notifications to Cocoa applications using either Ruby, or PHP? I want to send notifications using a cocoa application to another cocoa application and / or send notifications from a web based application. I have looked

Re: Putting a spinning progress indicator in a outline

2008-08-01 Thread Jens Alfke
On 1 Aug '08, at 2:49 PM, Markus Spoettl wrote: I'm trying to figure out how I might be able to do something like Mail.app does displaying a spinning progress indicator as part of an outline item. Is this a custom cell type that AppKit doesn't have or is it something that's already there w

Putting a spinning progress indicator in a outline

2008-08-01 Thread Markus Spoettl
Hello List, I'm trying to figure out how I might be able to do something like Mail.app does displaying a spinning progress indicator as part of an outline item. Is this a custom cell type that AppKit doesn't have or is it something that's already there waiting to be used? I'd be grateful

Re: pointers in objective-c?

2008-08-01 Thread Sherm Pendley
On Fri, Aug 1, 2008 at 3:38 PM, Arthur Coleman <[EMAIL PROTECTED]> wrote: > I hate to be dense, but what about C structs like NSRect? There's nothing special about them - they can be allocated on the stack or on the heap, just like any other C struct. > There are initialized on the stack aren't t

Re: Distributed Objects "connection went invalid while waiting for a reply"

2008-08-01 Thread Hamish Allan
On Fri, Aug 1, 2008 at 1:02 AM, Chris Suter <[EMAIL PROTECTED]> wrote: > The reason you're seeing the error is because as soon as you receive the > response in your client, you're printing it and terminating the application > but the server is expecting a response (even though the method has a voi

Re: pointers in objective-c?

2008-08-01 Thread Michael Ash
On Fri, Aug 1, 2008 at 2:43 PM, Wayne Shao <[EMAIL PROTECTED]> wrote: > It seems that every object is a pointer in the sample code I have > seen. Is there any distinction between an object and its pointer? Others have addressed the general concepts involved, but I wanted to answer this question s

Re: pointers in objective-c?

2008-08-01 Thread Glenn English
Arthur Coleman wrote: No, it won't compile: Like I said: my understanding. Now updated :-) I knew that somebody whined at me when I forgot the '*', but I remembered it as a warning... Thanks for the cluebat. -- Glenn English [EMAIL PROTECTED] _

Re: pointers in objective-c?

2008-08-01 Thread Clark S. Cox III
The NS prefix is used for just about every external symbol in the frameworks (classes, structs, enums, typedefs, etc.). NS just tells you where the symbol came from, not whether or not the symbol is a classname. Sent from my iPhone On Aug 1, 2008, at 13:07, "Giulio Cesare Solaroli" <[EMAIL

Re: pointers in objective-c?

2008-08-01 Thread Giulio Cesare Solaroli
On Fri, Aug 1, 2008 at 10:01 PM, Clark Cox <[EMAIL PROTECTED]> wrote: > On Fri, Aug 1, 2008 at 12:38 PM, Arthur Coleman <[EMAIL PROTECTED]> wrote: >> I hate to be dense, but what about C structs like NSRect? There are >> initialized on the stack aren't they? > > They're C structs, they aren't Obje

Re: pointers in objective-c?

2008-08-01 Thread Clark Cox
On Fri, Aug 1, 2008 at 12:38 PM, Arthur Coleman <[EMAIL PROTECTED]> wrote: > I hate to be dense, but what about C structs like NSRect? There are > initialized on the stack aren't they? They're C structs, they aren't Objective-C objects. -- Clark S. Cox III [EMAIL PROTECTED]

Re: Cocoa daemon

2008-08-01 Thread Charles Srstka
On Aug 1, 2008, at 2:28 PM, Jens Alfke wrote: That class is in the AppKit framework. Daemons must not link against AppKit, or any other framework, like HLTB, that would connect to the window server. (I believe the big Daemons-and-Agents technote has a list of what frameworks are OK.) The

Re: pointers in objective-c?

2008-08-01 Thread Arthur Coleman
I hate to be dense, but what about C structs like NSRect? There are initialized on the stack aren't they? Arthur On Aug 1, 2008, at 12:24 PM, Clark S. Cox III wrote: On Aug 1, 2008, at 12:10 PM, Glenn English wrote: Wayne Shao wrote: It seems that every object is a pointer in the sample

Re: Cocoa daemon

2008-08-01 Thread Jens Alfke
On 1 Aug '08, at 5:17 AM, Ivan C Myrvold wrote: I try to implement the menu in the NSStatusBar systemStatusBar. That class is in the AppKit framework. Daemons must not link against AppKit, or any other framework, like HLTB, that would connect to the window server. (I believe the big Daemo

Re: pointers in objective-c?

2008-08-01 Thread Clark S. Cox III
On Aug 1, 2008, at 12:10 PM, Glenn English wrote: Wayne Shao wrote: It seems that every object is a pointer in the sample code I have seen. Is there any distinction between an object and its pointer? In C++, C* c; would be an uninitialized pointer. But the following line will creates an obje

Re: pointers in objective-c?

2008-08-01 Thread Jens Alfke
On 1 Aug '08, at 11:54 AM, Clark S. Cox III wrote: There are ways to trick the runtime into treating an area of the stack as of it were an object, but the caviats are a list as long as my arm--it's just not worth it. Yup. The main problem is refcounting — if there were still references t

Re: pointers in objective-c?

2008-08-01 Thread Glenn English
Wayne Shao wrote: It seems that every object is a pointer in the sample code I have seen. Is there any distinction between an object and its pointer? In C++, C* c; would be an uninitialized pointer. But the following line will creates an object with the constructor C(). C c; It seems that th

Re: pointers in objective-c?

2008-08-01 Thread Clark S. Cox III
Correct, all objective-C objects are allocated on the heap (like using new in C++). The compiler will not allow you to allocate objects on the stack. There are ways to trick the runtime into treating an area of the stack as of it were an object, but the caviats are a list as long as my arm-

Re: pointers in objective-c?

2008-08-01 Thread Ken Thomases
On Aug 1, 2008, at 1:43 PM, Wayne Shao wrote: It seems that every object is a pointer in the sample code I have seen. Is there any distinction between an object and its pointer? In C++, C* c; would be an uninitialized pointer. But the following line will creates an object with the constructor

pointers in objective-c?

2008-08-01 Thread Wayne Shao
It seems that every object is a pointer in the sample code I have seen. Is there any distinction between an object and its pointer? In C++, C* c; would be an uninitialized pointer. But the following line will creates an object with the constructor C(). C c; It seems that there is no such equiv

Searchkit: adding metadata

2008-08-01 Thread chaitanya pandit
Hi, In my application i have to add number of images to the search index using searchKit, but i want to add other information (metadata) about the images in the search index, like suppose a name which will be different that the image's file name in it's file path. I tried using SKIndexSetDoc

Re: Cocoa daemon

2008-08-01 Thread Daniel Richman
Correct. You need to make an agent, not a daemon. Daniel Geoff Beier wrote: On Fri, Aug 1, 2008 at 6:11 AM, Ivan C Myrvold <[EMAIL PROTECTED]> wrote: I have developed a daemon which is launched by launchd. It have no user interface, other than putting up a status menu with an icon at the s

Re: compiler warning for not fully implementing protocol

2008-08-01 Thread Adam R. Maxwell
On Aug 1, 2008, at 3:53 AM, Mark Sanvitale wrote: I copied your code from Mail and pasted it into a text file. [ip193:~/Desktop] mas% cc test.m -framework Foundation -o test test.m:33: warning: incomplete implementation of class 'PortalActionView' test.m:33: warning: method definition for '

Re: interrupting a thread/run loop

2008-08-01 Thread Jean-Daniel Dupas
Le 1 août 08 à 14:52, Ken Thomases a écrit : On Aug 1, 2008, at 6:43 AM, Chris Idou wrote: I have a Cocoa thread waiting on events in a run loop. But I want to be able to give the waiting thread a "kick" to make it wake up and re-load its context. I realise I could write my own custom ru

Re: interrupting a thread/run loop

2008-08-01 Thread Ken Thomases
On Aug 1, 2008, at 6:43 AM, Chris Idou wrote: I have a Cocoa thread waiting on events in a run loop. But I want to be able to give the waiting thread a "kick" to make it wake up and re-load its context. I realise I could write my own custom run loop input source, but it seems like overkil

Re: Cocoa daemon

2008-08-01 Thread Geoff Beier
On Fri, Aug 1, 2008 at 6:11 AM, Ivan C Myrvold <[EMAIL PROTECTED]> wrote: > I have developed a daemon which is launched by launchd. It have no user > interface, other than putting up a status menu with an icon at the status > bar. That counts as user interface. You can't do that from a daemon. Dis

Re: Cocoa daemon

2008-08-01 Thread Ivan C Myrvold
I try to implement the menu in the NSStatusBar systemStatusBar. I would appreciate if anyone have any hint as to why the menu will not drop down, and show the menu items. Must be something I am missing here. Ivan Den 1. aug.. 2008 kl. 12:32 skrev Negm-Awad Amin: Hi, I do not think, that a

interrupting a thread/run loop

2008-08-01 Thread Chris Idou
In the Java thread API (which I am most familiar with) you put the thread in a wait() and then another thread can send the thread an interrupt() which makes it wake up and do stuff. I have a Cocoa thread waiting on events in a run loop. But I want to be able to give the waiting thread a "kick"

Re: compiler warning for not fully implementing protocol

2008-08-01 Thread Mark Sanvitale
I copied your code from Mail and pasted it into a text file. [ip193:~/Desktop] mas% cc test.m -framework Foundation -o test test.m:33: warning: incomplete implementation of class 'PortalActionView' test.m:33: warning: method definition for '-displayCapture' not found test.m:33: warning: class

Re: Cocoa daemon

2008-08-01 Thread Negm-Awad Amin
Hi, I do not think, that a daemon is the right place to implement a UI. It is the definition of an deamon, that it has no UI. http://en.wikipedia.org/wiki/Daemon_%28computer_software%29 Build a front-end is the better design. Cheers Am Fr,01.08.2008 um 12:11 schrieb Ivan C Myrvold: I have

Cocoa daemon

2008-08-01 Thread Ivan C Myrvold
I have developed a daemon which is launched by launchd. It have no user interface, other than putting up a status menu with an icon at the status bar. The menu icon is showing up, but nothing happens when I click it. NSLog shows that the menu exists, and have items in it. I have the same co