Re: Cleanup inside a failed init method

2008-12-07 Thread Jens Bauer
Hi Chuck, On Dec 7, 2008, at 03:00, Charles Steinman wrote: I'm sorry, I think I misunderstood the following line (due to the way we say things in Danish): Happily, the object should be released anyway if you plan to return nil since otherwise you'll leak a half-initialized object every ti

core data + undo + to-many relationship

2008-12-07 Thread John Clayton
Hi everyone In a core-data model I have a 'layer' which contains a to-many relationship to a set of 'effects'. When I add an effect, everything is working well. When I use Ctrl-Z to have the undo manager undo the addition of the effect, then none of my custom accessors are fired (so my G

Re: core data + undo + to-many relationship

2008-12-07 Thread John Clayton
OK, I can understand that its more efficient - and have now seen my error (I think). The listener to the remove event is getting fired (via KVO), but all of the data on the core-data Effect instances is nil, so my code discards the event. I've got my own uniqueID value set up on the Effe

Re: core data + undo + to-many relationship

2008-12-07 Thread John Clayton
Actually, extra note here... Things would probably work OK in my code if the object's values hadn't been set to nil by the time I get a willTurnIntoFault message. Is there a way to be notified prior to the event taking place? Thanks -- John Clayton Skype: johncclayton On 7/12/2008, at

core data + undo + accessors

2008-12-07 Thread John Clayton
Hi all, Tell me if I'm missing the point please. With core data and undo, apparently the undo system + core data (not sure if its a combination of them both), do NOT fire accessor methods on core-data objects when the undo manager changes the state of the object model. For example (outli

Re: core data + undo + to-many relationship

2008-12-07 Thread Mike Abdullah
Core Data is specifically designed not to invoke accessor methods when undoing or redoing changes. For efficiency, it just rolls back the state of the objects. It does NOT perform the reverse of your original actions. Of course, during an undo/redo, KVO notifications are fired, so your UI s

Re: Fix Populated NSMenu Of Files, Folders And Their Respected Images

2008-12-07 Thread Chunk 1978
nevermind, i managed to get it right... not sure how efficient this code is, but at least it works :) -=-=-=-=- @interface AppController : NSObject { IBOutlet NSMenu *theMenu; } - (void)launchFileOrFolder:(id)sender; @end -=-=-=-=-=- #import "AppController.h" @implem

Re: core data, refreshObject, multiple threads

2008-12-07 Thread Chris Idou
I've got fairly modest requirements, in so far as I'm using the XML store, and I'm happy to refresh the entire object graph of my worker thread when there is a change. So I've even tried [managedObjectContext reset] and querying from the beginning, but that doesn't seem to work either. I'm star

Re: core data, refreshObject, multiple threads

2008-12-07 Thread John Clayton
Chris, Can you make use of the - (void)refreshObject:(NSManagedObject *)object mergeChanges:(BOOL)flag method on NSManagedObjectContext? Thanks -- John Clayton Skype: johncclayton On 7/12/2008, at 12:22 PM, Chris Idou wrote: I've got fairly modest requirements, in so far as I'm using the

Debugger launched after closing the app window.

2008-12-07 Thread Gustavo Pizano
Hello Everybody. I dunno why, but I have been looking into the the list for the answer and hadn't been able to find the solution. Sometimes when I close the main window of the app, the debugger its loaded, I have been checking my code looking for unreleased objects thinking this might be t

Access to this item is restricted?

2008-12-07 Thread Robert Nicholson
So, in KeyChain Access if you press "Deny" it permanently marks the keychain such that any access to items in it are restricted? Last night I was helping my wife setup keychains and it seems there was a time when the Deny button was hit. Either when trying to access a single item or the actual pass

Re: Debugger launched after closing the app window.

2008-12-07 Thread Gustavo Pizano
Hi Tim. the overview, I have the main window which has 3 Custom views, 2 of them are subclasses of a NSView. What Im doing, after reading the memory management rules, is that for all the instances variables which are pointers and which Im allocating memory for them in some part of the code,

Re: Debugger launched after closing the app window.

2008-12-07 Thread Gustavo Pizano
Hi again me, I forgot to tell you that in my "business" controller, the one in charge of handling the operations between the 2 views I implemented a singleton pattern, but dunno if I should release the static variable I use to create the singleton. The app is a Naval Battle gameboard. so th

How to disable the transparency in dropdown sheets?

2008-12-07 Thread Arun
Hi I am displaying a window using [NSApp beginsheet] to display data to users in My App. By default the drop down sheet is transparent. How to disable transparency in the sheet? Thanks Arun KA ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Ple

NSArrayController setSelectedObjects: not working with newly created objects

2008-12-07 Thread Matteo Manferdini
Hi everyone, I stumbled into another weird behaviour of Cocoa. If I try to set as selected newly created objects into an NSArrayController, the method does not work and the controller loses its selection. The array controller is bound to a core data managed object context. Here there is the code:

Re: NSArrayController setSelectedObjects: not working with newly created objects

2008-12-07 Thread mmalcolm crawford
On Dec 7, 2008, at 8:29 AM, Matteo Manferdini wrote: NSManagedObject *newObject = [arrayController newObject]; [arrayController setSelectedObjects:[NSArray arrayWithObject:newObject]]; If I call [arrayController selectedObject] just before these two lines, the array returned contains the ac

Re: How to disable the transparency in dropdown sheets?

2008-12-07 Thread Mike Abdullah
Why do you want to do this? Why do you want your app to be different to all others on the system? That said, NSWindow does have a - setAlphaValue: method, does setting that before or after starting the sheet achieve anything? Mike. On 7 Dec 2008, at 15:41, Arun wrote: Hi I am displaying

Re: How to disable the transparency in dropdown sheets?

2008-12-07 Thread Chunk 1978
it's also possible to simply fill your window (that is your sheet) with a colored view with alpha:1.0... On Sun, Dec 7, 2008 at 12:21 PM, Mike Abdullah <[EMAIL PROTECTED]> wrote: > Why do you want to do this? Why do you want your app to be different to all > others on the system? That said, NSWind

CALayer Mask

2008-12-07 Thread Gordon Apple
Either the mask setting of CALayer is the most ill-behaved item in Cocoa or I totally don't understand it. I suspect the latter. Although I have successfully used a mask layer in a CALayer (mainly QTMovieLayer and QTCapture Layer) when first creating the CALayer, changing the transform (rotat

3-float struct?

2008-12-07 Thread Dave DeLong
Hi everyone, I was asked yesterday if there's a struct in Cocoa that has 3 float members. The person asking me was looking for a struct that could contain a 3 dimensional point (so like a CG- or NSPoint, but with a z member). My quick searches didn't reveal anything, but I was wondering

Re: Window moving during drag and drop operation, (newbiew question)

2008-12-07 Thread Jesper Storm Bache
Are you using a "metal" style window (NSTexturedBackgroundWindowMask). If so, then you will want to look into how [NSView mouseDownCanMoveWindow] works (try overriding it and return NO) Jesper Storm Bache On Dec 6, 2008, at 6:39 AM, Gustavo Pizano wrote: On 6.12.2008, at 12:20, Gustavo Pi

Re: Window moving during drag and drop operation, (newbiew question)

2008-12-07 Thread Gustavo Pizano
In fact yes I was using that NSWindow interesting.. thanks for the help, I was looking for something like that, but I wouldn't imagine it was such a method. thanks a lot Gus On 7.12.2008, at 19:48, Jesper Storm Bache wrote: Are you using a "metal" style window (NSTexturedBackgroundW

Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-12-07 Thread Michael A. Crawford
Well, I don't know if you guys are still listening on this thread but, for the record, I did put Graham's suggestion into practice, immediately. It was fast, easy, and simple to modify when I wanted to tweak the behavior to use float values instead of integers. Thanks, Graham. After g

NSPredicateEditor and date comparisons

2008-12-07 Thread Josh Abernathy
Hi all, In my application, users have the option of comparing to a date in an NSPredicateEditor. For the NSDates it is comparing against, only the date is important; time doesn't matter. The interesting thing I found about NSPredicateEditor is the NSTimeInterval it compares my NSDates to

Re: 3-float struct?

2008-12-07 Thread Benjamin Dobson
On 7 Dec 2008, at 18:46:18, Dave DeLong wrote: Hi everyone, I was asked yesterday if there's a struct in Cocoa that has 3 float members. The person asking me was looking for a struct that could contain a 3 dimensional point (so like a CG- or NSPoint, but with a z member). My quick sear

Re: 3-float struct?

2008-12-07 Thread Dave DeLong
Of course you could. But it's not uncommon to need a 3 dimensional coordinate, so we were just wondering if there's one built in. Obviously 2 dimensional coordinates are everywhere, and as such the appropriate struct is included in the frameworks. We were thinking that with 3 dimensional

Re: Debugger launched after closing the app window.

2008-12-07 Thread Michael Ash
On Sun, Dec 7, 2008 at 8:47 AM, Gustavo Pizano <[EMAIL PROTECTED]> wrote: > Hello Everybody. > > I dunno why, but I have been looking into the the list for the answer and > hadn't been able to find the solution. Sometimes when I close the main > window of the app, the debugger its loaded, I have b

NSTreeController, NSOutlineView, and a leak?

2008-12-07 Thread [EMAIL PROTECTED]
i've got an outline bound via a tree controller to a mutable set of my own proxy objects. when i create a new "real" object, i create a new proxy object and add it to the mutable set via the kvo compliant add<>Object: and all works well, and then i proceed to select the new object (line in the

Re: 3-float struct?

2008-12-07 Thread Mike Abdullah
The closest you'll find I think is the CIVector class. Mike. On 7 Dec 2008, at 20:19, Dave DeLong wrote: Of course you could. But it's not uncommon to need a 3 dimensional coordinate, so we were just wondering if there's one built in. Obviously 2 dimensional coordinates are everywhere, an

Re: 3-float struct?

2008-12-07 Thread Michael Ash
On Sun, Dec 7, 2008 at 1:46 PM, Dave DeLong <[EMAIL PROTECTED]> wrote: > Hi everyone, > > I was asked yesterday if there's a struct in Cocoa that has 3 float members. > The person asking me was looking for a struct that could contain a 3 > dimensional point (so like a CG- or NSPoint, but with a z

Unit Testing Frameworks

2008-12-07 Thread Thaddeus Cooper
Hello all. I am having a problem with setting up unit testing for frameworks. I've read the documentation that is provided in the Apple doc set and found Chris Hanson's updates to that documentati

Fwd: Unit Testing Frameworks

2008-12-07 Thread Thaddeus Cooper
Woops -- the highlighting didn't come through. Here is the line from below: 2008-12-07 14:15:35.042 otest[42098:80f] The executable for the test bundle at /Users/cooper/src/Sections/build/Debug/Tests.octest could not be found. Thaddeus O. Cooper ([EMAIL PROTECTED]) Begin forwarded mess

Re: core data, refreshObject, multiple threads

2008-12-07 Thread Chris Idou
--- On Sun, 7/12/08, John Clayton <[EMAIL PROTECTED]> wrote: > From: John Clayton <[EMAIL PROTECTED]> > Subject: Re: core data, refreshObject, multiple threads > To: [EMAIL PROTECTED] > Cc: cocoa-dev@lists.apple.com, "Steve Steinitz" <[EMAIL PROTECTED]> > Received: Sunday, 7 December, 2008, 5:45 A

Re: 3-float struct?

2008-12-07 Thread glenn andreas
On Dec 7, 2008, at 3:35 PM, Michael Ash wrote: On Sun, Dec 7, 2008 at 1:46 PM, Dave DeLong <[EMAIL PROTECTED]> wrote: Hi everyone, I was asked yesterday if there's a struct in Cocoa that has 3 float members. The person asking me was looking for a struct that could contain a 3 dimensional p

Re: NSPredicateEditor and date comparisons

2008-12-07 Thread Chris Idou
I'm a bit confused by your post. NSPredicateEditor doesn't compare any dates, it just creates NSPredicates. Maybe you're saying that if you have a NSDatePicker in your NSPredicateEditor, that it creates a predicate with a date set to 13:41:40. If that's the case, then it probably has more to do

Re: core data, refreshObject, multiple threads

2008-12-07 Thread Steve Steinitz
Hi Chris, On 7/12/08, Chris Idou wrote: I've even tried [managedObjectContext reset] and querying from the beginning, but that doesn't seem to work either. My experience has been that that works (at least in 10.5 with GC activated). I'm no Cocaa memory management expert but I suppose there

How to use NSWorkspace?

2008-12-07 Thread John Velman
I'm missing something obvious, but I don't know what. I want to use NSWorkspace to open an application from a command line Foundation Tool. When I try to build the simplest thing, I get -- Undefined symbols: ".objc_class_name_NSWorkspace", referenced from: [EMAIL PROTECTED]@[

Re: How to use NSWorkspace?

2008-12-07 Thread Mike Abdullah
NSWorkspace is part of AppKit, so you need to link against that, not just Foundation. Alternatively, you could drop down directly to the Launch Services functions. On 8 Dec 2008, at 00:07, John Velman wrote: I'm missing something obvious, but I don't know what. I want to use NSWorkspace t

Re: How to use NSWorkspace?

2008-12-07 Thread Rob Keniger
On 08/12/2008, at 10:07 AM, John Velman wrote: I want to use NSWorkspace to open an application from a command line Foundation Tool. You probably don't want to use NSWorkspace to do this. You should use NSTask to run command line tools. -- Rob Keniger _

Re: Unit Testing Frameworks

2008-12-07 Thread Rob Keniger
On 08/12/2008, at 8:25 AM, Thaddeus Cooper wrote: The framework builds correctly -- no warnings or errors, but the test cases do not get built automatically. I then switch my active target to my test bundle (creatively named Tests), and do a build and get the following error dump (note I've

Re: NSPredicateEditor and date comparisons

2008-12-07 Thread Josh Abernathy
Ah, yes, that would be the more accurate way to explain it. I have an NSDatePicker in my NSPredicateEditor and no funny business is going on with conversions. It's just the simple default, setup-in-IB usage. So I guess the question is better put: is there any guarantee about the time of an

Device type list for scanners/cameras, etc...

2008-12-07 Thread jmunson
Namaste! I'm working with ICA. Does anyone know any of the following: 1. What the list of device types are for connected devices? 2. Where I might find that list (in case you don't want to disclose it)? 3. Or, just the keywords for a scanner (I assume "scanner" but want to be sure) and a m

Re: NSPredicateEditor and date comparisons

2008-12-07 Thread Chris Idou
Would your time zone happen to somehow correspond to 8:00 ? Try doing a setDateValue on the gui component before you start, with a particular time. I've got a suspicion that it will then leave the time component alone. When you got a result of 13:41:40, might that have been the time you ran th

Re: NSPredicateEditor and date comparisons

2008-12-07 Thread jmunson
I remember, way long ago in the past, having to supply a time component to go with a date component - otherwise some seemingly "random" time was inserted which then threw off anything else I did. If I only needed a date (from a datetime field), I had to format it that way (as only a date,

Re: NSPredicateEditor and date comparisons

2008-12-07 Thread Chris Idou
I think you're better off writing a custom Date compare function, and customising the NSPredicateEditor to return a predicate using the function, so that you can guarantee that date comparison happens the way you want. I guess you *could* control the date passed into the predicate to normalise

Re: 3-float struct?

2008-12-07 Thread Gregory Weston
Dave DeLong wrote: Of course you could. But it's not uncommon to need a 3 dimensional coordinate, so we were just wondering if there's one built in. Obviously 2 dimensional coordinates are everywhere, and as such the appropriate struct is included in the frameworks. We were thinking that with

how to manage two nib files

2008-12-07 Thread XiaoGang Li
Hi, List, I have a question about how to design my applicaiton in Cocoa. My applicaiton is not a normal application. it is a utility for my printer device. when user double-click the application icon, the application first register an apple event before any UI being shown, he applica

One-way communication from NSPanel in MainMenu.xib to Custom View

2008-12-07 Thread Gordon Hughes
I've been pulling my hair out over this for a few days now. I know I'm not understanding something quite elementary, so I'd greatly appreciate any insights offered. I'm attempting to write a "game show"-like application. My laptop would display a window (the NSPanel) which controls what's going o

Re: how to manage two nib files

2008-12-07 Thread Kiel Gillard

Encrypted web services connections and pk12 certificates

2008-12-07 Thread Daniel Parnell
Hi All, I need to make some code to talk to a SOAP web service. Unfortunately I'm unable to get a connection to the service as it requires a SSL connection encrypted with a special certificate. I've been given a pk12 certificate which when installed into my keychain allows me to access

Re: Unit Testing Frameworks

2008-12-07 Thread Thaddeus Cooper
Thanks. I finally got over the hump -- it turned out to be that the test cases were not in the right target. Now that that's fixed I'm trying to get debugging of the framework working and I keep getting a launch path not accessible error. I added the executable target and set the arguments

Re: Child Window issues

2008-12-07 Thread Damien Cooke
Hi All I resolved this by using: [window setLevel: NSWindowLevel]; I hope this helps someone else out there. Damien On 06/12/2008, at 9:05 AM, Damien Cooke wrote: Hi all, In my application I have a main window with a few controls and 4 child windows each contain an image. When I maximise

PackageMaker installing into /Applications or ~/Applications depending on admin or not?

2008-12-07 Thread Chris Markle
We have an installer for our current app that use Vise. We'd like to switch maybe to PackageMaker and its artifacts. One thing that the Vise-created install does is get installed to /Applications if you're and admin and to ~/Applications if you're a standard user. Does anyone know if PackageMaker d

interact with users in a background app

2008-12-07 Thread BirdSong
Hi all,I want to add a window to a background application in order to interact with users sometimes. However, I found the window I added is not a keywindow or so because I can not type in the textField which located in the window... Does any one know how to solve this problem, I mean edit in th

Re: interact with users in a background app

2008-12-07 Thread Chunk 1978
[NSApp activateIgnoringOtherApps:YES]; On Mon, Dec 8, 2008 at 2:14 AM, BirdSong <[EMAIL PROTECTED]> wrote: > > Hi all,I want to add a window to a background application in order to > interact with users sometimes. However, I found the window I added is not a > keywindow or so because I can not t

RE: interact with users in a background app

2008-12-07 Thread BirdSong
Thank you for your answer... But seems it doesn't work, the window still can not accept the key events...> Date: Mon, 8 Dec 2008 02:21:25 -0500> From: [EMAIL PROTECTED]> To: [EMAIL PROTECTED]> Subject: Re: interact with users in a background app> CC: cocoa-dev@lists.apple.com> > [NSApp activat

Re: interact with users in a background app

2008-12-07 Thread Benjamin Dobson
On 8 Dec 2008, at 07:28:29, BirdSong wrote: Thank you for your answer... But seems it doesn't work, the window still can not accept the key events... Have you told it to makeKeyAndOrderFront:? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: interact with users in a background app

2008-12-07 Thread Kyle Sluder
On Mon, Dec 8, 2008 at 2:14 AM, BirdSong <[EMAIL PROTECTED]> wrote: > Hi all,I want to add a window to a background application in order to > interact with users sometimes. However, I found the window I added is not a > keywindow or so because I can not type in the textField which located in the