Re: CoreData: Fetching object with maximum of property

2008-10-08 Thread Negm-Awad Amin
Am Mi,08.10.2008 um 05:42 schrieb Bill Dudney: Hi Frank, Sorry for not getting back sooner; http://developer.apple.com/documentation/Cocoa/Conceptual/Predicates/Articles/pBNF.html#/ /apple_ref/doc/uid/TP40001796-217785 documents the BNF which is very cryptic but tells you everything that

Re: Next Key View doesn't "go to" pushbutton

2008-10-08 Thread Kyle Sluder
On Tue, Oct 7, 2008 at 4:17 PM, John Velman <[EMAIL PROTECTED]> wrote: > Blush. Fixing the Next key view sequence was simple. I'm not only new to > Cocoa, new to Mac as well. (And very happy with both, as well as the > helpful people on this list.) Yes, the fact that buttons etc. can't become

Re: Issue with modal window

2008-10-08 Thread Kyle Sluder
Are you sure that your final callback is indeed executing on the main thread? Is this even a good idea? Perhaps you should look into also using -performSelector:withObject:afterDelay from within a method that is called using -performSelectorOnMainThread:. --Kyle Sluder __

NSUndoManager [EMAIL PROTECTED] up Core Data database

2008-10-08 Thread Ruotger Skupin
Hi, I have a core data database with two contexts attached to it. One read- only for the main thread and bindings, one read/write for a background thread that takes data from the network and feeds it into the database. I know this is an effed-up design you shouldn't copy, but it won't chan

refreshObject doesn't seem to work

2008-10-08 Thread Steve Steinitz
Hello, We use Core Data for a multi-user, multi-machine point-of-sale system in a bicycle shop. When someone sells a bike on one machine the other machines don't immediately see it. I've tried everything I can think of, short of resetting the managedObjectContext to refresh the bike and its

NSPersistentDocument No Support "Save To" ("Save As"?)

2008-10-08 Thread Jerry Krinock
Documentation [1] states that "NSPersistentDocument does not support Save To operations". First of all, I presume that "Save To" means "Save As...", although I cannot this presumption. Could someone please confirm that "Save To" == "Save As..." ? If so, I'd like my app to have a "Save As

Re: cross development, missing methods

2008-10-08 Thread Ken Thomases
On Oct 7, 2008, at 11:19 AM, Robert Nikander wrote: I was hoping I could get the compiler to warn me about these things. Is there a compiler flag that helps? Or should I forget about the "Deployment Target" build setting and create multiple targets or projects that use different SDKs? C

Re: CoreData: Fetching object with maximum of property

2008-10-08 Thread Frank Illenberger
Hello Bill, unfortunately, this predicate does not work. The max() function returns the maximum of its comma-separated arguments. For example: max(2,1,5) --> 5 This does not help in the search for a cross-object maximum. Cheers Frank On Oct 8, 2008, at 5:42 AM, Bill Dudney wrote: Hi Fra

NSOpenGLView does not update view

2008-10-08 Thread Dirkjan Krijnders
Hi, I have a problem rendering a scene to a NSOpenGLView. Here is a outline of the setup: I have a carbon program (MATLAB) that allows for plugins called mexfiles, these are just .dylib's with a plain C-entry point. I setup a singleton controller object and feed the controller new data vi

Re: Trouble with NSSplitView

2008-10-08 Thread Dave Fernandes
Hi Jon, Given your explanation, I now don't understand why my split view works at all. I can resize my views to zero and back up again without having to jump to zero after reaching the minimum size. Another question: what does Mail do when it jumps to zero? Does it remove the subview from

Re: Conditional mouseDownCanMoveWindow for NSView?

2008-10-08 Thread Negm-Awad Amin
Am Do,02.10.2008 um 20:15 schrieb Daniel Weber: I have a single nsview that draws the main content area for my application and a bottom statusbar. This was done instead of using two different views so the user can move objects from the statusbar to the main content area, all with core anim

CALayer bounds with ResizeAspect mask?

2008-10-08 Thread Colin Doncaster
Hi there, I'm using a QTMovieLayer with [myMovieLayer setContentsGravity:kCAGravityResizeAspect]; specified. I have a second layer that I'd like to draw on that needs to match the resized movie that is now scaled to maintain the correct aspect ratio. Is there a way of retrieving the resiz

Re: CALayer bounds with ResizeAspect mask?

2008-10-08 Thread Matt Long
Colin, Not sure I completely understand that issue, but in a QTMovieLayer, the movie is tied to the layer dimensions. If you resize the layer, you resize the movie. The layer itself has a frame and a bounds property. All you should need to do is grab [myMovieLayer bounds] or [myMovieLayer

Re: NSPersistentDocument No Support "Save To" ("Save As"?)

2008-10-08 Thread glenn andreas
On Oct 8, 2008, at 7:20 AM, Jerry Krinock wrote: Documentation [1] states that "NSPersistentDocument does not support Save To operations". First of all, I presume that "Save To" means "Save As...", although I cannot this presumption. Could someone please confirm that "Save To" == "Save

Why does toolbar use validation and not enable/disable?

2008-10-08 Thread David
Why does toolbar use validation and not enable/disable like most every other Cocoa control does? It doesn't seem "consistent". When does the toolbar call validateToolbarItem? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admi

Re: Why does toolbar use validation and not enable/disable?

2008-10-08 Thread Nick Zitzmann
On Oct 8, 2008, at 8:42 AM, David wrote: Why does toolbar use validation and not enable/disable like most every other Cocoa control does? It doesn't seem "consistent". Really? Menu items also use validation. When does the toolbar call validateToolbarItem? When several toolbar-related eve

Optimized pixel manipulation

2008-10-08 Thread Christian Giordano
I'm modifying frequently the pixels of the images, the way I found is creating a copy of the data (CGDataProviderCopyData(CGImageGetDataProvider(image));) modify the pixels and then create a new one. I'm facing performance issues and I fear that all this allocating and deallocating is not helping.

Re: Optimized pixel manipulation

2008-10-08 Thread Jean-Daniel Dupas
CGImage does not provide an efficient way to update , but maybe CGImage is not what you want. Where your image come from, why do you need a CGImageRef and what are you trying to do with it ? Le 8 oct. 08 à 17:01, Christian Giordano a écrit : I'm modifying frequently the pixels of the image

Re: Getting pointer to NSWindowController

2008-10-08 Thread Nirias
That was it. Thanks. On Tue, Oct 7, 2008 at 11:41 PM, Graham Cox <[EMAIL PROTECTED]> wrote: > > On 8 Oct 2008, at 4:00 pm, Nirias wrote: > > It seems I must be doing something wrong since the NSWindow class have a >> property for NSWIndowController isnt documented to always return NULL. >> An

Re: Optimized pixel manipulation

2008-10-08 Thread Christian Giordano
I started questioning myself if maybe I need something else, but clearly I have no idea which other options I have. Maybe using OpenGL (ES)? The ultimate aim is of course to renderer the result of all the manipulation, at the moment this happens in a UIView.drawRect. Cheers, chr On Wed, Oct 8, 2

Re: Optimized pixel manipulation

2008-10-08 Thread Christian Giordano
At the moment I'm starting creating a context and drawing basic shapes, is there another way to draw basic shapes on a bitmap? Cheers, chr On Wed, Oct 8, 2008 at 4:32 PM, Christian Giordano <[EMAIL PROTECTED]> wrote: > I started questioning myself if maybe I need something else, but > clearly I

In dealloc(): ref @property, Can I use " = nil; " vs "[ release]; " ?

2008-10-08 Thread Lee, Frederick
Assuming the following: @property(retain) myVar; ... @synthesize myVar; ... -(void) dealloc { // Can I use: self.myVar = nil; // versus: [myVar release]; // ? } I've seen examples of using [myVar release]. But doesn't setting myVar = nil does the same thing?

corrupt coredata DB

2008-10-08 Thread Marc Monguio
I have a coredata application that uses sqlite3 for persistence. One of my users reported that his application was not responsive and showed the spinning beach ball of death. If I debug the application using his database it stops after executing this: // objectId is the object we want to de

Re: Optimized pixel manipulation

2008-10-08 Thread Jean-Daniel Dupas
I do not understand. If you just want to display some shapes and images, you don't need to draw into a bitmap, you just need to draw in your view. What do you mean by "creating a context". All views already have a context where you can draw whatever you want. Le 8 oct. 08 à 17:43, Christian

Re: In dealloc(): ref @property, Can I use " = nil; " vs "[ release]; " ?

2008-10-08 Thread Jim Puls
On Oct 8, 2008, at 8:49 AM, Lee, Frederick wrote: I've seen examples of using [myVar release]. But doesn't setting myVar = nil does the same thing? Which is the preferred way? This is a point of more contention than you may realize. The former is, of course, equivalent to [self set

Re: Optimized pixel manipulation

2008-10-08 Thread Christian Giordano
After drawing the shapes, I do pixel operations, of course. For this reason I create a bitmap context and after the drawing I get the CGImageRef generated, I copy the pixels, I modify the pixels and then I create a new image with those that will be drawn in the UIView context. Cheers, chr On We

Re: In dealloc(): ref @property, Can I use " = nil; " vs "[ release]; " ?

2008-10-08 Thread Ron Lue-Sang
On Oct 8, 2008, at 8:49 AM, Lee, Frederick wrote: Assuming the following: @property(retain) myVar; ... @synthesize myVar; ... -(void) dealloc { // Can I use: self.myVar = nil; // versus: [myVar release]; // ? } I've seen examples of using [myVar release]. But doesn'

Re: corrupt coredata DB

2008-10-08 Thread Devon Ferns
DELETE FROM zplayedtrack WHERE z_opt = null I don't know much about CoreData but maybe you can't bind null parameters in SQLite? Devon Marc Monguio wrote: I have a coredata application that uses sqlite3 for persistence. One of my users reported that his application was not responsive and sho

RE: In dealloc(): ref @property, Can I use " = nil; " vs "[ release]; " ?

2008-10-08 Thread Lee, Frederick
I've been setting my property thusly: @property (nonatomic, retain) myVar; ...what about: @property (nonatomic, copy) myVar; ? Ric. From: Ron Lue-Sang [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 08, 2008 11:06 AM To: Lee, Frederick Cc: cocoa-dev@lists.apple.com Subject:

Re: Optimized pixel manipulation

2008-10-08 Thread Ken Thomases
On Oct 8, 2008, at 11:02 AM, Christian Giordano wrote: After drawing the shapes, I do pixel operations, of course. Are these pixel operations not something which can be accomplished by changing the way you draw, for example using compositing modes? Alternatively, do you have access to Cor

Re: NSUndoManager [EMAIL PROTECTED] up Core Data database

2008-10-08 Thread Ron Lue-Sang
On Oct 8, 2008, at 4:17 AM, Ruotger Skupin wrote: Hi, I have a core data database with two contexts attached to it. One read-only for the main thread and bindings, one read/write for a background thread that takes data from the network and feeds it into the database. I know this is an ef

Re: In dealloc(): ref @property, Can I use " = nil; " vs "[ release]; " ?

2008-10-08 Thread Negm-Awad Amin
Am Mi,08.10.2008 um 17:49 schrieb Lee, Frederick: Assuming the following: @property(retain) myVar; ... @synthesize myVar; ... -(void) dealloc { // Can I use: self.myVar = nil; // versus: [myVar release]; // ? } I've seen examples of using [myVar release]. But doesn'

Where is close/cancel icon used in search field & Safari etc.

2008-10-08 Thread David
Hello, I'd like to have a button that looks like the close or cancel icon that is often present in Cocoa applications, but I can't find the icon. I'm surprised it doesn't show up as a choice in interface builder. Some places where this icon shows up includes: - When you have multiple tabs in Safar

Re: In dealloc(): ref @property, Can I use " = nil; " vs "[ release]; " ?

2008-10-08 Thread mmalc crawford
On Oct 8, 2008, at 8:49 AM, Lee, Frederick wrote: I've seen examples of using [myVar release]. But doesn't setting myVar = nil does the same thing? To be clear, I assume you mean self.myVar = nil. Neither, though "does the same thing". Which is the preferred way? Best practice is to u

Re: In dealloc(): ref @property, Can I use " = nil; " vs "[ release]; " ?

2008-10-08 Thread Negm-Awad Amin
Am Mi,08.10.2008 um 18:09 schrieb Lee, Frederick: I've been setting my property thusly: @property (nonatomic, retain) myVar; ...what about: @property (nonatomic, copy) myVar; ? In this case (deallocation) it doesn't matter, because you set nil. [nil copy] is nil. Cheers Ric.

Re: Optimized pixel manipulation

2008-10-08 Thread Christian Giordano
> If you've created a bitmap context, then you should already own the backing > bitmap data buffer. You can just manipulate it directly without making a > copy (via a CGImage). How could I access its buffer? Cheers, chr On Wed, Oct 8, 2008 at 5:21 PM, Ken Thomases <[EMAIL PROTECTED]> wrote: > O

Re: Why does toolbar use validation and not enable/disable?

2008-10-08 Thread j o a r
On Oct 8, 2008, at 7:56 AM, Nick Zitzmann wrote: Why does toolbar use validation and not enable/disable like most every other Cocoa control does? It doesn't seem "consistent". Really? Menu items also use validation. Indeed. Note that automatic validation can also be turned off, just li

RE: In dealloc(): ref @property, Can I use " = nil; " vs "[ release]; " ?

2008-10-08 Thread Lee, Frederick
My environment is certain '...apple-based mobile phone' that is nonatomic. So all my iVars are accessed via: @property(nonatomic, retain) iVar; // array, dictionary, etc. <-- collections & objects. Also, I'm not subclassing these properties. I've seen examples of releasing the iVars & setting th

NSIndexSet isEqual: sent to deallocated instance

2008-10-08 Thread Steve Cronin
Folks; I have two custom tableViews and two custom arrayControllers. The reasons for the custom objects are so the UI can respond to specific key events and for drag and drop support. Both tableView have their appropriate arrayControllers designated as delegates and datasources. The tableVie

Re: In dealloc(): ref @property, Can I use " = nil; " vs "[ release]; " ?

2008-10-08 Thread mmalc crawford
On Oct 8, 2008, at 9:41 AM, Lee, Frederick wrote: So all my iVars are accessed via: @property(nonatomic, retain) iVar; // array, dictionary, etc. <-- collections & objects. Also, I'm not subclassing these properties. I've seen examples of releasing the iVars & setting their pointers to nil. So

RE: In dealloc(): ref @property, Can I use " = nil; " vs "[ release]; " ?

2008-10-08 Thread Lee, Frederick
Thank you. I'm understand. Shall remedy. Ric. -Original Message- From: mmalc crawford [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 08, 2008 11:56 AM To: Lee, Frederick Cc: cocoa-dev@lists.apple.com Subject: Re: In dealloc(): ref @property, Can I use " = nil; " vs "[ release]; " ?

Re: Optimized pixel manipulation

2008-10-08 Thread Jean-Daniel Dupas
How do you create your bitmap context ? AFAK, to create a bitmap context, you should use CGBitmapContextCreate() that take as first argument the image backing store. So you already have it. The other way I know, is the create an NSBitmapImageRep, and then using it to create an NSGraphicsCon

Re: Where is close/cancel icon used in search field & Safari etc.

2008-10-08 Thread Randall Meadows
On Oct 8, 2008, at 10:24 AM, David wrote: Hello, I'd like to have a button that looks like the close or cancel icon that is often present in Cocoa applications, but I can't find the icon. I'm surprised it doesn't show up as a choice in interface builder. Some places where this icon shows up inc

Re: In dealloc(): ref @property, Can I use " = nil; " vs "[ release]; " ?

2008-10-08 Thread Sean McBride
On 10/8/08 9:55 AM, mmalc crawford said: >No, that is not Apple-sanctioned best-practice. mmalc, That was a nice summary, thanks. So does the same advice apply for init methods? That is: set ivars directly (unless there is no ivar, in which case you have no choice but to call the setter). Che

Re: In dealloc(): ref @property, Can I use " = nil; " vs "[ release]; " ?

2008-10-08 Thread mmalc crawford
On Oct 8, 2008, at 10:16 AM, Sean McBride wrote: That was a nice summary, thanks. Cheers. So does the same advice apply for init methods? That is: set ivars directly (unless there is no ivar, in which case you have no choice but to call the setter). Yes. mmalc __

Re: Where is close/cancel icon used in search field & Safari etc.

2008-10-08 Thread David
Thats exactly what I was looking for. Thanks! On Wed, Oct 8, 2008 at 1:12 PM, Randall Meadows <[EMAIL PROTECTED]> wrote: > On Oct 8, 2008, at 10:24 AM, David wrote: > >> Hello, >> I'd like to have a button that looks like the close or cancel icon >> that is often present in Cocoa applications, but

Re: Cocoa-dev Digest, Vol 5, Issue 1743

2008-10-08 Thread Gustavo Vera
I don´t know why the Z_OPT ended with a NULL value, but I think it shouldn't. I think that the Z_OPT field is something like a counter for changes on a record. Maybe you can try update the value to something different from the NULL value and try again the delete with coredata. On Wed, Oct 8, 2008

Re: CALayer bounds with ResizeAspect mask?

2008-10-08 Thread Colin Doncaster
Hey Matt, So - if you create an NSView with a resolution of 640x300 and then create a QTMovieLayer that fits that frame, is resizable and has [myMovieLayer setContentsGravity:kCAGravityResizeAspect] Core Animation resizes the movie to fit within the bounds of the layer while maintaining i

Synthesized versus Explicit *instance variables*.

2008-10-08 Thread Lee, Frederick
Your answer got me thinking about Synthesized versus Explicit Instance Variables. I've been using Synthesized-Explicit Instance Variables. That is, explicitly declaring iVars AND per ObjC_2, using @property/@synthesize directive to build the assessors. Is there any benefit of using non-explicit/S

Re: NSIndexSet isEqual: sent to deallocated instance

2008-10-08 Thread Ron Lue-Sang
On Oct 8, 2008, at 9:48 AM, Steve Cronin wrote: Folks; I have two custom tableViews and two custom arrayControllers. The reasons for the custom objects are so the UI can respond to specific key events and for drag and drop support. Both tableView have their appropriate arrayControllers desig

Re: Cocoa-dev Digest, Vol 5, Issue 1743

2008-10-08 Thread Marc Monguio
Thanks for the answers so far. If I update the values to anything other than NULL or 0 CoreData deletion does work, otherwise enters the endless loop. I can delete tracks through the sqlite client but this is not how it's supposed to be done since CoreData should have all the control with t

Re: Synthesized versus Explicit *instance variables*.

2008-10-08 Thread Charles Steinman
--- On Wed, 10/8/08, Lee, Frederick <[EMAIL PROTECTED]> wrote: > Your answer got me thinking about Synthesized versus > Explicit Instance > Variables. > > I've been using Synthesized-Explicit Instance > Variables. > That is, explicitly declaring iVars AND per ObjC_2, using > @property/@synthesize

Re: defaultCenter's addObserver

2008-10-08 Thread John Love
On Oct 7, 08, at 5:58 PM, j o a r wrote: On Oct 7, 2008, at 12:03 PM, John Love wrote: 2008-10-07 14:36:14.149 Calculate Medical[265:10b] *** -[NSCFSet calcStatusChanged:]: unrecognized selector sent to instance 0xe41f250 John, This type of error message indicates that your notification

Re: NSIndexSet isEqual: sent to deallocated instance

2008-10-08 Thread Gordon Apple
The question I would ask is if you are using a KVC compliant method when "Under some circumstances the the backing array is refreshed with new content". Otherwise, the changes might not be registered everywhere they need to be. NSIndexSet is a non-mutable object that gets replaced whenever you ch

Re: Trouble with NSSplitView

2008-10-08 Thread Jonathan Hess
On Oct 8, 2008, at 4:59 AM, Dave Fernandes wrote: Hi Jon, Given your explanation, I now don't understand why my split view works at all. I can resize my views to zero and back up again without having to jump to zero after reaching the minimum size. Another question: what does Mail do when

Help window and Modal Dialogs

2008-10-08 Thread Matthew Mashyna
I have an app that, at times, gets locked into a modal window. One of the windows, for instance, sets up a CD burn and we don't want them doing anything else in the app at the same time so we make the setup window modal. There are lots of options, though, and we want to offer help. When the

Re: CALayer bounds with ResizeAspect mask?

2008-10-08 Thread Matt Long
Colin, My assumptions were totally wrong. It seems that once you set it to maintain the aspect ratio with kCAGravityResizeAspect, it is simply updating the contents as you pointed out, and there doesn't appear to be any way to get the movie's display frame. Seems to me you will probably h

re: corrupt coredata DB

2008-10-08 Thread Ben Trumbull
Marc, Looks like it's trying to delete the object repeatedly in the database but it can't and then rolls back and tries again. By looking inside the sqlite database directly through sqlite3 tool I see that the tuple that coredata is trying to delete has Z_OPT equal to null: That looks bad, and

Re: NSPersistentDocument No Support "Save To" ("Save As"?)

2008-10-08 Thread chaitanya pandit
Hi, I have implemented Save As... in one of my core data app. What i do is, in the "saveToURL: ofType: forSaveOperation: error:" method, if the save operation is NSSaveAsOperation, i migrate the persistent store to a new location given by the absoluteURL and also set the document's URL to

Re: NSUndoManager [EMAIL PROTECTED] up Core Data database

2008-10-08 Thread Keary Suska
On Oct 8, 2008, at 5:17 AM, Ruotger Skupin wrote: In my case I'd like to get rid of the NSUndoManager altogether as I don't need it. Is there a way to do that? -[NSManagedObjectContext setUndoManager:nil] Are you familiar with the "Multi-Threading with Core Data"

re: NSUndoManager [EMAIL PROTECTED] up Core Data database

2008-10-08 Thread Ben Trumbull
Ruotger, This has less to do with the undo manager itself, and more to do with event coalescing. You can set the undo manager for the MOC to nil, but this problem will happen elsewhere later, like -save: or - executeFetchRequest: or when you call -processPendingChanges yourself. This cod

re: refreshObject doesn't seem to work

2008-10-08 Thread Ben Trumbull
Steve, We use Core Data for a multi-user, multi-machine point-of-sale system in a bicycle shop. When someone sells a bike on one machine the other machines don't immediately see it. How is this configured ? Through distributed notifications replicating changes, or a network file system mou

Re: Core Data: Copying and pasting chained entities

2008-10-08 Thread Ben Trumbull
Renaud, Could you point me at those articles ? I was not able to find them. I know I've seen some third party examples, but I don't have references handy. Hopefully, Google can help. Yes, it is a simple solution, but I guess it can rarely be used. If you Copy an object, modify the objec

[Job] Cocoa developer at Skype

2008-10-08 Thread Janno Teelem
Hello, Looking for a skilled Cocoa developer with a positive attitude toward working in an environment of frequently changing requirements. As an engineer in the Skype for Mac OS X desktop team, you will help design and develop new features for the Skype for Mac product. Ideal candidate should be

Re: NSPersistentDocument No Support "Save To" ("Save As"?)

2008-10-08 Thread Mike Abdullah
On 8 Oct 2008, at 20:48, chaitanya pandit wrote: Hi, I have implemented Save As... in one of my core data app. What i do is, in the "saveToURL: ofType: forSaveOperation: error:" method, if the save operation is NSSaveAsOperation, i migrate the persistent store to a new location given by

NSTextView/NSAttributedString supported file types

2008-10-08 Thread Ben Lachman
I have an open panel that I'd like to handle text a little more fluidly. At the moment I call runModalForTypes with an array composed of my best guesses at what NSMutableAttributedString can figure out in its readFromData:... method. However I'm wondering if there is some way of getting a

Re: CALayer bounds with ResizeAspect mask?

2008-10-08 Thread Colin Doncaster
Hey Matt - No worries. It seems like the best approach is to do as you suggest and handle the aspect resizing of the layer myself - that way I can maintain the same dimensions with the drawing layer. It'd be interesting to have some sort of insight as to what's actually changing then - it seems

Re: NSTextView/NSAttributedString supported file types

2008-10-08 Thread Jim Correia
On Oct 8, 2008, at 5:46 PM, Ben Lachman wrote: I have an open panel that I'd like to handle text a little more fluidly. At the moment I call runModalForTypes with an array composed of my best guesses at what NSMutableAttributedString can figure out in its readFromData:... method. However

Re: Help window and Modal Dialogs

2008-10-08 Thread Rob Keniger
On 09/10/2008, at 5:05 AM, Matthew Mashyna wrote: Is there some way to push the help out in front ? Is there a strategy to suspend the modal session but still not allow a user to do anything with any window but help or the one our user clicked help from ? Have you tried calling [window

Re: In dealloc(): ref @property, Can I use " = nil; " vs "[ release]; " ?

2008-10-08 Thread Sean McBride
On 10/8/08 10:21 AM, mmalc crawford said: >> So does the same advice apply for init methods? That is: set ivars >> directly (unless there is no ivar, in which case you have no choice >> but >> to call the setter). >> >Yes. One last related question, if I may. What about awakeFromInsert/awakeFro

Just when I thought I understood bindings.

2008-10-08 Thread Chris Idou
I've got an NSObjectController controlling an object. This content object's properties are bound to various fields on my screen. It seems that the bindings are only working in one direction. Editing the fields updates the object, but programmatically updating the object doesn't update the gui.

Re: Just when I thought I understood bindings.

2008-10-08 Thread Rob Keniger
On 09/10/2008, at 10:21 AM, Chris Idou wrote: It seems that the bindings are only working in one direction. Editing the fields updates the object, but programmatically updating the object doesn't update the gui. I've added observers to my fields, and they are definitely notifying of chan

Re: Just when I thought I understood bindings.

2008-10-08 Thread Chris Idou
Since I've added my own observers to the properties, and they are getting called correctly after I set the values, I guess I must be right? --- On Wed, 10/8/08, Rob Keniger <[EMAIL PROTECTED]> wrote: > From: Rob Keniger <[EMAIL PROTECTED]> > Subject: Re: Just when I thought I understood bindi

Re: Just when I thought I understood bindings.

2008-10-08 Thread Chris Idou
I set them up in interface builder. --- On Wed, 10/8/08, Tim Isted <[EMAIL PROTECTED]> wrote: > From: Tim Isted <[EMAIL PROTECTED]> > Subject: Re: Just when I thought I understood bindings. > To: [EMAIL PROTECTED] > Date: Wednesday, October 8, 2008, 5:36 PM > Did you setup the bindings using In

Re: In dealloc(): ref @property, Can I use " = nil; " vs "[ release]; " ?

2008-10-08 Thread mmalc crawford
On Oct 8, 2008, at 4:44 PM, Sean McBride wrote: What about awakeFromInsert/awakeFromFetch? If my entity has an attribute named 'firstName', should I use the (magically pre-existing) method setFirstName: or should I use setPrimitiveValue:forKey:? "If you want to set attribute values in an impl

Re: Just when I thought I understood bindings.

2008-10-08 Thread Tim Isted
Did you setup the bindings using Interface Builder or programatically? If programatically, they work in only one direction so you need to call [object1 bind:@"value" toObject:object2 withKeyPath:@"whateverPathForKeyIs" options:nil]; and [object2 bind:@"value" toObject:object1 withKeyPath:

Starting a drag in mouseDragged

2008-10-08 Thread James Walker
The documentation on -[NSView dragImage:at:offset:event:pasteboard:source:slideBack:] says that you can invoke it either in mouseDown or mouseDragged. It makes more sense to me to call it from mouseDragged, since in most cases mouseDown will just indicate a click. However, if I start the drag

Re: NSTextView/NSAttributedString supported file types

2008-10-08 Thread Ben Lachman
Thanks Jim. Not sure how I missed that, its exactly what I was looking for. Unfortunately it's deprecated in 10.5. Know what the advised API to transition to is? ->Ben -- Ben Lachman Acacia Tree Software http://acaciatreesoftware.com email: [EMAIL PROTECTED] twitter: @benlachman mobile:

Re: NSTextView/NSAttributedString supported file types

2008-10-08 Thread Ken Ferry
/* Methods that were deprecated in Mac OS 10.5. You can now use +textTypes and +textUnfilteredTypes to get arrays of Uniform Type Identifiers (UTIs). */ + (NSArray *)textFileTypes AVAILABLE_MAC_OS_X_VERSION_10_1_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_5; + (NSArray *)textPasteboardTypes AVA

silly event question 'cuz i'm a n00b

2008-10-08 Thread John Zorko
Hello, all ... If a certain flag is set, my app needs to advance to the next item in a list to process it when the previous item is done. However, I want the user to still be able to stop it, so I don't want to hang the UI. In effect, if this flag is set, I want the app to act as if the

Re: NSTextView/NSAttributedString supported file types

2008-10-08 Thread Jim Correia
On Oct 8, 2008, at 10:33 PM, Ben Lachman wrote: Thanks Jim. Not sure how I missed that, its exactly what I was looking for. Unfortunately it's deprecated in 10.5. Know what the advised API to transition to is? For 10.5 and later, there are UTI based variants. Jim __

Re: silly event question 'cuz i'm a n00b

2008-10-08 Thread Jamie Hardt
It sounds like you want an NSOperationQueue, which would map to your problem on a high level. http://developer.apple.com/documentation/Cocoa/Reference/NSOperationQueue_class/Reference/Reference.html I don't know Win32, but PostMessage() sounds a lot like NSNotificationCenter's postNotificati

Re: silly event question 'cuz i'm a n00b

2008-10-08 Thread Andrew Merenbach
On Oct 8, 2008, at 7:46 PM, John Zorko wrote: Hello, all ... If a certain flag is set, my app needs to advance to the next item in a list to process it when the previous item is done. However, I want the user to still be able to stop it, so I don't want to hang the UI. In effect, if th

Re: Optimized pixel manipulation

2008-10-08 Thread Ken Ferry
A CGImage is an immutable object. While it is possible in some cases to physically change the bytes that back it, it does not reliably work. CG may produce color matched caches or upload data to a graphics card or what have you. If the data is modified behind the framework's back, none of those

re: refreshObject doesn't seem to work

2008-10-08 Thread Steve Steinitz
Hi Ben, Thanks for your reply. I was hoping to hear from you. On 8/10/08, Ben Trumbull wrote: Core Data for a multi-user How is this configured ? Through distributed notifications replicating changes, or a network file system mount ? If the later, is it AFP ? We're not yet using distri

Re: silly event question 'cuz i'm a n00b

2008-10-08 Thread Chris Idou
If all you actually want is a flag, why not just have a flag? When the other thread gets around to examining the flag, it can do what it wants. If you need to synchronize access to the flag, because say, the number of times they press the button is significant, then put an @synchronized directiv

Re: refreshObject doesn't seem to work

2008-10-08 Thread Ben Trumbull
On Oct 8, 2008, at 8:36 PM, Steve Steinitz wrote: On 8/10/08, Ben Trumbull wrote: Core Data for a multi-user How is this configured ? Through distributed notifications replicating changes, or a network file system mount ? If the later, is it AFP ? We're not yet using distributed notifi

Re: Just when I thought I understood bindings.

2008-10-08 Thread Chris Idou
I figured it out. I inherited from NSObjectController and I defined observeValueForKeyPath without calling the super class implementation. So I guess I was swallowing the events that the controller apparently passes on. --- On Wed, 10/8/08, Tim Isted <[EMAIL PROTECTED]> wrote: > From: Tim Is

Re: Cocoa Programming iPing exercise

2008-10-08 Thread Shawn Protsman
On Oct 2, 2008, at 8:37 AM, j o a r wrote: On Oct 2, 2008, at 8:12 AM, Jack Carbaugh wrote: could it be that [hostField stringValue] is not an object ? isn't "stringValue" just a value ? That doesn't seem likely. In all likelihood the "hostField" variable points to a NSTextField, in wh

Re: Just when I thought I understood bindings.

2008-10-08 Thread Fritz Anderson
On 8 Oct 2008, at 7:21 PM, Chris Idou wrote: I've got an NSObjectController controlling an object. This content object's properties are bound to various fields on my screen. It seems that the bindings are only working in one direction. Editing the fields updates the object, but programmatic

Mirror...rorriM

2008-10-08 Thread M Pulis
Anyone developed a mirror Image Unit? Just the kernel code and ROI would be enough. Would rather not re- invent what seems to be a wheel someone may already have written (like Picture Taker [setMirroring], except for live video). Gary ___ Cocoa-de

Foundation Tool, readf, stdio, question!

2008-10-08 Thread Luis Rojas
Hi, I am trying to make a tool that uses cocoa classes but i am stuck in one basic point. How do i read text on the terminal? and where can i find more information if i want to make cocoa applications that is main interface is the terminal. Thanks in advance. __

Newb Question about Delegtes and callbacks

2008-10-08 Thread Ron Green
Somehow in my education I missed out on delegates and callbacks. Can someone point me to a really good explanation that even a dummy like me can understand? ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

Re: Just when I thought I understood bindings.

2008-10-08 Thread Scott Anguish
On 8-Oct-08, at 8:46 PM, Tim Isted wrote: Did you setup the bindings using Interface Builder or programatically? If programatically, they work in only one direction so you need to call [object1 bind:@"value" toObject:object2 withKeyPath:@"whateverPathForKeyIs" options:nil]; and [object

Re: CALayer bounds with ResizeAspect mask?

2008-10-08 Thread Colin Doncaster
Sorry for dragging out this thread, so I would turn off the animations by updating the frame and position within [CATransaction begin]; [CATransaction setValue: (id)kCFBooleanTrueforKey:kCATransactionDisableActions]; // my layer update code here [CATransaction commit]; or

Re: Mirror...rorriM

2008-10-08 Thread Raphael Sebbe
Yes Apple did so. CIAffineTransform. Raphael On Thu, Oct 9, 2008 at 5:09 AM, M Pulis <[EMAIL PROTECTED]> wrote: > Anyone developed a mirror Image Unit? > > Just the kernel code and ROI would be enough. Would rather not re-invent > what seems to be a wheel someone may already have written (like Pi