Re: Problems with Launchd Daemon

2008-04-29 Thread Kyle Sluder
On Tue, Apr 29, 2008 at 2:20 AM, JanakiRam <[EMAIL PROTECTED]> wrote: > Will this work on 10.4 as well as 10.5 ? Yes, as long as you use a login item for the agent. Per-user launchd agents are broken on 10.4. Login items work just fine. IIRC, to create a login item you send an Apple Event to th

Re: Problems with Launchd Daemon

2008-04-29 Thread JanakiRam
Hi All, >From the error log , it looks like my app is not trusted , hence its unable to connect to Windows server before login. Is there any way i can my application trusted to make my daemon work ? *: 3891612: (CGSLookupServerRootPort) Untrusted apps are not allowed to connect to or launch Windo

Re: autosizing problem

2008-04-29 Thread Yann Disser
Giving a minimum size to my drawer worked. However I think this absolutely is a bug. I would expect my views to vanish if the window is made too small and to reappear normally once the window is again large enough. I also find it stange, that I can specify a drawing order in IB if overlap

Re: autosizing problem

2008-04-29 Thread Kyle Sluder
On Tue, Apr 29, 2008 at 3:59 AM, Yann Disser <[EMAIL PROTECTED]> wrote: > Giving a minimum size to my drawer worked. > > However I think this absolutely is a bug. I would expect my views to vanish > if the window is made too small and to reappear normally once the window is > again large enough.

Re: Problems with Launchd Daemon

2008-04-29 Thread Kyle Sluder
On Tue, Apr 29, 2008 at 3:37 AM, JanakiRam <[EMAIL PROTECTED]> wrote: > Is there any way i can my application trusted to make my daemon work ? Again, read the documentation. The message you are seeing is generated because you are acting in defiance of the rules for daemons on Mac OS X, which I an

Re: How to adopt a superclass's protocol?

2008-04-29 Thread Paul Sargent
On 29 Apr 2008, at 04:22, K. Darcy Otto wrote: First, I still get the warning that the superclass "may not respond" to the method (and to be sure, it is only implemented in the subclass, but the superclass calls it after a conformsToProtocol: check). Sounds like the way things a decompose

How can i connect to database?

2008-04-29 Thread vinitha
hi, I'm working in xcode3.0 in leopard machine in cocoa application and using objective c.How can i connect to database in my cocoa application?And how can i make final exe of my project? Thanks vinitha ___ Cocoa-dev mailing list (Cocoa-dev@lists.

Re: How can i connect to database?

2008-04-29 Thread parag vibhute
While asking queries, be specific. Which database do u want to connect? and what do you mean 'how to make final exe'? If you don't know about making application on Mac, please go through the beginner's doc. On Tue, Apr 29, 2008 at 2:54 PM, <[EMAIL PROTECTED]> wrote: > hi, > > I'm working in

How can i connect to database?

2008-04-29 Thread vinitha
hi, I'm working in xcode3.0 in leopard machine in cocoa application and using objective c.How can i connect to database in my cocoa application?And how can i make final exe of my project? Thanks vinitha ___ Cocoa-dev mailing list (Cocoa-dev@lists

NSTableView calls setPlaceHolderString: for image cell

2008-04-29 Thread Ferhat Ayaz
Hi, I wrote a custom cell (subclass of NSActionCell) and called [super initWithImage: nil] in my initialization method. I have set my custom cell to use with a NSTableView. However, in random cases I get this error message *** -[MyBlockCell setPlaceholderString:]: unrecognized selector se

Re: How can i connect to database?

2008-04-29 Thread I. Savant
I'm working in xcode3.0 in leopard machine in cocoa application and using objective c.How can i connect to database in my cocoa application?And how can i make final exe of my project? If you're at the stage where you're still learning how to create a final build of your application or com

Re: Calculating file size

2008-04-29 Thread ajb . lists
I dug up some code that might help. This uses a category to replace NSFileManager's fileAttributesAtPath: traverseLink and provides more attributes than the standard implementation. With this category method, you can continue to use the directory enumerator, so your calculation becomes:

Immediate memory release

2008-04-29 Thread Yannick De Koninck
Hi everybody, I am writing an application where, at some point in time, the user clicks a button and for a great amount of images the average pixel values are calculated and stored in an array. Basically this looks like this: -(IBAction)Generate:(id)sender { // some code for (i =

Re: Immediate memory release

2008-04-29 Thread Graham Cox
It sounds like something in "some code" is also retaining tempSource (probably autoreleasing it), so that the release at the end of the loop is not actually releasing, but the subsequent release of the autorelease pool at the end of the event is doing so. So without "some code" it's hard to

Re: Immediate memory release

2008-04-29 Thread João Pavão
Hi, Calling -[NSObject release] is almost never a guarantee that your object will be deallocated. By releasing tempSource in your code you're simply stating that you no longer need that object and that Cocoa can free up the memory taken by the object **when appropriate** (i.e., when nobod

Re: Immediate memory release

2008-04-29 Thread Paul Bailey
Of course, if that's the case, simply wrapping the whole section of code with its own autorelease pool will cause the memory to be released at the end of each iteration. Paul On Tue, Apr 29, 2008 at 12:37 PM, Graham Cox <[EMAIL PROTECTED]> wrote: > It sounds like something in "some code" is also

Re: Calculating file size

2008-04-29 Thread Jean-Daniel Dupas
Shouldn't be !isDirectory ? if (isDirectory) { FileInfo *fileInfo = (FileInfo *) &info.finderInfo; fileHFSType = [NSNumber numberWithUnsignedLong:fileInfo->fileType]; fileCreator = [NSNumber numberWithUnsignedLong:fileInfo->fileCreator];

Re: starting...

2008-04-29 Thread Vineet Bhatia
Cocoa® Programming for Mac® OS X, Third Edition by Aaron Hillegass is available on Oreilly's Safari Books online. http://safari.oreilly.com/9780321562739?tocview=true On Apr 25, 2008, at 9:43 PM, Brad Gibbs wrote: I also began learning Objective-C programming about a month ago, without any

NSTokenField

2008-04-29 Thread Ivan Blagdan
Greetings, I have some issues regarding the behavior of the NSTokenFiled i need to act on removal/addition of tokens(autocompleted reresentations of some objects) in the field. My setup is as follows: NSTokenField content is handled by a delegate that in turn, autocompletes, fills it

Re: Tiger bug on NSXMLParser?

2008-04-29 Thread Lorenzo Thurman
Have you tried loading the data first, and then parsing it? Does the data > > look reasonable, i.e. can you convert it to an NSString using the expected > > encoding? > > > I tried loading the XML into an NSString using initWithContentsOfURL:encoding:error using Latin1 encoding. Under Leopard, the

Re: Snazzy open-source slideshow controls

2008-04-29 Thread douglas a. welton
Ben, Have you taken a look at the IKSlideShow class in ImageKit? You can see it demonstrated in the IKSlideShowDemo sample code. regards, douglas On Apr 28, 2008, at 5:48 PM, Ben Kazez wrote: Hi everyone, An app I'm developing has a full-screen slideshow-like view that would benefit g

Webservices and Structure of SOAP Envelope

2008-04-29 Thread Krys Malak
Hi, i'm trying to access a webservice and retrieve data from it, but something goes wrong when i get the response from the server and i lose some of the data i actually need. Here's the setup: A webservice (written in java) running in a Glassfish Server on my Windows machine that has a method g

Core Animation Caching Resolution

2008-04-29 Thread Kai
Hi, I am having a CALayer with a scale-down transform and many sub layers. It seems to be the case that these sub layers cache their contents with 1 unit to 1 pixel, that is they ignore the (outer) transform until it comes to draw to the screen. Is there a suggested way to work around thi

Re: Immediate memory release

2008-04-29 Thread Joseph Kelly
You have no guarantee that a method like -initWithContentsOfFile: is not going to add many allocations to the autorelease pool (which probably exists at your top runloop). In my code, in places that sit in tight processing loops, I've had to create an autorelease pool at the top of the loop whic

Re: [SOLVED] vertically resize NSTextField frame

2008-04-29 Thread Rob Napier
Check the archives from a couple of weeks ago: http://www.cocoabuilder.com/archive/message/cocoa/2008/4/17/204483 -Rob -- Rob Napier -- Software and Security Consulting -- http://robnapier.net On Apr 22, 2008, at 1:19 AM, Stuart Malin wrote: After poking around some more, I came up with

Re: A cursor bug in DragItemAround example

2008-04-29 Thread an0
Thanks again. It seems tracking area is not suited for this application. And I revert to cursor rect finally. Wish a better tracking area from Apple. On Mon, Apr 28, 2008 at 1:30 AM, Quincey Morris <[EMAIL PROTECTED]> wrote: > I think the problem is that you are not properly handling *responsibil

Re: Failure on unarchiving a NSBezierPath

2008-04-29 Thread an0
On Tue, Apr 29, 2008 at 12:01 AM, Kyle Sluder <[EMAIL PROTECTED]> wrote: > You know what? I don't think you've ever said that you know that > view.drawing != nil. Check that. > > --Kyle Sluder > Oh, what a shame for me to overlook such a critical check! Thank you for helping me find this fooli

Counting instances in Core Data

2008-04-29 Thread Steve Cronin
Folks; I want to obtain a count of instances for a specific entity in stored in Core Data (SQLite) In the archive I find this: FROM : mmalcolm crawford DATE : Sun Apr 02 21:21:45 2006 On Apr 2, 2006, at 11:16 AM, Frederick C. Lee wrote: > How do you count (or determine empty

Re: NSTableView calls setPlaceHolderString: for image cell

2008-04-29 Thread Corbin Dunn
Hmm..NSTableView doesn't call that method. Chances are, something else is tickling it. We need more information to really help you out. Break on -setPlaceHolderString:, or something else lower level (like NSLog), get a backtrace (bt in gdb). Post that here. corbin On Apr 29, 2008, at 2:49

Re: Counting instances in Core Data

2008-04-29 Thread I. Savant
> Execute a fetch for the entity in which you're interested, and count the > returned array. > > > My question is: what is the most efficient fetch to pose given that every > fetch is IO. Yes. > A given entity might have a lot of records so an array COULD be an > unnecessar

Binding a popup button's selected index to a model integer

2008-04-29 Thread Johnny Lundy
Hello all, I would appreciate some guidance in getting a popup button to use its selectedIndex to set an integer in my model. I am having trouble understanding how to properly bind the selection of a popup to an integer in the model so that changes in the popup's selection changes the mod

Re: Binding a popup button's selected index to a model integer

2008-04-29 Thread I. Savant
> I would appreciate some guidance in getting a popup button to use its > selectedIndex to set an integer in my model. Am I correct in assuming you want your popup to represent the -gameType of the selected item in the array controller? If so, the best thing to do is to create an NSObjectCon

Re: Counting instances in Core Data

2008-04-29 Thread I. Savant
> > My question is: what is the most efficient fetch to pose given that every > > fetch is IO. > > Yes. Sorry, I thought this was "is this the most efficient" ... Meaning: mmalc's response of "Execute a fetch for the entity in which you're interested, and count the returned array." is the m

Re: autosizing problem

2008-04-29 Thread John Stiles
Kyle Sluder wrote: On Tue, Apr 29, 2008 at 3:59 AM, Yann Disser <[EMAIL PROTECTED]> wrote: Giving a minimum size to my drawer worked. However I think this absolutely is a bug. I would expect my views to vanish if the window is made too small and to reappear normally once the window is again

Any actor or coroutine implementations for Cocoa?

2008-04-29 Thread Jens Alfke
Anyone know if the "Actor" design pattern for concurrent programming has been implemented for Cocoa? In a nutshell, an Actor is an object that has its own [cooperative] thread and message queue. Actors interact by message-passing instead of shared state. The idea is to eliminate the need fo

How to programmatically create an NSObjectController in Entity mode?

2008-04-29 Thread Sean McBride
Hi all, How does one programmatically create an NSObjectController in Entity mode? I've tried all kinds of orderings of calls but can't get it do work. 1) the docs don't say what the designated initializer is. Is it initWithContent? What should be passed as 'content'? Is nil acceptable? 2) I

Re: How to programmatically create an NSObjectController in Entity mode?

2008-04-29 Thread I. Savant
> What is the correct way to programmatically creates these things? I believe you've gotten it all right, but the document says of the 'automatically prepares content' flag: "If flag is YES and a managed object context is set, the initial content is fetched from the managed object context usin

Re: How is "Apple + Ctrl + D" implemented?

2008-04-29 Thread John Stiles
Really? Does this actually work? I needed to find word boundaries to implement a Find panel which supports searching for "Whole Words" and I ended up using UCFindTextBreak based on advice from this list. It was a pain to implement (since it's not designed to mesh with Cocoa at all). Graham C

Re: Snazzy open-source slideshow controls

2008-04-29 Thread Ben Kazez
Thanks! It isn't actually customizable enough, but I just used the IK image resources to build what I needed. Ben On Apr 29, 2008, at 9:24 AM, "douglas a. welton" <[EMAIL PROTECTED] > wrote: Ben, Have you taken a look at the IKSlideShow class in ImageKit? You can see it demonstrated in

Re: Counting instances in Core Data

2008-04-29 Thread Adam Swift
On Apr 29, 2008, at 9:03 AM, Steve Cronin wrote: Folks; I want to obtain a count of instances for a specific entity in stored in Core Data (SQLite) In the archive I find this: FROM : mmalcolm crawford DATE : Sun Apr 02 21:21:45 2006 On Apr 2, 2006, at 11:16 AM, Frederick C

Re: Counting instances in Core Data

2008-04-29 Thread I. Savant
> In Tiger that was the best means available, but if you're targeting Leopard > there is a better option available: > > Create your fetch request to fetch all instances of a given entity and > execute the fetch with countForFetchRequest:error: which will simply return > the number of instances/ro

Re: Counting instances in Core Data

2008-04-29 Thread Adam Swift
On Apr 29, 2008, at 11:18 AM, Adam Swift wrote: On Apr 29, 2008, at 9:03 AM, Steve Cronin wrote: My question is: what is the most efficient fetch to pose given that every fetch is IO. A given entity might have a lot of records so an array COULD be an unnecessarily large transaction...

Re: How is "Apple + Ctrl + D" implemented?

2008-04-29 Thread Keith Blount
> Really? Does this actually work? > I needed to find word boundaries to implement a Find panel which > supports searching for "Whole Words" and I ended up using > UCFindTextBreak based on advice from this list. It was a pain to > implement (since it's not designed to mesh with Cocoa at all). Y

transient attributes of NSManagedObject reflected in isUpdated

2008-04-29 Thread Michael Link
I noticed that if you have a transient attribute in an NSManagedObject and update that attribute then isUpdated will return that the object has unsaved changes. I suppose this makes some sense if the attribute is actually defined in the entity. On the other hand if the managed object has a

Re: Immediate memory release

2008-04-29 Thread Bob Smith
Use a local autorelease pool, like this: - (IBAction)Generate:(id)sender { // some code for (i = 0; i < count; i++) { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; NSImage *tempSource = [NSImage imageWithContentsOfFile:sPath[i]]; // some code [pool release]

Re: How is "Apple + Ctrl + D" implemented?

2008-04-29 Thread John Stiles
Man, what a bummer. I wish you had been around when I asked the question before :) Keith Blount wrote: Really? Does this actually work? I needed to find word boundaries to implement a Find panel which supports searching for "Whole Words" and I ended up using UCFindTextBreak based on advice fr

Re: How to adopt a superclass's protocol?

2008-04-29 Thread K. Darcy Otto
The casting worked, and the protocol gets found; but I'm still getting a warning that the protocol is not found. Here's what I have: Superclass.h: @protocol Check; Superclass.m: @protocol Check @optional -(BOOL)optionalMethodToImplement; @end (I'm relegating the protocol to the .m file t

PerlObjCBridge and SFAuthorization

2008-04-29 Thread Cameron Smith
Maybe I'm missing something fundamental, but I can't get this to work. Based on what I've read, I should be able to use the PerlObjCBridge to access the Security.framework through the SFAuthorization class. According to "man PerlObjCBridge": "Using PerlObjCBridge, Perl programs can reference

Re: Counting instances in Core Data

2008-04-29 Thread Ben Trumbull
> In Tiger that was the best means available, but if you're targeting Leopard there is a better option available: Create your fetch request to fetch all instances of a given entity and execute the fetch with countForFetchRequest:error: which will simply return the number of instances/rows

Re: How to adopt a superclass's protocol?

2008-04-29 Thread Andy Lee
Sorry to answer a question with a question, but will this really do what you want? I see from the docs that the @optional keyword means the method is not required. Doesn't that mean you can conform to the Check protocol without implementing -optionalMethodToImplement, which would mean that

Modal window and 'hanging' menu

2008-04-29 Thread Manfred Schwind
I have a modal dialog window that "pops up" at some time. I am doing the modal session with [NSApp runModalForWindow:window]. If the user has clicked into the menu bar just before this modal window opens, the menu is hanging down and can not be closed before the modal window is closed. Is

Re: How to adopt a superclass's protocol?

2008-04-29 Thread Michael Vannorsdel
Sounds like you're getting into a mess of includes. I know you'd like to use a protocol but honestly the cleanest way to do this is not to use a protocol but implement the optional methods in the subclasses without listing them in the header. Then in the superclass method just check if it

Re: How to adopt a superclass's protocol?

2008-04-29 Thread Graham Cox
This is what I'd expect. A protocol isn't much different from a class; if you want to subclass a class, you need to import its header. Same here. The concept of a "private protocol" is a bit of a contradiction in terms - protocols exist to allow more than one class to comply with a common

Re: Any actor or coroutine implementations for Cocoa?

2008-04-29 Thread Jim Roepcke
Hi Jens, I've been researching the Actor model for the last couple of months. I too thought Erlang used Actors, because that's what everyone says, but after a lot of looking I cannot find a single reference where the creators of Erlang say it uses the Actor model! They do say it implements the Coo

Re: Modal window and 'hanging' menu

2008-04-29 Thread Graham Cox
From the docs for runModalForWindow: "Use this method in cases where you do not need to do any additional background processing while the modal loop runs. This method consumes only enough CPU time to process events and dispatch them to the action methods associated with the modal window. If

Re: Modal window and 'hanging' menu

2008-04-29 Thread John Stiles
You could probably use NSMenu's -cancelTracking to work around this. (I guess you could send it to every menu in the menubar, or see if just sending it to mainMenu is good enough.) Or, you can use -menuWillOpen: and -menuDidClose: to watch for when the user accesses the menus, and postpone you

Predicate to get objects in a NSDate interval

2008-04-29 Thread Dex Morgan
Hello Lists, Anyone know how to write a predicate that returns only elements with a NSDate property between a range interval? (ie. two weeks ago <-> today). Thanks a lot ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admi

Re: Observer CoreData Objects changes

2008-04-29 Thread Dex Morgan
Hello Ben, Thanks a lot for your help. I've used [self addObserver: forKeyPath: options: context: NULL]; inside awakeFromFetch/FromInsert of my observed class in order to get each notification. It works very well. Again thank you Il giorno 27/apr/08, alle ore 06:44, Ben Lachman ha scritto:

Re: Debugger at odds with reality? [SOLVED]

2008-04-29 Thread Jerry Krinock
On 2008 Apr, 28, at 21:34, Chris Hanson wrote: On Apr 27, 2008, at 1:43 PM, Jerry Krinock wrote: Graham, welcome to the apparently small club (about 3-4 oddballs) who care about what version and configuration of their private framework gets packaged or run. That group includes most every

Bug?:? CFPreferencesSynchronize() Remembers Value from Deleted File

2008-04-29 Thread Jerry Krinock
Is this a bug, or just me goofing things up again? SUMMARY I call CFPreferencesSynchronize() followed by CFPreferencesCopyValue() with the domain argument in both set to kCFPreferencesAnyUser. I expect that this should always give me the current value of the given key on the disk, in

Re: Any actor or coroutine implementations for Cocoa?

2008-04-29 Thread Jens Alfke
I completely derailed my regular project and just worked on coroutines all day. Here's what I've got so far. * libCoroutine does not build as-is on Mac OS X 10.5. (It's trying to implement its own ucontext API, which then has name collisions with the one that's already in the OS.) * I twe

Re: Modal window and 'hanging' menu

2008-04-29 Thread Jens Alfke
On 29 Apr '08, at 2:12 PM, Manfred Schwind wrote: I have a modal dialog window that "pops up" at some time. I am doing the modal session with [NSApp runModalForWindow:window]. If the user has clicked into the menu bar just before this modal window opens, the menu is hanging down and can not

Re: Tiger bug on NSXMLParser?

2008-04-29 Thread Jens Alfke
On 29 Apr '08, at 6:27 AM, Lorenzo Thurman wrote: I tried loading the XML into an NSString using initWithContentsOfURL:encoding:error using Latin1 encoding. Under Leopard, the XML is read in just fine. I can output the resulting string in the debugger and it looks good and is parsed just f

Re: How can i connect to database?

2008-04-29 Thread Jens Alfke
On 29 Apr '08, at 3:48 AM, I. Savant wrote: ... then, obeying the etiquette and guidelines therein, post specific, pointed questions about individual problems and we'll all be happy to help. Contrast this with "How do I build some general, unspecified database application?" and I'm sure y

Re: Bug?:? CFPreferencesSynchronize() Remembers Value from Deleted File

2008-04-29 Thread Chris Parker
Hi Jerry, On 29 Apr 2008, at 5:21 PM, Jerry Krinock wrote: Is this a bug, or just me goofing things up again? No, it's just a bug; you haven't goofed anything up. It's been addressed, but as usual I can't comment on when the fix will appear. .chris -- Chris Parker Cocoa Frameworks Ap

Re: View Getting MouseUp Without Corresponding MouseDown

2008-04-29 Thread Peter Zegelin
Thanks for that - makes sense I guess! Peter On 29/04/2008, at 2:26 PM, Rob Petrovec wrote: FYI, same thing happens in Carbon. Its technically a feature for Drag support. --Rob On Apr 28, 2008, at 8:51 PM, Peter Zegelin wrote: Hi Graham, I don't think so as they are my own rulers - I'm

beginSheetModalForWindow: and Distributed Objects

2008-04-29 Thread Andrew Kimpton
I'm displaying a modal sheet for a Window using beginSheetModalForWindow: but I'm seeing that whilst the sheet is displayed new messages sent to the application using a previously registered NSConnection are not being handled. I think this is because the run loops is not in NSDefaultRunLoop

Re: beginSheetModalForWindow: and Distributed Objects

2008-04-29 Thread Michael Vannorsdel
NSConnection has a addRequestMode: method you can add multiple modes it will work in. On Apr 29, 2008, at 7:05 PM, Andrew Kimpton wrote: I'm displaying a modal sheet for a Window using beginSheetModalForWindow: but I'm seeing that whilst the sheet is displayed new messages sent to the app

Re: Tiger bug on NSXMLParser?

2008-04-29 Thread Lorenzo Thurman
On Tue, Apr 29, 2008 at 7:36 PM, Jens Alfke <[EMAIL PROTECTED]> wrote: > > On 29 Apr '08, at 6:27 AM, Lorenzo Thurman wrote: > > I tried loading the XML into an NSString using > > initWithContentsOfURL:encoding:error using Latin1 encoding. Under Leopard, > > the XML is read in just fine. I can ou

Re: Any actor or coroutine implementations for Cocoa?

2008-04-29 Thread Michael Ash
On Tue, Apr 29, 2008 at 8:26 PM, Jens Alfke <[EMAIL PROTECTED]> wrote: > I completely derailed my regular project and just worked on coroutines all > day. Here's what I've got so far. > > * libCoroutine does not build as-is on Mac OS X 10.5. (It's trying to > implement its own ucontext API, which

Question about DRFrameworks

2008-04-29 Thread Development
I am using the DRFrameworks and trying to set the finder window view mode for the disc thats created. According to the documentation this is done by passing an NSNumber to the properties dictionary for the key DRMacWindowView The problem is that after a couple of hours on google and the dev