Re: Bindings - newbie question

2008-09-02 Thread Quincey Morris
On Sep 1, 2008, at 22:25, Oleg Krupnov wrote: What I do: From within MyDocument's windowControllerDidLoadNib message: [myController bind: @currMode toObject: self withKeyPath:@currMode options:nil]; I do not override bind, unbind etc. of MyController relying on the default implementation

Re: NSArray as a static

2008-09-02 Thread Jean-Daniel Dupas
Le 2 sept. 08 à 00:13, Steven Noyes a écrit : On Sep 1, 2008, at 1:38 PM, Jean-Daniel Dupas wrote: Unlike java, Obj-C does not have the concept of class variable. Your static variable is a classic C variable, and C variable are not automatically initialized to NULL. The first time you

Re: Creating movie on background thread

2008-09-02 Thread Roger Herikstad
Hi, Thanks for pointing that out. My application is 64 bit, though, as it needs to handle fairly large datasets. Since the Carbon stuff is not 64 bit, I'm basically in trouble. Does anyone know of a way around this? I guess an option would be to keep everything to the main thread, but I'd like to

Re: Creating movie on background thread

2008-09-02 Thread j o a r
On Sep 2, 2008, at 12:55 AM, Roger Herikstad wrote: Since the Carbon stuff is not 64 bit Not correct: Some of it is, some of it isn't. Read the API reference documentation and release notes to figure out which is what. Besides, QTKit is a Cocoa framework. j o a r

Re: Creating movie on background thread

2008-09-02 Thread Roger Herikstad
Hi, But I do need the Carbon headers to use the functions AttachMovieToCurrentThread, DetachMovieFromCurrentThread, etc, no? I had to add the Quicktime framework to get access to these, after which Xcode complained that QuickTime.h is not 64 bit... ~ Roger On Tue, Sep 2, 2008 at 4:05 PM, j o a

Re: Problem with NSUserDefaultsController

2008-09-02 Thread Mark Allan
I think I've fixed the the problem, thanks to an idea I had whilst reading Oleg's Bindings - newbie question thread. I've added a message within -init to bind my model's variable (theValue) to the appropriate value (thevalue) within the standardUserDefaults dictionary (myPrefs). Apologies for

Re: Trouble with Scripting Bridge

2008-09-02 Thread has
Tommy Nordgren wrote: On 31 aug 2008, at 03.12, Peter Stirling wrote: I've been trying to do some python scripting of iTunes using pyobjc and ScriptingBridge, and I've been having some problems (I reduced everything to objective-c on its own in order work out if it was caused by pyobjc).

Modal dialog from a document-modal sheet

2008-09-02 Thread Nor
My app needs to open NSOpenPanel from a document-modal sheet using action-target model. However, after dismissing the NSOpenPanel and then pressing a close button on the sheet, even though my callback gets an event to close the sheet, orderOut: comes to do nothing but just cycling the rainbow

Re: Bindings - newbie question

2008-09-02 Thread Oleg Krupnov
I have read the following thread: http://www.cocoabuilder.com/archive/message/cocoa/2008/6/27/211362 (the useful part of it) and mostly figured out the matter myself and coped to make my code work. I will now briefly set forth my understanding and appreciate if some more experienced colleague

Re: AppleScript on a Context Menu

2008-09-02 Thread has
David Orriss Jr wrote: OK, it's not Cocoa, per se... but I thought someone here might know. I want to create an AppleScript that is on the Context (Ctrl+Click/ Right Click) menu. I've seen ways to do it with Automator - but that puts the script in the automator menu. I want it top-level.

Re: Trouble with Scripting Bridge

2008-09-02 Thread Peter Stirling
'=' and '==' are equivalent in predicate format strings (predicates are queries, so assignment isn't possible) I should probably have made clear in the first post: The program returns a list of all tracks that are marked as gapless from my mp3 collection (and only those marked gapless), the

Re: Valgrind alternative?

2008-09-02 Thread Keith Duncan
Works pretty well on the few apps I've run it on. I'll second that; I used it for the first time yesterday and it's very good. Keith ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments

Preference panes and Apple Help

2008-09-02 Thread Andrew White
I can't seem to get my preference pane to register with Apple Help. The bundle contains English.lproj/MyPrefHelp This contains: My Pref Help.helpindex (also tried with MyPrefHelp.helpindex) MyPrefHelp.html pages/ ... image/ ... style/ ... InfoPlist.strings (English) contains:

[Long] flicker issue using an NSOpenGLView / resent

2008-09-02 Thread eric.bachard
[my apologies if ever you receive the mail twice] Hi, I'm writing to the list, because I got a problem I can't solve, even after reading a lot of archives about possible wrong thing we do, and searching a lot on the web. First, the code was initialy written in C++, and adding the

Re: Core Data: Instantiating linked entities

2008-09-02 Thread Renaud Céroce
I have my program working at last. Thank you all for your answers, particularly to you Quincey, who understood well my misconceptions and took the time to provide me with a very detailed answer. Thank you again ! Renaud Pradenc ceroce.com ___

Re: Image in NSOutlineView

2008-09-02 Thread chaitanya pandit
If you want to preserve the state for other cells then you can maintain an instance variable (flag) in the ImageAndTextCell, so in outlineViewSelectionDidChange, you simply get the cell for the selected row and set it's flag to YES, and in willDisplayCell you simply check that flag of the

Re: how to delete the current user's directory?

2008-09-02 Thread Shawn Erickson
On Mon, Sep 1, 2008 at 6:18 PM, Chris Suter [EMAIL PROTECTED] wrote: I believe there's a sample somewhere that illustrates the new procedure. http://developer.apple.com/samplecode/BetterAuthorizationSample/listing4.html -Shawn ___ Cocoa-dev mailing

Weak Linking using HiShape

2008-09-02 Thread Pierre Guilluy
Hi there, We're trying to compile our application so that it can run under 10.5 10.4 using weak linking (this is required for us other libraries). Our software is based on wxWidget and so for the moment we're evaluating the possibility of running the minimal sample from wxWidget using weak

Re: NSArray as a static

2008-09-02 Thread Clark Cox
On Tue, Sep 2, 2008 at 12:33 AM, Jean-Daniel Dupas [EMAIL PROTECTED] wrote: Le 2 sept. 08 à 00:13, Steven Noyes a écrit : On Sep 1, 2008, at 1:38 PM, Jean-Daniel Dupas wrote: Unlike java, Obj-C does not have the concept of class variable. Your static variable is a classic C variable, and C

Re: wrapping multiple IBOutlet objects for reuse

2008-09-02 Thread Chuck Han
I think you'd be better off doing things programmatically, but leverage the framework as much as possible. I'm developing on the iPhone, so if you're not, I hope there are analogous built-in classes that you can leverage: 1. Since it looks like you want rows of objects, I'd leverage

Re: NSArray as a static

2008-09-02 Thread Jean-Daniel Dupas
Le 2 sept. 08 à 16:29, Clark Cox a écrit : On Tue, Sep 2, 2008 at 12:33 AM, Jean-Daniel Dupas [EMAIL PROTECTED] wrote: Le 2 sept. 08 à 00:13, Steven Noyes a écrit : On Sep 1, 2008, at 1:38 PM, Jean-Daniel Dupas wrote: Unlike java, Obj-C does not have the concept of class variable. Your

Re: Valgrind alternative?

2008-09-02 Thread Keith Duncan
Works pretty well on the few apps I've run it on. I'll second that; I used it for the first time yesterday and it's very good. Accidental cross posting, it is nonetheless very interesting, see http://tinyurl.com/69vnqv for the rest of the thread. Keith

Re: Preference panes and Apple Help

2008-09-02 Thread Gregory Weston
Andrew White wrote: I can't seem to get my preference pane to register with Apple Help. ... Any guidance? Ran into difficulties with this a few years ago, partly because it was under-documented and partly because some of the documentation that was there had a critical typo. When I

Re: NSDateFormatter and Display Value bindings

2008-09-02 Thread Keary Suska
9/1/08 9:46 PM, also sprach [EMAIL PROTECTED]: I have a label that I want to display the date range for which I am displaying data. So, the label would say July 1, 2008 to September 1, 2008 for my QTD numbers. That is simple enough, but when I set the display value binding to my startDate and

Re: NSTableView sometimes doesn't repaint on reloadData:?

2008-09-02 Thread Corbin Dunn
On Aug 30, 2008, at 6:33 PM, Kyle Sluder wrote: On Sat, Aug 30, 2008 at 7:30 PM, marc hoffman [EMAIL PROTECTED] wrote: right - but it wouldn't constantly requery for the row count, right? so if i tell it you got 3 rows and then later, when more rows get added, the reloadData call fails,

Re: Creating movie on background thread

2008-09-02 Thread j o a r
On Sep 2, 2008, at 1:14 AM, Roger Herikstad wrote: But I do need the Carbon headers to use the functions AttachMovieToCurrentThread, DetachMovieFromCurrentThread, etc, no? It doesn't seem like that's the case: With Mac OS X 10.5 and QuickTime 7.3 or later installed, QTKit provides the

Re: Weak Linking using HiShape

2008-09-02 Thread Eric Schlegel
On Sep 2, 2008, at 5:06 AM, Pierre Guilluy wrote: After recompiling the libraries and minimal example using -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.4 the example works fine under 10.5 but running it under a 10.4 system comes with a dyld error dyld: lazy symbol

Re: NSOutlineView and checkbox cells for child items

2008-09-02 Thread Corbin Dunn
On Aug 30, 2008, at 10:34 PM, Seth Willits wrote: On Aug 30, 2008, at 9:35 PM, Justin Williams wrote: I have an two-column NSOutlineView with the first column being an checkbox cell. This works fine for any root level/parent items, but any children underneath a given item will not display a

Re: Finder Eject Button in OutlineView

2008-09-02 Thread Corbin Dunn
On Sep 1, 2008, at 4:25 PM, kiran Sanka wrote: I am trying to figure out how I might be able to do something like Finder does displaying disc Eject Image(When disc inserted) indicator as part of an outline item. I did by customizing NSTextField Cell as below - (void)

Re: NSArray as a static

2008-09-02 Thread Richard Good
First I do appreciate the help. The code suggested below does what I need it to, but I don't understand something (probably the semantics of 'static'). I know the constants are set only once as I traced the code but, it sure seems like they should be set each time the method is called.

Re: acceptsFirstMouse with NSTableView

2008-09-02 Thread Corbin Dunn
On Sep 1, 2008, at 8:41 PM, Ron Wagner wrote: I am trying to get an NSTableView to change it's selection when clicking on one if it's cells when it's window is not active. I have subclassed NSTableView, overridden acceptsFirstMouse: and return YES unconditionally, and verified that it is

Re: acceptsFirstMouse with NSTableView

2008-09-02 Thread Corbin Dunn
On Sep 2, 2008, at 2:20 AM, Bill Cheeseman wrote: on 2008-09-01 11:41 PM, Ron Wagner at [EMAIL PROTECTED] wrote: I am trying to get an NSTableView to change it's selection when clicking on one if it's cells when it's window is not active. I have subclassed NSTableView, overridden

Re: NSArray as a static

2008-09-02 Thread Shawn Erickson
On Tue, Sep 2, 2008 at 8:45 AM, Richard Good [EMAIL PROTECTED] wrote: Could someone please explain why? Thanks. That is how static is _defined_ to behave. The initialization only takes place once. -Shawn ___ Cocoa-dev mailing list

Re: Weak Linking using HiShape

2008-09-02 Thread Shawn Erickson
On Tue, Sep 2, 2008 at 8:38 AM, Eric Schlegel [EMAIL PROTECTED] wrote: I believe the problem was also fixed in Xcode 3.1, so you might also be able to install 3.1 and associated SDKs and link against the 10.5 SDK in that release. It must be because our product isn't bitten by this issue and

Re: Modal dialog from a document-modal sheet

2008-09-02 Thread Scott Ribe
Any suggestions and advices would be mush appreciated. Pause in the debugger and see what your app is doing. Could be a retain/release problem, where you're messaging an object that was released and whose memory has been overwritten. (Can happen--I saw exactly this behavior, locked up, from an

Re: Problem with NSUserDefaultsController

2008-09-02 Thread Keary Suska
9/2/08 2:37 AM, also sprach [EMAIL PROTECTED]: For what it's worth, the [sharedUserDefaultsController save:] message is still returning before performing the save, so if I send any other messages within my savePrefs method, userDefaults will still contain the old value - I'm beginning to

Prevent Text Highlighting

2008-09-02 Thread Erik Aigner
Hi, how can i prevent text highlighting (e.g. on enter key) in a NSTextFieldCell? -- eric ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at

NSTreeController for readapt estructure

2008-09-02 Thread Xin
Hello, I am trying to make a grouped tree of my core data, to show in an outlineview. I have been researching how to do it and the only thing I have discovered is that inheriting NSTreeNode is useless. I want group the root entities for his color. So, the root branches are the colors,

converting from decimal to hexadecimal

2008-09-02 Thread Ronnie B
Hello, Is there an easy way to convert a decimal number to hexadecimal. NSNumberFormatter does not have an api for that. Any advice. Thanks, R. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Re: NSArray as a static

2008-09-02 Thread Clark Cox
On Tue, Sep 2, 2008 at 8:45 AM, Richard Good [EMAIL PROTECTED] wrote: It appears that the line static NSArray* constants = nil; is only being executed on the first call to the method and being ignored on all subsequent calls. Could someone please explain why? Thanks. That's the point of

Re: converting from decimal to hexadecimal

2008-09-02 Thread Shawn Erickson
On Tue, Sep 2, 2008 at 9:45 AM, Ronnie B [EMAIL PROTECTED] wrote: Is there an easy way to convert a decimal number to hexadecimal. NSNumberFormatter does not have an api for that. Any advice. 'man 3 printf' in terminal and look for the x and X conversion specifiers You can use those with

Re: Problem with NSUserDefaultsController

2008-09-02 Thread Mark Allan
For what it's worth, the [sharedUserDefaultsController save:] message is still returning before performing the save, so if I send any other messages within my savePrefs method, userDefaults will still contain the old value - I'm beginning to wonder if this is a bug within

Re: Path animation with CGPathAddArcToPoint

2008-09-02 Thread John Harper
On Sep 2, 2008, at 10:30 AM, Gordon Hughes wrote: I guess I had gotten lucky with a previous path animation attempt (a MoveToPoint and EllipseInRect) when I used the paced calculation mode because it worked. According to the CAKeyframeAnimation Class Reference, although it's available in OS X

Debugging NSWindow disappearances

2008-09-02 Thread Nick Zitzmann
I've got a situation in my application where, when it is placed in the background, its windows disappear from view, although they continue to show up in the application's Dock menu, so they're not closed. How do I set a breakpoint to trigger when one of these windows disappears? I already

Re: converting from decimal to hexadecimal

2008-09-02 Thread Gregory Weston
Ronnie B wrote: Hello, Is there an easy way to convert a decimal number to hexadecimal. NSNumberFormatter does not have an api for that. Any advice. Depends on what you mean. The words decimal and hexadecimal don't have any implications beyond the presentation of data. In memory,

Re: Problem with NSUserDefaultsController

2008-09-02 Thread Keary Suska
9/2/08 11:04 AM, also sprach [EMAIL PROTECTED]: Some other suggestions: storing the shared defaults and controller is really just a waste of memory. They won't change across invocations. With the overhead of Objective C messaging, isn't it more efficient to obtain once and store the

Re: converting from decimal to hexadecimal

2008-09-02 Thread Gregory Weston
On Sep 2, 2008, at 2:04 PM, Ronnie B wrote: Ok. In my code I have this: NSString *str = [NSString stringWithFormat:@%x, [NSNumber numberWithInt:12345]]; NSLog(@ --- hex or not %@, str); in a concole I see this: --- hex or not 5c633d0 But, in Calculator.app I see this: 0x3039

Re: Debugging NSWindow disappearances

2008-09-02 Thread Randall Meadows
On Sep 2, 2008, at 11:52 AM, Nick Zitzmann wrote: I've got a situation in my application where, when it is placed in the background, its windows disappear from view, although they continue to show up in the application's Dock menu, so they're not closed. How do I set a breakpoint to

Re: converting from decimal to hexadecimal

2008-09-02 Thread Ronnie B
That was it. Thanks Gregory. On Tue, Sep 2, 2008 at 2:08 PM, Gregory Weston [EMAIL PROTECTED] wrote: On Sep 2, 2008, at 2:04 PM, Ronnie B wrote: Ok. In my code I have this: NSString *str = [NSString stringWithFormat:@%x, [NSNumber numberWithInt:12345]]; NSLog(@ --- hex or not %@,

Re: Debugging NSWindow disappearances

2008-09-02 Thread Nick Zitzmann
On Sep 2, 2008, at 12:10 PM, Randall Meadows wrote: I'm sure you checked this (!), but the Hide On Deactivate is not checked for those windows in your [xn]ib, right? It wasn't turned on in the main window, but that was turned on in one of the children of the main window, and apparently

Re: Debugging NSWindow disappearances

2008-09-02 Thread Eric Schlegel
On Sep 2, 2008, at 11:17 AM, Nick Zitzmann wrote: Why is Hide On Deactivate circumventing all of the different order out methods? Hide on Deactivate windows are hidden by the window server automatically when your process deactivates, and the window server (being a separate process from

Re: acceptsFirstMouse with NSTableView

2008-09-02 Thread Ron Wagner
On Sep 2, 2008, at 11:45 AM, Corbin Dunn wrote: On Sep 1, 2008, at 8:41 PM, Ron Wagner wrote: I am trying to get an NSTableView to change it's selection when clicking on one if it's cells when it's window is not active. I have subclassed NSTableView, overridden acceptsFirstMouse: and

Adding PDFPage to PDFDocument crashes

2008-09-02 Thread Paul Archibald
Okay, after a bunch of struggles, I got my code to work. What I wanted was to make a multi-page pdf document from a bunch of text. I wanted a method that would take an array of strings and make a pdf page from each string, then join them all together into a single pdf document. My

Re: Adding PDFPage to PDFDocument crashes

2008-09-02 Thread Andy Mroczkowski
Hi Paul, The structure of your code is very similar to some I wrote, which works well for me. A couple comments: PDFDocument *tempDoc = [[PDFDocument alloc] initWithData:[v dataWithPDFInsideRect:r]]; PDFPage *page = [[PDFPage alloc] initWithDocument:tempDoc];

Re: Path animation with CGPathAddArcToPoint

2008-09-02 Thread Gordon Hughes
John, Thanks for your reply. I'll submit the radar later today. I'm still curious about elliptical paths and 360 degree arcs. Do they always start/end on horizontals, or is there something that I'm overlooking to have the path start at an arbitrary point? Gordon On 9/2/08, John Harper

Re: Best 'native' formats for NSImage and NSSound?

2008-09-02 Thread Benjamin Stiglitz
In running Shark on my app recently I noticed that by far, my app spent most of its time in: CGSConvertBGR888toRGBA. I'm having trouble understanding what this means. It appears that CoreGraphics is having to convert some of my non-alpha channel images to have an alpha, and perhaps

Re: Path animation with CGPathAddArcToPoint

2008-09-02 Thread John Harper
On Sep 2, 2008, at 12:41 PM, Gordon Hughes wrote: Thanks for your reply. I'll submit the radar later today. I'm still curious about elliptical paths and 360 degree arcs. Do they always start/end on horizontals, or is there something that I'm overlooking to have the path start at an

Re: Adding PDFPage to PDFDocument crashes

2008-09-02 Thread Andy Mroczkowski
Yes you can skip the page variable altogether if you want. [outputDoc insertPage:[tempDoc pageAtIndex:0] atIndex:[outputDoc pageCount]]; Should work fine. On Sep 2, 2008, at 3:47 PM, Paul Archibald wrote: Thanks for the comments Andy. I see what you mean about reassigning that page

Re: Core Data: Instantiating linked entities

2008-09-02 Thread Ben Trumbull
On Sep 1, 2008, at 3:48 PM, Godfrey Van Der Linden wrote: On 02/09/2008, at 8:26, Ben Trumbull [EMAIL PROTECTED] wrote: - (void) awakeFromInsert { [super awakeFromInsert]; _rect = [NSEntityDescription insertNewObjectForEntityForName:@Rect inManagedObjectContext:[self

Detecting File Existence over FTP

2008-09-02 Thread Wyatt Webb
Hi all, I'm still getting comfortable with NSURLConnection and the related classes as well as the CFStream classes for reading and writing files via FTP. I think I've got it down, now, but I have one hiccup I'd like to solve. What's the best way to see if a file already exists on the

Get confused with initWithData:encoding:

2008-09-02 Thread Pierre Molinaro
Hello, I do not understand what I am doing wrong ; running the following snippet: NSMutableData * d = [NSMutableData dataWithCapacity:10] ; const unsigned char data = 0xC0 ; // U+00CO is À [d appendBytes: data length:1] ; NSLog (@d: %@, d) ; NSString *

Declaring multidimensional arrays in obj-c

2008-09-02 Thread Don Arnel
Hello all, I'm having a devil of a time trying to figure out what seems to be a pretty basic scenario: declaring a multidimensional array in the interface section of a class when the array dimensions are unknown until runtime. Can anyone point me in the right direction with this one?

Re: Declaring multidimensional arrays in obj-c

2008-09-02 Thread Keary Suska
9/2/08 2:25 PM, also sprach [EMAIL PROTECTED]: I'm having a devil of a time trying to figure out what seems to be a pretty basic scenario: declaring a multidimensional array in the interface section of a class when the array dimensions are unknown until runtime. Can anyone point me in the

Re: Detecting File Existence over FTP

2008-09-02 Thread Mike Abdullah
It's not exactly a direct answer to your question, but have you considered looking into using ConnectionKit instead for FTP access? It's Objective-C and fuller-featured than CoreFoundation's FTP code. Mike. On 2 Sep 2008, at 21:21, Wyatt Webb wrote: Hi all, I'm still getting comfortable

Re: textfield validation / formatter: emailaddress

2008-09-02 Thread Mike Abdullah
You want to use either an NSFormatter subclass, or possibly, if using bindings, key-value validation. On 2 Sep 2008, at 20:29, Joeles Baker wrote: hi, is there any easy way to validate a textfield? my app has a textfield, which should only accept emailaddresses. before I start reinventing

Re: Declaring multidimensional arrays in obj-c

2008-09-02 Thread Bill Bumgarner
On Sep 2, 2008, at 1:49 PM, Keary Suska wrote: 9/2/08 2:25 PM, also sprach [EMAIL PROTECTED]: I'm having a devil of a time trying to figure out what seems to be a pretty basic scenario: declaring a multidimensional array in the interface section of a class when the array dimensions are unknown

Re: Declaring multidimensional arrays in obj-c

2008-09-02 Thread Filip van der Meeren
I don't see the problem... Just use a pointer to a pointer to a pointer to a ... Every array in C is just a hidden pointer and if you try to dynamically allocate an array in C then you are left only with one option: malloc, calloc, realloc On 02 Sep 2008, at 22:49, Keary Suska wrote:

re: Declaring multidimensional arrays in obj-c

2008-09-02 Thread Justin Carlson
Hello all, I'm having a devil of a time trying to figure out what seems to be a pretty basic scenario: declaring a multidimensional array in the interface section of a class when the array dimensions are unknown until runtime. Can anyone point me in the right direction with this one? Hi Don,

[NSCursor] White Arrow?

2008-09-02 Thread Stéphane Sudre
In Apple Remote Desktop, when you are in observe mode, the cursor is set to a white arrow. This is pretty nice to show that you can't click somewhere you're usually able to. As far as I can tell, this cursor is not set from a picture. Is the white arrow cursor a system cursor not documented

Re: Declaring multidimensional arrays in obj-c

2008-09-02 Thread Keary Suska
9/2/08 2:57 PM, also sprach [EMAIL PROTECTED]: I don't see the problem... Just use a pointer to a pointer to a pointer to a ... Every array in C is just a hidden pointer and if you try to dynamically allocate an array in C then you are left only with one option: malloc, calloc, realloc No

Re: Declaring multidimensional arrays in obj-c

2008-09-02 Thread Don Arnel
Thanks, everyone. I guess I'm going the pointer/malloc way. On Sep 2, 2008, at 5:27 PM, Keary Suska wrote: 9/2/08 2:57 PM, also sprach [EMAIL PROTECTED]: I don't see the problem... Just use a pointer to a pointer to a pointer to a ... Every array in C is just a hidden pointer and if you try

Re: Get confused with initWithData:encoding:

2008-09-02 Thread Kyle Sluder
On Tue, Sep 2, 2008 at 4:25 PM, Pierre Molinaro [EMAIL PROTECTED] wrote: Could someone tell me why initWithData:encoding succeeds? Because Cocoa might be letting you slide? --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: Adding PDFPage to PDFDocument crashes

2008-09-02 Thread Michael Ash
On Tue, Sep 2, 2008 at 3:28 PM, Andy Mroczkowski [EMAIL PROTECTED] wrote: The other two autoreleases are correct, though in general I suggest using regular release when you can. The overhead on autorelease isn't much but it is non-zero. Plus it makes over-release bugs a little harder to track

[NSTableView] Drag and Drop issues with NSButton in Leopard

2008-09-02 Thread Stéphane Sudre
I have some code that works OK on Tiger but does not on Leopard. I have a NSTableView with a column whose data cell is a NSButtonCell subclass. The NSButtonCell is set to be a checkbox/switchbox. The subclass implements the following method: - (BOOL) trackMouse:(NSEvent *)theEvent

Re: [NSCursor] White Arrow?

2008-09-02 Thread I. Savant
On Sep 2, 2008, at 5:26 PM, Stéphane Sudre wrote: In Apple Remote Desktop, when you are in observe mode, the cursor is set to a white arrow. This is pretty nice to show that you can't click somewhere you're usually able to. As far as I can tell, this cursor is not set from a picture. Is

Re: Preference panes and Apple Help

2008-09-02 Thread Andrew White
Thanks Gregory, that did the trick. I actually didn't need your step 2 (putting the anchors in the Info.plist); using a helpindex worked fine on 10.4. But I did need to explicitly register the help book. Incidentally, I was able to shortcut the Apple example code slightly using

Re: Modal dialog from a document-modal sheet

2008-09-02 Thread norio
Thank you very much for your hot experience. I'm not sure where to place breakpoints yet, but will carefully look at the retain/release places. Let me thank you again. Nor On 2008/09/03, at 1:18, Scott Ribe wrote: Any suggestions and advices would be mush appreciated. Pause in the

Configuring the Doc via Managed Prefs

2008-09-02 Thread Ken Andrews
I read through the thread about getting the guid used for the key when attempting to add an item into the doc from an installer and have a couple of questions. I am working on a utility that creates users with managed preferences set for Parental Controls. While I can see not wanting an app to

Re: Adding PDFPage to PDFDocument crashes

2008-09-02 Thread Paul Archibald
Thanks for the comments Andy. I see what you mean about reassigning that page pointer. As I recall, I had trouble fully allocating a page without the pdf document. Just using [[PDFPage alloc] init] did not seem to create a real pdf page, and trying to do anything with such an object

nibless applications

2008-09-02 Thread David Alter
I have a situation where it would make a lot of sense to have a nibless application. I think this situation is unique and would suspect that very few people would need to do this. There is some information on how to do this. Lap Cat Software has some good information on this

Re: Modal dialog from a document-modal sheet

2008-09-02 Thread Scott Ribe
I'm not sure where to place breakpoints yet Launch under the debugger, do what you do to lock it up, then in the debugger click the pause button and look at the stack to see where it is. This will often give you a clue; you'll often see it locked up trying to send a message to a particular

utf8 to NSString crasher

2008-09-02 Thread Waqar Malik
I am converting UTF8 string Rø to NSString using stringWithUTF8String: I get nil as a return value: (gdb) p utf8_str $1 = R\303, '\000' repeats 253 times (gdb) po theString Cannot access memory at address 0x0 Is there a canonical way to convert wchat_t to NSString? Thanks

Font Color In CTLineDraw?

2008-09-02 Thread Mike Rossetti
Are there limitations on what kind of text can be drawn using CTLineDraw in a Quartz context? I'm finding it impossible to set the font color. Here is some code I've been experimenting with: ... NSFontDescriptor *fontDesc = [NSFontDescriptor fontDescriptorWithFontAttributes:

Re: NSTableView/NSOutlineView variable row height

2008-09-02 Thread Chris Suter
Hi Kevin, On Tue, Sep 2, 2008 at 3:58 AM, Kevin Meaney [EMAIL PROTECTED] wrote: I feel like I am missing something that should be obvious. Pointers would be helpful or a suggestion for something else to try. Here's some code I wrote a while back that we use. It works back to 10.3.7 (possibly

[OT] curious about the iPhone dev program

2008-09-02 Thread Paul Archibald
Comrades, going off topic here I am getting interested in iPhone development, but I can't tell if dropping a C-note to Apple is really worth it. Anyone know of other fora where I can tune in to see what its all about, or is Apple's the only game in town? now returning to our regularly

Re: Adding PDFPage to PDFDocument crashes

2008-09-02 Thread Paul Archibald
I really like that rule of thumb. Very clean, very cool. Thanks. (I am not too worried about overhead in this case.) Paul On Sep 2, 2008, at 7:00 PM, [EMAIL PROTECTED] wrote: And if you do use autorelease, then put it right where you allocate the object. For example: NSTextView* view

Re: basic Core Data scaling question

2008-09-02 Thread Michael B Johnson
Thanks Ben. This was all great information. The doc link was the key - after I posted, and kept sampling my app, I figured out a number of these myself, but the doc made me more confident that I wasn't missing something in Core Data. On a tangential note, how can I get Instruments to

[MEET] CocoaHeads Mac Developer Meetings

2008-09-02 Thread Stephen Zyszkiewicz
Greetings, CocoaHeads is an international Mac programmer's group. We specialize in Cocoa, but everything Mac programming related is welcome. Why Should I Attend? Meeting other Mac OS X developers in person is both fun and immensely useful. There's no better way to learn Cocoa or get help with

Re: Font Color In CTLineDraw?

2008-09-02 Thread David Duncan
On Sep 2, 2008, at 7:43 PM, Mike Rossetti wrote: [attrString addAttribute:NSForegroundColorAttributeName value:[NSColor lightGrayColor] // No effect. range:NSMakeRange(0, [attrString length])]; Rendering a font with an NSColor attribute requires a

Re: [OT] curious about the iPhone dev program

2008-09-02 Thread Dave Carrigan
On Sep 2, 2008, at 8:00 PM, Paul Archibald wrote: I am getting interested in iPhone development, but I can't tell if dropping a C-note to Apple is really worth it. Anyone know of other fora where I can tune in to see what its all about, or is Apple's the only game in town? You can

Re: utf8 to NSString crasher

2008-09-02 Thread Ken Thomases
On Sep 2, 2008, at 9:42 PM, Clark Cox wrote: On Tue, Sep 2, 2008 at 7:29 PM, Waqar Malik [EMAIL PROTECTED] wrote: I am converting UTF8 string Rø to NSString using stringWithUTF8String: I get nil as a return value: (gdb) p utf8_str $1 = R\303, '\000' repeats 253 times That is not a valid

process monitoring panic

2008-09-02 Thread Paul Archibald
Help. I was about to send my client a new version of the app, and the main thing I just thought I fixed has completely stopped working. Sheesh. What the app does is launch a memory and cpu intensive command line program and monitor its progress. It I run the CLP separately, I see it

Re: process monitoring panic

2008-09-02 Thread Ken Thomases
On Sep 3, 2008, at 12:03 AM, Paul Archibald wrote: Okay, this has me stumped. Does Xcode somehow pipe the output of the CLP to my app when it is present, and when its not there that pipe is never hooked up? It is your responsibility to establish the pipe between the subprocess and your