Re: outlineViewSelectionDidChange not called

2008-03-29 Thread Adam Gerson
I hooked it all up and now the OutlineView displays content, but the exact same "out of sync issues remain" The GUI representation of the selected row (which is always correct) is not noticed by the TreeController under certain rare conditions. A removal of an item and then an undo for instance.

Flickering in NSTableView with Core Animation

2008-03-29 Thread Dave Verwer
I am having a strange problem with a simple use of CA. I am basically using the same code as in this example (http://www.cimgf.com/2008/03/03/core-animation-tutorial-wizard-dialog-with-transitions/) so I have a window which I am using a CATransition to push in 3 views. As in the example, I have set

Re: setMenuVisible

2008-03-29 Thread Wesley Smith
On Fri, Mar 28, 2008 at 5:05 AM, Uli Kusterer <[EMAIL PROTECTED]> wrote: > On 27.03.2008, at 08:24, Wesley Smith wrote: > > I'm trying to make an NSWindow that takes up the entire screen > > including the menu bar but is not actually a fullscreen window. I > > know this is possible with Carbon,

Re: machine with null serial number?

2008-03-29 Thread Mike
Or it is a prototype machine from Apple that was never a real production machine but that got out into the wild somehow. When I worked there, all the prototype machines used to have their serial # (and other firmware info) missing. -m == Kenny Leung wrote: This is a G5 machine

Re: Threads and Core Data, bindings results in view corruption

2008-03-29 Thread Jeff LaMarche
Dave: Are you using separate managed object contexts for each thread? According to the documentation here: http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdMultiThreading.html That's the way to do it - pass managed object IDs between threads, not managed object

Threads and Core Data, bindings results in view corruption

2008-03-29 Thread David
I would think this is the normal typical case, but can't figure it out. The UI should run on one thread, another thread should be used for time consuming updates/generation of an object tree maintained using Core Data. I have a NSOutlineView (via NSTreeController subclass) which displays the object

Re: Distributed Notifications to C / C++ applications

2008-03-29 Thread Jens Alfke
On 29 Mar '08, at 6:51 PM, Rick Langschultz wrote: I am looking to create an application written in C / C++ that will send notifications to a Cocoa application and the Cocoa application will communicate back. Since I am using multiple server environments will / is this possible? Or should

Distributed Notifications to C / C++ applications

2008-03-29 Thread Rick Langschultz
Hello everyone, I am looking to create an application written in C / C++ that will send notifications to a Cocoa application and the Cocoa application will communicate back. Since I am using multiple server environments will / is this possible? Or should I just stick with Cocoa shell tools

Re: How to interrupt a long loop with command-period?

2008-03-29 Thread Nick Zitzmann
On Mar 29, 2008, at 6:45 PM, Duncan Champney wrote: I really want a "check the event queue for keyboard events" call that would let me pick command period or escape key events out of the applications event queue. Use GetKeys(), but beware, the output of GetKeys() is a little bit differe

NSManagedObject Copy and Paste

2008-03-29 Thread Mike Burns
I have a question regarding implementing copy and paste with NSManagedObjects-- I've read through the NSPersistentDocument copy and paste tutorial, but my situation is a bit more involved then just copying and pasting an employee first and last name. Without getting too involved, this is

How to interrupt a long loop with command-period?

2008-03-29 Thread Duncan Champney
My app can create 3D views of the fractal images it creates. It has an option to save very large versions of these 3D views to disk as JPEGs or TIFFs. I generate the images as tiles, then assemble them and save the result to disk. For very large images this can take tens of seconds. I hav

weak linking

2008-03-29 Thread Gerriet M. Denkmann
I use in some Cocoa app a weak linked library. In some class I do: - (BOO)haveNoLibrary { BOOL noHave1 = weak_function == NULL ; // does NOT work - is always NO void *dummy = weak_function; BOOL noHave2 = dummy == NULL ; // does work - is YES if and only library is mi

NSOutlineView / NSSplitView redraw delay

2008-03-29 Thread Milen Dzhumerov
Hi all, I've just noticed a small regression in my app. I've got an NSOutlineView and an NSTableView inside an NSSplitView. Now, imagine that the outline view has some text rows and I drag the splitter such that the whole text in the outline is no longer visible. What used to happen is th

Re: Cant get Garbage Collection to work

2008-03-29 Thread ugol
> Have you tried using Xcode's build settings instead of manually specifying > the compiler flag? There might be more to it than just -fobjc-gc-only. no, that's the only option needed > if you want to use compiler flags in the long term, it's still worth trying > the build setting, just so yo

Re: Core Data & IB in prefs pane ("Cannot perform operation without a managed object context")

2008-03-29 Thread Keary Suska
on 3/28/08 2:18 PM, [EMAIL PROTECTED] purportedly said: > I'm clearly missing some link in the whole Core Data thing. I'm trying > to use it in a Prefs Pane. I've written no code, just set things up > with the data model editor and IB. Is there something NSDocument does > to support Core Data that

Re: fixed width of a pane in NSSplitView (solved)

2008-03-29 Thread Vladimir Sokolov
28.03.2008, в 23:40, Milen Dzhumerov написал(а):Hi Milen, Great! It works. Thanks a lot! Regards, Vladimir On 28 Mar 2008, at 22:34, Vladimir Sokolov wrote: Hi All. How can I make fixed width of the left pane in the NSSplitView? I want to make it as in iTunes. When user resize a window o

Fwd: Use of a int type property

2008-03-29 Thread Davide Benini
You're right, I just cut bits of my code to make it more synthetic, variantEnding was allocated in the init method. At any rate, after an observation by Bill Bumgarner, i realised the bug was much simpler (and more stupid), as often happens: NSLog("Blah blah %@", repetitions) As you said, a

Re: Use of a int type property

2008-03-29 Thread Quincey Morris
On Mar 29, 2008, at 12:15, Davide Benini wrote: Here is MyClass.h file @interface MyClass : NSObject { int repetitions; NSMutableArray *body; // Il contenuto NSString *key; // in questo modo posso determinare cambi di chiave! } - (void) dealloc { [variantEnd

Re: Thread safe?

2008-03-29 Thread Adam R. Maxwell
On Mar 29, 2008, at 12:20 PM, Trygve Inda wrote: How about: NSImage *image = [[[NSImage alloc] initWithContentsOfFile:path] autorelease]; [...] Drawing into an NSImage is explicitly documented to be thread safe in the article you linked to, I guess I was more concerned with the ini

Re: Use of a int type property

2008-03-29 Thread Bill Bumgarner
On Mar 29, 2008, at 12:15 PM, Davide Benini wrote: What is wrong with this code? Any idea? Do you have a custom -description method? Did it print the value of repetitions using [EMAIL PROTECTED] Did you change it to %d when refactoring your code to use a numeric type for repetitions? (Wit

Re: NSScroller question

2008-03-29 Thread slasktrattenator
This works perfectly, just what I was looking for. Many thanks! F. On Sat, Mar 29, 2008 at 4:39 PM, Steve Weller <[EMAIL PROTECTED]> wrote: > > Try looking at the source for TextEdit. TextEdit adds a pop-up at the > end of the horizontal scroller by overriding NSScrollView's tile: > method. Yo

Re: Thread safe?

2008-03-29 Thread Trygve Inda
> Yes. See > > http://www.cocoabuilder.com/archive/message/cocoa/2007/11/15/193191 > > ISTR having problems specifying a nonzero bytesPerRow and passing NULL > for the bitmap data, so you might need to either manage the buffer > yourself or pass zero for bytesPerRow to allow NSBitmapImageRep t

Use of a int type property

2008-03-29 Thread Davide Benini
In a previous conversation I realised that I can use any tipe as a property. As a consequence, I decided to use a simple int type for a "repetitions" property of MyClass, instead of a NSNumber. I changed my code accordingly, but the changes generated a strange bug. As soon as I set my int p

Re: Thread safe?

2008-03-29 Thread Adam R. Maxwell
On Mar 29, 2008, at 6:44 AM, Trygve Inda wrote: I am finding it hard to determine in many cases exactly what is thread safe as this is not complete: http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading/Thr eadSafetySummary/chapter_950_section_2.html Can I call the followi

Core Data migration

2008-03-29 Thread David Wilson
I have a reasonably complex core data data model which makes use of entity inheritance. In an attempt to make use of the new Leopard data migration tools, I created a new version, made a few minor desired changes (added a few entities and created the relationships to them- no changes to existing en

Re: how to check if a property is empty?

2008-03-29 Thread Jens Alfke
On 29 Mar '08, at 10:11 AM, Davide Benini wrote: I half suspected something like this... Well, for a _pointer_ type*, there is an "empty" value: NULL. (For object pointers the constant 'nil' is used, but they both have the same underlying value.) When an Objective-C object is created, i

Re: how to check if a property is empty?

2008-03-29 Thread Jens Alfke
On 29 Mar '08, at 8:32 AM, Davide Benini wrote: repetitions = [[NSNumber alloc] init]; variantEnding = [[NSNumber alloc] init]; These lines don't really make sense. NSNumber (like its superclass NSValue) is immutable. You can't store a different number in one

Re: how to check if a property is empty?

2008-03-29 Thread Davide Benini
There's no intrinsic "initialized but empty" state of Objective C objects. 'variantEnding' can be initialized to nil (or, rather, allowed to remain nil, since everything in a new object is guaranteed to be zeroes) or it can be given a NSNumber value. I half suspected something like this

Re: Thread safe?

2008-03-29 Thread Jens Alfke
On 29 Mar '08, at 6:44 AM, Trygve Inda wrote: Can I call the following from a thread? Apologies for giving an opinion instead of an answer ... but here's my opinion. I've always avoided calling AppKit from multiple threads. Instead I run the app's entire UI on the main thread, use asynchr

Re: how to check if a property is empty?

2008-03-29 Thread Quincey Morris
On Mar 29, 2008, at 08:32, Davide Benini wrote: - (void) dealloc { [repetitions release]; [variantEnding release]; [body release]; [super dealloc]; } - (id) init { self = [super init]; if (self != nil) { repetitions = [[NSNumber a

Re: machine with null serial number?

2008-03-29 Thread John Joyce
Indeed, on repair, the computer should have the old serial number. This is why it is also located on the case, exact location depends on the model. The only time there should ever be a new serial number is when a Mac is outright replaced. Definitely, it is a bad idea to depend on the serial

Re: App Crashing when remove an Object

2008-03-29 Thread Mario Gajardo Tassara
El 28-03-2008, a las 21:08, Sherm Pendley escribió: On Fri, Mar 28, 2008 at 8:49 PM, Andrew Farmer <[EMAIL PROTECTED]> wrote: On 28 Mar 08, at 18:37, Mario Gajardo Tassara wrote: > In a portion of code of my app (collision detection part) i need to > remove an object from an array of objects,

Cocoa Tutoring in SF Bay Area

2008-03-29 Thread Brad Gibbs
Hi, I'm new to Cocoa programming. I have a specific application I would like to create and feel I have a good idea of the application's requirements, but I'm looking for advice on how to structure the code most efficiently. I'm hoping to meet with someone for an hour or two initially to

Re: GDB says not an object

2008-03-29 Thread Jens Alfke
On 29 Mar '08, at 5:15 AM, Nick Rogers wrote: currentNode is an NodeType* and [currentNode key:0] returns an ItemType*, which has a method - (Uint32)keyField. but when I use: [[currentNode key:0] keyField] GDB tells that its not an object. GDB as in the debugger? What's the exact command yo

CAOpenGLLayer

2008-03-29 Thread Stefan Hafeneger
Hi, I would like to use CAOpenGLLayer instead of NSOpenGLView. I didn't find any example source code but got it working. I implemented - (BOOL)canDrawInCGLContext:(CGLContextObj)glContext pixelFormat: (CGLPixelFormatObj)pixelFormat - (void)drawInCGLContext:(CGLContextObj)glContext pixelForma

Re: NSScroller question

2008-03-29 Thread Steve Weller
Try looking at the source for TextEdit. TextEdit adds a pop-up at the end of the horizontal scroller by overriding NSScrollView's tile: method. You may be able to change the layout so that the end of the NSScroller is clipped off. On Mar 29, 2008, at 4:57 AM, [EMAIL PROTECTED] wrote: Tha

how to check if a property is empty?

2008-03-29 Thread Davide Benini
Hello folks. I have a class with a number of properties. Some of them are used only in specific instances. I need to check whether these properties have been assigned a value; I am thinking about a method similar to isset in php. I alloc and init properties in the genral init methid; I relea

Re: Communications between multiple NIB's

2008-03-29 Thread Steve Weller
On Mar 28, 2008, at 11:27 AM, Lincoln Green wrote: I followed your suggestion, and it worked great! However, when I delete the preferences file form /Library/Preferences/, my application won't put up a window. Any suggestions to get around this? Check the console window in Xcode and then st

Thread safe?

2008-03-29 Thread Trygve Inda
I am finding it hard to determine in many cases exactly what is thread safe as this is not complete: http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading/Thr eadSafetySummary/chapter_950_section_2.html Can I call the following from a thread? segImageRep = [[NSBitmapImageRep a

Re: Core Data faulting and bindings: recursive KVO notifications?

2008-03-29 Thread Dennis Lorson
On 29 Mar 2008, at 06:29, Ron Lue-Sang wrote: There's also the controller attribute "Always Use Multi Value Marker" which will keep the controller from even looking at the property values of the selected objects as long as more than one object is selected in the controller. Of course, th

Re: Core Data faulting and bindings: recursive KVO notifications?

2008-03-29 Thread Dennis Lorson
On 29 Mar 2008, at 06:08, Ben Trumbull wrote: On Mar 28, 2008, at 7:38 PM, Dennis Lorson wrote: On 28 Mar 2008, at 20:24, Ben Trumbull wrote: The problem I'm having arises when selecting all images at once (Command+A), if they are fairly large in number (in my store: ~2000). This take

GDB says not an object

2008-03-29 Thread Nick Rogers
hi, I'm working on a small btree implementation. currentNode is an NodeType* and [currentNode key:0] returns an ItemType*, which has a method - (Uint32)keyField. but when I use: [[currentNode key:0] keyField] GDB tells that its not an object. any ideas? Wishes, nick _

Re: NSScroller question

2008-03-29 Thread slasktrattenator
Thanks Troy for the in-depth account. Yes, my goal is to customize the scroller's appearance, and yes, I wish this process involved less guess-work. As you say, there is no empty space when you let the scroller draw normally. You only see this when drawing a custom scroller based on the rects retur

Re: machine with null serial number?

2008-03-29 Thread Matt Burnett
With the tools apple provides, you can not change a serial number, but you can program a serial number in to a blank board. If your good with assembly you can modify the software to allow you to change the serial number. The tech you encountered did not do his job properly. The service ma

Re: machine with null serial number?

2008-03-29 Thread Kok-Yong Tan
What is the proceedure to "reset the serial number"? I've come across a couple of eMacs that have had their motherboards/logic boards replaced due to a faulty batch of capacitors causing the infamous "melting screen" issue. None of them had serial numbers when I looked at them using Apple

Re: Core Data and NSOperation

2008-03-29 Thread Quincey Morris
On Mar 28, 2008, at 22:56, Daniel Thorpe wrote: Oooh, that might work... But how do you assign independent operations using NSInvocationOperation objects? I don't understand the question. Each NSInvocationOperation represents the independent execution of a method on an object in a thread

Re: QTMovie delegate method with 64 bit

2008-03-29 Thread Holger Hanstein
Am 28.03.2008 um 16:52 schrieb Nick Zitzmann: On Mar 28, 2008, at 4:36 AM, Holger Hanstein wrote: Does anybody have an explanation or workaround for this behavior? Have you filed a bug? not yet... could someone please recheck that, to make sure it is not due to a mistake of mine? I'v

Re: machine with null serial number?

2008-03-29 Thread Matt Burnett
I forgot the name of it, but there is a kext that allows you to change your MAC address. For software licensing this could be a issue since a pirate could change their MAC address, albeit not of every machine on their network. It is much more difficult (but possible) to change your systems