NSTextField keyboard event

2008-03-05 Thread peiyuan
Hi all, Situation: I have a window which contains several NSTextField. In these NSTextField, I want that when a user presses a key which is not a number ( 0-9), the active NSTextField will not accept the key input (that is, it does nothing). What I find on the list: I find several posts

Re: mysterious crash in [NSCell menu]

2008-03-05 Thread John C. Randolph
On Mar 5, 2008, at 5:45 AM, Hendrik Schreiber wrote: a customer of mine experiences a crash that I cannot reproduce and that I have no idea where its coming from. He is trying to export some photos from iPhoto using our export plugin (iP2F) and at some point always gets a Bus Error. I

Re: how to monitor the system status?

2008-03-05 Thread Ken Thomases
On Mar 5, 2008, at 4:13 PM, Scott.D.R wrote: As the titled mentioned, How to monitor the system status? Mac OS X provided a very powerful application Activity Monitor, which can let you inspect the system status such as CPU usage, disk usage, network usage and so on. But how to retrieve

Re: how to monitor the system status?

2008-03-05 Thread Phil
On Mar 5, 2008, at 5:13 PM, Scott.D.R wrote: Hi everyone. As the titled mentioned, How to monitor the system status? Mac OS X provided a very powerful application Activity Monitor, which can let you inspect the system status such as CPU usage, disk usage, network usage and so on. But how to

NSPopUpButton under Leopard?

2008-03-05 Thread Bazyli Zygan
Hello! Sorry to bother with such a lame question, but neither google or my own research came up with any specific answers. I'm struggling to create an app, that uses NSPopUpButton. Under Tiger, with old XCode and IB, when I've associated the menu with NSPopUpButton, I could change selected item

Re: NSOutlineView slow update w Core Data

2008-03-05 Thread David
I figured out a way around it. I added code in the controller to send the processPendingChanges message to the ManagedObjectContext. That flushes pending changes, but I still don't understand why this is needed. On Wed, Mar 5, 2008 at 12:14 AM, David Melgar [EMAIL PROTECTED] wrote: I have an

Deinterlacing QTCaptureDecompressedVideoOutput

2008-03-05 Thread Bram Loogman
Hi, When I use QTCaptureDecompressedVideoOutput to capture a still image from a QTCaptureSession with a DV camera as input device, the image is interlaced. Which looks very ugly for moving objects. I basically use the code from the 'Creating a QTKit Stop or Still Motion Application' tutorial in

Re: Localise between different versions of English

2008-03-05 Thread Christopher Nebel
On Mar 4, 2008, at 9:36 PM, Jens Alfke wrote: On 4 Mar '08, at 3:23 PM, Sean McBride wrote: There's also Canadian English (en_CA), and perhaps others too... The ISO is in the process of adding en_LOL for Lolcat, aka Kitteh or Cat Pidgin[1]. (If you don't think there's a need for this,

Re: KVO autonotifying complaining about custom setter return value

2008-03-05 Thread Jim Turner
Chris, On Tue, Mar 4, 2008 at 9:47 PM, Chris Suter [EMAIL PROTECTED] wrote: On 05/03/2008, at 2:10 PM, Kyle Sluder wrote: On Tue, Mar 4, 2008 at 11:49 AM, Jim Turner [EMAIL PROTECTED] wrote: In attempting to use a custom setter for a object, I'm getting the following message in

Re: KVO autonotifying complaining about custom setter return value

2008-03-05 Thread mmalc crawford
On Mar 5, 2008, at 9:34 AM, Jim Turner wrote: I filed a bug (rdar://problems/5781977) as this doesn't appear to be proper behavior. I'd be happy to be told I'm wrong if you can point out what I'm missing. I believe this behaves correctly. As stated in

Re: Deinterlacing QTCaptureDecompressedVideoOutput

2008-03-05 Thread Robert Douglas
I ran in to a similar problem while analyzing incoming HDV images and I didn't find any simple solution. My approach now is to create a second CVPixelBuffer with half the number of lines and copy every second line into that buffer. Or two buffers to get better temporal resolution. I

[Job Posting] Full Time Cocoa Developer

2008-03-05 Thread Brett Karopczyc
There is a position available for a full-time Cocoa Developer with Bristol Capital, Inc. in Montvale, NJ. We provide information services to the enterprise telecommunications industry under the InfoPlus brand. NOTE: The position requires an intimate knowledge of our internal frameworks

Re: Core Data, SQLite, and Housekeeping

2008-03-05 Thread Jens Alfke
On 5 Mar '08, at 9:15 AM, I. Savant wrote: Okay, well that sucks. So now the question is this: does Core Data implicitly run VACUUM? If so, when? How often? Unfortunately googling and archive-searching did not produce any obvious answers to this particular question. My guess is that the

Re: KVO autonotifying complaining about custom setter return value

2008-03-05 Thread Jim Turner
On Wed, Mar 5, 2008 at 12:00 PM, mmalc crawford [EMAIL PROTECTED] wrote: On Mar 5, 2008, at 9:34 AM, Jim Turner wrote: I filed a bug (rdar://problems/5781977) as this doesn't appear to be proper behavior. I'd be happy to be told I'm wrong if you can point out what I'm missing. I

Re: regexkit [Using NSPredicate to parse strings]

2008-03-05 Thread John Engelhart
On Mar 5, 2008, at 1:03 AM, Jens Alfke wrote: On 4 Mar '08, at 8:55 PM, John Engelhart wrote: The ICU Regex C API (the one I need to use for RegexKit, not the C+ + one, which I haven't really looked at) is very multi-threading unfriendly. Basically, the 'compiled' regex, the string being

Re: Core Data, SQLite, and Housekeeping

2008-03-05 Thread I. Savant
I don't know the answer; but it probably doesn't vacuum at every save. Vacuuming can be quite slow if the database is at all large, especially if there's already a lot of disk I/O going on. (The vacuum algorithm has to read and write every page of the database.) That certainly makes

NSStream SSL Help

2008-03-05 Thread Eric Scharff
var YAHOO = {'Shortcuts' : {}}; YAHOO.Shortcuts.hasSensitiveText = false; YAHOO.Shortcuts.sensitivityType = []; YAHOO.Shortcuts.doUlt = false; YAHOO.Shortcuts.location = us; YAHOO.Shortcuts.document_id = 0; YAHOO.Shortcuts.document_type = ; YAHOO.Shortcuts.document_title = Does NSStream\x5c\x27s

Re: Custom View drawn twice?

2008-03-05 Thread Ben Lachman
displayIfNeededIgnoringOpacity goes back up the view hierarchy looking for an opaque superview to start drawing with. Doing so was causing an infinite drawing loop. I'm pretty sure this is because you're not really supposed to be calling setNeedsDisplay...: and displayIfNeeded...: within

Re: KVO autonotifying complaining about custom setter return value

2008-03-05 Thread mmalc crawford
On Mar 5, 2008, at 11:40 AM, Jim Turner wrote: But, I still appear to have an issue with defining a custom getter/setter. Defining a property as @property (setter=mySetMethod:,getter=myMethod) id valueTest; and sending my object a valueTest message, I get the unrecognized selector sent to

Re: KVO autonotifying complaining about custom setter return value

2008-03-05 Thread mmalc crawford
On Mar 5, 2008, at 1:40 PM, Adam P Jenkins wrote: If you define a @property in the interface, then in the implementation you either need use @synthesize to have the compiler automatically generate a getter and setter, or use @dynamic to inform the compiler that you will provide the

Re: Best way to hook up Font Panel to floater (that isn't first responder)?

2008-03-05 Thread Graham
Thanks for that... I thought this seemed a bit too obvious to have overlooked and sure enough, it's new for 10.5. I should have mentioned I need a solution for 10.4 or later. Any ideas? S.O.S. On 05/03/2008, at 3:17 AM, Benjamin Stiglitz wrote: Is there a way to hook up the

re: Core Data, SQLite, and Housekeeping

2008-03-05 Thread Ben Trumbull
... so that's fine, but SQLite's documentation says of auto_vacuum: When the auto-vacuum flag is 1 (full), the freelist pages are moved to the end of the file and the file is truncated to remove the freelist pages at every commit. Note, however, that auto-vacuum only truncates the freelist

Re: KVO autonotifying complaining about custom setter return value

2008-03-05 Thread Bill Garrison
On Mar 5, 2008, at 5:14 PM, mmalc crawford wrote: One further issue for the sake of raising it: @property (setter=mySetMethod:,getter=myMethod) id valueTest; Note that this implies that the accessor methods are atomic. It's comparatively rare (unless you're using GC) that Cocoa

Re: KVO autonotifying complaining about custom setter return value

2008-03-05 Thread mmalc crawford
On Mar 5, 2008, at 2:56 PM, Bill Garrison wrote: Note that this implies that the accessor methods are atomic. It's comparatively rare (unless you're using GC) that Cocoa developers implement atomic accessor methods, so you'd typically specify: @property (nonatomic,

Re: KVO autonotifying complaining about custom setter return value

2008-03-05 Thread mmalc crawford
On Mar 5, 2008, at 2:56 PM, Bill Garrison wrote: So for most non-GC code, properties should be specified using @property (nonatomic, ...)? To address this separately as a general point: see performance and threading considerations discussed at

Re: KVO autonotifying complaining about custom setter return value

2008-03-05 Thread Jim Turner
On Wed, Mar 5, 2008 at 4:14 PM, mmalc crawford [EMAIL PROTECTED] wrote: On Mar 5, 2008, at 1:40 PM, Adam P Jenkins wrote: If you define a @property in the interface, then in the implementation you either need use @synthesize to have the compiler automatically generate a getter and

large documents with doc based app

2008-03-05 Thread Torsten Curdt
Hey guys, Using the document based skeleton there is the method - (BOOL)loadDataRepresentation:(NSData *)data ofType:(NSString *)aType or - (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error: (NSError **)outError; that gets called when files get loaded. But according to the

Re: large documents with doc based app

2008-03-05 Thread j o a r
On Mar 6, 2008, at 12:19 AM, Torsten Curdt wrote: But according to the docs NSData is limited to 2GB. What I am wondering is... How can one handle files larger than 2GB? Override the path / URL based methods from NSDocument instead, and read the interesting portions of the files

Re: KVO autonotifying complaining about custom setter return value

2008-03-05 Thread Chris Suter
On 06/03/2008, at 10:10 AM, Jim Turner wrote: Ok first, mmalc, thank you for taking the time to point out exactly what I needed to see to understand where I was going wrong. My problem stemmed from the misguided idea that properties were required for KVC/KVO. Chris' comment about using

Re: NSPreferencePane with my own private framework?

2008-03-05 Thread Ryan
Thanks for the reply. I tried changing the installation directory on my framework to use @loader_path and re-built it, but I'm still getting the same error message when trying to open the preference pane. I imagine I have to change something in the build settings for the preference pane

Re: Core Data, SQLite, and Housekeeping

2008-03-05 Thread I. Savant
If you have any performance data showing problems with internal db fragmentation (i.e. sqlite3 dbname 'vacuum' fixes it, but cp doesn't), we'd love to hear about it. Thanks, Ben, for this informative response. So what you're saying, in summary is: 1 - Vacuuming on every save is

Re: large documents with doc based app

2008-03-05 Thread Nick Zitzmann
On Mar 5, 2008, at 4:19 PM, Torsten Curdt wrote: But according to the docs NSData is limited to 2GB. What I am wondering is... How can one handle files larger than 2GB? In addition to what has been said, if you can afford to target only Leopard and only 64-bit Macs, then this limitation

Re: large documents with doc based app

2008-03-05 Thread Kyle Sluder
On Wed, Mar 5, 2008 at 6:40 PM, Torsten Curdt [EMAIL PROTECTED] wrote: I though NSData would handle the access just transparently. Otherwise that would be good to keep in mind also for files slightly smaller than 2GB :) While NSData certainly has the capability to do memory-mapped IO, it

Re: NSPreferencePane with my own private framework?

2008-03-05 Thread Nick Zitzmann
On Mar 5, 2008, at 4:44 PM, Ryan wrote: Thanks for the reply. I tried changing the installation directory on my framework to use @loader_path and re-built it, but I'm still getting the same error message when trying to open the preference pane. Are you sure it's being set, and the

RE: large documents with doc based app

2008-03-05 Thread Gary L. Wade
Try overriding readFromFile:ofType: and other similar messages for unique file needs. Hey guys, Using the document based skeleton there is the method - (BOOL)loadDataRepresentation:(NSData *)data ofType:(NSString *)aType or - (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error:

Why [NSApplication _deallocHardCore:] crash in my Safari Plug In

2008-03-05 Thread Joe Jones
Hi all, I have an NPAPI based plug in and I am trying to use a Cocoa window to create a full screen window that the plug in can use when it wants to take over the screen. All works as expected, The window displays and goes away as required and all is joy. Until you quit the application. At

Re: NSStream SSL Help

2008-03-05 Thread Jens Alfke
On 5 Mar '08, at 12:24 PM, Eric Scharff wrote: This doesn't make sense because TLS shouldn't require host name verification anyway, and I'm sure that the server's SSL certificate is valid. The cert does look valid, and matches the domain name, so that doesn't seem to be the problem.

Re: Core Data, SQLite, and Housekeeping

2008-03-05 Thread Jens Alfke
On 5 Mar '08, at 3:49 PM, I. Savant wrote: To that, I pose another question: Why, then, does it make such a huge difference when I run the vacuum command against Mail's database? After just a month of usage, Mail seems sluggish when switching between various folders, but once I run the

Re: Core Data, SQLite, and Housekeeping

2008-03-05 Thread I. Savant
Mail [which does not use CoreData, btw] might not have enabled auto_vacuum. IIRC, there were bugs in auto_vacuum in the version of sqlite that shipped in Tiger. I thought I remembered reading that Mail does not use Core Data. It does, however, use SQLite and auto_vacuum is a problem

Deferring a selector until later, but before painting

2008-03-05 Thread John Stiles
There are many times in my code where I want to defer a selector's execution until the next time the event loop runs, which is a perfect match for -performSelector:withObject:afterDelay:, passing a delay of 0.0. However, this executes after the app has repainted all the windows. Is there a way

Re: Localise between different versions of English

2008-03-05 Thread Jonathan Dann
On 5 Mar 2008, at 17:25, Christopher Nebel wrote: On Mar 4, 2008, at 9:36 PM, Jens Alfke wrote: On 4 Mar '08, at 3:23 PM, Sean McBride wrote: There's also Canadian English (en_CA), and perhaps others too... The ISO is in the process of adding en_LOL for Lolcat, aka Kitteh or Cat

Re: Why [NSApplication _deallocHardCore:] crash in my Safari Plug In

2008-03-05 Thread Peter Ammon
On Mar 5, 2008, at 4:52 PM, Joe Jones wrote: Hi all, I have an NPAPI based plug in and I am trying to use a Cocoa window to create a full screen window that the plug in can use when it wants to take over the screen. All works as expected, The window displays and goes away as required

Re: NSStream SSL Help

2008-03-05 Thread Eric Scharff
[fileInStream setProperty: NSStreamSocketSecurityLevelTLSv1 forKey: NSStreamSocketSecurityLevelKey]; //[fileInStream setProperty: NSStreamSocketSecurityLevelNegotiatedSSL forKey: NSStreamSocketSecurityLevelKey]; Are you sure that both of these properties need

Re: Core Data, SQLite, and Housekeeping

2008-03-05 Thread Ben Trumbull
If you have any performance data showing problems with internal db fragmentation (i.e. sqlite3 dbname 'vacuum' fixes it, but cp doesn't), we'd love to hear about it. Thanks, Ben, for this informative response. So what you're saying, in summary is: 1 - Vacuuming on every save is

Re: NSTextField keyboard event

2008-03-05 Thread Aki Inoue
Look at http://developer.apple.com/documentation/Cocoa/Reference/Foundation/Classes/NSFormatter_Class/Reference/Reference.html#/ /apple_ref/occ/instm/NSFormatter/ isPartialStringValid:proposedSelectedRange:originalString:originalSelectedRange:errorDescription : Aki On 2008/03/05, at 17:34,

Re: Localise between different versions of English

2008-03-05 Thread Deborah Goldsmith
Even Leopard (and Tiger, not sure about further back) has Klingon (tlhlngan Hol)! Don't know about the ISO code for it though. tlh is the ISO code for Klingon (tlhIngan Hol). Note that fictional languages and scripts are considered perfectly acceptable for ISO and Unicode as long as there

Re: Why [NSApplication _deallocHardCore:] crash in my Safari Plug In

2008-03-05 Thread Joe Jones
Yeah, did that. Even took the step of not calling close or ever manually releasing the window. It doesn't matter. At the time where my close occurs the retain count is 2 so how it is going away I don't know. I never get called on dealloc nor does the window get called on autorelease which I

Re: Undo and Core Data issue

2008-03-05 Thread Ben Trumbull
At 6:58 PM -0800 3/5/08, Michael Latta wrote: The calls are on the Will/Did undo/redo notifications not the KVO callbacks on object changes. Ah, okay. There shouldn't be any need to call -processPendingChanges there, unless you're programmatically working with your own undo groups. What I

Re: NSTextField keyboard event

2008-03-05 Thread peiyuan
Big thanks. The answer is the isPartialStringValid:proposedSelectedRange:originalString:originalSelectedRange:errorDescription. Thank you again. Pei-Yuan @KCodes -- From: Aki Inoue [EMAIL PROTECTED] Sent: Thursday, March 06, 2008 10:51 AM

Re: NSPreferencePane with my own private framework?

2008-03-05 Thread Adam Leonard
In your preference pane project, make sure @loader_path/../Frameworks is in the target's Framework Search Paths. If that doesn't work, you might also try @bundle_path (set in both the preference pane and framework) Adam Leonard On Mar 5, 2008, at 3:44 PM, Ryan wrote: Thanks for the

Re: Send an event to another app

2008-03-05 Thread Nick Zitzmann
On Mar 5, 2008, at 9:20 PM, Alex Kac wrote: I realize that under OS X things are different and they simply don't work that way. I also know that menus do have a handler and I *assume* that even if a menu is greyed out or a sheet is open (which I understand is modal) that the main window

Re: Send an event to another app

2008-03-05 Thread Alex Kac
I actually thought of that first - even though I'm a Win32 dev, I am a constant Mac user since 1994. But I'm not an AppleScript expert and I kept getting errors saying it didn't understand the message. I do know the app I'm working with is Cocoa based so I would assume its NSDocument

Re: Send an event to another app

2008-03-05 Thread Kyle Sluder
On Wed, Mar 5, 2008 at 11:47 PM, Alex Kac [EMAIL PROTECTED] wrote: I actually thought of that first - even though I'm a Win32 dev, I am a constant Mac user since 1994. But I'm not an AppleScript expert and I kept getting errors saying it didn't understand the message. I do know the app I'm

Re: Undo and Core Data issue

2008-03-05 Thread Michael Latta
Here are the accessor methods I use for the property: - (NSData*)transform { [self willAccessValueForKey:@transform]; NSData *result = [self primitiveValueForKey:@transform]; [self didAccessValueForKey:@transform]; return result; } -

Re: Undo and Core Data issue

2008-03-05 Thread Michael Latta
I just ran a test where I commented out the calls that start/end grouping. Now the undo menu item is not enabled. This suggests that either the UI is not using the same undo manager as CoreData, or the changes are not being recorded. Back to the documentation. Michael On Mar 5, 2008,

Re: Undo and Core Data issue

2008-03-05 Thread Michael Latta
It was separate undo managers. I overrid the undoManager method of the view to use the one from the document and things are working now. Thanks for the help in what to check. Michael On Mar 5, 2008, at 7:53 PM, Ben Trumbull wrote: At 6:58 PM -0800 3/5/08, Michael Latta wrote: The calls

Need help with NSToolbarItem subclass and custom view

2008-03-05 Thread Matthew Delves
Greetings, I've been reading through some of the apple documentation and have a basic understanding of what needs to be done when creating an NSToolbarItem subclass that contains a custom view. What I'm not sure about is how to pass any mouse click events through to the custom view rather

Re: Need help with NSToolbarItem subclass and custom view

2008-03-05 Thread Jens Alfke
On 4 Mar '08, at 12:47 AM, Matthew Delves wrote: What I'm not sure about is how to pass any mouse click events through to the custom view rather than have them handled by the NSToolbarItem. Currently the custom view contains an NSSlider and an NSTextField. AppKit's regular

Re: Deferring a selector until later, but before painting

2008-03-05 Thread Ken Ferry
On Mar 5, 2008, at 5:41 PM, j o a r [EMAIL PROTECTED] wrote: On Mar 6, 2008, at 2:12 AM, John Stiles wrote: Right now in my app, there are some controls which appear and then their state changes a fraction of a second later, and I'd like to avoid the visually jarring pop effect of a

CoreData fed ImageView blank on first run.

2008-03-05 Thread Ben Lachman
I have an NSImageView subclass that displays thumbnails of a CoreData attribute via its value binding. The thumbnail (an NSImage) is stored as a transient attribute and updated lazily as needed. This all works and looks great except for the first time the app is launched(and sets up a