Re: Files without an extension

2008-09-29 Thread matt . gough
On 30 Sep 2008, at 08:07, Chris Idou wrote: Does anyone know how OS-X and/or the Finder treats files without an extension? If I have a plain text file without an extension, then changing the program that opens txt files will make it change for plain text files without an extension. But

Re: problems in runModal in NSOpenPanel used with defaults

2008-09-29 Thread spartan g
Oh Yes... Thanks Mike. I got your point corbin. I was thinking that I am messing somewhere in using the panel properties!!! In fact that behavior, now, seems very helpful to get the last opened directory.. Very much Helpful... Once again Thanks Mike, Thanks Corbin Best Regards, Spartan... O

Files without an extension

2008-09-29 Thread Chris Idou
Does anyone know how OS-X and/or the Finder treats files without an extension? If I have a plain text file without an extension, then changing the program that opens txt files will make it change for plain text files without an extension. But if I have an RTF file without an extension, it doesn

re:tracking area pending install and disabled

2008-09-29 Thread Dale Miller
The code I excerpted is located in my "updateCursorRects" method. Regards, Dale Miller [EMAIL PROTECTED] ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderato

Re: How to count composed characters in NSString?

2008-09-29 Thread Peter Edberg
On Sep 29, 2008, at 9:27 PM, David Niemeijer wrote: Hi Douglas and Peter, On Sep 29, 2008, at 6:39 PM, Douglas Davidson wrote: On Sep 28, 2008, at 11:17 AM, David Niemeijer wrote: I need to be able to display the number of characters to the user in a way that makes sense to them. If they s

Re: NSManagedObject subclass accessor pattern mystery?

2008-09-29 Thread Dave Dribin
On Sep 29, 2008, at 11:44 PM, Michael B Johnson wrote: So I have a CoreData app (10.5.5, 64 bit only) that has a NSManagedObject that has an NSColor* that is part of its data model. Because this color is actually a computed value that we want to cache, it is declared as a property: Have

NSManagedObject subclass accessor pattern mystery?

2008-09-29 Thread Michael B Johnson
So I have a CoreData app (10.5.5, 64 bit only) that has a NSManagedObject that has an NSColor* that is part of its data model. Because this color is actually a computed value that we want to cache, it is declared as a property: @property (retain) NSColor* color; but since we may need to

Re: How to count composed characters in NSString?

2008-09-29 Thread David Niemeijer
Hi Douglas and Peter, On Sep 29, 2008, at 6:39 PM, Douglas Davidson wrote: On Sep 28, 2008, at 11:17 AM, David Niemeijer wrote: I need to be able to display the number of characters to the user in a way that makes sense to them. If they see 3 I should report 3. I also need it to cut-off cer

Re: How to count composed characters in NSString?

2008-09-29 Thread Michael Ash
On Mon, Sep 29, 2008 at 12:52 AM, Michael Gardner <[EMAIL PROTECTED]> wrote: > But composed character sequences aren't the problem; surrogate pairs are. > Composed character sequences can be taken care of by using either > -precomposedStringWithCanonicalMapping or > -precomposedStringWithCompatibil

Drawing in a window with rounded corners

2008-09-29 Thread Daniel Weber
Hi, I have a custom view that takes up the whole frame of my textured window. Normally, the corners of a textured window are rounded. However, since my custom view is rectangular, it draws over the rounded corners. I am using Core Animation to draw in the view. I think what I need to do is clip my

Re: NSWindowController retain count confusion

2008-09-29 Thread Jonathan Hess
Hey James - The method -[NSObject retainCount] only exists to aid in debugging. You shouldn't be making any runtime decisions based on the return value of retainCount. You should only release something you previously retained/alloced/newed/copied or are for some other reason explicitly re

NSWindowController retain count confusion

2008-09-29 Thread James Walker
I have an NSWindowController subclass that is defined as File's Owner in a nib. The window outlet is connected to a window, and the delegate outlet of the window goes back to the File's Owner. I was trying to release the controller in the windowWillClose: delegate method, but it didn't cause t

Questions on An NSOpenGL Application Design

2008-09-29 Thread Carmen Cerino Jr.
When my application starts up, the user is presented with a settings window. It contains a view that will be attached to a web camera, and some widgets to control various filter settings. Once the settings are tweaked to the user's desire, the window will be closed, but the camera will stil

Re: Tracking area pending install and disabled

2008-09-29 Thread Dale Miller
Thanks for your reply. Unfortunately, I forgot to indicate that the code snippet I showed is in my "updateTrackingAreas" method, as it is in my previous project which is working. Regards, Dale Miller [EMAIL PROTECTED] ___ Cocoa-dev mailing list

Re: Newbie: Strange problem with NSTableView, check boxes and Core Data

2008-09-29 Thread Corbin Dunn
On Sep 29, 2008, at 10:55 AM, Jonathan Oddie wrote: Hi all, I'm new on this list -- teaching myself Cocoa programming by writing a small utility as a Core Data document-based application. Mostly I have everything working well, but there is one strange bug I can't isolate where a check box

Re: Load launchd job immediately, without restart - how?

2008-09-29 Thread Dimitris Roilidis
OK I checked and tested the code, and it seems to work just fine. Had to make a few minor tweaks 'cause of compiler warnings, and also added the -unload command, but otherwise, it's just what I needed. Many thanks! Now all I need is to determine what happens if the PrefPane is deleted wit

Re: Passing focus to a control

2008-09-29 Thread Mike Abdullah
Directly quoting the -becomeFirstResponder: docs: Use the NSWindow makeFirstResponder: method, not this method, to make an object the first responder. Never invoke this method directly. Also, it's called a method, not a function. On 29 Sep 2008, at 09:36, Cocoader wrote: I have a window of

Re: Passing focus to a control

2008-09-29 Thread Nick Zitzmann
On Sep 29, 2008, at 2:36 AM, Cocoader wrote: When I press Cmd-J I get my function called but can't work out how to get the control to get the focus. I've tried becomeFirstResponder but nothing happens and no error occurs. Please help! I'm sure this is an obvious error, but after 3 hours I

Re: Window Shadow

2008-09-29 Thread I. Savant
On Sep 29, 2008, at 10:55 AM, Matthieu Campion wrote: When I launch my application, all is ok (ther isn't shadow); but if I go to another virtual desktop (I use 'Spaces' from Mac OSX ), when I come back to the first screen, my view has a shadow. Do you have an idea (maybe it's a Mac OS bug..

Newbie: Strange problem with NSTableView, check boxes and Core Data

2008-09-29 Thread Jonathan Oddie
Hi all, I'm new on this list -- teaching myself Cocoa programming by writing a small utility as a Core Data document-based application. Mostly I have everything working well, but there is one strange bug I can't isolate where a check box in a table view sometimes fails to draw itself prope

NSWindow animationResizeTime

2008-09-29 Thread Ken Orr
Is there any way to alter the value provided by animationResizeTime without subclassing NSWindow (as the documentation suggests)? Thanks, -Ken ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator commen

Window Shadow

2008-09-29 Thread Matthieu Campion
Hi all, I have a problem with shadows on transparent windows: I create a fullscreen borderless transparent window with a view (an object derived from NSView) in the center and I don't want to have a shadow on it. [self setBackgroundColor: [[NSColor blueColor] colorWithAlphaComponent:0.

Re: Load launchd job immediately, without restart - how?

2008-09-29 Thread Dimitris Roilidis
(Oops, hit reply and forgot to change the address to cocoa-dev) Thanks for the tip! This looks like what I had in mind, I'll give it a spin. Regarding the "original" route I mentioned, there is a programmatic way to interface directly with launchd. Look in /usr/include/launch.h; there's a

Passing focus to a control

2008-09-29 Thread Cocoader
I have a window of controls, a NSComboBox and some NSTextFields. I want to be able to place the cursor in the NSComboBox when the user selects Cmd-J. All of the code for managing the window is in an .h and .m file: @interface HF_Browser : NSDocument { ... When I press Cmd-J I get my functio

Re: More on Keyboard Event posting

2008-09-29 Thread Dave DeLong
Rock on! Changing that eventTap to kCGHIDEventTap worked perfectly! Thank you so much! Dave On Sep 29, 2008, at 4:16 PM, Ken Thomases wrote: On Sep 29, 2008, at 10:25 AM, Dave DeLong wrote: However some keyevents, such as Command-Space to activate Quicksilver on my machine (usually Spotli

Re: More on Keyboard Event posting

2008-09-29 Thread Ken Thomases
On Sep 29, 2008, at 10:25 AM, Dave DeLong wrote: However some keyevents, such as Command-Space to activate Quicksilver on my machine (usually Spotlight) or Shift-Command-3 to take a screenshot or Command-Tab to activate the application switcher, only produce a system beep. Any ideas why an

Re: Problem in using NSKeyedUnarchiver for my custom class

2008-09-29 Thread Eric Gorr
name = [NSString stringWithString:aString]; is creating an autoreleased string. If you want to keep it around, you will need to: [name retain]; and similarly with your height setter. I believe this will solve your problem. Can you use or are you using Obj-C 2.0? If so, I would suggest l

Problem in using NSKeyedUnarchiver for my custom class

2008-09-29 Thread Adil Saleem
Hi, I am trying to write instances of a class (subclass of NSObject) in an array and then write them to a preferences files using NSKeyedArchiver. It does so successfully. After i unarchive it using NSKeyedUnarchiver, it reads the contents in the array. It also reports correct no. of objects of

Resize Indicator on a NSPanel

2008-09-29 Thread Eric Gorr
Can one programmatically control the size of the resize indicator on a NSPanel? If so, how? Is it possible to programmatically get or compute the frame the resize indicator occupies on a NSPanel? thank you. ___ Cocoa-dev mailing list (Cocoa-dev@

Re: Problem setting the menu

2008-09-29 Thread Peter Ammon
On Sep 28, 2008, at 4:15 PM, Felipe Monteiro de Carvalho wrote: Hello, I am having problems setting a menu for my application. I am writting the application in Object Pascal and I am not using nib files, because the point is being able to use this to port cross-platform GUI libraries. NSMenu

Re: Crash with toolbars

2008-09-29 Thread Peter Ammon
On Sep 28, 2008, at 4:20 PM, Felipe Monteiro de Carvalho wrote: Hello, I am having a problem with toolbars. I have created a delegate class for my toolbar, but when I added the toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar: method it crashes: Exception: EXC_BREAKPOINT (0x0006) Code

[announce] SousChef 1.0

2008-09-29 Thread Ben Lachman
Just wanted to announce the release of SousChef 1.0, a digital cooking assistant. It's available at . "Most cooking software stops at organizing recipes. Acacia Tree Software's just released SousChef helps you cook, start to finish. Find a recipe,

Re: Tracking area pending install and disabled

2008-09-29 Thread Corbin Dunn
On Sep 29, 2008, at 11:19 AM, Dale Miller wrote: I create a NSTracking area with tkarea = [[NSTrackingArea alloc] initWithRect:usedrect options:NSTrackingMouseEnteredAndExited |NSTrackingActi

Tracking area pending install and disabled

2008-09-29 Thread Dale Miller
I create a NSTracking area with tkarea = [[NSTrackingArea alloc] initWithRect:usedrect options:NSTrackingMouseEnteredAndExited |NSTrackingActiveInActiveApp

Re: How to get Safari Bookmarks in the code

2008-09-29 Thread John Joyce
On Sep 29, 2008, at 9:50 AM, [EMAIL PROTECTED] wrote: Subject: How to get Safari Bookmarks in the code To: [EMAIL PROTECTED], cocoa-dev@lists.apple.com Message-ID: <[EMAIL PROTECTED]> Content-Type: text/plain; charset=ISO-8859-1 Hi All, I am creating a application that needs to displ

Re: How to count composed characters in NSString?

2008-09-29 Thread Douglas Davidson
On Sep 28, 2008, at 11:17 AM, David Niemeijer wrote: I need to be able to display the number of characters to the user in a way that makes sense to them. If they see 3 I should report 3. I also need it to cut-off certain input to the number of "real" characters and should not generate resu

Re: How to get Safari Bookmarks in the code

2008-09-29 Thread Mike Abdullah
You could look into the bookmarks portion of our imedia framework: http://code.google.com/p/imedia/ Mike. On 29 Sep 2008, at 14:39, SridharRao M wrote: Hi All, I am creating a application that needs to display Safari Bookmarks. Is there any way to get safari bookmarks. Please help me in thi

Re: How to develop a Safari event listener

2008-09-29 Thread Jim Turner
Hi Bill Unless things have changed recently, what you're looking for is called "Not Officially Supported by Safari". As you discovered, there is no interface that will allow a plugin to load arbitrarily unless it's going to provide some sort of media handler for content on the page. That being s

Re: Mouse events with higher priority then repeating NSTimer

2008-09-29 Thread Michael Ash
On Mon, Sep 29, 2008 at 11:08 AM, Christian Giordano <[EMAIL PROTECTED]> wrote: > It seems my problem was that I was putting as interval "1/10" not > "0.1" or "1.0/10", this presumebly was as putting interval 0. That's > why the continuous loop :) Indeed, welcome to the wonderful world of C. 1/10

Re: Two questions about cocoa programming...

2008-09-29 Thread Graham Cox
On 29 Sep 2008, at 2:44 am, Leopard x86 wrote: 2. Using openPanel function: how can we memorize the most recent opened directory? As the question says, we often the open panel directive to open file, is there some method to guarantee that we can be the same location which is opened l

Re: IBAction deselects currently selected Core Data record?

2008-09-29 Thread Quincey Morris
On Sep 28, 2008, at 16:21, Michael LaMorte wrote: I have a Core Data application with a subclass of NSManagedObject. The subclass has an IBAction that, when triggered, needs to get the value of several entity properties of the currently selected record. I have the accessor methods declared

Re: Making NSTableView column headers editable

2008-09-29 Thread Corbin Dunn
On Sep 28, 2008, at 2:00 AM, Andrew BusH wrote: Hi all, What is the best approach to do this? I would like the user to be able to double click on the header cell of a NSTableView and have a field appear in place that would let them change the heading. Ive tried just setting [[NSTableCol

Re: problems in runModal in NSOpenPanel used with defaults

2008-09-29 Thread Corbin Dunn
On Sep 26, 2008, at 10:34 PM, spartan g wrote: Thanks Corbin, I have used your tips in the updated code. Besides, my aim is to save the filename selected through the panel to a pList file timely whenever it is changed, so I am using synchronization of defaults. I checked and found that the

More on Keyboard Event posting

2008-09-29 Thread Dave DeLong
Hi everyone, I eventually figured out my previous problem with keyboard event posting when a colleague of mine pointed out the CGPostKeyboardEvent had been deprecated. After digging around some more, we came up with the following: [window makeFirstResponder:textfield]; CGEventSo

Re: Mouse events with higher priority then repeating NSTimer

2008-09-29 Thread Christian Giordano
It seems my problem was that I was putting as interval "1/10" not "0.1" or "1.0/10", this presumebly was as putting interval 0. That's why the continuous loop :) Thanks, chr On Mon, Sep 29, 2008 at 11:22 AM, Christian Giordano <[EMAIL PROTECTED]> wrote: > Hi guys, I'm trying to render the stage

Re: Menu item issues when programmatically updating an application's main menu

2008-09-29 Thread Mattias Arrelid
On Wed, Sep 24, 2008 at 02:32, Kyle Sluder <[EMAIL PROTECTED]> wrote: > Your best bet might be to file a bug report at http://bugreport.apple.com . Done, see rdar://problem/6253819. Thanks Mattias ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Re: Two questions about cocoa programming...

2008-09-29 Thread Chris Hanson
On Sep 28, 2008, at 9:44 AM, Leopard x86 wrote: Hi everyone. In the recent development, I need to solve the following two issues: In the future, if you have multiple questions, please post each one in a separate message. Furthermore, please use more descriptive subject lines. Everybody i

Re: How to get Safari Bookmarks in the code

2008-09-29 Thread Nick Zitzmann
On Sep 29, 2008, at 7:39 AM, SridharRao M wrote: I am creating a application that needs to display Safari Bookmarks. Is there any way to get safari bookmarks. Two ways I know of: Read the Bookmarks.plist file using NSDictionary, or use Sync Services to synchronize the bookmarks. Nick Zi

Re: NSTokenField Drag and Drop

2008-09-29 Thread Nick Zitzmann
On Sep 28, 2008, at 6:57 PM, Chris Idou wrote: However, when I drag a token ("Token") from the palette to the field, it arrives as a string and not a token. tokenField:(NSTokenField *)tokenField styleForRepresentedObject:(id)representedObject gets called with a NSString and not a "Token" c

Re: NSManagedObject custom class & for loop

2008-09-29 Thread aclark
> Hi folks, > In my core data app I have an Account entity. I've subclassed this as > I want to add a method that calculates the Account's balance by doing > a fetch on "Transaction" entities and tallying up the amounts. I've > created a custom class in xcode and added the following code in > Accou

How to get Safari Bookmarks in the code

2008-09-29 Thread SridharRao M
Hi All, I am creating a application that needs to display Safari Bookmarks. Is there any way to get safari bookmarks. Please help me in this.. Regards, Sridhar. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

IBAction deselects currently selected Core Data record?

2008-09-29 Thread Michael LaMorte
I have a Core Data application with a subclass of NSManagedObject. The subclass has an IBAction that, when triggered, needs to get the value of several entity properties of the currently selected record. I have the accessor methods declared properly in the declaration and implementation fil

Re: Load launchd job immediately, without restart - how?

2008-09-29 Thread Jerry Krinock
On 2008 Sep, 28, at 7:49, Dimitris Roilidis wrote: I have a PrefPane that acts as a ui for a command line utility (helper). According to the launchd docs, ...To load the helper immediately ... the alternative possibly involves a script to call launchctl Well, I wouldn't call it an "alte

NSManagedObject custom class & for loop

2008-09-29 Thread Steven Hamilton
Hi folks, In my core data app I have an Account entity. I've subclassed this as I want to add a method that calculates the Account's balance by doing a fetch on "Transaction" entities and tallying up the amounts. I've created a custom class in xcode and added the following code in Account.

Mouse events with higher priority then repeating NSTimer

2008-09-29 Thread Christian Giordano
Hi guys, I'm trying to render the stage with a default interval. When the needed time to render the scene is higher than the interval itself, the application doesn't process anymore the mouse events. I'm setting the timer once with [NSTimer scheduledTimerWithTimeInterval]. I'm thinking of recreatin

Re: Restoring a .nib's Edit menu

2008-09-29 Thread Kevin Bracey
Drag the Edit Menu from the Library into the main .nib window. Then drag it up to the MainMenu and it will insert ok. Cheers Kevin ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the

Re: Setting automatic alignment

2008-09-29 Thread Mike Abdullah
On 29 Sep 2008, at 00:51, Felipe Monteiro de Carvalho wrote: Hello, Is it possible to have a control automatically expand as the window is resized? I have a toolbar and a text area and I would like the text area to automatically increase size as the window is resized. Is there a clever pr

Re: showing window causes EXC_BAD_ACCESS

2008-09-29 Thread Negm-Awad Amin
Am Sa,27.09.2008 um 22:44 schrieb Uli Kusterer: On 27.09.2008, at 22:13, Michael Ash wrote: But suddenly you're back to having to think about the global picture of who owns objects, which is what Cocoa's memory management system is supposed to avoid. Retains and releases should be balan

How to develop a Safari event listener

2008-09-29 Thread Bill Morgan
Hi to all, I am trying to develop a small tool, it can be an appliction/bundle/plug-in ... The goal is, when Safari opens certain web page, like www.apple.com, the tool will be launched automatically, and it can get the page's url. I know for firefox, people call this kind of tool as add-on, not

Setting automatic alignment

2008-09-29 Thread Felipe Monteiro de Carvalho
Hello, Is it possible to have a control automatically expand as the window is resized? I have a toolbar and a text area and I would like the text area to automatically increase size as the window is resized. Is there a clever property for this? Also, is it possible to change the coordinates syst

Crash with toolbars

2008-09-29 Thread Felipe Monteiro de Carvalho
Hello, I am having a problem with toolbars. I have created a delegate class for my toolbar, but when I added the toolbar:itemForItemIdentifier:willBeInsertedIntoToolbar: method it crashes: Exception: EXC_BREAKPOINT (0x0006) Code[0]:0x0002 Code[1]:0x Thread 0 Crashed: 0 co

Problem setting the menu

2008-09-29 Thread Felipe Monteiro de Carvalho
Hello, I am having problems setting a menu for my application. I am writting the application in Object Pascal and I am not using nib files, because the point is being able to use this to port cross-platform GUI libraries. I create a NSMenu and set it to both AppleMenu and MainMenu, or just 1 of t

Load launchd job immediately, without restart - how?

2008-09-29 Thread Dimitris Roilidis
I have a PrefPane that acts as a ui for a command line utility (helper). According to the launchd docs, all I need to do is add the correct plist to the /LaunchAgents folder. However, this will take effect after a restart, which is unacceptable. To load the helper immediately, I need to go

Two questions about cocoa programming...

2008-09-29 Thread Leopard x86
Hi everyone. In the recent development, I need to solve the following two issues: 1. How to distinguish the difference about the inline children count of the XML Node? here is my code: xmlDoc = [[NSXMLDocument alloc] initWithXMLString:[NSString stringWithContentsOfFile:_filePath]

Re: Collections can be simple Attributes in Core Data

2008-09-29 Thread Negm-Awad Amin
Am Fr,26.09.2008 um 03:08 schrieb Jerry Krinock: When I first looked at Core Data, I saw that there was no such attribute type as "Array" or "Set", and concluded that collections must be modelled as relationships. This would be overkill in many cases, for example, in a Person type of appl