Re: Why is [nil aMessage] a no-op?

2008-04-18 Thread Jens Alfke
On 17 Apr '08, at 9:56 PM, Adam P Jenkins wrote: Can you give an example of where invoking methods on nil objects would make sense in a non-error-path situation? I'm not trying to be argumentative here, I'm really curious to know what Objective-C idioms take advantage of the

Re: @dynamic and Programmatic Access to Setters

2008-04-18 Thread Jens Alfke
I've successfully used @dynamic property implementations with CoreData managed-object subclasses. The only limitation I know of is that it only works with object-valued properties, not scalars. But that's not what you're running into. My guess would be that you're not instantiating the

Re: Mounting AFP Volume using Cocoa

2008-04-18 Thread Jens Alfke
On 17 Apr '08, at 1:19 PM, JanakiRam wrote: Is there any cocoa way to mount a volume silently by passing the user name and password. There is no Objective-C API; you'll have to use either CoreServices or POSIX APIs. I would look at the FSVolumeMount function. —Jens smime.p7s

Re: Why is [nil aMessage] a no-op?

2008-04-18 Thread Gerriet M. Denkmann
On 18 Apr 2008, at 07:18, [EMAIL PROTECTED] wrote: Date: Fri, 18 Apr 2008 00:56:13 -0400 On Apr 18, 2008, at 12:47 AM, Bill Bumgarner wrote: On Apr 17, 2008, at 11:20 PM, Adam P Jenkins wrote: Exactly. And now that the convention of methods returning self no longer exists, it seems like

Another graphical challenge...

2008-04-18 Thread Graham Cox
This is not really a Cocoa-specific problem, but before I embark on a long-winded quest, I just wonder if there's a solution out there already. Given two rectangles that overlap in some way, I need to create a list of all the rectangles that make up the non-overlapping areas. In other

running out of NSPipes

2008-04-18 Thread justin webster
so I see at least one other thread on this topic but no real solution. the situation is: using NSTask to run a shell command and using the return. all the NSTask stuff is in a separate function which gets called repeatedly from a loop. works great until I run out out NSPipes - about 248

Re: Why is [nil aMessage] a no-op?

2008-04-18 Thread ab_lists
On 18 Apr 2008, at 06:20, Adam P Jenkins wrote: Of course (and as you have discovered), there are an awful lot of situations where a 'nil' return value is actually indicative of a serious problem -- something has failed that shouldn't have. And tracking it down can be a pain. Exactly.

Re: OpenGL in a Visual iTunes Plugin

2008-04-18 Thread Paul Bailey
Since Cocoa is not an option, this is probably the wrong list to be asking... Maybe mac-opengl on this list server is more appropriate? Cheers, Paul On Thu, Apr 17, 2008 at 8:43 PM, J. Todd Slack [EMAIL PROTECTED] wrote: Hi All, I wish to create a UI using OpenGL for use in an ITunes

how to get what tells fileURL has been changed by others

2008-04-18 Thread norio
Hi, I'd like to know who tells NSDocument that its location has been changed by other apps and how to get the notification. I'd like to hack before you notice something like the document's location was changed, so do you want to save any other location? when you open the file by an app

Re: Mounting AFP Volume using Cocoa

2008-04-18 Thread Bill Cheeseman
on 2008-04-18 2:23 AM, Jens Alfke at [EMAIL PROTECTED] wrote: On 17 Apr '08, at 1:19 PM, JanakiRam wrote: Is there any cocoa way to mount a volume silently by passing the user name and password. There is no Objective-C API; you'll have to use either CoreServices or POSIX APIs. I would

Re: Mounting AFP Volume using Cocoa

2008-04-18 Thread JanakiRam
Hi Jens, Thanks for the reply. Can you provide some pointers on using FSVolumeMount API or some CoreServices API. If no API is available , then how Finder is able to connect to afp volume using Connect to Server (Cmd+K). Any pointers on these is greatly appreciated. -JanakiRam. On Fri, Apr

Re: Mounting AFP Volume using Cocoa

2008-04-18 Thread Mike Abdullah
On 18 Apr 2008, at 12:52, JanakiRam wrote: Hi Jens, Thanks for the reply. Can you provide some pointers on using FSVolumeMount API or some CoreServices API. If no API is available , then how Finder is able to connect to afp volume using Connect to Server (Cmd+K). Any pointers on these is

Re: Drawing a 1 pixel-perfect wide bordered NSBezierPath

2008-04-18 Thread Scott Thompson
On Apr 17, 2008, at 4:28 AM, Heinrich Giesen wrote: Sorry, pressed the wrong button. And: if the bezier path shall always be drawn 1 pixel wide, independent of resolution and scaling the lineWidth should be set to 0 (zero) While this works for PostScript, it does not work for Quartz.

Re: running out of NSPipes

2008-04-18 Thread Scott Ribe
I have the function wrapped in an autorelease pool and have tried explicitly allocating and releasing the NSPipe. Sre you sure the NSPipes are being dealloc'd? Are you sure you have sent release/autorelease enough times? NSTask probably retains the NSPipes. Are you reusing the same NSTask? If

Re: Drawing a 1 pixel-perfect wide bordered NSBezierPath

2008-04-18 Thread Graham Cox
On 18 Apr 2008, at 10:19 pm, Scott Thompson wrote: On Apr 17, 2008, at 4:28 AM, Heinrich Giesen wrote: Sorry, pressed the wrong button. And: if the bezier path shall always be drawn 1 pixel wide, independent of resolution and scaling the lineWidth should be set to 0 (zero) While this

Re: Another graphical challenge...

2008-04-18 Thread Richard Kennaway
Quoting Graham Cox [EMAIL PROTECTED]: This is not really a Cocoa-specific problem, but before I embark on a long-winded quest, I just wonder if there's a solution out there already. Given two rectangles that overlap in some way, I need to create a list of all the rectangles that make up the

Re: Another graphical challenge...

2008-04-18 Thread Richard Kennaway
Sorry, that should have gone just to the original poster. -- Richard Kennaway ___ 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

Re: Drawing a 1 pixel-perfect wide bordered NSBezierPath

2008-04-18 Thread Peter Zegelin
On 18/04/2008, at 10:28 PM, Graham Cox wrote: On 18 Apr 2008, at 10:19 pm, Scott Thompson wrote: On Apr 17, 2008, at 4:28 AM, Heinrich Giesen wrote: Sorry, pressed the wrong button. And: if the bezier path shall always be drawn 1 pixel wide, independent of resolution and scaling the

Re: Drawing a 1 pixel-perfect wide bordered NSBezierPath

2008-04-18 Thread Peter Zegelin
On 18/04/2008, at 11:06 PM, Graham Cox wrote: On 18 Apr 2008, at 11:01 pm, Peter Zegelin wrote: Weird - I just set the stroke width of my selection rectangle to 0 and didn't get anything. Peter What function is drawing? I'm not sure this works with NSFrameRectWithWidth(), but it

Re: Why is [nil aMessage] a no-op?

2008-04-18 Thread Citizen
On 18 Apr 2008, at 05:56, Adam P Jenkins wrote: On Apr 18, 2008, at 12:47 AM, Bill Bumgarner wrote: On Apr 17, 2008, at 11:20 PM, Adam P Jenkins wrote: Exactly. And now that the convention of methods returning self no longer exists, it seems like there's no longer any advantage to this

Re: Drawing a 1 pixel-perfect wide bordered NSBezierPath

2008-04-18 Thread Graham Cox
On 18 Apr 2008, at 11:21 pm, Scott Thompson wrote: Setting a line width of 0 draws a 1-pixel wide line at the resolution of the device it draws to, so on screen, that's 1/72 of an inch (approx) on a printer 1/600 inch, say. It's a useful way to isolate drawing from any CTM scaling. This is

Different ways of application installation

2008-04-18 Thread parag vibhute
Hi guys, I have build cocoa application. I am finding out as many ways as possible of application installation which can be done either locally or remotely. Can you please list all those ways? Thanks, Palav -- There are many things in your life that will catch your eye but only a few will

Re: Drawing a 1 pixel-perfect wide bordered NSBezierPath

2008-04-18 Thread Scott Thompson
What function is drawing? I'm not sure this works with NSFrameRectWithWidth(), but it definitely does with NSBezierPath/ stroke. The NSFrameRect family of routines are odd ducks to begin with. In some ways, they tend to to be more pixel oriented than your typical drawing routines. For

Re: Why is [nil aMessage] a no-op?

2008-04-18 Thread Adam P Jenkins
On Apr 18, 2008, at 1:16 AM, Graham Cox wrote: Here's a simple example: - (void) dealloc { [someIvar release]; [super dealloc]; } is someIvar really initialised? Maybe it's nil? Do I care at this point? no - either way, the code is correct - if the object was made, it's released,

Re: Different ways of application installation

2008-04-18 Thread I. Savant
I have build cocoa application. I am finding out as many ways as possible of application installation which can be done either locally or remotely. Can you please list all those ways? Have a look at this document:

Re: Different ways of application installation

2008-04-18 Thread Michael Watson
It's worth noting that you also need to define more clearly what you mean by remotely. Do you mean pushing software packages to clients on a network or over the Internet? An installer that pulls its payload from a remote server? Something else? -- m-s On 18 Apr, 2008, at 09:36, I. Savant

Re: Different ways of application installation

2008-04-18 Thread parag vibhute
Remotely means pushing software packages to clients on a network. Not understood meaning of An installer that pulls its payload from a remote server. Palav On Fri, Apr 18, 2008 at 7:31 PM, Michael Watson [EMAIL PROTECTED] wrote: It's worth noting that you also need to define more clearly what

Re: Different ways of application installation

2008-04-18 Thread parag vibhute
ya, option An installer that pulls its payload from a remote server will also be ok. Palav On Fri, Apr 18, 2008 at 7:53 PM, parag vibhute [EMAIL PROTECTED] wrote: Remotely means pushing software packages to clients on a network. Not understood meaning of An installer that pulls its payload

Re: Another graphical challenge...

2008-04-18 Thread Graham Cox
Richard, thanks very much for applying yourself to this problem. You make it seem easy, and it works a treat. I obviously haven't drunk enough coffee today as it looked a lot harder than it turned out to be! Here's my ready-to-use Cocoa-conversion, if anyone else wants to make use of it.

Re: Different ways of application installation

2008-04-18 Thread I. Savant
Remotely means pushing software packages to clients on a network. Not understood meaning of An installer that pulls its payload from a remote server. That's considerably more complicated than a simple client-side install by dragging an application to a folder. :-) I wonder if you realize

Re: Why is [nil aMessage] a no-op?

2008-04-18 Thread Scott Ribe
Here's a simple example: - (void) dealloc { [someIvar release]; [super dealloc]; } It's worth noting that even in C++ there's a special case for delete, so that one can write delete myptr rather than if(myptr) delete myptr) 10 bazillion[1] times. I was around when this behavior was

Re: Printing and tabular data (again)

2008-04-18 Thread Erik Verbruggen
The third approach is to use the NSTextTable, as described in http:// developer.apple.com/documentation/Cocoa/Conceptual/TextLayout/ Articles/TextTables.html Cheers, Erik. On 16 Apr 2008, at 22:44, Luca Torella wrote: Hi all, I know this has been discussed many times before, but I still

Re: Different ways of application installation

2008-04-18 Thread parag vibhute
I don't know much about Mac OS X Server, but does it have this type of remote installation without requiring ARD? Thanks, Palav On Fri, Apr 18, 2008 at 8:04 PM, I. Savant [EMAIL PROTECTED] wrote: Remotely means pushing software packages to clients on a network. Not understood meaning of An

Authenticatiion tool

2008-04-18 Thread parag vibhute
I am currently working on a project which is similar to an iChat application tool. I want to save the chat session as iChat does. Incase of iChat we have noted how when we click on save copy menu item it saves the copy of the chat session as a file with time. And when we want to see the chat

Re: Different ways of application installation

2008-04-18 Thread I. Savant
On Fri, Apr 18, 2008 at 10:56 AM, parag vibhute [EMAIL PROTECTED] wrote: I don't know much about Mac OS X Server, but does it have this type of remote installation without requiring ARD? This is definitely off-topic for this list. You'll want to take these types of questions to a more

Re: Different ways of application installation

2008-04-18 Thread parag vibhute
Fine. Palav On Fri, Apr 18, 2008 at 8:30 PM, I. Savant [EMAIL PROTECTED] wrote: On Fri, Apr 18, 2008 at 10:56 AM, parag vibhute [EMAIL PROTECTED] wrote: I don't know much about Mac OS X Server, but does it have this type of remote installation without requiring ARD? This is definitely

Re: Authenticatiion tool

2008-04-18 Thread I. Savant
In my case I want to save my chat session in an html file which when double clicked will open the file in the browser and will show all the chat messages with their respective images of the people who are sending the messages. How can I do this? One more thing my application is not

setTextContainerInset with different values for left and right

2008-04-18 Thread Ferhat Ayaz
Hi, how would I go about setting NSTextView up so its insets are dx1 from the left and dx2 from the right side? I guess setTextContainerInset: will set for both left and right the same value (dx1 = dx2). Thanks, Ferhat ___ Cocoa-dev

Re: @dynamic and Programmatic Access to Setters

2008-04-18 Thread Mike Rossetti
Hah! I believe Paul and Jens have identified the problem! Yes, I am using [[Tip alloc] init]. I'll rework that portion of the code and ping back later confirmating the good news. Thanks guys! Mike On Apr 17, 2008, at 11:13 PM, Paul Goracke wrote: [snip] I think the problem is in your

Re: Mounting AFP Volume using Cocoa

2008-04-18 Thread Jens Alfke
On 18 Apr '08, at 4:52 AM, JanakiRam wrote: Can you provide some pointers on using FSVolumeMount API or some CoreServices API. I haven't used any of those functions. How about reading the documentation? Just type FSVolumeMount into Xcode's documentation viewer. If no API is available

Re: Why is [nil aMessage] a no-op?

2008-04-18 Thread Rob Napier
On Apr 18, 2008, at 9:56 AM, Adam P Jenkins wrote: On Apr 18, 2008, at 1:16 AM, Graham Cox wrote: Here's a simple example: - (void) dealloc { [someIvar release]; [super dealloc]; } is someIvar really initialised? Maybe it's nil? Do I care at this point? no - either way, the code is

NSTableView -editColumn:row:withEvent:select: question

2008-04-18 Thread John Stiles
The docs for -editColumn:row:withEvent:select: ominously claim: The row at rowIndex must be selected prior to calling editColumn:row:withEvent:select:, or an exception will be raised. I'm implementing a subclass of NSTableView which behaves a little more like an Excel spreadsheet—it

Pasteboard inconsistencies

2008-04-18 Thread Randall Meadows
I'm doing some manipulation of selected text and having some inconsistencies, apparently based on what the *contents* of the text is. I'm very confused about this, hopefully someone can set me straight. I'm using writeSelectionToPasteboard:types: to get the current text selection, using

Re: setTextContainerInset with different values for left and right

2008-04-18 Thread Ben Lachman
You can subclass the text view and returned an origin point from - (NSPoint)textContainerOrigin. This will give you origin.x +inset.width on the left and just inset.width on the right when used in conjunction with setTextContainerInset. -Ben -- Ben Lachman Acacia Tree Software

NSBundle loadNib creates extra NSMenuItem

2008-04-18 Thread Justin Williams
Hi, I have an NSMenuItem in my application that toggles the visibility of my application's main window. If the user hasn't entered a license code for the application, I call a method in my main controller that shows a custom sheet that asks them to register. - (void) showTrialWindow {

Bitmap data from CGImageRef

2008-04-18 Thread Carter R. Harrison
Hey everybody, Is it possible to obtain the raw bitmap data from a CGImageRef? Thanks. Regards, Carter ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the

Re: Bitmap data from CGImageRef

2008-04-18 Thread Adam R. Maxwell
On Friday, April 18, 2008, at 11:32AM, Carter R. Harrison [EMAIL PROTECTED] wrote: Hey everybody, Is it possible to obtain the raw bitmap data from a CGImageRef? Thanks. CGImageGetDataProvider and CGImageProviderCopyData should do what you want. -- adam

Re: Simulating menu bar blink in Cocoa

2008-04-18 Thread John Stiles
Reading the list archives a little more, it looks like there may be two ways to do this: - _NSHighlightCarbonMenu and _NSUnhighlightCarbonMenu are SPIs which take an NSMenu* and do exactly what you'd expect - You can add a fake temporary menu item to your menu, with a suitably bizarre key

Re: Bitmap data from CGImageRef

2008-04-18 Thread Adam R. Maxwell
On Friday, April 18, 2008, at 11:40AM, Adam R. Maxwell [EMAIL PROTECTED] wrote: On Friday, April 18, 2008, at 11:32AM, Carter R. Harrison [EMAIL PROTECTED] wrote: Hey everybody, Is it possible to obtain the raw bitmap data from a CGImageRef? Thanks. CGImageGetDataProvider and

Re: Bitmap data from CGImageRef

2008-04-18 Thread Carter R. Harrison
Thanks Adam.. For some reason I cannot seem to find CGDataProviderCopyData in the Apple docs. I can search for it at the ADC, and it returns the page for CGDataProvider as the first hit, but once you go to that page, there is absolutely no reference to CGDataProviderCopyData. Strange.

Re: Bitmap data from CGImageRef

2008-04-18 Thread Scott Thompson
On Apr 18, 2008, at 1:54 PM, Carter R. Harrison wrote: Thanks Adam.. For some reason I cannot seem to find CGDataProviderCopyData in the Apple docs. I can search for it at the ADC, and it returns the page for CGDataProvider as the first hit, but once you go to that page, there is

Re: running out of NSPipes

2008-04-18 Thread Ken Thomases
On Apr 18, 2008, at 4:23 AM, justin webster wrote: so I see at least one other thread on this topic but no real solution. the situation is: using NSTask to run a shell command and using the return. all the NSTask stuff is in a separate function which gets called repeatedly from a loop. works

Re: Mounting AFP Volume using Cocoa

2008-04-18 Thread Bill Monk
On Apr 18, 2008, at 2:03 PM, Jens Alfke [EMAIL PROTECTED] wrote: I haven't used any of those functions. How about reading the documentation? Just type FSVolumeMount into Xcode's documentation viewer. Well, um, that won't help him much, because there is no such function. Something like this

Modal popup from command line tool or daemon?

2008-04-18 Thread Rod Cater
Hi I'm new to Cocoa and I'm trying to figure out how to create a simple popup which can be displayed from a command line tool or a background process. Ideally it would be something like NSAlert plus a text input field. I've been reading Apple's docs on windows, documents and the various

Re: NSBundle loadNib creates extra NSMenuItem

2008-04-18 Thread Justin Williams
On Fri, Apr 18, 2008 at 2:23 PM, Rob Napier [EMAIL PROTECTED] wrote: On Apr 18, 2008, at 2:26 PM, Justin Williams wrote: When you say a secondary NSMenuItem in the user's menu bar, what do you mean? -Rob Hi Rob, I've made a short screencast that shows what's happening. As you'll see,

Re: Modal popup from command line tool or daemon?

2008-04-18 Thread David Wilson
A command line tool or a true background daemon can't really pull it off- the process wouldn't have a connection to the window server to actually do any of that. The best bet, I think, would be to have a small helper application that could be launched to display the appropriate alert; the helper

Re: Bitmap data from CGImageRef

2008-04-18 Thread Carter R. Harrison
Surprisingly, if you go to Xcode Documentation you can find the method that Adam first mentioned, but it is not on the ADC website. Thanks Scott. On Apr 18, 2008, at 3:05 PM, Scott Thompson wrote: On Apr 18, 2008, at 1:54 PM, Carter R. Harrison wrote: Thanks Adam.. For some reason I

Re: Mounting AFP Volume using Cocoa

2008-04-18 Thread Bill Monk
On Apr 18, 2008, at 2:59 PM, Randall Meadows wrote: On Apr 18, 2008, at 1:48 PM, Bill Monk wrote: On Apr 18, 2008, at 2:03 PM, Jens Alfke [EMAIL PROTECTED] wrote: I haven't used any of those functions. How about reading the documentation? Just type FSVolumeMount into Xcode's documentation

Re: Capsule-Style Toolbar Controls

2008-04-18 Thread Peter Ammon
Thanks Stefan, From the screenshot, it looks to me like the test app is not using the unified title/toolbar metrics, but Mail is. Try checking the unified title/toolbar checkbox in IB. Your understanding of the NSToolbarItemGroup is correct. However, the view will not be automatically

Re: setTextContainerInset with different values for left and right

2008-04-18 Thread Ferhat Ayaz
thank you! Works great. On Apr 18, 2008, at 8:17 PM, Ben Lachman wrote: You can subclass the text view and returned an origin point from - (NSPoint)textContainerOrigin. This will give you origin.x +inset.width on the left and just inset.width on the right when used in conjunction with

Re: NSBundle loadNib creates extra NSMenuItem

2008-04-18 Thread Peter Ammon
These items in the upper right are called status items, to distinguish them from menu items that are in menus. A likely reason for this is that you create the status item in awakeFromNib, and awakeFromNib is being executed twice - once when the main nib is loaded, and once again when your

[SOLVED] Simulating menu bar blink in Cocoa

2008-04-18 Thread John Stiles
The fake temporary item solution actually works pretty well. It's the last thing I'd call elegant, but here's how you can blink a menu title in Cocoa. This assumes that you aren't actually assigning the command+F35 key equivalent to any of your menu items... hopefully a safe assumption for the

Re: Unregistering KVO observers

2008-04-18 Thread Hal Mueller
Maybe try [[NSNotificationCenter defaultCenter] removeObserver:nil name:nil object:self] in your dealloc method? I think that will patch the symptom, but I still don't understand why you're getting the original error. This bit looks important though. Makes me wonder if you've got things

Getting an array/tree controller to select newly added managed objects

2008-04-18 Thread Sean McBride
Hi all, Consider an app that uses bindings and Core Data. It has a tableview bound to an array controller. There is an 'Add' button that creates a new entity to be shown in the table. It could be implemented by: 1) sending add: to the array controller. 2) using a custom IBAction method that

Re: NSTableView -editColumn:row:withEvent:select: question

2008-04-18 Thread Ben Lachman
Well, you should be able to just override the drawing code, since thats really your problem. Going directly against the docs, while it may work fine now, is playing with fire in my opinion. To get the drawing you want, you can just implement tableView:willDisplayCell:forTableColumn:row:

Re: Capsule-Style Toolbar Controls

2008-04-18 Thread Stefan Hafeneger
Hi Peter, Thanks for your reply. You are right. Since the WWDC Beta I haven't touched the unified checkbox because I thought that there is no difference because the design is always unified. I also didn't find something in the HIG about that. So when should we activate this checkbox? Is

Subclassing

2008-04-18 Thread K. Darcy Otto
I am working on a program with a complex hierarchy of classes, and I want to subclass one of the objects a few steps down on that hierarchy. Do I have to create a parallel hierarchy to do this? Here is the problem: AppController instantiates a Deduction object. The Deduction object

Re: NSTableView -editColumn:row:withEvent:select: question

2008-04-18 Thread John Stiles
Ben Lachman wrote: Well, you should be able to just override the drawing code, since thats really your problem. Going directly against the docs, while it may work fine now, is playing with fire in my opinion. Yeah… that's why I posted :) I was hoping to get a oh yeah, that only applies if

Re: NSTableView -editColumn:row:withEvent:select: question

2008-04-18 Thread John Stiles
Ben Lachman wrote: Well, you should be able to just override the drawing code, since thats really your problem. Going directly against the docs, while it may work fine now, is playing with fire in my opinion. Yeah… that's why I posted :) I was hoping to get a oh yeah, that only applies if

Re: Subclassing

2008-04-18 Thread j o a r
On Apr 18, 2008, at 2:56 PM, K. Darcy Otto wrote: The only reason to subclass Deduction (with SDeduction) and then DeductionLine (with SDeductionLine) is to get an SDependency object. Is there an easier way? I suppose I could just copy the Dependency class files and then modify it for

Re: Capsule-Style Toolbar Controls

2008-04-18 Thread Peter Ammon
Yes, in Leopard, unified and non-unified windows are the same except for some minor differences in the toolbar metrics, which you found. :) The metric differences were left in for compatibility. I don't think the HIG has any guidance about when to use one or the other on Leopard, so I

Re: Subclassing

2008-04-18 Thread Andy Lee
On Apr 18, 2008, at 5:56 PM, K. Darcy Otto wrote: I am working on a program with a complex hierarchy of classes, and I want to subclass one of the objects a few steps down on that hierarchy. Do I have to create a parallel hierarchy to do this? Here is the problem: AppController

Re: Subclassing

2008-04-18 Thread Jack Repenning
On Apr 18, 2008, at 2:56 PM, K. Darcy Otto wrote: I want to subclass Dependency and override a few things. Can I do this without modifying DeductionLine? Perhaps you want to create a category instead? That allows you to add methods to Dependency without DeductionLine having to know about

editing in a custom NSView

2008-04-18 Thread Torsten Curdt
Hey guys, I need some pointers into the right direction. I would like to create a view that display a list of objects with their attributes. Of course NSTableView could do that. But I would like the rows to expand vertically when I add more information to the object ...and have the

Re: editing in a custom NSView

2008-04-18 Thread Mike Manzano
NSTableView: tableView:heightOfRow: Returns the height of row in tableView. - (CGFloat)tableView:(NSTableView *)tableView heightOfRow:(NSInteger)row Discussion You should implement this method if your table supports varying row heights. The height returned should not include intercell

Hand style movement inside a NSScrollView

2008-04-18 Thread Steve Sheets
Does someone have any suggestions or hints about how to do this? I am using NSScrollView to display some graphical data. The Scroll View displays a section of my custom view which displays the graphics. The user can drag the horizontal and vertical scrollers to change the visible position

Re: Hand style movement inside a NSScrollView

2008-04-18 Thread Jamie Phelps
Not sure if it's suitable for your purposes, but IKImageView and its currentToolMode property (IKToolModeMove). This would get you the behavior you want for free. JP On Apr 18, 2008, at 2:49 PM, Steve Sheets wrote: Does someone have any suggestions or hints about how to do this? I am

Re: Modal popup from command line tool or daemon?

2008-04-18 Thread Jens Alfke
On 18 Apr '08, at 1:21 PM, David Wilson wrote: A command line tool or a true background daemon can't really pull it off- the process wouldn't have a connection to the window server to actually do any of that. A command-line tool, invoked from a logged-in user account, can use a GUI if it's

Re: editing in a custom NSView

2008-04-18 Thread Jens Alfke
On 18 Apr '08, at 4:32 PM, Torsten Curdt wrote: So I already got a custom view that is manually bound to NSArrayController and draws the objects. Now I need to make one of the object's string attributes editable. How to do that best? I assume I could catch the click on the item, then

setTextColor:range: text coloring problem

2008-04-18 Thread tyler durden
Hi Everybody, i am writing an easy chat application. i have an object of NSTextview on my UI form. i want to change the text color in a specified range from default color black to red. i used the method setTextColor:range: but it did not work. following is my declaration of the object and the

Re: Getting an array/tree controller to select newly added managed objects

2008-04-18 Thread Ron Lue-Sang
On Apr 18, 2008, at 2:54 PM, Sean McBride wrote: Hi all, Consider an app that uses bindings and Core Data. It has a tableview bound to an array controller. There is an 'Add' button that creates a new entity to be shown in the table. It could be implemented by: 1) sending add: to the array

Re: [SOLVED] Simulating menu bar blink in Cocoa

2008-04-18 Thread Martin Wierschin
The fake temporary item solution actually works pretty well. It's the last thing I'd call elegant, but here's how you can blink a menu title in Cocoa. Unfortunately that solution (and any of the other horrible strategies available) trigger VoiceOver for the menu item. Anyone know a way to

Re: running out of NSPipes

2008-04-18 Thread justin webster
I guess it may be a bug. I achieved more or less the same thing bypassing NSTask and NSPipe and now have no issues with resource management. the trick, I think, was fflush() and pclose(). perhaps NSPipe is missing some tidy-up code. there probably are more efficient ways of doing this but

Re: [SOLVED] Simulating menu bar blink in Cocoa

2008-04-18 Thread Martin Wierschin
The fake temporary item solution actually works pretty well. It's the last thing I'd call elegant, but here's how you can blink a menu title in Cocoa. Unfortunately that solution (and any of the other horrible strategies available) trigger VoiceOver for the menu item. Anyone know a way

controls in a NSTableCell (was Re: editing in a custom NSView)

2008-04-18 Thread Torsten Curdt
Bizarre ...remember I read it somewhere. Well, fair enough. Now got my NSTableView with different row heights working. But how do I get other edit controls in there? Is this the only way to stick a NSView in there? http://www.stepwise.com/Articles/Technical/2003-12-20.01.html Essentially I

Re: editing in a custom NSView

2008-04-18 Thread Torsten Curdt
On Apr 19, 2008, at 03:12, Jens Alfke wrote: On 18 Apr '08, at 4:32 PM, Torsten Curdt wrote: So I already got a custom view that is manually bound to NSArrayController and draws the objects. Now I need to make one of the object's string attributes editable. How to do that best? I assume

Re: Hand style movement inside a NSScrollView

2008-04-18 Thread Ben Lachman
On Apr 18, 2008, at 9:14 PM, Jens Alfke wrote: On 18 Apr '08, at 12:49 PM, Steve Sheets wrote: However, I also want to implement a Hand style tool. One that allows the user to simple click inside the Scroll View and draw the graphics around. I think you just need to have your view's

Re: Hand style movement inside a NSScrollView

2008-04-18 Thread Jens Alfke
On 18 Apr '08, at 8:59 PM, Ben Lachman wrote: I tend to like scrollRect:by: for this sort of thing since it takes a offset to a rect. But that method just blits pixels around on the screen; it doesn't actually change the coordinate system of the view. The scroll view will do the

Re: Modal popup from command line tool or daemon?

2008-04-18 Thread Rod Cater
I think the CFUserNotification API is exactly what I'm looking for, although I'm not pleased with daemons requiring user interaction in the first place. An earlier reply suggested Growl which I'm thinking is better suited for what I'm doing. Combined with a simple preference pane for

Re: Hand style movement inside a NSScrollView

2008-04-18 Thread Ben Lachman
On Apr 19, 2008, at 12:41 AM, Jens Alfke wrote: On 18 Apr '08, at 8:59 PM, Ben Lachman wrote: I tend to like scrollRect:by: for this sort of thing since it takes a offset to a rect. But that method just blits pixels around on the screen; it doesn't actually change the coordinate system

Re: Using STL strings and supporting 10.2.x

2008-04-18 Thread Sherm Pendley
On Fri, Apr 18, 2008 at 5:16 PM, Mark Thomas [EMAIL PROTECTED] wrote: Hi All, Does anybody know how to stop the STL string class including any unicode support, as we are compiling a .dylib with Xcode 2.2.1 on 10.4, but when the library loads on a 10.2 system we are getting linker