Re: Distributed Objects Performance

2008-11-14 Thread Seth Willits
On Nov 13, 2008, at 11:33 PM, Bridger Maxwell wrote: How often? 60 times per second often? Once per second often? Every minute, often? You'll need to calculate the amount of data you're expecting to transfer, worst case. I would say about every five seconds often, max. My gut instinct

Changing cursor in NSTextView's Subview

2008-11-14 Thread chaitanya pandit
Hi, List I have a NSTextView with some subviews, i want to implement tracking areas for the subViews so that whenever the mouse enters a subview the cursor changes to open hand cursor. I referred the Trackit example (http://developer.apple.com/samplecode/TrackIt/index.html#/

Re: Distributed Objects Performance

2008-11-14 Thread Jean-Daniel Dupas
Le 14 nov. 08 à 10:47, Seth Willits a écrit : On Nov 13, 2008, at 11:33 PM, Bridger Maxwell wrote: How often? 60 times per second often? Once per second often? Every minute, often? You'll need to calculate the amount of data you're expecting to transfer, worst case. I would say about

Where does stdout go in an ordinary Cocoa application?

2008-11-14 Thread Karan, Cem (Civ, ARL/CISD)
I'm using a library that has been ported over from Linux that uses fprintf() and a global variable to determine where to dump a bunch of logging information. I don't really have the option of converting all of this to syslog() or NSLog(), and I don't want to waste a bunch of time on this

[ANN] SArchiveKit: A XAR Cocoa library

2008-11-14 Thread Jean-Daniel Dupas
Hi, The SArchiveKit is a Cocoa framework to create and extract XAR archives. It supports archive signature, background file extraction, subdocument, and more. http://code.google.com/p/sarchivekit/ And it is released under MIT license. ___

CALayer and View controls

2008-11-14 Thread Fabrizio Guglielmino
Hi all, in some previous posts I was looking for information about CALayer rotation and now I can rotate layer using core animation. This mail it's about a strange behaviour, in my simple test I have a single View and a little image loaded as content of main layer. in the bottom of View there is a

Re: Where does stdout go in an ordinary Cocoa application?

2008-11-14 Thread Nick Zitzmann
On Nov 14, 2008, at 6:02 AM, Karan, Cem (Civ, ARL/CISD) wrote: So where does the output of fprintf(stdout,…) go to in a Cocoa application? If there's no tty attached, I'm pretty sure it goes straight to the console, just as stderr does. So you can read it by launching Console.app.

Adding an NSButton to a layer-hosted view

2008-11-14 Thread Michel Schinz
Hi, I have a layer-hosted view containing several layers making up the UI of my application. In a few cases, I would actually like to use standard controls *inside* of this layer-hosted view. For example, I'd like to have a standard NSButton in one location, and use an NSTextField to

Re: Where does stdout go in an ordinary Cocoa application?

2008-11-14 Thread Scott Ribe
Open Console.app. You should see your log messages, mixed in with others... Or close stdout and reopen to wherever you want. (See fclose fdup...) -- Scott Ribe [EMAIL PROTECTED] http://www.killerbytes.com/ (303) 722-0567 voice ___ Cocoa-dev

CALayer and View

2008-11-14 Thread Fabrizio Guglielmino
Hi all, in some previous posts I was looking for information about CALayer rotation and now I can rotate layer using core animation. This mail it's about a strange behaviour, in my simple test I have a single View and a little image loaded as content of main layer. in the bottom of View there is a

Re: CALayer and View controls

2008-11-14 Thread David Duncan
On Nov 14, 2008, at 8:10 AM, Fabrizio Guglielmino wrote: in some previous posts I was looking for information about CALayer rotation and now I can rotate layer using core animation. This mail it's about a strange behaviour, in my simple test I have a single View and a little image loaded as

Re: Adding an NSButton to a layer-hosted view

2008-11-14 Thread David Duncan
On Nov 14, 2008, at 8:22 AM, Michel Schinz wrote: This seems to work relatively well, except that the NSButton instance does not react to mouse events. For example, it does not perform the action or toggle its state when I click on it. Instead, my layer-hosted view gets the event (i.e. its

Re: CALayer and View controls

2008-11-14 Thread Fabrizio Guglielmino
2008/11/14 David Duncan [EMAIL PROTECTED]: On Nov 14, 2008, at 8:10 AM, Fabrizio Guglielmino wrote: in some previous posts I was looking for information about CALayer rotation and now I can rotate layer using core animation. This mail it's about a strange behaviour, in my simple test I have a

Re: CALayer and View controls

2008-11-14 Thread David Duncan
On Nov 14, 2008, at 9:12 AM, Fabrizio Guglielmino wrote: Sorry but I forgot to say my application is for iPhone so I don't need setWantsLayer:YES, I don't think this make the difference, right? Layers are always on on iPhone, so yes it makes no difference here. So, if I understand, I can

[ANN] VirtualEarthKit - Microsoft Virtual Earth for Mac and iPhone

2008-11-14 Thread Colin Cornaby
I've been working with Microsoft recently in bringing their Virtual Earth services to the Mac and iPhone. The result is VirtualEarthKit, a BSD licensed Cocoa framework, managed completely independently of Microsoft. VirtualEarthKit provides several services to Mac and iPhone programmers,

Unable to generate a PDF from textual data

2008-11-14 Thread Lee, Frederick (Ric)
Greetings: I'm trying to create a PDF from a NSString; but I'm not getting anything. What am I doing wrong? - (id)initWithData:(NSDictionary *)inData { self = [super init]; if (self != nil) { self.faxHistoryItemDict = inData; // 1) Create the PDF Data Source:

Re: Adding an NSButton to a layer-hosted view

2008-11-14 Thread Michel Schinz
Le 14 nov. 08 à 18:04, David Duncan a écrit : AppKit doesn't do hit testing via the layer tree, so by moving the button's layer, you've desynchronized the graphical location of the button with the hit test location of the button. If you want to use layer-backed AppKit views, you always

Re: Unable to generate a PDF from textual data

2008-11-14 Thread I. Savant
On Fri, Nov 14, 2008 at 1:16 PM, Lee, Frederick (Ric) [EMAIL PROTECTED] wrote: // 1) Create the PDF Data Source: CFDataRef faxMsgData = (CFDataRef)[[self.faxHistoryItemDict objectForKey:@msg] dataUsingEncoding: NSUTF8StringEncoding]; CGDataProviderRef faxMsgDataRef =

Re: Adding an NSButton to a layer-hosted view

2008-11-14 Thread David Duncan
On Nov 14, 2008, at 10:33 AM, Michel Schinz wrote: Le 14 nov. 08 à 18:04, David Duncan a écrit : AppKit doesn't do hit testing via the layer tree, so by moving the button's layer, you've desynchronized the graphical location of the button with the hit test location of the button. If you

Re: Unable to generate a PDF from textual data

2008-11-14 Thread David Duncan
On Nov 14, 2008, at 10:16 AM, Lee, Frederick (Ric) wrote: CFDataRef faxMsgData = (CFDataRef)[[self.faxHistoryItemDict objectForKey:@msg] dataUsingEncoding: NSUTF8StringEncoding]; This is not PDF data, this is just text. CGPDFDocumentCreateWithProvider() expects valid PDF data to be

Re: Unable to generate a PDF from textual data

2008-11-14 Thread Charles Steinman
Are you certain that faxMsgData is valid PDF data? It sounds like it isn't being recognized as a PDF. Cheers, Chuck --- On Fri, 11/14/08, Lee, Frederick (Ric) [EMAIL PROTECTED] wrote: From: Lee, Frederick (Ric) [EMAIL PROTECTED] Subject: Unable to generate a PDF from textual data To:

Re: Unable to generate a PDF from textual data

2008-11-14 Thread Michael Ash
On Fri, Nov 14, 2008 at 1:16 PM, Lee, Frederick (Ric) [EMAIL PROTECTED] wrote: Greetings: I'm trying to create a PDF from a NSString; but I'm not getting anything. What am I doing wrong? Are you thinking that your code will build a PDF which contains a visual representation of the text

Re: Determining GUI ivar assignments in IB

2008-11-14 Thread Quincey Morris
On Nov 14, 2008, at 11:09, Brian Stern wrote: On Nov 14, 2008, at 1:58 PM, Jonathon Kuo wrote: Okay, let me rephrase the question... I have an NSButton in my MainMenu.nib, and I've connected it to my controller class's myButton ivar by control-drag. Repeat this many times. Now, is there

Notifying that a TextView's content has been changed?

2008-11-14 Thread Jean-Nicolas Jolivet
I have a TextView set up so its data is bound to my User Defaults controller so that its content is saved when I press a button... If I enter some text manually and click on my Save button (the one that saves the preference) everything goes well, however, if I set some text to my TextView

Core Data, Filtering by PopUps Bindings Confusion

2008-11-14 Thread Brad Gibbs
I've been using Jonathan Dann's excellent Core Data Sorted sample code to create an outline view consisting of two concrete entities -- Categories and Types (each parent Category can have an unlimited number of children types). The only real adjustment I've made to his code is to put the

How do you get the OS X version number in C or C++?

2008-11-14 Thread Tom Fortmann
Is there a core foundation function for querying the Mac OS X operating system name and version information? The uname() API returns the Darwin kernel version information, but I need to find the OS X 10.x.x information. Tom Fortmann Xcape Solutions

Tabbing PDF Annotation Editor between annotations in edit mode?

2008-11-14 Thread Joel Norvell
Dear Cocoa-dev People, I've been tangling with this question most of the morning and was hoping for some guidance on how to proceed. I want to modify the PDF Annotation Editor so that it will tab from annotation-to-annotation in edit mode, just like it does in test mode. What is the key to

Re: How do you get the OS X version number in C or C++?

2008-11-14 Thread chaitanya pandit
+ (BOOL)MacOSTigerOrLower { UInt32 version; return (Gestalt(gestaltSystemVersion,(SInt32 *) version) == noErr) (version 0x01050 ); } On 15-Nov-08, at 1:36 AM, Tom Fortmann wrote: Is there a core foundation function for querying the Mac OS X operating system name and version

Re: Notifying that a TextView's content has been changed?

2008-11-14 Thread chaitanya pandit
Try posting a NSTextDidChangeNotification with your text view as the object, after you do setString: On 15-Nov-08, at 1:23 AM, Jean-Nicolas Jolivet wrote: I have a TextView set up so its data is bound to my User Defaults controller so that its content is saved when I press a button... If

Re: How do you get the OS X version number in C or C++?

2008-11-14 Thread Randall Meadows
On Nov 14, 2008, at 1:06 PM, Tom Fortmann wrote: Is there a core foundation function for querying the Mac OS X operating system name and version information? The uname() API returns the Darwin kernel version information, but I need to find the OS X 10.x.x information. If nothing else,

Re: How do you get the OS X version number in C or C++?

2008-11-14 Thread Sean McBride
On 11/15/08 1:48 AM, chaitanya pandit said: + (BOOL)MacOSTigerOrLower { UInt32 version; return (Gestalt(gestaltSystemVersion,(SInt32 *) version) == noErr) (version 0x01050 ); } Gestalt() is a good approach, but never use gestaltSystemVersion. See Gestalt.h for why. --

Re: Tabbing PDF Annotation Editor between annotations in edit mode?

2008-11-14 Thread John Calhoun
On Nov 14, 2008, at 12:18 PM, Joel Norvell wrote: I want to modify the PDF Annotation Editor so that it will tab from annotation-to-annotation in edit mode, just like it does in test mode. : And since PDFAnnotation isn't an NSView subclass, I'll have to create a mechanism that hears tab

Re: How do you get the OS X version number in C or C++?

2008-11-14 Thread Jesper Storm Bache
gestaltSystemVersion is not the best way to do it (and it caused problems in 10.4.10 and up). As the documentation in Gestalt.h states: ... A better way to get version information on Mac OS X would be to use the new gestaltSystemVersionMajor, gestaltSystemVersionMinor, and

Re: Notifying that a TextView's content has been changed?

2008-11-14 Thread Douglas Davidson
On Nov 14, 2008, at 12:22 PM, chaitanya pandit wrote: Try posting a NSTextDidChangeNotification with your text view as the object, after you do setString: That's probably not the best idea. If you want to fully integrate your programmatic changes with user text changes, including undo

Re: Notifying that a TextView's content has been changed?

2008-11-14 Thread Jean-Nicolas Jolivet
Hmm I tried, unfortunately it is not working I also tried [self willChangeValueForKey:@myTextView]; it was a random guess but it didn't work either... On 14-Nov-08, at 3:22 PM, chaitanya pandit wrote: Try posting a NSTextDidChangeNotification with your text view as the object, after

RE: Unable to generate a PDF from textual data

2008-11-14 Thread Lee, Frederick (Ric)
Thanks from a neophyte. Yes... I had hoped that I could 'magically' create a PDF from a text string. I noticed that you can select 'text' from a PDF document. I thought you could likewise create a PDF from text (NSString). BTW: My client wanted to render text as a PDF on his iPhone. Ric.

Re: Notifying that a TextView's content has been changed?

2008-11-14 Thread Jean-Nicolas Jolivet
Thanks a lot, that did the trick! On 14-Nov-08, at 3:29 PM, Douglas Davidson wrote: On Nov 14, 2008, at 12:22 PM, chaitanya pandit wrote: Try posting a NSTextDidChangeNotification with your text view as the object, after you do setString: That's probably not the best idea. If you want

Re: Cocoa and NSLog

2008-11-14 Thread Tommy Nordgren
On 10 nov 2008, at 07.16, Marcus wrote: 9 nov 2008 kl. 23.03 skrev Tommy Nordgren: Is it possible to open an Additional file for use by logging in Cocoa (I want it to contain ONLY the info logged from my App) You can do that by just redirect standard error to a file. Since each process

RE: Where does stdout go in an ordinary Cocoa application?

2008-11-14 Thread Karan, Cem (Civ, ARL/CISD)
I like this method the best; there is (potentially) a lot of output, and this is probably the cleanest method. Thanks! Thanks, Cem Karan -Original Message- From: Scott Ribe [mailto:[EMAIL PROTECTED] Sent: Friday, November 14, 2008 11:23 AM To: Karan, Cem (Civ, ARL/CISD);

RE: How do you get the OS X version number in C or C++?

2008-11-14 Thread Tom Fortmann
What framework do I include in my Xcode project to pull in Gestalt? I've tries CoreServices, Carbon and Cocoa. -Original Message- From: Sean McBride [mailto:[EMAIL PROTECTED] Sent: Friday, November 14, 2008 2:27 PM To: chaitanya pandit; Tom Fortmann Cc: cocoa-dev@lists.apple.com

Re: How do you get the OS X version number in C or C++?

2008-11-14 Thread Nick Zitzmann
On Nov 14, 2008, at 1:53 PM, Tom Fortmann wrote: What framework do I include in my Xcode project to pull in Gestalt? I've tries CoreServices, Carbon and Cocoa. It's in the CoreServices umbrella framework, but just linking to the Cocoa or Carbon frameworks and importing their master

Re: How do you get the OS X version number in C or C++?

2008-11-14 Thread Sean McBride
On 11/14/08 2:53 PM, Tom Fortmann said: What framework do I include in my Xcode project to pull in Gestalt? I've tries CoreServices, Carbon and Cocoa. In Xcode, option-double-click the word Gestalt (or any API), this will open the docs for that API. Scroll to the very top, you'll see:

Re: Distributed Objects Performance

2008-11-14 Thread Seth Willits
On Nov 14, 2008, at 2:40 AM, Jean-Daniel Dupas wrote: I would be curious to know how you reached 50MB/sec on a LAN that has a theorical limit of 12.5MB/sec. That's a good question, now that I think about it. :-p Apparently I *am* plugged into the gigabit switch... Either way, any

Re: Core Data, Filtering by PopUps Bindings Confusion

2008-11-14 Thread Quincey Morris
On Nov 14, 2008, at 12:06, Brad Gibbs wrote: I've been using Jonathan Dann's excellent Core Data Sorted sample code to create an outline view consisting of two concrete entities -- Categories and Types (each parent Category can have an unlimited number of children types). The only real

RE: How do you get the OS X version number in C or C++?

2008-11-14 Thread Tom Fortmann
I'm an idiot! I was trying to include gestalt.h directly. Simply including the CoreService/CoreService.h header works like a champ. -Original Message- From: Sean McBride [mailto:[EMAIL PROTECTED] Sent: Friday, November 14, 2008 3:17 PM To: Tom Fortmann; 'chaitanya pandit' Cc:

NSDocument annoying warning

2008-11-14 Thread Randall Meadows
The NSDocument class reference contains this note: As of Mac OS X v10.5, this method checks to see if the document's file has been modified since the document was opened or most recently saved or reverted, in addition to the checking for file moving, renaming, and trashing that it has done

Re: Core Data, Filtering by PopUps Bindings Confusion

2008-11-14 Thread Brad Gibbs
Thanks for the thoughts, Quincey, but I couldn't make that work. I have a categoriesAC which is bound to File's Owner's MOC and set to Entity mode for Category. My categories Popup Button (categoriesPUB) is bound to the categories array controller as follows: Content.arrangedObjects

Re: NSDocument annoying warning

2008-11-14 Thread Randall Meadows
On Nov 14, 2008, at 4:21 PM, Randall Meadows wrote: In addition, when the app opens the document, it changes the extension to indicate that this particular document is in use (since it's typically opened from a server, and multiple users could be working in the same folder, and we use this

Re: NSDocument annoying warning

2008-11-14 Thread Quincey Morris
On Nov 14, 2008, at 15:21, Randall Meadows wrote: Is there something I can do to tell NSDocument (or whomever) that these changes that it thinks are made by another application are on purpose, and that it needs to keep its opinions regarding them to itself? If whatever ends up marking the

Re: Core Data, Filtering by PopUps Bindings Confusion

2008-11-14 Thread Quincey Morris
On Nov 14, 2008, at 15:21, Brad Gibbs wrote: My categories Popup Button (categoriesPUB) is bound to the categories array controller as follows: Content.arrangedObjects ContentValues.arrangedObjects.displayName I've tried a variety of bindings for the popup button's selectedObject binding,

Re: Tabbing PDF Annotation Editor between annotations in edit mode?

2008-11-14 Thread Joel Norvell
On Nov 14, 2008, at 12:18 PM, Joel Norvell wrote: I want to modify the PDF Annotation Editor so that it will tab from annotation-to-annotation in edit mode, just like it does in test mode. And since PDFAnnotation isn't an NSView subclass, I'll have to create a mechanism that

Re: NSDocument annoying warning

2008-11-14 Thread Mike Abdullah
I would suggest that you rearrange your code slightly to match how the document architecture expects it to operate. Move your package-modification code to be part of the -writeToURL: or - saveToURL: method of your document subclass. Then, when opening a document, check if the upgrade needs

NSManagedObjectContextObjectsDidChangeNotification

2008-11-14 Thread Jerry Krinock
NSManagedObjectContextObjectsDidChangeNotification gives me a userInfo dictionary that segregates changes into the type of change: inserted, updated, deleted. Well, in my app, and it seems that in any real-life app, the more important segregation, and the dependency in the first branching

Calling a script with parameters failing with error -1708

2008-11-14 Thread Ken Tozier
Hi I've been trying off and on for a couple of days to run a script that requires parameters. The first problem I found was that NSAppleScript has a bug that wipes out QuarkXPress's event dictionary when loading scripts containing Quark commands. Someone pointed me to the OSAScript

Re: NSManagedObjectContextObjectsDidChangeNotification

2008-11-14 Thread Jim Correia
On Nov 14, 2008, at 8:37 PM, Jerry Krinock wrote: NSManagedObjectContextObjectsDidChangeNotification gives me a userInfo dictionary that segregates changes into the type of change: inserted, updated, deleted. Well, in my app, and it seems that in any real-life app, the more important

Re: NSDistantObject in Core Data

2008-11-14 Thread Bridger Maxwell
One answer is to use a transient attribute to represent the relationship. Set the attribute's kind to Undefined, and use a custom NSManagedObject subclass. Define an instance variable in the subclass to hold the actual NSDistantObject pointer, and write custom accessors to get and manipulate

Re: NSManagedObjectContextObjectsDidChangeNotification

2008-11-14 Thread Jerry Krinock
On 2008 Nov, 14, at 18:25, Jim Correia wrote: That's hard to answer without knowing a bit more about what it is you are doing in response to the notification. (For example, it might be that there is a more appropriate solution to the problem you are trying to solve.) Thank you, Jim.

Re: Core Data, Filtering by PopUps Bindings Confusion

2008-11-14 Thread Steve Steinitz
Hi Brad, I couldn't grasp from a quick skim of your post whether types are related to categories in your model, ie. category -- type. If so, I'd say keep trying to do it with bindings -- it will work. If not, I had a similar scenario where I ended up creating a custom NSArrayController, to

Animation And Core Data

2008-11-14 Thread ChrisOutwin
I would like to use the persistence of Core Data to save animation properties associated with my model objects. For instance, previously created layers would reappear in a table along with their associated filter, Z-order, etc. Is any example available? Do I have to abandon Core Data to

Re: Unable to generate a PDF from textual data

2008-11-14 Thread Michael Ash
On Fri, Nov 14, 2008 at 3:34 PM, Lee, Frederick (Ric) [EMAIL PROTECTED] wrote: Thanks from a neophyte. Yes... I had hoped that I could 'magically' create a PDF from a text string. I noticed that you can select 'text' from a PDF document. I thought you could likewise create a PDF from text

Re: How do you get the OS X version number in C or C++?

2008-11-14 Thread Michael Ash
On Fri, Nov 14, 2008 at 3:27 PM, Sean McBride [EMAIL PROTECTED] wrote: On 11/15/08 1:48 AM, chaitanya pandit said: + (BOOL)MacOSTigerOrLower { UInt32 version; return (Gestalt(gestaltSystemVersion,(SInt32 *) version) == noErr) (version 0x01050 ); } Gestalt() is a good approach, but

Re: How do you get the OS X version number in C or C++?

2008-11-14 Thread Rob Keniger
On 15/11/2008, at 6:06 AM, Tom Fortmann wrote: Is there a core foundation function for querying the Mac OS X operating system name and version information? The uname() API returns the Darwin kernel version information, but I need to find the OS X 10.x.x information. This is the way