Re: Coredata - populating initial data on app load - best practices

2008-03-03 Thread mmalc crawford
On Mar 3, 2008, at 8:31 AM, Jason Kravitz wrote: So given the 3 options in this article, any guidelines for when one is more beneficial than another? It depends primarily on your situation. * You can create the managed objects directly in code (as trivially illustrated in NSPersistentDoc

Re: Typing attributes and the location of the insertion point

2008-03-03 Thread Douglas Davidson
On Mar 3, 2008, at 8:24 AM, Todd Ransom wrote: This works well when the user is typing at the end of the text. When the user is typing in the middle of existing text, however, the ruler and insertion point do not always update to reflect the paragraph style of the typing attributes. Is thi

Re: Bypassing inter-cell navigation for NSButtonCell in NSOutlineView

2008-03-03 Thread Corbin Dunn
On Mar 2, 2008, at 4:58 PM, Rosyna wrote: Have you tried overriding - (BOOL)canFocusCell:(NSCell *)cell atTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row; to return NO in an outline view subclass? Please don't override this method. It is a private, internal AppKit method, wh

How can I fix an error in a XIB file?

2008-03-03 Thread Brian Krisler
Hi All, I somehow introduced an error into a XIB file: Description: ibtool failed with exception: Error (1002) creating CGSWindow If I try to open, what I believe is the offending window, in Interface Builder, it does not display, and I get no error. Am I out of luck and have to recrea

Re: Relaunching an application

2008-03-03 Thread Nir Soffer
On Mar 3, 2008, at 18:24, Mattias Arrelid wrote: I have an application that I need to restart. Why do you want to do that? An easy way to do this could be: [[NSWorkspace sharedWorkspace] launchApplication:executablePath]; [NSApp terminate:self]; The problem is that the above solution resu

Re: displaying image and multiple rows of text in NSTableView row

2008-03-03 Thread Corbin Dunn
On Mar 3, 2008, at 6:34 AM, Nick Rogers wrote: Hi, I'm using NSTableView for displaying. Now I need to show an icon in every row and also have to display 2 rows of text in one row of tableView. Is it possible, if yes then how and can i incresse a row's width to accomodate two rows of text?

Re: Relaunching an application

2008-03-03 Thread Mattias Arrelid
On 3 mar 2008, at 18.14, Nir Soffer wrote: On Mar 3, 2008, at 18:24, Mattias Arrelid wrote: I have an application that I need to restart. Why do you want to do that? A scenario could be that the entire contents of the .app bundle has been replaced with new stuff (e.g. the case with Spark

keydown, determining if a keypress was "repeated"

2008-03-03 Thread David Harper
Hello, When a keyDown event is received, does anyone know how to determine whether the event was caused by a key press or a timed repeat? For example, when the x key is pressed and held, I would prefer to ignore the events following the initial key press. Thanks in advance, -Dave H.

Re: Typing attributes and the location of the insertion point

2008-03-03 Thread Todd Ransom
I do ensure that paragraph styles are consistent throughout the paragraph. New styles are applied in insertNewlineForTextView: or, if the user changes them manually, they always cover the range of the entire paragraph. What I am seeing is that when the user is typing in the middle of text a

Re: How can I fix an error in a XIB file?

2008-03-03 Thread Jean-Daniel Dupas
This is a know bug. I'have already fill a bug report about it was mark as duplicate. In my case, it was due to an NSPathControl when I was using the "Popup" style. It's probably an element that serializes icns image (as the AppKit is not able to create NSImage from icns without CGSWindow.

Re: Relaunching an application

2008-03-03 Thread Jean-Daniel Dupas
Le 3 mars 08 à 18:18, Mattias Arrelid a écrit : On 3 mar 2008, at 18.14, Nir Soffer wrote: On Mar 3, 2008, at 18:24, Mattias Arrelid wrote: I have an application that I need to restart. Why do you want to do that? A scenario could be that the entire contents of the .app bundle has been

Re: keydown, determining if a keypress was "repeated"

2008-03-03 Thread Randall Meadows
On Mar 3, 2008, at 10:25 AM, David Harper wrote: When a keyDown event is received, does anyone know how to determine whether the event was caused by a key press or a timed repeat? For example, when the x key is pressed and held, I would prefer to ignore the events following the initial key

Re: Relaunching an application

2008-03-03 Thread John Stiles
Mattias Arrelid wrote: On 3 mar 2008, at 18.14, Nir Soffer wrote: On Mar 3, 2008, at 18:24, Mattias Arrelid wrote: I have an application that I need to restart. Why do you want to do that? A scenario could be that the entire contents of the .app bundle has been replaced with new stuff (e

Re: Typing attributes and the location of the insertion point

2008-03-03 Thread Douglas Davidson
On Mar 3, 2008, at 9:25 AM, Todd Ransom wrote: I do ensure that paragraph styles are consistent throughout the paragraph. New styles are applied in insertNewlineForTextView: or, if the user changes them manually, they always cover the range of the entire paragraph. What I am seeing is that

NSArchiver and MySQL

2008-03-03 Thread Ben Einstein
What's the best way to archive/unarchive an NSData object created from NSArchiver to a MySQL (or any other) database? I was thinking: [archivedData description] for archiving and [archivedString dataUsingEncoding:someEncoding] for unarchiving. Not sure if that will work. Maybe [NSString st

Re: best time to alter GUIs

2008-03-03 Thread Daniel Child
On Mar 1, 2008, at 6:15 AM, Ken Thomases wrote: Does your init method do anything else other than calling [super initWithWindowNibName:]? In particular, if it calls [self window], that forces the loading (and awakening) of the NIB in order to reconstitute the window. My bad. I should have

Re: Typing attributes and the location of the insertion point

2008-03-03 Thread Todd Ransom
I will put together a sample to demonstrate the behavior and may do both. Thanks as always for your help. Todd Ransom Return Self Software http://returnself.com On Mar 3, 2008, at 12:31 PM, Douglas Davidson wrote: On Mar 3, 2008, at 9:25 AM, Todd Ransom wrote: I do ensure that paragraph

Cocoaheads Lake Forest (92630) meeting 3/5 7pm - Topic: Cocoa graphics 101

2008-03-03 Thread Scott Ellsworth
CocoaHeads Lake Forest will be meeting on the first Wednesday in March, instead of the second. We will be meeting, as usual, in the community room of the El Toro branch of the Orange County Public Library at 24672 Raymond Way, Lake Forest, CA 92630. Please join us from 7pm to 9pm on Wednesday, 3/

Re: Using NSPredicate to parse strings

2008-03-03 Thread Dave Camp
On Mar 3, 2008, at 10:12 AM, Jonathan Dann wrote: On 3 Mar 2008, at 16:16, Mike Abdullah <[EMAIL PROTECTED]> wrote: Jonathon, you'll have much better luck with NSScanner. It's designed for exactly what you want. Mike. Thanks Mike, just tried it and it works quite well. Any way of usi

Re: NSArchiver and MySQL

2008-03-03 Thread Mike Abdullah
Relying on -description would almost certainly be a bad idea as it might change in the future. Also, it will take up a lot of room. I'd recommend: http://www.dribin.org/dave/blog/archives/2006/03/12/base64_cocoa/ Mike. On 3 Mar 2008, at 18:08, Ben Einstein wrote: What's the best way to arc

Re: Using NSPredicate to parse strings

2008-03-03 Thread Jonathan Dann
On 3 Mar 2008, at 16:16, Mike Abdullah <[EMAIL PROTECTED]> wrote: Jonathon, you'll have much better luck with NSScanner. It's designed for exactly what you want. Mike. Thanks Mike, just tried it and it works quite well. Any way of using NSScanner directly with regex? Not su

Interface Builder (almost) supports NSToolbar

2008-03-03 Thread Brian Krisler
I have discovered that it is now "almost" possible to create toolbars from within Interface builder, with one big exception. There appears to be no way to define identifiers for the toolbar items. Is this a sign of future functionality? I can not find any documentation on NSToolbar withi

Re: NSArchiver and MySQL

2008-03-03 Thread Jim Correia
On Mar 3, 2008, at 1:21 PM, Mike Abdullah wrote: Relying on -description would almost certainly be a bad idea as it might change in the future. Also, it will take up a lot of room. I'd recommend: http://www.dribin.org/dave/blog/archives/2006/03/12/base64_cocoa/ Why convert to a string rep

Re: best time to alter GUIs

2008-03-03 Thread Quincey Morris
On Mar 3, 2008, at 09:12, Daniel Child wrote: My bad. I should have checked that, and assumed it simply passed the address. If [self window] loads things, is there any way to obtain the window's address without loading it? I found it useful to assign a (superfluous) instance variable since

Re: best time to alter GUIs

2008-03-03 Thread Ken Thomases
On Mar 3, 2008, at 11:12 AM, Daniel Child wrote: On Mar 1, 2008, at 6:15 AM, Ken Thomases wrote: Does your init method do anything else other than calling [super initWithWindowNibName:]? In particular, if it calls [self window], that forces the loading (and awakening) of the NIB in order

Re: How can I fix an error in a XIB file?

2008-03-03 Thread Jonathan Hess
Hey Brian - There are two known issues with IB 3.0 and AppKit where toolbars and path cells cause this issue during ibtool compilation. If it's a path control that's giving you trouble, I suggest changing the style to something other than NSPathStylePopUp and then resetting the style fro

Re: Interface Builder (almost) supports NSToolbar

2008-03-03 Thread I. Savant
>> There appears to be no way to efine identifiers for the toolbar items. I ran into the same issue when playing with it but none of my projects have been "updated" to use the IB method so I never pursued it. I feel your pain. :-) > create IBOutlets for each toolbar item you care about in your

Re: Interface Builder (almost) supports NSToolbar

2008-03-03 Thread Quincey Morris
On Mar 3, 2008, at 10:53, Brian Krisler wrote: I have discovered that it is now "almost" possible to create toolbars from within Interface builder, with one big exception. There appears to be no way to define identifiers for the toolbar items. Is this a sign of future functionality? I c

Re: Create a PDFPage instance from Quartz-format image

2008-03-03 Thread John Calhoun
On Mar 3, 2008, at 3:06 PM, Scott.D.R wrote: However, I want to know whether it is possible to create the PDFPage instance directly from the CGImage, CIImage and so on? Yes. The best way to be sure is to subclass PDFPage. Your subclass should implement -[drawWithBox:] and -[boundsForBox:].

Re: Relaunching an application

2008-03-03 Thread Steven Degutis
Perhaps a small application like relaunch.app could be imbedded into your relaunchable application, where all it pretty much does is serve as a buffer by relaunching your application reliably (through Cocoa methods) after your app calls it the same way you mentioned above. [[NSWorkspace sharedWork

Re: Interface Builder (almost) supports NSToolbar

2008-03-03 Thread Quincey Morris
On Mar 3, 2008, at 11:26, I. Savant wrote: I would never have thought of this; I thought toolbar items were discarded / recreated when removed from and added to the toolbar. Have I missed something? It's the same ambiguity about the term "toolbar" that makes IB's toolbar-creation so unintu

Re: NSFontManager Initialization

2008-03-03 Thread Aki Inoue
Gordon, -[NSFontManager selectedFont] is used mainly for getting the font set via -[NSFontManager setSelectedFont:isMultiple:] method. Typically, you query the user font selection via -convertFont: method. See the following tech doc section. Font Panel: Using the Font Panel Aki On 2008/03/

Re: Problems with ScriptingBridge and iTunes

2008-03-03 Thread Christopher Nebel
On Mar 1, 2008, at 5:28 PM, Hannes Petri wrote: I want to retrieve the path to the currently played file in iTunes. I thought scripting bridge would be the perfect tool for this, however i've run into some problem. I have this code: iTunesApplication *iTunes = [[SBApplication alloc] initW

Changing the format of NSTableColumn built using Core Data Entity ?

2008-03-03 Thread Martin Linklater
HI - I have what seems a silly question, but I can't seem to find an answer. I have a window in IB which contains a 'Core Data Entity' table view. This pre-built table has a number of columns, some contained strings and some containing integers. What I want to do is change the binding of on

Paste (without a bonus space) in a Cocoa NSText

2008-03-03 Thread Jonathan Gillaspie
So Cocoa is wonderfully clever when you double-click to select a word about making sure that it "comes with it's own extra space character". For editing english text documents this works great but for editing source or scripts it's usually a drawback. I didn't see anything "easy" documen

Re: Paste (without a bonus space) in a Cocoa NSText

2008-03-03 Thread I. Savant
> I didn't see anything "easy" documented to override or control this > behavior, although perhaps I just overlooked them. What techniques > have people used to improve this behavior in cocoa based code-editors? -smartInsertDeleteEnabled: / -setSmartInsertDeleteEnabled: -- I.S. __

Re: Paste (without a bonus space) in a Cocoa NSText

2008-03-03 Thread I. Savant
>> So Cocoa is wonderfully clever when you double-click to select a word > -smartInsertDeleteEnabled: / -setSmartInsertDeleteEnabled: Sorry, I made two mistakes: 1 - -smartInsertDeleteEnabled does not take an argument (so the colon was extra - keep it, I have plenty). and 2 - If forgot to m

NSURLConnection SSL connection with expired cert.

2008-03-03 Thread Dave Hersey
Is there a way to get NSURLConnection to connect to an SSL server that has an expired certificate? I'm looking for a way to warn the user about the certificate and then allow them to connect anyway if they wanted, similar to how web browsers behave. It appears that I only find out about the

Traversing windows with Cocoa

2008-03-03 Thread aldo kurnia
Hi everyone, I'm relatively new to Mac development and would love to have any suggestion to the problem I'm facing. I've tried searching for a solution some weeks now, and still nothing really useful. Anyway, this is what I'm trying to do: Given a window's TITLE, how do you create a reference to

Re: Changing the format of NSTableColumn built using Core Data Entity ?

2008-03-03 Thread Quincey Morris
On Mar 3, 2008, at 12:51, Martin Linklater wrote: HI - I have what seems a silly question, but I can't seem to find an answer. I have a window in IB which contains a 'Core Data Entity' table view. This pre-built table has a number of columns, some contained strings and some containing inte

Re: NSFontManager Initialization

2008-03-03 Thread Gordon Apple
I guess I don't understand how to use that. I have no font specified. ConvertFont returns a similar font style (e.g., Italic) and size to whatever you put into it. What I want is to extract the user selected font and size from the panel. "selectedFont" does what I want, as long as it has bee

Re: Changing the format of NSTableColumn built using Core Data Entity ?

2008-03-03 Thread Martin Linklater
On 3 Mar 2008, at 21:10, Quincey Morris wrote: Select the table column (which takes 3 clicks if you're starting at the top level). Click again to select the table column cell. You should see a little circle that represents the formatter. Click on the circle to select it and press Delete t

Re: Traversing windows with Cocoa

2008-03-03 Thread I. Savant
> Given a window's TITLE, how do you create a reference to it, determine what > kind of application the window is (the name of the application/executable)? > and how do you move that window to the front? AppleScript is probably your best bet. -- I.S. _

Re: Problems with ScriptingBridge and iTunes

2008-03-03 Thread has
On 3 Mar 2008, at 15:27, Steven Degutis wrote: Thank you for the update on that sample code. I was hoping it would continue to be ignored because I was publicly berated in the #macdev channel for posting it, but oh well. Don't feel too bad: if you're coming from a Cocoa background, applicati

Re: Adding GUI components dynamically

2008-03-03 Thread Jens Alfke
On 1 Mar '08, at 2:07 PM, Dimitri Bouniol wrote: Easy. Create an instance of a NSButton: NSButton *myButton = [[NSButton alloc] initWithFrame:nsRectOfButton]; Then add it to your view: [view addSubview:myButton]; I would recommend against doing this, for several reasons: 1. Last time I trie

Setting the image of an NSPopUpButton in IB?

2008-03-03 Thread Nick Zitzmann
I checked the archives and didn't see anything. How do I set the image to display in a pull-down NSPopUpButton using Interface Builder 3.0? No matter what I type in the image field, the field is always cleared out, and no image is displayed. I also tried setting the image in the first menu

Re: Spotlight importer for records

2008-03-03 Thread Jens Alfke
On 3 Mar '08, at 5:50 AM, Adam P Jenkins wrote: Thank you for the information. Search Kit does allow indexing arbitrary pieces of data that don't have to correspond to actual files, and since Spotlight is built on top of Search Kit I thought there would be some way to do the same thing.

Re: NSFontManager Initialization

2008-03-03 Thread Aki Inoue
The standard idiom here is to implement -changeFont: method that receives action messages whenever user changes font selection. In the method, you can call -convertFont: to query the user selection. The result has to be kept in your object. http://developer.apple.com/documentation/Cocoa/Conceptu

Re: displaying image and multiple rows of text in NSTableView row

2008-03-03 Thread Jens Alfke
On 3 Mar '08, at 6:34 AM, Nick Rogers wrote: Now I need to show an icon in every row Add a new column and make its data cell an NSImageCell in IB. and also have to display 2 rows of text in one row of tableView. Is it possible, if yes then how and can i incresse a row's width to accomodat

Re: Changing the format of NSTableColumn built using Core Data Entity ?

2008-03-03 Thread Martin Linklater
No matter what I select I don't get the formatter circle. I've seen formatter circles before, so know what they look like. Is there something special about these auto-generated Core Data tables that stops what you describe working ? My apologies - I seem to have found it now. Thank you ve

Re: NSURLConnection SSL connection with expired cert.

2008-03-03 Thread Jens Alfke
On 3 Mar '08, at 1:08 PM, Dave Hersey wrote: Is there a way to get NSURLConnection to connect to an SSL server that has an expired certificate? I don't think so. I can't find any public API having to do with SSL or certificates. If this can't be handled by NSURLConnection, is there a way

Re: Traversing windows with Cocoa

2008-03-03 Thread Jens Alfke
On 3 Mar '08, at 1:10 PM, aldo kurnia wrote: Given a window's TITLE, how do you create a reference to it, determine what kind of application the window is (the name of the application/executable)? and how do you move that window to the front? Applications run in protected memory spaces. Th

Re: Setting the image of an NSPopUpButton in IB?

2008-03-03 Thread Jens Alfke
On 3 Mar '08, at 1:56 PM, Nick Zitzmann wrote: I checked the archives and didn't see anything. How do I set the image to display in a pull-down NSPopUpButton using Interface Builder 3.0? That's funny, I was just doing this for the first time today, too! I got it to work... I also tried

Re: Relaunching an application

2008-03-03 Thread Michael Ash
On Mon, Mar 3, 2008 at 2:43 PM, Steven Degutis <[EMAIL PROTECTED]> wrote: > Perhaps a small application like relaunch.app could be imbedded into > your relaunchable application, where all it pretty much does is serve > as a buffer by relaunching your application reliably (through Cocoa > methods

Re: NSArchiver and MySQL

2008-03-03 Thread Ben Einstein
Never really read about BLOBs. They seem like they'll do the trick just fine! Thanks. On Mar 3, 2008, at 2:04 PM, Jim Correia wrote: On Mar 3, 2008, at 1:21 PM, Mike Abdullah wrote: Relying on -description would almost certainly be a bad idea as it might change in the future. Also, it wil

Re: Traversing windows with Cocoa

2008-03-03 Thread Eric Schlegel
On Mar 3, 2008, at 1:10 PM, aldo kurnia wrote: So, I looked at Accessiblity API and NSApplication looks somewhat promising because it can give out its NSWindow children reference and there are functions to activate them. One missing piece of the puzzle though, is that I couldn't find any w

[SOLVED] Re: Setting the image of an NSPopUpButton in IB?

2008-03-03 Thread Nick Zitzmann
On Mar 3, 2008, at 3:21 PM, Jens Alfke wrote: Don't set the button style back to pop-up. Leave it pull-down, and set the button's Position attribute to image-only. Then select the first menu item and set its image name. Thanks. I guess it's a bug, then, that filling out the title of the

Re: Better Anti-Aliasing for drawing?

2008-03-03 Thread Graham
If the standard anti-aliasing at that size isn't adequate, it might be worth trying to do the rotation at a larger size then scale down the result to the desired size. Worth a try? S.O.S. On 01/03/2008, at 6:49 AM, Ben Lachman wrote: On Feb 29, 2008, at 5:15 AM, Jean-Daniel Dup

Re: Traversing windows with Cocoa

2008-03-03 Thread aldo kurnia
Hi, I'm not trying to manipulate anything in the protected memory space. All I want to do is determine the name of the application / process from the window, and then bring it to the front-most index. UI scripting is exactly what I've tried to do and failed. For example, you'd expect the follow

Re: NSURLConnection SSL connection with expired cert.

2008-03-03 Thread Nick Zitzmann
On Mar 3, 2008, at 2:08 PM, Dave Hersey wrote: Is there a way to get NSURLConnection to connect to an SSL server that has an expired certificate? There is, but it's private. Nick Zitzmann ___ Cocoa-dev mailing list

Re: [SOLVED] Re: Setting the image of an NSPopUpButton in IB?

2008-03-03 Thread Ken Ferry
Hi Nick, See the docs for -[NSPopUpButtonCell setImage:]: --- setImage: This method has no effect. - (void)setImage:(NSImage *)anImage Parameters anImage The image to display. Discussion The image displayed in a pop up button is taken from the selected menu item (in the case of a pop up menu)

Re: [SOLVED] Re: Setting the image of an NSPopUpButton in IB?

2008-03-03 Thread Nick Zitzmann
On Mar 3, 2008, at 3:57 PM, Ken Ferry wrote: See the docs for -[NSPopUpButtonCell setImage:]: But if setting the title in the inspector works, it follows that setting the image should also work... The fact that it doesn't is quite confusing. Nick Zitzmann

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

2008-03-03 Thread Graham
In a UI I'm working on, I have an occasional need to use the Font Panel from a floating panel (the panel has a "Font..." button that brings up the Font Panel to change the font attribute of something in my panel). The problem is that the Font panel sends its changes to the changeFont: met

Re: NSArchiver and MySQL

2008-03-03 Thread Mike Abdullah
On 3 Mar 2008, at 21:55, Ben Einstein wrote: Never really read about BLOBs. They seem like they'll do the trick just fine! Thanks. On Mar 3, 2008, at 2:04 PM, Jim Correia wrote: On Mar 3, 2008, at 1:21 PM, Mike Abdullah wrote: Relying on -description would almost certainly be a bad idea

Re: Setting the image of an NSPopUpButton in IB?

2008-03-03 Thread Sean McBride
On 3/3/08 2:56 PM, Nick Zitzmann said: >I checked the archives and didn't see anything. How do I set the image >to display in a pull-down NSPopUpButton using Interface Builder 3.0? >No matter what I type in the image field, the field is always cleared >out, and no image is displayed. I filed this

Re: When in the launch cycle does coredata data become available.

2008-03-03 Thread Adam Gerson
> > Thanks, this does directly address my question. Not exactly sure what > > to do with it. I tried calling fetchWithRequest:merge:error: in > > awakeFromNib and then trying to access the managed object, but that > > didn't work. > > > Is the outlet to the array controller connected? > > mm

Re: Dropping into One of Several Columns

2008-03-03 Thread Benjamin Stiglitz
I've got an NSTableView with multiple text column and I'd like to be able to control where a drop of some text goes based on in which column the user is making the drop. Since the validateDrop: member function of the table's data source does not provide a 'proposed column', I'm going to gue

Re: Relaunching an application

2008-03-03 Thread Steven Degutis
I've come up with an applucation design that works better than my previous suggestion of psuedo-polling launchedApplications. Rather, the relaunch application subscribes to NSWorkspace's notification center, and waits until it gaurantees that its owner-Application has terminated. If you want the en

Re: Setting the image of an NSPopUpButton in IB?

2008-03-03 Thread Steven Degutis
For the first time a few days ago, I began to use NSPopUpButton and began to test it in IB3 to experiment around and see what it could do. Ultimately, I was planning on using -setImage: programattically, but it seemed odd that I couldn't set its image in IB. Within a few minutes, I had solved the p

General MVC and ownership question

2008-03-03 Thread Graham
I have an object embodying a data model. In a document-based app, there would be one of these per doc. There can be one or more views on this data (for example a split view of it). Currently I don't have a controller between the two - the view is pretty specific so it implements the control

Re: Relaunching an application

2008-03-03 Thread Joe Ranieri
Maybe I'm missing something, but Instead of NSTask, why not use LSOpenApplication passing in (kLSLaunchDefaults | kLSLaunchNewInstance | kLSLaunchDontAddToRecents) for flags? Your main program will block until the sub program has launched. Joe Ranieri Lead Magician, Alacatia Labs, Inc

localizable strings file with macro

2008-03-03 Thread Mitchell Livingston
Hello, I have C code that I want to generate a strings file for use on Mac. I use: #if defined(SYS_DARWIN) #include #define _(a) CFStringGetCStringPtr(CFCopyLocalizedStringFromTable( \ CFSTR( a ), CFSTR("LibraryLocalizable"), "comment" ), kCFStringEncodingMacRoman) #els

Re: Can CoreData return only unique results of an attribute - SOLVED

2008-03-03 Thread Adam Gerson
Yes, distinctUnionOfObjects turned out to be the answer. Thanks to everyone who replied. The final answer was simple, though I cant take credit for coming up with it: NSArray *allServers = [serverLibraryArrayController arrangedObjects]; NSLog(@"%@", [allServers valueForKeyPath:@"@distinctUnionOfOb

Getting the "iCal" window style?

2008-03-03 Thread Nick Zitzmann
In Leopard, if you make a window that is textured, then the window's content is drawn with a gradient, and the bottom corners are rounded off. However, I noticed that several Apple applications (Address Book, iCal, Console, probably a few others) are using a look that is similar, except tha

Re: localizable strings file with macro

2008-03-03 Thread Deborah Goldsmith
genstrings doesn't appear to read stdin, but you could run the C preprocessor on your source file, send it to a temp file, and then run genstrings on that. cpp -DSYS_DARWIN mysource.c >/tmp/foo.c genstrings /tmp/foo.c >outputfile Deborah Goldsmith Apple Inc. [EMAIL PROTECTED] On Mar 3, 2008

Re: Getting the "iCal" window style?

2008-03-03 Thread Kyle Sluder
On Mon, Mar 3, 2008 at 10:08 PM, Nick Zitzmann <[EMAIL PROTECTED]> wrote: > How did they do that? More importantly, how can we do that? It's not > the unified style; I already tried that & I think it only does > anything under Tiger. Look into -[NSWindow setContentBorderThickness:forEdge:], and

Re: Getting the "iCal" window style?

2008-03-03 Thread Nick Zitzmann
On Mar 3, 2008, at 9:00 PM, Kyle Sluder wrote: Look into -[NSWindow setContentBorderThickness:forEdge:], and read the AppKit release notes for Leopard. I don't care about the etched borders; I only want the lighter gradient. How do I get the lighter gradient? Nick Zitzmann

Re: Getting the "iCal" window style?

2008-03-03 Thread Steven Degutis
I haven't tested this, but I'm almost certain that the thickness of the bottom border is exactly what causes the gradient to become lighter. Perhaps you should follow up on Kyle's advice and try it. Then perhaps you should read this: http://www.mikeash.com/getting_answers.html On Mon, Mar 3, 2008

Re: Getting the "iCal" window style?

2008-03-03 Thread Ken Ferry
The AppKit release notes cover this: --- The behavior of -setContentBorderThickness:forEdge:NSMinYEdge and -setAutorecalculatesContentBorderThickness:NO forEdge:NSMinYEdge for non-textured windows will do the following: The top gradient will be repeated in the bottom border, separator lines will b

[SOLVED] Re: Getting the "iCal" window style?

2008-03-03 Thread Nick Zitzmann
On Mar 3, 2008, at 9:54 PM, Ken Ferry wrote: The 'lighter gradient' you're after is the top gradient being repeated at the bottom. Thank you. Doing the following worked: 1. Turning off the textured background 2. Using the following line in the window controller's -awakeFromNib method: [

Re: Getting the "iCal" window style?

2008-03-03 Thread Kyle Sluder
On Mon, Mar 3, 2008 at 11:48 PM, Nick Zitzmann <[EMAIL PROTECTED]> wrote: > However, it makes no difference. Did anyone get it to draw lighter > this way, and if so, then what worked for you? You have made the window non-metal, correct? --Kyle Sluder

Re: Getting the "iCal" window style?

2008-03-03 Thread Nick Zitzmann
On Mar 3, 2008, at 9:39 PM, Steven Degutis wrote: I haven't tested this, but I'm almost certain that the thickness of the bottom border is exactly what causes the gradient to become lighter. Perhaps you should follow up on Kyle's advice and try it. You're making the assumption that I didn't.

Re: NSURLConnection SSL connection with expired cert.

2008-03-03 Thread Marcel Borsten
I don't think this is in any way documented and can break at any time, but after looking around for a while I found this method: @interface NSURLRequest (NSHTTPURLRequest) + (BOOL)allowsAnyHTTPSCertificateForHost:(id)fp8; + (void)setAllowsAnyHTTPSCertificate:(BOOL)fp8 forHost:(id)fp12; @end

Any Seattle-area Cocoa developer groups?

2008-03-03 Thread David Orriss Jr
Are there any Seattle-area Cocoa programming groups out there? Tried to email seattlexcoders.org but the contact email alias is down. Thanks in advance. -- David Orriss Jr. My blog: http://www.codethought.com/blog ___ Cocoa-dev mailing list (C

How to get an NSString from a non-terminated array of unicode chars (length is known)

2008-03-03 Thread Stuart Malin
My problem is that I receive a function call from a C library that gives me a wchar_t array and its length. The unicode array is _not_ terminated. The library defines an XML_Char type, so my code below refers to that, but XML_Char is wchar_t (which, I believe is UTF8 on a Mac). I'm very w

Triggering GUI login session from daemon? And reboot.

2008-03-03 Thread Mac QA
Hi, I am writing a system daemon that runs (on a client) in the root session as invoked by launchd, and there is also a per-user user agent process in each login session. I communicate with this daemon from a remote process (on a server) via Cocoa Distributed Objects and I want to trigger certain

Re: How to get an NSString from a non-terminated array of unicode chars (length is known)

2008-03-03 Thread Karsten
hi Stuart, you can simply use: [NSString stringWithUTF8String: s]. or [NSString stringWithCharacters:s length: len]. I tried this approach: NSMutableData *data = [NSMutableData dataWithBytes:(void *)s length:len]; //as supplied, s is: (const XML_Char *), and len is its length

Re: How to get an NSString from a non-terminated array of unicode chars (length is known)

2008-03-03 Thread Stuart Malin
On Mar 3, 2008, at 9:19 PM, Karsten wrote: you can simply use: [NSString stringWithUTF8String: s]. or [NSString stringWithCharacters:s length: len]. Can't use the former because s is not terminated. The latter (with a cast): NSString *str = [NSString stringWithCharacters:(const unichar *)s

Re: When in the launch cycle does coredata data become available.

2008-03-03 Thread Conor
Some of the setup methods are on a queue in the run loop and are done after applicationDidFinishLaunching: (in this case the content object of your array controller is not yet populated as the core data fetch hasn't been done yet). Run your method by placing it on the queue during applicationDidFin

Re: Custom View drawn twice?

2008-03-03 Thread Uli Kusterer
Am 29.02.2008 um 20:55 schrieb Ben Lachman: [self displayIfNeededIgnoringOpacity]; Is there a particular reason why you're calling this method? Won't plain old -displayIfNeeded do the job? Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de

Re: Returning values from objc_msgSend etc

2008-03-03 Thread Duncan McGregor
Thanks for all the help on this. Rococoa uses JNA, which in turns uses libffi, so I'm also spared most of the heavy lifting, but like Sherm, I do have to make all the decisions at runtime. Greg's post is the most definitive thing I've seen on the subject - thank you. >> * Should I call objc_msgSe

[ANN] UKCrashReporter 0.3

2008-03-03 Thread Uli Kusterer
Hi folks, just a short heads-up that there's a new version of UKCrashReporter out. UKCrashReporter is a class that checks for crash reports at startup and offers to send them to a CGI (PHP script or whatever) on your server. It does not patch anything, does not inject any code, it plays it

Re: Returning values from objc_msgSend etc

2008-03-03 Thread Ronald Oussoren
On Monday, March 03, 2008, at 11:53AM, "Duncan McGregor" <[EMAIL PROTECTED]> wrote: >> I can simply check the calculated size after calling ffi_prep_cif(), and >> compare that to sizeof(void*) to see if the return value will fit in a >> register. > >Is that right? 8 byte structs are returned

Re: Reading word at mouse pointer w/o Universal Access

2008-03-03 Thread Evan Gross
On 28/02/08 8:27 PM, "Ryan Homer" <[EMAIL PROTECTED]> wrote: > I've read this post > (http://lists.apple.com/archives/accessibility-dev/2006/Aug/msg7.html > ) about using the accessibility options to read the text under the > cursor. However, this requires that the user enable access for > ass

Re. Cascading windows in document architectures

2008-03-03 Thread perego
Hi! Finally, I found the time to investigate the problem. The issue seems to be actually connected with the fact that a window is already displayed when [aNSWindow cascadeTopLeftFromPoint:] is called as a result of [aNSWindowController window] call. Here follows the debugging trace generated by th

Re: Returning values from objc_msgSend etc

2008-03-03 Thread Sherm Pendley
On Mon, Mar 3, 2008 at 6:10 AM, Ronald Oussoren <[EMAIL PROTECTED]> wrote: > > On Monday, March 03, 2008, at 11:53AM, "Duncan McGregor" < > [EMAIL PROTECTED]> wrote: > > >> I can simply check the calculated size after calling ffi_prep_cif(), > and compare that to sizeof(void*) to see if the return

Unit Tests - mainWindow, keyWindow

2008-03-03 Thread steven Hooley
When running my application's tests i cannot figure out why the NSWindow and NSApplication properties relating to the keyWindow and mainWindow (and others that depend on them, like NSDocumentController's currentDocument) are always null. I have my application configured as the 'Test Host' for it

Re: Spotlight importer for records

2008-03-03 Thread Adam P Jenkins
Thank you for the information. Search Kit does allow indexing arbitrary pieces of data that don't have to correspond to actual files, and since Spotlight is built on top of Search Kit I thought there would be some way to do the same thing. Thanks, Adam On Mar 3, 2008, at 1:54 AM, Jens Al

displaying image and multiple rows of text in NSTableView row

2008-03-03 Thread Nick Rogers
Hi, I'm using NSTableView for displaying. Now I need to show an icon in every row and also have to display 2 rows of text in one row of tableView. Is it possible, if yes then how and can i incresse a row's width to accomodate two rows of text? OR if not possible, then can i use NSOutlineView

Create a PDFPage instance from Quartz-format image

2008-03-03 Thread Scott.D.R
Hi everyone. As the developer documents mention, we can create a PDFPage from a NSImage. After did some experiments, I found it was very handy to do some tasks. Thanks to Apple. However, I want to know whether it is possible to create the PDFPage instance directly from the CGImage, CIImage

  1   2   >