Re: Cocoa UI In Carbon App Issues.

2008-05-25 Thread Kevin Grant
At least in my case, I use Option+Close in my Carbon+Cocoa app and I don't see a crash. (This closes all Cocoa windows and leaves the Carbon ones alone.) See if your Cocoa wrapper functions have forgotten any autorelease pools, which can cause a crash when Carbon calls the functions. What versi

Re: File's Owner

2008-05-25 Thread Scott Anguish
Look at the other Currency Converter example (the non bindings one) http://developer.apple.com/documentation/Cocoa/Conceptual/ObjCTutorial/01Introduction/chapter_1_section_1.html this uses almost the exact same structure you're looking to implement. On May 25, 2008, at 5:01 AM, Roland King wro

alternate pattern for object initializers

2008-05-25 Thread Stuart Malin
I am reasonably new to Cocoa. I do have the concept of a "designated initializer" understood. However, I have begun to use an alternate pattern. Before I get too far in my use of this approach, I thought it best to check with the more experienced developers here to see if my approach for do

Re: No-frills print to label printer help please

2008-05-25 Thread Rick Mann
On May 25, 2008, at 20:20:38, Boaz Stuller wrote: I wrote almost this exact same program about 2 years ago. Looking back at the code, here's what I did: Thanks Boaz. Did you also override the pagination stuff? What size is your view, just some arbitrary size in IB, or do you adjust it ba

Re: CoreData

2008-05-25 Thread Joshua Preston
Hey guys, After continuing to tweak it, I've figured out what the problem was-- basically I think my NIB got corrupted as I was unable to change the NSArrayController for the Topics. I had to rebuild my NIB file. So far I've been unable to reproduce the problem... Regards, Joshua Presto

Cocoa UI In Carbon App Issues.

2008-05-25 Thread Vijay Malhan
Hi All,I've implemented a Cocoa UI (as a plugin), in a legacy Carbon App. It is a palette implementation. There are many usability issues related to it. Few of them are like: - Keyboard events loss. - Key selection on Menu's, doesn't work. - Mouse Cursor update event loss. - Option + Close (Close A

Re: Resizing a view to match the main NSWindow size?

2008-05-25 Thread Graham Reitz
Thanks Eric. I have a CustomOpenGLView example that I downloaded from the apple development site (http://developer.apple.com/samplecode/Custom_Cocoa_OpenGL/listing5.html ). Hopefully that has what I am looking for. Use NSOpenGLView. It's whole reason to exist is to simplify setup and use

Re: Scaling view to fill printed page

2008-05-25 Thread Scott Ribe
> Must I actually create a view with bounds that match that of the paper > at print time? No, but there are other things you have to get right, such as the values your view returns for the various methods that query for bounds/adjustments. Sorry, I don't remember the details. -- Scott Ribe [EMA

Re: No-frills print to label printer help please

2008-05-25 Thread Boaz Stuller
I wrote almost this exact same program about 2 years ago. Looking back at the code, here's what I did: 1) To suppress the print dialog, I called [printOperation setShowsPrintPanel:NO] between when I create the print operation and when I call runOperation 2) To fit the label to the edges I used th

Re: Resizing a view to match the main NSWindow size?

2008-05-25 Thread Nathan Kinsinger
On May 25, 2008, at 7:51 PM, Graham Reitz wrote: I think I am close but don't understand how the coordinate system of an NSView relates to the NSWindow it resides in. It looks like the NSView setFrame method will help but I am getting weird results. Am I on the right track? thanks, grah

Re: Resizing a view to match the main NSWindow size?

2008-05-25 Thread Erik Buck
Changing the opengl viewport every time you draw is generally a poor practice. Setting the viewport is traditionally one of the most expensive open gl operations. The window will not resize anywhere near as often as the view will be redrawn. That is why it is usually better to reset the

Resizing a view to match the main NSWindow size?

2008-05-25 Thread Graham Reitz
I think I am close but don't understand how the coordinate system of an NSView relates to the NSWindow it resides in. It looks like the NSView setFrame method will help but I am getting weird results. Am I on the right track? thanks, graham ___

Re: Change the Language of just one Application

2008-05-25 Thread Kyle Sluder
On Sat, May 24, 2008 at 1:59 PM, Jean-Daniel Dupas <[EMAIL PROTECTED]> wrote: > You can pass this argument: > > -AppleLanguages '(de)' Interestingly enough, when I do this for OmniGraffle, the Help menu doesn't have Spotlight for Help in it. Is this a known issue? --Kyle Sluder _

Re: File's Owner

2008-05-25 Thread Kyle Sluder
On Sun, May 25, 2008 at 4:14 PM, James Merkel <[EMAIL PROTECTED]> wrote: > More to the subject at hand, I thought File's owner was just a mechanism for > connecting nib objects to code. Nothing more or less. If I'm missing > something, someone can correct me. Pretty much. Any further significance

Re: Detecting a resize window event?

2008-05-25 Thread Erik Buck
I use the -resize method within an NSOpenGLView subclass. Is there some reason you don't use an NSOpenGLSubclass ? @implementation EBNMapOpenGLView - (id)initWithFrame:(NSRect)frame { static NSOpenGLPixelFormatAttribute attribs[] = { NSOpenGLPFANoRecovery, NSOpenGLPFAWindow

CoreData

2008-05-25 Thread Joshua Preston
Hey guys, I'm attempting to follow the Core Data tutorial located at cocoadevcentral (http://cocoadevcentral.com/articles/85.php). Anyhow, I've followed it step by step, making adjustments for Xcode 3.0, and seem to keep hitting a dead end. I've setup my array controllers, bound all

Re: Detecting a resize window event?

2008-05-25 Thread Graham Reitz
Thanks Greg! Works great. About the time I noticed your post I had ended up with this: (seems to work) - (void) drawRect: (NSRect) rect { NSWindow* main_window = [self window]; NSRect window_rect = [main_window frame]; NSLog(@"my_window_width=%f, my_window_height=%f", window_r

Re: Detecting a resize window event?

2008-05-25 Thread Greg Titus
In your NSView: - (void)viewDidMoveToWindow { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(windowResized:) name:NSWindowDidResizeNotification object:[self window]]; } - (void)dealloc { [[NSNotificationCenter defaultCenter] removeObserver:self];

Re: Detecting a resize window event?

2008-05-25 Thread Graham Reitz
I don't think I am presenting my question well enough. Let me try again. I have a custom NSView object with a NSOpenGLContext in it. When the window is resized how do you capture the window height and width (not the derived NSView object's height/width, it doesn't change) so I can adjus

Re: Faster way to test pixels?

2008-05-25 Thread Ken Ferry
There are a couple of things that aren't great about looking at the bytes in a bitmap. (1) You need to understand bitmap formats, as others have pointed out. (2) Getting access to raw bitmap data often means blowing away caches throughout the graphics system. -[NSBitmapImageRep bitmapData gives r

Re: Detecting a resize window event?

2008-05-25 Thread Erik Buck
I would like to dispatch a message to a C++ controller letting it know that the window has been resized to x,y dimensions. Then you want the window delegate messages. - (void)windowDidResize:(NSNotification *)notification Also, please use the available documentation. http://developer.apple.

Re: Detecting a resize window event?

2008-05-25 Thread Scott Andrew
For a window: If you are registered as the delegate you can handle the windowWillResize:toSize: call to get called just before the reisize. Or, If you want the message after the resize, you can handle the windowDidResize: call. For a view: You can register to receive the NSViewFrameDidCh

Re: Scope in an interface?

2008-05-25 Thread Uli Kusterer
Am 25.05.2008 um 09:41 schrieb Jens Alfke: * Calling any method on a NULL object pointer doesn't crash, and doesn't call any code; instead, it's a no-op. This is actually extremely useful and can be taken advantage of to make your code much more concise by eliminating a lot of pointer checks

Re: Detecting a resize window event?

2008-05-25 Thread Graham Reitz
Thanks Greg. I would like to dispatch a message to a C++ controller letting it know that the window has been resized to x,y dimensions. graham On May 25, 2008, at 6:09 PM, Greg Titus wrote: Assuming you are asking because you need to do drawing differently based on whether resizing is ta

Re: Detecting a resize window event?

2008-05-25 Thread Greg Titus
Assuming you are asking because you need to do drawing differently based on whether resizing is taking place, see here: http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaPerformance/Articles/CocoaLiveResize.html You'll want to override the -viewWillStartLiveResize and - viewDidEn

Detecting a resize window event?

2008-05-25 Thread Graham Reitz
How do you detect a resize event? I can see that lockFocus and drawRect are getting called. Is there a method to help determine if the user is resizing the window? thanks, graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not p

Scaling view to fill printed page

2008-05-25 Thread Rick Mann
Hi. I have a custom NSView that I want to scale up to fill the printed page. I've gotten the orientation right, but setting H & V pagination to "fit" doesn't seem to do the trick. Must I actually create a view with bounds that match that of the paper at print time? I'd like to avoid that, b

Re: How hard is it to learn Cocoa - Survey ?

2008-05-25 Thread Greg Titus
I think it'll be very hard to compare learning times then to learning times now because the frameworks involved are quite a bit different. I started working on Cocoa stuff for Omni near the end of 1993. A lot of the concepts behind the AppKit class hierarchy have changed surprisingly little

Re: NSError and presentError:

2008-05-25 Thread Ali Ozer
-localizedFailureReason is supposed to be the "why" part of - localizedDescription. Since it's already included in - localizedDescription, it is not shown again; otherwise you would get a repetition in the panel: Main message: "The file <> could not be copied you do not have appropriate ac

Re: NSCollectionView problems

2008-05-25 Thread Daniel Vollmer
On May 25, 2008, at 18:44, Jens Alfke wrote: I remember having some similar funky issues with the scrollbar — IIRC, the scrolling range was always much too large for the number of items, and resizing the window didn't help. I can't remember now exactly what I did to fix it ... looking th

Re: Quit iTunes

2008-05-25 Thread Uli Kusterer
Am 24.05.2008 um 17:49 schrieb Mr. Gecko: How would I quit iTunes. There is a way to launch it with NSWorkspace but how about quit? You could use the scripting bridge. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de __

Re: How to Delay, Wait, Pause...

2008-05-25 Thread Steve Steinitz
Hi Jens, Thank you for your clarifications. I had been left with an unsettled feeling about the technique. On 25/5/08, Jens Alfke wrote: > On 25 May '08, at 2:40 AM, Thomas Davie wrote: > > >I hate to say this, but any form of delay here is the *wrong* > >way to do this. You already know yo

Re: NSError and presentError:

2008-05-25 Thread Quincey Morris
On May 25, 2008, at 14:21, Seth Willits wrote: So why is it that when the standard sheet for presentError: is displayed, it only ever uses NSLocalizedDescriptionKey and NSLocalizedRecoverySuggestionErrorKey? A lot of NSError objects don't have a value for NSLocalizedRecoverySuggestionErr

NSError and presentError:

2008-05-25 Thread Seth Willits
So why is it that when the standard sheet for presentError: is displayed, it only ever uses NSLocalizedDescriptionKey and NSLocalizedRecoverySuggestionErrorKey? A lot of NSError objects don't have a value for NSLocalizedRecoverySuggestionErrorKey but they do have values for NSLocalizedFai

Re: Scope in an interface?

2008-05-25 Thread Jens Alfke
On 25 May '08, at 1:53 PM, Graham Reitz wrote: Did you just type that up now? That seems like a lot of effort. Yeah, I typed it in last night. I have a strong interest in languages & runtimes, so it doesn't take a lot to get me started! Also, I strongly suspect the barista at Starbucks,

ANN: MYNetwork library, including abstract TCP client/server and BLIP protocol

2008-05-25 Thread Jens Alfke
I've just put up a preliminary release of an open-source Cocoa library called MYNetwork, which extracts some of the networking code from the app I'm working on, Cloudy. http://mooseyard.com/projects/MYNetwork/ MYNetwork includes an abstract TCP client and server implementation, which may b

Re: Scope in an interface?

2008-05-25 Thread Graham Reitz
Outstanding! Thanks Jens! Did you just type that up now? That seems like a lot of effort. Much appreciated, -graham On May 25, 2008, at 2:41 AM, Jens Alfke wrote: On 24 May '08, at 10:29 PM, Graham Reitz wrote: Can I think of an @interface as something similar to a c++ class? Yes. @in

Re: No-frills print to label printer help please (Rick Mann)

2008-05-25 Thread David Phillip Oster
At Sun, 25 May 2008 10:42:26 -0700, No-frills print to label printer help please (Rick Mann): I'm writing a small app to print labels. Currently I'm targeting a Dymo LabelWriter 400 Turbo (a little USB printer) using a small 2.3" X 4" label. I created a view in my app that uses that aspect rat

Re: How to retrieve conversion factors from internet?

2008-05-25 Thread Steven Huey
Sam, It looks like http://www.xmethods.net has a list of web services and providers, some of which look to be currency converters. Best regards, Steven Huey On May 25, 2008, at 3:21 PM, KSamdev wrote: Hi, I am writing Converter Application in Cocoa and would like to retrieve units conve

How hard is it to learn Cocoa - Survey ?

2008-05-25 Thread Erik Buck
I have been working with Cocoa and its predecessors for so long that I can't remember how long it took me to learn to use the frameworks. One of my first non-trivial NeXTstep applications was a Tetris game. It was about 1989 or early 1990 when a friend was admiring my NeXT cube. She aske

Re: File's Owner

2008-05-25 Thread James Merkel
On May 25, 2008, at 12:02 PM, Hamish Allan wrote: What this thread has reminded me of is an ongoing conversation I have with a friend of mine, who refuses to countenance the square root of minus one, because he doesn't think it means anything. I explain to him how useful it can be to admit comp

Re: File's Owner

2008-05-25 Thread Sherman Pendley
On May 25, 2008, at 1:30 PM, Andy Lee wrote: Early in his book, Aaron Hillegass suggests ten hours of sleep a night when you're learning something new Given my commitment to lifelong learning, that is now my official excuse for sleeping in late. :-) sherm--

Re: File's Owner

2008-05-25 Thread Jens Alfke
On 25 May '08, at 11:58 AM, Hamish Allan wrote: What this thread has reminded me of is an ongoing conversation I have with a friend of mine, who refuses to countenance the square root of minus one, because he doesn't think it means anything. It also reminded me of the fact that Isaac Asimov n

File's Owner

2008-05-25 Thread Johnny Lundy
Forgot one thing. If anyone would be interested to critique my whole project, I would appreciate it. It on my iDisk "johnnylundy", a zip file named "MafiaC9Arrays.zip" ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

How to retrieve conversion factors from internet?

2008-05-25 Thread KSamdev
Hi, I am writing Converter Application in Cocoa and would like to retrieve units conversion factors from internet (at least such as exchange rates that change all the time). Anyone is aware of any such server available? Is it possible to get such data from Google, Yahoo? How? Thank, Sam

Re: File's Owner

2008-05-25 Thread Johnny Lundy
Thanks to everyone who replied and supplied sample code and anecdotes. I will study these carefully and take notes. N.B. My 16 hours a day comment did not imply that I am losing sleep. I really have been reading and adding features to my project, and creating dozens of test projects, and loa

Re: File's Owner

2008-05-25 Thread Hamish Allan
On Sun, May 25, 2008 at 2:31 PM, Andy Lee <[EMAIL PROTECTED]> wrote: > If I can make a rough analogy, many of our answers have been like different > re-implementations of an algorithm. Like the guy on the guillotine in that > engineer joke, we each think we see what the problem is. And so we "re

No-frills print to label printer help please

2008-05-25 Thread Rick Mann
I'm writing a small app to print labels. Currently I'm targeting a Dymo LabelWriter 400 Turbo (a little USB printer) using a small 2.3" X 4" label. I created a view in my app that uses that aspect ratio (I have yet to find out the printer's actual resolution) at about 315 X 182. I draw a nu

Re: File's Owner

2008-05-25 Thread mmalc crawford
On May 25, 2008, at 10:30 AM, Andy Lee wrote: Early in his book, Aaron Hillegass suggests ten hours of sleep a night when you're learning something new, which I found one of the most interesting suggestions a programming book had ever made. Oh, in the Cocoa training courses we typically re

Re: Problem configuring NSToolbarItem in IB

2008-05-25 Thread Christian Corsano
On 25 mai 08, at 18:45, Jens Alfke wrote: You should be able to add IBOutlets to your controller and wire them up to the individual toolbar items in IB. Thanks Jens, I hadn't thought of this solution ! But it still doesn't fell right to have to wire all these instances manually and keep a r

Re: File's Owner

2008-05-25 Thread Andy Lee
On May 25, 2008, at 1:22 PM, mmalc crawford wrote: On May 25, 2008, at 9:13 AM, Johnny Lundy wrote: Took about a month of 16-hour days to get that down. Experience suggests that this is a suboptimal way to try to learn Cocoa. Early in his book, Aaron Hillegass suggests ten hours of sleep a

Re: File's Owner

2008-05-25 Thread mmalc crawford
On May 25, 2008, at 9:13 AM, Johnny Lundy wrote: Took about a month of 16-hour days to get that down. Experience suggests that this is a suboptimal way to try to learn Cocoa. Some concepts are better understood after quiet reflection. If you're struggling with a concept, find something else c

Re: File's Owner

2008-05-25 Thread mmalc crawford
On May 25, 2008, at 6:31 AM, Andy Lee wrote: The File's Owner is the hole -- the one thing that *isn't* created in the nib. First Responder and Application are also not created in the nib. :) Indeed, that's why I didn't sleep so well -- something was nagging as I clicked Send just before

Re: Faster way to test pixels?

2008-05-25 Thread Jens Alfke
On 25 May '08, at 8:14 AM, Steve Christensen wrote: Unless you know for a fact that your bitmap data is packed such that each row begins immediately after the previous row, you'll need to do a bit more work. Bitmaps can be created with [bits bytesPerRow] > bytesPerPixel * [bits pixelsWide]

Re: Problem configuring NSToolbarItem in IB

2008-05-25 Thread Jens Alfke
On 25 May '08, at 2:56 AM, Christian Corsano wrote: Now my problem is I need to use these items programmatically (to implement a delegate for my NSToolbar), and by looking at the xib file the identifiers for these items are some kind of hash-code, and I can't find a place to set it in IB.

Re: How to Delay, Wait, Pause...

2008-05-25 Thread Jens Alfke
On 25 May '08, at 2:40 AM, Thomas Davie wrote: I hate to say this, but any form of delay here is the *wrong* way to do this. You already know you have a race condition, all you're doing is making it so the race condition will work out in your favor 99.99% of the time. There are still exc

Re: Problem configuring NSToolbarItem in IB

2008-05-25 Thread Nathan Kinsinger
On May 25, 2008, at 3:56 AM, Christian Corsano wrote: Hi to you all, I've been reading this list for quite a while now, and I need a hand on a small problem : I can't find a way to set the identifier of my custom NSToolbarItems in Interface Builder. I'm building a document based applicati

Re: Faster way to test pixels?

2008-05-25 Thread Gary L. Wade
I've not explored Velocity Engine programming under the PowerPC or its equivalent under the Intel processor family, but your needs seem like they might be solved by using that as a solution to further improve the performance. Graham Cox wrote: On 25 May 2008, at 5:13 pm, Jens Alfke wrote: T

Re: NSCollectionView problems

2008-05-25 Thread Jens Alfke
I remember having some similar funky issues with the scrollbar — IIRC, the scrolling range was always much too large for the number of items, and resizing the window didn't help. I can't remember now exactly what I did to fix it ... looking through the revision history and diffs, I think it

Re: File's Owner

2008-05-25 Thread Johnny Lundy
LOL - all of what you just described was the hair-pulling extravaganza that led me to a more detailed look at File's Owner in the first place. Several weeks ago I was trying to get my model object out of the nib, or more specifically, to figure out how to connect the controller to it if the

Re: Faster way to test pixels?

2008-05-25 Thread Steve Christensen
On May 25, 2008, at 4:34 AM, Graham Cox wrote: On 25 May 2008, at 5:13 pm, Jens Alfke wrote: Is there any faster way of doing this than just iterating over the pixels like this? I can't think of anything but someone might have a bright idea. If you do test against pixels, work with the ra

Re: File's Owner

2008-05-25 Thread Andy Lee
On May 25, 2008, at 6:20 AM, mmalc crawford wrote: On May 25, 2008, at 12:15 AM, Johnny Lundy wrote: And, if I don't understand something, I will ask why. Here are some suggestions as to how you might pose your questions: I hesita

[Job Posting] Princeton Satellite Systems

2008-05-25 Thread Michael Paluszek
Princeton Satellite Systems, located in Princeton, New Jersey, is looking for software engineers to work on its VisualCommander product: http://www.psatellite.com/vc Work will involve DoD and NASA projects including development of the software for a deep space optical navigation sensor, miss

Re: File's Owner

2008-05-25 Thread Graham Cox
On 25 May 2008, at 5:15 pm, Johnny Lundy wrote: And, if I don't understand something, I will ask why. This is not magic - there is actual computer code behind that File's Owner concept, and it is deterministic, not vague, not abstract, not a philosophical enigma, not random, not ambiguous.

Re: How to Delay, Wait, Pause...

2008-05-25 Thread Steve Steinitz
Hi Dimitri, Thanks for your insightful reply. On 25/5/08, Dmitri Goutnik wrote: Have to agree with Thomas that delay is the wrong way to handle this. Yes, he makes a good point. From 10.4 on fetch: results are delayed until the next iteration of the run loop so (please correct me if I'm wr

Re: Core Data add object

2008-05-25 Thread mmalc crawford
On May 25, 2008, at 4:25 AM, Ivan C Myrvold wrote: Den 25. mai. 2008 kl. 13:08 skrev Ivan C Myrvold: I have a core data project with two entities, Call and CallEvent. In the Call entity, I have a to-many relationship to CallEvent. [...] I think I was too fast with my conclusion that it doesn't

Re: How to Delay, Wait, Pause...

2008-05-25 Thread Steve Steinitz
Hi Ken, On 25/5/08, Ken Thomases wrote: Just for posterity, there's also the simpler, more efficient [NSThread sleepForTimeInterval:0.1]. The documentation says it's only available in 10.5 and later, but the 10.5 release notes say that it was always available but only recently published in the

Re: Faster way to test pixels?

2008-05-25 Thread Graham Cox
On 25 May 2008, at 5:13 pm, Jens Alfke wrote: There are geometric techniques for doing this, that wouldn't require working with pixels. Computing the bounding box of a Bézier curve is very easy, so you can usually trivially reject most of them by checking the rects for intersection. For th

Re: How to Delay, Wait, Pause...

2008-05-25 Thread Steve Steinitz
Hi Bob at [EMAIL PROTECTED] (Thomas Davie) On 25/5/08, Thomas Davie wrote: I hate to say this, but any form of delay here is the *wrong* way to do this. You already know you have a race condition, all you're doing is making it so the race condition will work out in your favor 99.99% of the tim

Re: Core Data add object

2008-05-25 Thread Ivan C Myrvold
I think I was too fast with my conclusion that it doesn't work. I just looked at the warning I got, which says: "NSManagedObject may not respond to -addCallEventsObject". Ivan Den 25. mai. 2008 kl. 13:08 skrev Ivan C Myrvold: I have a core data project with two entities, Call and CallEvent

Re: Core Data add object

2008-05-25 Thread mmalc crawford
On May 25, 2008, at 4:08 AM, Ivan C Myrvold wrote: I now want to add the callevent object to thecall object. I see in the NSManagedObject subclass Call there is a method prepared for this, - (void)addCallEventsObject:(CallEvent *)value; simply doing [thecall addCallEventsObject:thecallevent];

Core Data add object

2008-05-25 Thread Ivan C Myrvold
I have a core data project with two entities, Call and CallEvent. In the Call entity, I have a to-many relationship to CallEvent. I create the two objects in code with thecall = [NSEntityDescription insertNewObjectForEntityForName:@"Call" inManagedObjectContext:[self managedObjectContext]]; a

Re: How to Delay, Wait, Pause...

2008-05-25 Thread Dmitri Goutnik
Sorry, forgot to hit Reply All.. On May 25, 2008, at 10:45 AM, Steve Steinitz wrote: Hello, This is hard to google for because they are such common words: how do I delay, wait, pause for a tenth of a second? I don't want to use NSTimer because I just want to resume where I left off. I don

Re: File's Owner

2008-05-25 Thread mmalc crawford
On May 25, 2008, at 12:15 AM, Johnny Lundy wrote: And, if I don't understand something, I will ask why. Here are some suggestions as to how you might pose your questions: This is not magic - there is actual computer code behind th

Re: How to Delay, Wait, Pause...

2008-05-25 Thread Michael Vannorsdel
This is an important consideration. If you're relying on a specific event to finish within a finite amount of time, you're going to have a race condition where the event could finish later than expected and you may end up in an invalid state. Perhaps if you told us what it is you're specif

Problem configuring NSToolbarItem in IB

2008-05-25 Thread Christian Corsano
Hi to you all, I've been reading this list for quite a while now, and I need a hand on a small problem : I can't find a way to set the identifier of my custom NSToolbarItems in Interface Builder. I'm building a document based application with a NSToolbar in the document window. I've added

Re: How to Delay, Wait, Pause...

2008-05-25 Thread Ken Thomases
On May 25, 2008, at 4:22 AM, Steve Steinitz wrote: NSDate *future = [NSDate dateWithTimeIntervalSinceNow: 0.1]; [NSThread sleepUntilDate:future]; Just for posterity, there's also the simpler, more efficient [NSThread sleepForTimeInterval:0.1]. The documentation says it's only availabl

Re: File's Owner

2008-05-25 Thread Ken Thomases
On May 25, 2008, at 4:14 AM, mmalc crawford wrote: On May 25, 2008, at 2:01 AM, Roland King wrote: Where do I make the model object and how do I hook it into the controller? I start the application, the Files Owner is the singleton NSApplication, I guess I can override the NIB finished lo

Re: IB outlets and NSCollectionViews

2008-05-25 Thread Daniel Vollmer
On May 23, 2008, at 17:48, David Carlisle wrote: I solved a similar problem when putting a pop up menu into a collectionView item. There might be an easier way, but I assume that to put a button in a collectionViewItem, the button would have to send a message to a subclass of NSCollectio

Re: How to Delay, Wait, Pause...

2008-05-25 Thread Thomas Davie
On 25 May 2008, at 11:22, Steve Steinitz wrote: Hello, Thank you Jens Alfke, Peter Burtis and Stephen Joseph Butler for your excellent, quick and helpful replies. [SNIP] from your method. Stephen warns that the host method needs to be re- entrant or guard against multiple entries. I

Re: NSCollectionView problems

2008-05-25 Thread Daniel Vollmer
On May 24, 2008, at 08:53, Markus Spoettl wrote: On May 23, 2008, at 11:06 PM, Markus Spoettl wrote: For those interested, both issues go away if "Automatically Hide Scrollers" is switched OFF for the enclosing scroll view. I had scrollers switched off by default for esthetic reasons. Appar

Re: How to Delay, Wait, Pause...

2008-05-25 Thread Steve Steinitz
Hello, Thank you Jens Alfke, Peter Burtis and Stephen Joseph Butler for your excellent, quick and helpful replies. Thank you Jens for the heads up about the threading and for letting me know that things are done this way in Cocoa -- I just didn't want to be out in left field. Below. for fu

Re: File's Owner

2008-05-25 Thread mmalc crawford
On May 25, 2008, at 2:01 AM, Roland King wrote: Where do I make the model object and how do I hook it into the controller? I start the application, the Files Owner is the singleton NSApplication, I guess I can override the NIB finished loading method, make the model object there and now I

Re: File's Owner

2008-05-25 Thread Roland King
On May 25, 2008, at 3:49 PM, Scott Anguish wrote: On May 25, 2008, at 3:15 AM, Johnny Lundy wrote: Well, tell that to the guy who wrote the Currency Converter Using Bindings tutorial. See the last sentence here: "This concrete example should help you understand what the value binding’s

Re: File's Owner

2008-05-25 Thread Paul Thomas
On 25 May 2008, at 08:15, Johnny Lundy wrote: Well, tell that to the guy who wrote the Currency Converter Using Bindings tutorial. See the last sentence here: [...] And you wonder why I am still confused. That paragraph from Apple directly contradicts what you just said. The Converter o

Re: File's Owner

2008-05-25 Thread Ken Thomases
On May 25, 2008, at 2:15 AM, Johnny Lundy wrote: And, if I don't understand something, I will ask why. This is not magic - there is actual computer code behind that File's Owner concept, and it is deterministic, not vague, not abstract, not a philosophical enigma, not random, not ambiguous.

Re: File's Owner

2008-05-25 Thread Jens Alfke
On 25 May '08, at 12:15 AM, Johnny Lundy wrote: And you wonder why I am still confused. That paragraph from Apple directly contradicts what you just said. In some cases model objects are instantiated directly in nib files, but it's not typical. It generally happens if the model object is a

Re: File's Owner

2008-05-25 Thread Scott Anguish
On May 25, 2008, at 3:15 AM, Johnny Lundy wrote: Well, tell that to the guy who wrote the Currency Converter Using Bindings tutorial. See the last sentence here: "This concrete example should help you understand what the value binding’s configuration implies: The content of the text field

Re: Scope in an interface?

2008-05-25 Thread Jens Alfke
On 24 May '08, at 10:29 PM, Graham Reitz wrote: Can I think of an @interface as something similar to a c++ class? Yes. @interface is a class declaration, just as 'class' is in C++. The variables declared in the "{...}" block are member variables, and are protected by default. The object m

Re: How to Delay, Wait, Pause...

2008-05-25 Thread stephen joseph butler
On Sun, May 25, 2008 at 1:45 AM, Steve Steinitz <[EMAIL PROTECTED]> wrote: > Hello, > > This is hard to google for because they are such common words: > > how do I delay, wait, pause for a tenth of a second? Hmm... someone correct me if I'm wrong, but I believe the run loop is re-enterable. So you

Re: Spaces causes sheet to go behind parent window

2008-05-25 Thread Seth Willits
On May 24, 2008, at 11:53 PM, Justin Williams wrote: I'm running into an odd issue with Spaces. If a user browses to a different Space while a sheet is dropped in my application and then clicks my app's Dock icon, the sheet will appear behind the main window. Happens all the time with every

Re: File's Owner

2008-05-25 Thread Johnny Lundy
Well, tell that to the guy who wrote the Currency Converter Using Bindings tutorial. See the last sentence here: "This concrete example should help you understand what the value binding’s configuration implies: The content of the text field is bound to the value of the exchangeRate key, whi

Re: Faster way to test pixels?

2008-05-25 Thread Jens Alfke
On 24 May '08, at 10:55 PM, Graham Cox wrote: The purpose is to test whether a given rect intersects a rendered object (path), not just test a point against it. There are geometric techniques for doing this, that wouldn't require working with pixels. Computing the bounding box of a Bézier

Re: How to Delay, Wait, Pause...

2008-05-25 Thread Michael Vannorsdel
There's usleep, but sleeping a thread just for a very small amount of time in a loop is gonna force a context switch every iteration and really hurt performance. It might be better to poll or spin. On May 25, 2008, at 12:45 AM, Steve Steinitz wrote: This is hard to google for beca

Re: How to Delay, Wait, Pause...

2008-05-25 Thread Jens Alfke
On 24 May '08, at 11:45 PM, Steve Steinitz wrote: I don't want to use NSTimer because I just want to resume where I left off. I don't want to be in a tight loop because I need the system to finish something. I just want to pause execution for a short time. I think there was a wait() in

Re: Core Data dynamic attributes and fetching

2008-05-25 Thread Ben
On 24 May 2008, at 21:47, Ben Trumbull wrote: At 2:56 AM -0700 5/24/08, [EMAIL PROTECTED] wrote: I have a core data object graph using an SQLite store where several entities have an attribute containing a date (eg, birthDate). This is stored as a date type. I am currently implementing an