Re: NSTextField black outline, not drawing in background thread when in a custom NSControl?

2009-09-21 Thread aaron smith
Hey Graham, thanks for the reply. Would you mind glancing at some code quickly? I've been banging my head against the wall on this one. Here's my view that builds out a search looking control (extends NSView). http://pastebin.com/m5fd70532 and here's the code that builds the scale 9 background

Core Data threading fun

2009-09-21 Thread Luke Evans
I have a server app that responds to network requests, making use of a Core Data database to serve responses. Some requests update the database. I have chosen to allow requests to arrive on multiple threads, and intend for these threads to use Core Data directly. In keeping with Core

Re: Core Data threading fun

2009-09-21 Thread Kyle Sluder
Have you remembered to merge changes whenever a thread's MOC posts NSManagedObjectContextDidSaveNotification? If the objects which are seeing the stale properties haven't been faulted out or hit their staleness interval, you will see this behavior. Take a look at the NSManagedObject methods

Re: favicon of address

2009-09-21 Thread Jean-Daniel Dupas
As not everybody like the nasty ico file format, some web developer are nice enough to use 32 bits PNG. link rel=icon type=image/png href=/favicon.png/ So, without page content, I don't see how you would now where the favicon is. Le 21 sept. 2009 à 01:11, Mike Abdullah a écrit : The best

enable/disable/check file Sharing from code

2009-09-21 Thread Georg Seifert
Hi, Is there a way to enable and disable file sharing from code. I only found this: /usr/sbin/AppleFileServer It seems to work but if I use it, the Sharing prefPane does not show the enabled state. And is there a way to check if file sharing is running? Are there recommended approaches to

NSURLConnection inserting Accept-Language and Accept headers

2009-09-21 Thread Michael C . Silva
Is there anyway to completely remove these headers from being inserted by NSURLConnection? They are not present in my NSMutableURLRequest, but show up in the stream sent out by the NSURLConnection. I see no way to control this. Thanks, Mike ___

Help needed with orientation to bindings

2009-09-21 Thread Graham Cox
Hi all, So far I haven't used bindings to any serious extent, but I thought it was about time I got with the program. As luck would have it, one of my interfaces is showing some slightly buggy behaviour, so I thought it might be an opportunity to replace its implementation with a

[OT] Re: enable/disable/check file Sharing from code

2009-09-21 Thread Alastair Houghton
On 21 Sep 2009, at 10:50, Georg Seifert wrote: Is there a way to enable and disable file sharing from code. I only found this: /usr/sbin/AppleFileServer It seems to work but if I use it, the Sharing prefPane does not show the enabled state. And is there a way to check if file sharing is

Core Data memory not freed after reset

2009-09-21 Thread Sebastian Morsch
Hi, in my SQLite backed Core Data app, a search action fetches from a large number of objects (1.000.000) only to show them in a table. When the user exits search mode (search string empty), I'd like to free the managed objects to restore the app's normal memory footprint. I do that by

Re: Help needed with orientation to bindings

2009-09-21 Thread Keary Suska
On Sep 21, 2009, at 6:20 AM, Graham Cox wrote: So, I have objects that can be selected. None, one or many objects might be in the selection. The current selection is available as an array property in the base controller (NSWindowController subclass) of this particular UI. Each selected

Re: Optimizing Enormous lists in NSBrowser

2009-09-21 Thread Scott Ribe
For normal-sized directories, this works pretty well. However, in my worst-case scenario of a flat directory containing 1 million files... Depending on what your purpose here is, you might also benchmark how the Finder handles increasingly large directories, and set that as the bar to match

Any way to tell why a window is closing?

2009-09-21 Thread Scott Ribe
Within -windowWillClose, I need to know whether or not the user clicked the close button on the window. Please note: this is not for some crazy un-Mac-like UI idea, it is for debugging purposes. -- Scott Ribe scott_r...@killerbytes.com http://www.killerbytes.com/ (303) 722-0567 voice

Re: enable/disable/check file Sharing from code

2009-09-21 Thread James Bucanek
Georg Seifert mailto:georg.seif...@gmx.de wrote (Monday, September 21, 2009 2:50 AM +0200): Is there a way to enable and disable file sharing from code. Almost all background services are universally controlled by launchd. See man launchctl, launchd, et al. -- James Bucanek

Re: Optimizing Enormous lists in NSBrowser

2009-09-21 Thread Dave DeLong
That's a great question. Simple tests show that Finder can handle a folder of a million files in about 2-3 minutes (more than twice as fast as what I described in my original email). Dave On Sep 21, 2009, at 9:01 AM, Scott Ribe wrote: For normal-sized directories, this works pretty well.

Re: Any way to tell why a window is closing?

2009-09-21 Thread Uli Kusterer
On 21.09.2009, at 17:15, Scott Ribe wrote: Within -windowWillClose, I need to know whether or not the user clicked the close button on the window. Please note: this is not for some crazy un-Mac-like UI idea, it is for debugging purposes. For debugging, you could probably walk the view

Re: Optimizing Enormous lists in NSBrowser

2009-09-21 Thread Graham Cox
On 22/09/2009, at 1:20 AM, Dave DeLong wrote: Simple tests show that Finder can handle a folder of a million files in about 2-3 minutes That's still effectively unusable. Ideally if the list can't display more than, say 50 files at a time (depends on how big your screen is, etc), then

Re: Any way to tell why a window is closing?

2009-09-21 Thread Randall Meadows
On Sep 21, 2009, at 9:15 AM, Scott Ribe wrote: Within -windowWillClose, I need to know whether or not the user clicked the close button on the window. I think you can get the instance of the button, can't you? Then set a custom action on it.

Re: Help needed with orientation to bindings

2009-09-21 Thread Graham Cox
On 22/09/2009, at 12:55 AM, Keary Suska wrote: Bindings don't handle aggregate/coalesce. You will need to do that yourself in the main or a mediating model. Observe the controller's selection (or table view notifications) to update on the fly. Ah, OK. That's perhaps why I couldn't see how

an app that never quits

2009-09-21 Thread Erick Calder
I want to write a daemon for the iPhone. my goal is to record the orientation of the phone across time for later analysis. I am unsure how this could be done since it seems only one application gets to run at a time i.e. when the user takes a call my program quits. can this be done?

Tablet events from ordinary touchpad?

2009-09-21 Thread Sander Stoks
Hello all, In a program I'm writing, I'm getting nice results from my Wacom tablet. However, I can't discern between ordinary mouse drags (via the trackpad on my MBP) and real Wacom events. The reason I want to do this is because the normal mouse events seem to have a bogus pressure

Capturing content programatically

2009-09-21 Thread Achint Sandhu
Hi, Is there a way to programatically capture content from different applications in osx. As an example, I'd like to be able to get a webarchive of the current web page being displayed in safari. I know this can be done with applescript, but I'm not sure how to go about doing this in

Class for external monitor?

2009-09-21 Thread Jacob Schwartz
Hey everyone, I'm new to this mailing list and also new to objective-c/cocoa programming. I've gone through a book I picked up and I wanted to try to make a simple, run in the background application. To get to the point, I was looking through the documentation was looking for some class

/Library/Preferences Writable By Everyone

2009-09-21 Thread Ken J.
Hello all, this is a question regarding to the permission set on /Library/Preferences in Leopard. I ran this code as a non-admin user: (I am strict to myself to not use admin accounts other then installs/updates.) CFPreferencesSetValue(keyName, valueString, appID,

Architecture for concurrent network client

2009-09-21 Thread Sixten Otto
I'm trying to work out in my head the best way to structure a Cocoa app that's essentially a concurrent download manager. There's a server the app talks to, the user makes a big list of things to pull down, and the app processes that list. (It's not using HTTP or FTP, so I can't use the

getting started on bindings = problems with NSMutableArray - NSArrayController - NSTableView

2009-09-21 Thread Colin Howarth
Hi all, I've tried various searches, Apple documentation and example code, but my code stubbornly refuses to work :-( I'm trying to do this in conjunction with Interface Builder... I have an instance of an NSMutableArray of LensElements in my AppDelegate. I have an NSArrayController in

Job Posting: Experienced Cocoa User Interface Developer (full time position, New York City)

2009-09-21 Thread boxworkjobs
Boxwork is seeking an experienced UI developer with Cocoa experience to augment its digital capture software team. The developer will design interfaces to manage complex color and image manipulation tasks. Responsibilities: • Participate in design activities with team members

Re: an app that never quits

2009-09-21 Thread Dave DeLong
Unless you're running your app on a jailbroken iPhone, or you leave your app running all the time, what you are asking is not possible. IIRC, when the user takes a call, your app does not necessarily terminated, but the user can choose to switch to the phone app, which would kill your app.

Re: an app that never quits

2009-09-21 Thread BJ Homer
On Sat, Sep 19, 2009 at 1:07 AM, Erick Calder e...@arix.com wrote: I want to write a daemon for the iPhone. my goal is to record the orientation of the phone across time for later analysis. I am unsure how this could be done since it seems only one application gets to run at a time i.e.

Re: Any way to tell why a window is closing?

2009-09-21 Thread Scott Ribe
I think you can get the instance of the button, can't you? Then set a custom action on it. And... Or actually, I vaguely remember there may be an API for getting the close button these days. Ah, I see standardWindowButton now. I'd never noticed that when looking (I think it didn't register

Re: Class for external monitor?

2009-09-21 Thread Graham Cox
On 20/09/2009, at 5:09 AM, Jacob Schwartz wrote: I was looking through the documentation was looking for some class that would act as a reference to an external monitor or whatever is plugged into a laptops DVI port. My search came up empty, but I was hoping you guys could point me in the

Re: /Library/Preferences Writable By Everyone

2009-09-21 Thread Glenn L. Austin
On Sep 20, 2009, at 3:00 AM, Ken J. wrote: So I checked the folder permission to find out it's: drwxrwxrwx 67 root admin 2278 Sep 20 02:35 Preferences Mine is: drwxrwxr-x 113 root admin 3842 Sep 21 08:10 /Library/Preferences -- Glenn L. Austin, Computer Wizard and Race Car Driver

Re: Optimizing Enormous lists in NSBrowser

2009-09-21 Thread Jean-Francois Dontigny
Hi, I don't know how helpful to you this could be, but you might want to take a look at: http://developer.apple.com/mac/library/documentation/Performance/Conceptual/ FileSystem/FileSystem.html#//apple_ref/doc/uid/1161 You might be able to salvage something from the samples there. JFD On

Re: an app that never quits

2009-09-21 Thread Clark Cox
On Sat, Sep 19, 2009 at 9:07 AM, Erick Calder e...@arix.com wrote: I want to write a daemon for the iPhone.  my goal is to record the orientation of the phone across time for later analysis.  I am unsure how this could be done since it seems only one application gets to run at a time i.e. when

Re: getting started on bindings = problems with NSMutableArray - NSArrayController - NSTableView

2009-09-21 Thread Sean Kline
It does not appear that you have a dataSource. You need to implement: - (int)numberOfRowsInTableView:(NSTable View *)aTableView ; - (id)tableView:(NSTableView *)aTableView objectValueForTableColumn:(NSTableColumn *)aTableColumn row:(int)rowIndex; - Sean On Sun, Sep 20, 2009 at 4:51 PM, Colin

Re: Capturing content programatically

2009-09-21 Thread Jens Alfke
On Sep 19, 2009, at 8:09 AM, Achint Sandhu wrote: Is there a way to programatically capture content from different applications in osx. Not in general. It depends on how scriptable the application is. As an example, I'd like to be able to get a webarchive of the current web page being

Re: Class for external monitor?

2009-09-21 Thread Uli Kusterer
On 19.09.2009, at 21:09, Jacob Schwartz wrote: I'm new to this mailing list and also new to objective-c/cocoa programming. I've gone through a book I picked up and I wanted to try to make a simple, run in the background application. Look at the list of Info.plist keys to see how to do a

Re: Capturing content programatically

2009-09-21 Thread Randall Meadows
On Sep 19, 2009, at 9:09 AM, Achint Sandhu wrote: Hi, Is there a way to programatically capture content from different applications in osx. As an example, I'd like to be able to get a webarchive of the current web page being displayed in safari. I know this can be done with

Re: Core Data memory not freed after reset

2009-09-21 Thread Quincey Morris
On Sep 21, 2009, at 05:40, Sebastian Morsch wrote: in my SQLite backed Core Data app, a search action fetches from a large number of objects (1.000.000) only to show them in a table. When the user exits search mode (search string empty), I'd like to free the managed objects to restore the

Re: Architecture for concurrent network client

2009-09-21 Thread Jens Alfke
On Sep 20, 2009, at 8:43 AM, Sixten Otto wrote: One way to approach this might be to create N threads, each of which would own a connection, and wait on the request queue You don't need concurrency or threads to handle socket connections. The 'Mac way' is to use asynchronous I/O, hooking

Re: Any way to tell why a window is closing?

2009-09-21 Thread Jens Alfke
On Sep 21, 2009, at 8:15 AM, Scott Ribe wrote: Within -windowWillClose, I need to know whether or not the user clicked the close button on the window. Well, if the user clicked the close button your -windowShouldClose delegate method will be called first. You could set a flag in there,

Re: Optimizing Enormous lists in NSBrowser

2009-09-21 Thread Jens Alfke
On Sep 21, 2009, at 8:28 AM, Graham Cox wrote: Ideally if the list can't display more than, say 50 files at a time (depends on how big your screen is, etc), then it shouldn't touch more than 50 files on disk. It has never really managed that however, and maybe there are fundamental

Re: NSURLConnection inserting Accept-Language and Accept headers

2009-09-21 Thread Jens Alfke
On Sep 21, 2009, at 5:08 AM, Michael C.Silva wrote: Is there anyway to completely remove these headers from being inserted by NSURLConnection? They are not present in my NSMutableURLRequest, but show up in the stream sent out by the NSURLConnection. I see no way to control this. I don't

Oh notification, where are you?

2009-09-21 Thread Michael Thon
When I instantiate and run an NSMetadataQuery on the main thread I can register for, and receive its notifications, but when I try to run the same code on a separate thread it seems like the notifications are not being delivered. I assumed that NSMetadataQuery was still delivering its

Re: favicon of address

2009-09-21 Thread Jens Alfke
The best engineered approach would probably be to load the page up into a WebView, BUT use the WebResourceLoadDelegate to stop it wasting time downloading any resource that isn't the favicon. WebView has a lot of overhead! It would be much more efficient to just use NSXMLDocument to

Re: Menu shortcuts without modifiers?

2009-09-21 Thread Uli Kusterer
On 18.09.2009, at 23:07, Peter Ammon wrote: For key events without modifiers, like hitting the spacebar, the first responder of the key window should get first crack via keyDown:. So I'm not sure why you're seeing the behavior you describe. I wrote a quick test with a focused text field

Re: getting started on bindings = problems with NSMutableArray - NSArrayController - NSTableView

2009-09-21 Thread Quincey Morris
On Sep 20, 2009, at 13:51, Colin Howarth wrote: It's really frustrating. The examples I find either don't seem to fit what I'd like to do (NSMutableArray - NSArrayController - NSTableView). And/or they use ancient versions of IB (which keeps changing). Or they don't use IB at all. Or, like

Re: Capturing content programatically

2009-09-21 Thread Mike Abdullah
On 19 Sep 2009, at 16:09, Achint Sandhu wrote: Hi, Is there a way to programatically capture content from different applications in osx. As an example, I'd like to be able to get a webarchive of the current web page being displayed in safari. I know this can be done with applescript,

Re: /Library/Preferences Writable By Everyone

2009-09-21 Thread Alastair Houghton
On 20 Sep 2009, at 11:00, Ken J. wrote: I did a lot of research and was confident that this would NOT write the plist file since it requires an Admin-user for an AnyUser domain. But it is now in the /Library/Preferences as com.example.test.plist and is the case with all the non-admin account I

Re: enable/disable/check file Sharing from code

2009-09-21 Thread Georg Seifert
Is there a way to enable and disable file sharing from code. Almost all background services are universally controlled by launchd. See man launchctl, launchd, et al. This is not exactly my problem. I can start file sharing with just calling /usr/sbin/AppleFileServer. My question was how

Re: /Library/Preferences Writable By Everyone

2009-09-21 Thread Jeff Johnson
On Sep 20, 2009, at 5:00 AM, Ken J. wrote: I did a lot of research and was confident that this would NOT write the plist file since it requires an Admin-user for an AnyUser domain. But it is now in the /Library/Preferences as com.example.test.plist and is the case with all the non-admin account

Re: Class for external monitor?

2009-09-21 Thread Jacob Schwartz
Yeah, monitor without menu bar will work great, thank you and thanks to Graham, -Jake On Sep 21, 2009, at 11:55 AM, Scott Ribe wrote: Well I don't think there's a way to directly ask for the external monitor, but look at NSScreen first. Remember, on Mac it is easy to move the menu bar to

Re: Oh notification, where are you?

2009-09-21 Thread Jerry Krinock
On 2009 Sep 21, at 09:31, Michael Thon wrote: In the sendNotification: method I send the notification to the other thread using performSelector: onThread: however sendNotification: is never even called. Either the notifications are not, in fact being sent to the main thread or I'm doing

Re: Printing to NSData

2009-09-21 Thread David Duncan
On Sep 18, 2009, at 8:35 PM, Gerriet M. Denkmann wrote: Is this a bug or did I miss some magical incantation here? No incantation you've missed. Unless you want to do the pagination and assembly yourself (you probably don't) you will have to write to file and create a new PDF from it. I

Re: Core Data threading fun

2009-09-21 Thread Luke Evans
Hi Kyle, Actually that's exactly what the doctor ordered (I think). I had missed this facet of using Core Data in across multiple threads. So, thank you very much. I'm sure you have saved me a lot of time. One last question comes to mind: As the NSManagedObjectContextDidSaveNotification will

Re: Optimizing Enormous lists in NSBrowser

2009-09-21 Thread Alastair Houghton
On 21 Sep 2009, at 17:27, Jens Alfke wrote: (In practice, the HFS+ filesystem does return filenames in alphabetical order, although I think it's just sorted by Unicode codepoint, It's a little more complicated in practice; case-insensitive HFS+ sorts by means of a case-insensitive

Debugging IB 3.2 problem

2009-09-21 Thread Robert Mullen
I have a problem with IB 3.2 in one of my plugins. I get the following error message: ibtool failed with exception: Some objects didn't get the ibBeginArchivingDocument:withContext: callback. A class has probably overriden the method without calling through to super. I don't want a

Re: Tablet events from ordinary touchpad?

2009-09-21 Thread Sander Stoks
Hello all, Thanks to the Event Taps Testbench by PreFab Software (thanks, Bill) I was able to confirm that the tablet was indeed sending out different events. The pressure value was correctly set to 1.0 by the ordinary mouse events (it was a typo elsewhere that caused my

[OT] Re: enable/disable/check file Sharing from code

2009-09-21 Thread Alastair Houghton
On 21 Sep 2009, at 17:56, Georg Seifert wrote: This is not exactly my problem. I can start file sharing with just calling /usr/sbin/AppleFileServer. My question was how to to it that would also check the checkbox and respect the settings in the sharing pane (enable afs, smb and ftp it is

NSManagedObject Initialization Methods Not Called

2009-09-21 Thread Richard Somers
I have a core data document based application. When a file on the disk is opened -awakeFromInsert and -awakeFromFetch are never called for one of my NSManagedObject objects. Why is not one of these methods getting called when the object is loaded into memory from disk? Richard

Re: Debugging IB 3.2 problem

2009-09-21 Thread Jonathan Hess
On Sep 21, 2009, at 11:54 AM, Robert Mullen wrote: I have a problem with IB 3.2 in one of my plugins. I get the following error message: ibtool failed with exception: Some objects didn't get the ibBeginArchivingDocument:withContext: callback. A class has probably overriden the method

Re: Class for external monitor?

2009-09-21 Thread Uli Kusterer
Am 21.09.2009 um 19:08 schrieb Jacob Schwartz: Yeah, monitor without menu bar will work great, thank you and thanks to Graham, Keep in mind that there may be more than two screens. Put a second GPU in a Mac Pro and you can already have 4 screens. Cheers, -- Uli Kusterer The Witnesses of

Re: Architecture for concurrent network client

2009-09-21 Thread Sixten Otto
On Mon, Sep 21, 2009 at 12:20 PM, Jens Alfke j...@mooseyard.com wrote: You don't need concurrency or threads to handle socket connections. The 'Mac way' is to use asynchronous I/O, hooking up the socket connections to the runloop and getting callbacks when data is available. That's true, and I

Re: Capturing content programatically

2009-09-21 Thread Achint Sandhu
Thanks to everyone for the prompt response. I'll proceed with the NSAppleScript approach as I'd originally planned. Cheers, Achint On 2009-09-21, at 12:36 PM, Mike Abdullah wrote: On 19 Sep 2009, at 16:09, Achint Sandhu wrote: Hi, Is there a way to programatically capture content from

Re: an app that never quits

2009-09-21 Thread Erick Calder
On Sep 21, 2009, at 8:54 AM, Greg Reichow wrote: Possible - yes Possible without violating your developer agreement - No ok, perhaps there's another way I can solve my problem. I have a little app called Trapster that uses something called push technology... I think what it means is that

Why am I always getting the linker error: 'duplicate symbol'...?

2009-09-21 Thread Frederick C. Lee
I'm trying to replace #define directives with c datatype directives.Example: (1) #define x 123 versus... (2) const unsigned x = 123; I place this at the top of the .h (or .m) file, outside of any class or method as stand alone. However, every time I try to use the (2) declaration (within a .h

Re: Core Data threading fun

2009-09-21 Thread Kyle Sluder
On Mon, Sep 21, 2009 at 11:43 AM, Luke Evans l...@eversosoft.com wrote: As the NSManagedObjectContextDidSaveNotification will be posted on the main thread, is it safe to do a -mergeChangesFromContextDidSaveNotification: on the main thread for any given MOC? This led to confusion a few months

Re: an app that never quits

2009-09-21 Thread Sixten Otto
On Mon, Sep 21, 2009 at 4:15 PM, Erick Calder e...@arix.com wrote: ok, perhaps there's another way I can solve my problem.  I have a little app called Trapster that uses something called push technology... I think what it means is that some server can send my app a signal and even though the

Re: Why am I always getting the linker error: 'duplicate symbol'...?

2009-09-21 Thread Kyle Sluder
On Mon, Sep 21, 2009 at 1:19 PM, Frederick C. Lee amourinet...@gmail.com wrote: I place this at the top of the .h (or .m) file, outside of any class or method as stand alone. However, every time I try to use the (2) declaration (within a .h file) the linker gives the error: 'duplicate symbol

Re: Tablet events from ordinary touchpad?

2009-09-21 Thread Uli Kusterer
Am 21.09.2009 um 21:05 schrieb Sander Stoks: However, I'm still not getting the tabletProximity: event in my NSView. In the Event Tabs Testbench I do see it. Is there anything special I must do to my NSView to receive these tablet-only events? I don't think there was anything special

Re: Architecture for concurrent network client

2009-09-21 Thread Jens Alfke
On Sep 21, 2009, at 10:14 AM, Sixten Otto wrote: I don't think that that gets me out of the problem I was really trying to ask about, though, which is how to manage getting the work from the (single) queue of requests from the user to the exactly N persistent connections available to the

Re: Why am I always getting the linker error: 'duplicate symbol'...?

2009-09-21 Thread Jens Alfke
On Sep 21, 2009, at 1:24 PM, Kyle Sluder wrote: You might want to review your favorite C documentation. I always preferred KR. Specifically, look up the keyword extern in the index. —Jens___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: Problem with fontDescriptorWithFontAttributes:

2009-09-21 Thread Laurent Daudelin
On Sep 19, 2009, at 00:03, John C. Randolph wrote: Looks like NSFontColorAttribute is deprecated after 10.4. Try NSForegroundColorAttributeName instead. -jcr John, I just tried this: NSFontDescriptor *currentFontDescriptor = [[self font] fontDescriptor]; NSMutableDictionary

Re: Why am I always getting the linker error: 'duplicate symbol'...?

2009-09-21 Thread Frederick C. Lee
I suspected such.Thanks to all. I'm assuming 'const datatype' is better then the compiler directive '#define', due to the use of the compiler for more-efficient code. Hence the attempt. Regards, Ric. On Mon, Sep 21, 2009 at 2:00 PM, Jens Alfke j...@mooseyard.com wrote: On Sep 21, 2009, at

Re: Why am I always getting the linker error: 'duplicate symbol'...?

2009-09-21 Thread Jesper Storm Bache
In C, the default storage class of a non-local c o n s t is extern and in C++ it is static. (the quote is from: http://www.research.att.com/~bs/examples_short.pdf) My guess is that your other application may have used C++. Therefore when you declare a const variable in a header in C you

Re: Tablet events from ordinary touchpad?

2009-09-21 Thread Raleigh Ledet
Tablet proximity events are sent to the first responder of the window the cursor is over. Which is probably not what you want. You have two options: 1) On 10.6, add a local event monitor to catch proximity events directly by the objects that care. 2) Create your own NSApplication subclass

Re: Problem with fontDescriptorWithFontAttributes:

2009-09-21 Thread Kyle Sluder
Fonts really don't have colors. I don't know why NSFontColorAttribute is defined in NSFontDescriptor.h, but none of the other attributed string attributes are in there. Why are you trying to attach a color to a font? --Kyle Sluder ___ Cocoa-dev

Re: Why am I always getting the linker error: 'duplicate symbol'...?

2009-09-21 Thread Jens Alfke
On Sep 21, 2009, at 2:15 PM, Frederick C. Lee wrote: I'm assuming 'const datatype' is better then the compiler directive '#define', due to the use of the compiler for more-efficient code. Hence the attempt. It depends. In C, a const variable of a primitive type like an integer is less

Re: Problem with fontDescriptorWithFontAttributes:

2009-09-21 Thread Laurent Daudelin
On Sep 21, 2009, at 14:23, Kyle Sluder wrote: Fonts really don't have colors. I don't know why NSFontColorAttribute is defined in NSFontDescriptor.h, but none of the other attributed string attributes are in there. Why are you trying to attach a color to a font? --Kyle Sluder Simple: I

Re: Problem with fontDescriptorWithFontAttributes:

2009-09-21 Thread Kyle Sluder
On Mon, Sep 21, 2009 at 2:29 PM, Laurent Daudelin laurent.daude...@verizon.net wrote: Simple: I want to set the font as a gray to show that the text field cell is disabled, e.g. cannot be selected. Okay, what you really want to do is set the NSForegroundColorAttributeName of the attributed

Re: Core Data threading fun

2009-09-21 Thread Luke Evans
Thanks again Kyle. Great that -mergeChangesFromContextDidSaveNotification: does the Right Thing vis-a-vis working across threads. Would be a little awkward to keep it happy otherwise. Kudos to the Core Data folks (especially since the more I learn about Core Data the more I realise just

Re: Architecture for concurrent network client

2009-09-21 Thread Sixten Otto
On Mon, Sep 21, 2009 at 4:58 PM, Jens Alfke j...@mooseyard.com wrote: connections available to the application. Somehow I need to track which/how many connections are idle, and dequeue requests to those connections. Just keep a mutable array of free connections. As I think about it more, I

Re: Why am I always getting the linker error: 'duplicate symbol'...?

2009-09-21 Thread Frederick C. Lee
This is for an iPhone application, using ObjC code with access to C-level functions and primitive data types.The original primitive types are either double, float, sci notiation(E) or unsigned int. So there's a lot of: #define de2ra 1.74532925E-2 // Degrees to Radians. #define pi

Re: Why am I always getting the linker error: 'duplicate symbol'...?

2009-09-21 Thread Greg Guerin
Frederick C. Lee wrote: I'm assuming 'const datatype' is better then the compiler directive '#define', due to the use of the compiler for more-efficient code. Hence the attempt. Is your code currently bogged down loading #defined literal values? If not, then why pursue efficiency, as

Re: Problem with fontDescriptorWithFontAttributes:

2009-09-21 Thread Steve Christensen
On Sep 21, 2009, at 2:29 PM, Laurent Daudelin wrote: On Sep 21, 2009, at 14:23, Kyle Sluder wrote: Fonts really don't have colors. I don't know why NSFontColorAttribute is defined in NSFontDescriptor.h, but none of the other attributed string attributes are in there. Why are you trying to

Re: Handling mouse events in NSCell's?

2009-09-21 Thread Lee Ann Rucker
On Sep 18, 2009, at 1:21 PM, aaron smith wrote: Ken, Yeah I read the docs. I can't figure out how to get the -stopTracking:at:inView:mouseIsUp: method to fire. Should I just be able to define that method and receive use that method when the mouse is up? Or do I have to use a combination of

Re: Why am I always getting the linker error: 'duplicate symbol'...?

2009-09-21 Thread Frederick C. Lee
I've been reading C C++ conflicts in from a URL link to ...examples_short.pdf.It appears you're right. The hassles of using 'const' 'static' versus #define just isn't worth pursuing. I'll stick to the #define stmt and keep it simple. Ric. On Mon, Sep 21, 2009 at 2:40 PM, Greg Guerin

Re: NSManagedObject Initialization Methods Not Called

2009-09-21 Thread Mike Abdullah
More information please. What store type are you using? On 21 Sep 2009, at 20:12, Richard Somers wrote: I have a core data document based application. When a file on the disk is opened -awakeFromInsert and -awakeFromFetch are never called for one of my NSManagedObject objects. Why is not

Re: Problem with fontDescriptorWithFontAttributes:

2009-09-21 Thread Laurent Daudelin
On Sep 21, 2009, at 14:47, Steve Christensen wrote: On Sep 21, 2009, at 2:29 PM, Laurent Daudelin wrote: On Sep 21, 2009, at 14:23, Kyle Sluder wrote: Fonts really don't have colors. I don't know why NSFontColorAttribute is defined in NSFontDescriptor.h, but none of the other attributed

CARenderer Example

2009-09-21 Thread Christopher J Kemsley
Hi all, I've been trying to make a class to record CALayers and their animations to QuickTime movies. I've only found two ways to do this: Poll and renderInContext I can have a timer running at some rate, and I use that to tell the layer's presentationLayer

Strategies for tracking a tricky (typing) slowdown/lag bug

2009-09-21 Thread Keith Blount
Hi, This is most probably going to come across as a dumb question to the more hardened developers here, but I am a little stumped right now and pulling my hair out so please forgive any obtuseness on my part. My app uses a heavily modified version of the OS X text system and has some typing

Re: getting started on bindings = problems with NSMutableArray - NSArrayController - NSTableView

2009-09-21 Thread Colin Howarth
On 21 Sep, 2009, at 18:36, Quincey Morris wrote: On Sep 20, 2009, at 13:51, Colin Howarth wrote: It's really frustrating. The examples I find either don't seem to fit what I'd like to do (NSMutableArray - NSArrayController - NSTableView). And/or they use ancient versions of IB (which keeps

Redraw layer during animation

2009-09-21 Thread Dave Keck
Hey list, I have a layer that draws its content based on its bounds size, and I'm animating this layer's size using a CABasicAnimation. I've set the layer's needsDisplayOnBoundsChange = YES. During the course of the scaling animation, though, the layer is not redrawn. Instead, its cached content

re: Core Data memory not freed after reset

2009-09-21 Thread Ben Trumbull
in my SQLite backed Core Data app, a search action fetches from a large number of objects (1.000.000) only to show them in a table. When the user exits search mode (search string empty), I'd like to free the managed objects to restore the app's normal memory footprint. I do that by resetting the

Re: Core Data memory not freed after reset

2009-09-21 Thread Ben Trumbull
Core Data has (or, I should say, had, since I haven't investigated the behavior in Snow Leopard) its own internal in-memory cache of object and attribute data, which means that, up to a point, data from a persistent store is in memory twice. AFAICT there's no way of unloading or controlling this

re: Core Data threading fun

2009-09-21 Thread Ben Trumbull
I have a server app that responds to network requests, making use of a Core Data database to serve responses. Some requests update the database. I have chosen to allow requests to arrive on multiple threads, and intend for these threads to use Core Data directly. In keeping with Core Data's doc

Re: FileManager Problem Post OS X 10.6 Installation

2009-09-21 Thread Jens Alfke
On Sep 21, 2009, at 3:26 PM, dct wrote: Prior to installing OS X 10.6 and Xcode 3.2 (64-bit), a bit of FileManager code for replacing one file with another, to wit: if( [mgr fileExistsAtPath:path1] ) [mgr removeFileAtPath:path1 handler:nil]; [mgr movePath:path0 toPath:path1

Re: FileManager Problem Post OS X 10.6 Installation

2009-09-21 Thread Greg Guerin
Don Thompson wrote: With the new OS X and Xcode I changed the code to: if( [mgr fileExistsAtPath:path1] ) [mgr removeItemAtPath:path1 error:NULL]; [mgr moveItemAtPath:path0 toPath:path1 error:NULL]; which fails in that: a. FileManager is aware of a file at the new location, i.e.,

Re: Strategies for tracking a tricky (typing) slowdown/lag bug

2009-09-21 Thread Jens Alfke
On Sep 21, 2009, at 3:40 PM, Keith Blount wrote: My app uses a heavily modified version of the OS X text system and has some typing lag issues. Generally it has always been fine, but in some circumstances typing would slow down (sometimes this is in part attributable to the fault of the

Re: Class for external monitor?

2009-09-21 Thread Graham Cox
On 22/09/2009, at 3:08 AM, Jacob Schwartz wrote: Yeah, monitor without menu bar will work great, thank you and thanks to Graham, You can use CGDisplayIsBuiltin() to detect integrated screens, therefore any that return NO must be external. But what the main screen is will depend on the

Re: Oh notification, where are you?

2009-09-21 Thread Rob Keniger
On 22/09/2009, at 2:31 AM, Michael Thon wrote: NSNotificationCenter *nc = [NSNotificationCenter defaultCenter]; [nc addObserver:self selector:@selector(sendNotification:) name:@NSMetadataQueryDidFinishGatheringNotification

  1   2   >