Re: Using a string as filepath

2008-11-27 Thread Knut Lorenzen
Am 27.11.2008 um 01:22 schrieb Kiel Gillard: Can you use NSSavePanel? It handles all that detail for you. Unfortunately not. Alternatively, try using NSString's stringByAppendingPathComponent: method, it may validate the path component you're trying to add. Tried that, but

Re: Using a string as filepath

2008-11-27 Thread Knut Lorenzen
Am 27.11.2008 um 06:11 schrieb Michael Ash: There really isn't, because it's a pretty hard problem. Mike, thanks for your detailed reply. My case (one or two files a week or so) does not justify more than a few lines of code and string length is not a problem either. I think I'll

Re: NSTrackingArea strange requirement

2008-11-27 Thread rajesh
On Nov 26, 2008, at 7:02 PM, Quincey Morris wrote: On Nov 26, 2008, at 06:30, rajesh wrote: I have Custom NSView with set of boxes arranged in some pattern ( boxes with some extra UI elements like , text fields and stuff). I am using the gaps between the boxes a.k.a the visible custom

Private frameworks in a bundle

2008-11-27 Thread Luke Evans
I've had a need, for the first time, to have a private framework in a bundle that gets loaded into an app. Now, I've done a bit of framework wrangling in the past, and thought it might involve getting the installation path in the framework build/ packaging right in order to do this. When

Re: NSTextView

2008-11-27 Thread Jean-Daniel Dupas
Le 27 nov. 08 à 11:34, Graham Cox a écrit : On 27 Nov 2008, at 9:27 pm, Mahaboob wrote: Hi all, I need to check whether the NSTextView contains any data. For an NSTextField, [[txtName stringValue] length] should work. Is there any method like this for a textView? [[[myTextView

Re: set position of Alert panel

2008-11-27 Thread Rob Keniger
On 27/11/2008, at 8:48 PM, Nishad Kumar wrote: Hi all,how can i set the position of alert panel at centre of window rather than centre of screen.With thanks,Nishad You probably don't want to do that. If you have a window-specific alert, you should use a sheet:

Re: NSTrackingArea strange requirement

2008-11-27 Thread Rob Keniger
On 27/11/2008, at 7:17 PM, rajesh wrote: I should have made my query bit clear , I need the cursor updates only for certain portion of the visible area ( only horizontal gaps , its like horizontal split view but no split view in use ) . but I can use the above technique for something else

Re: how to set up nextKeyView, full keyboard access etc, for custom subviews set up in code (rather than nib)

2008-11-27 Thread Ricky Sharp
On Nov 26, 2008, at 9:47 PM, Rua Haszard Morris wrote: I have a dialog that has a few controls as well as a complex custom view that itself contains other controls as subviews. The custom view (for various good reasons) is instantiated and added as a subview in code. A template view and

Re: Memory management puzzle

2008-11-27 Thread Jens Miltner
Am 27.11.2008 um 03:49 schrieb DKJ: I've got something this in my code, which is run several times by the app: UIView *subView = [[MyView alloc] initWithFrame:frame]; [theView addSubview:subView]; [subView release]; Later on this happens: [subView

NSTextView

2008-11-27 Thread Mahaboob
Hi all, I need to check whether the NSTextView contains any data. For an NSTextField, [[txtName stringValue] length] should work. Is there any method like this for a textView? Thanks in advance mahaboob ___ Cocoa-dev mailing list

Re: Scheme for efficiently archiving images.

2008-11-27 Thread Jens Miltner
Am 27.11.2008 um 07:54 schrieb Graham Cox: On 27 Nov 2008, at 2:00 pm, Ken Thomases wrote: First, it seems to me like you don't want an NSImage in your model. You want the original source of the image. Either a file path or a blob of data with some meta-data (e.g. UTI) describing it

Re: Private frameworks in a bundle

2008-11-27 Thread Jean-Daniel Dupas
Le 27 nov. 08 à 10:35, Luke Evans a écrit : I've had a need, for the first time, to have a private framework in a bundle that gets loaded into an app. Now, I've done a bit of framework wrangling in the past, and thought it might involve getting the installation path in the framework

Can I split an implementation file?

2008-11-27 Thread Greg Robertson
One of my implementation files is getting kind of long and I would like to split it into two. I have a lot of custom getters and setters and I was wondering if there was a way I could put them in a separate file but keep a common interface file? Can I do that? What is the syntax for doing

Re: Killing a Thread

2008-11-27 Thread Mahaboob
Thanks for your valuable comments. The thread is not exit and now it working for another threads. I used one progress window to display the delivery progress of the mail. When I'm calling the thread for second time, the animation speed of progress bar get increased. And also some times I'm

set position of Alert panel

2008-11-27 Thread Nishad Kumar
Hi all,how can i set the position of alert panel at centre of window rather than centre of screen.With thanks,Nishad _ Register once and play all contests. Increase your scores with bonus credits for logging in daily on MSN.

Re: NSTextView

2008-11-27 Thread chaitanya pandit
[[textView string]length]; Thats because NSTextView inherits from NSText which has string method. On 27-Nov-08, at 3:57 PM, Mahaboob wrote: Hi all, I need to check whether the NSTextView contains any data. For an NSTextField, [[txtName stringValue] length] should work. Is there any method like

Re: NSTextView

2008-11-27 Thread Graham Cox
On 27 Nov 2008, at 9:27 pm, Mahaboob wrote: Hi all, I need to check whether the NSTextView contains any data. For an NSTextField, [[txtName stringValue] length] should work. Is there any method like this for a textView? [[[myTextView textStorage] string] length]; --Graham

Re: set position of Alert panel

2008-11-27 Thread Alexander Spohr
If you ask the same question again you will get the same answer again: Use a sheet! atze Am 27.11.2008 um 11:48 schrieb Nishad Kumar: Hi all,how can i set the position of alert panel at centre of window rather than centre of screen.With thanks,Nishad

Re: NSTrackingArea strange requirement

2008-11-27 Thread rajesh
That seems to be the only solution for my case I started with the same and was wondering if I was doing some redundant work. but I see a kind of problem with above approach as well. Since we are updating the TrackingAreas in updateTrackingAreas (removing and adding track areas) , my

Re: Can I split an implementation file?

2008-11-27 Thread Matt Gough
Yes, something like this should do you In file MyObj.h @interface MyObj : NSObject{ Foo* _foo; } -(Foo) foo; -(void) setFoo:(Foo)aFoo; -(void) solveWorldFinancialCrisis; @end; In file MyObj+GetSetters.m: #import MyObj.h @implementation MyObj (GetSetters) -(Foo) foo {} -(void)

Re: Can I split an implementation file?

2008-11-27 Thread Jean-Daniel Dupas
You can learn more about category in the Obj-C language guide: http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/chapter_6_section_3.html Le 27 nov. 08 à 15:04, Matt Gough a écrit : Yes, something like this should do you In file MyObj.h @interface MyObj :

[MEET] Aachen CocoaHeads TODAY (November 27, 2008)

2008-11-27 Thread Stefan Hafeneger
Hi everyone, Aachen CocoaHeads is today (November 27, 2008) at 7PM. Talks: (1) Amin Negm-Awad, Dispatching in Objective-C, (2) Stefan Hafeneger, Distributed Objects Please visit http://www.cocoaheads.de/ for location information. See you there! Stefan smime.p7s Description: S/MIME

Re: Core Data modeling question

2008-11-27 Thread Alexander Spohr
Am 26.11.2008 um 22:08 schrieb Markus Schneider: Shall I use a MO class DAY and model the list as a to-many relationship? TASK - startDate - endDate

What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-11-27 Thread Michael A. Crawford
I assume I can sub-class the control but I wondering if there is a better way. I'm using a circular slider and would like it to rotate when I roll the scroll wheel up or down. -Michael -- There are two ways of constructing a software design. One way is to make it so

Re: Killing a Thread

2008-11-27 Thread Scott Ribe
When I'm calling the thread for second time, the animation speed of progress bar get increased. It seems pretty clear that your function never terminates. As we all have been telling you, if the function returns the thread will exit. You need to examine things in the debugger and determine

Re: Can I split an implementation file?

2008-11-27 Thread Michael Ash
On Thu, Nov 27, 2008 at 8:30 AM, Greg Robertson [EMAIL PROTECTED] wrote: One of my implementation files is getting kind of long and I would like to split it into two. I have a lot of custom getters and setters and I was wondering if there was a way I could put them in a separate file but

Re: Can I split an implementation file?

2008-11-27 Thread Greg Robertson
If I declare foo and setFoo as properties instead of methods in the interface would that be the same for the example you posted? Thanks Greg On Thu, Nov 27, 2008 at 9:04 AM, Matt Gough [EMAIL PROTECTED] wrote: Yes, something like this should do you In file MyObj.h @interface MyObj :

Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-11-27 Thread Graham Cox
On 28 Nov 2008, at 3:18 am, Michael A. Crawford wrote: I assume I can sub-class the control but I wondering if there is a better way. I'm using a circular slider and would like it to rotate when I roll the scroll wheel up or down. You can just implement the -scrollWheel: method in a

Re: Can I split an implementation file?

2008-11-27 Thread Greg Robertson
Thanks for the link, one last question (I hope) if I declare foo as a property and synthesize then I could use a category to override the foo and setFoo. But I was wondering if I could just skip the synthesize? Thanks Greg On Thu, Nov 27, 2008 at 9:07 AM, Jean-Daniel Dupas [EMAIL PROTECTED]

Re: Can I split an implementation file?

2008-11-27 Thread Quincey Morris
On Nov 27, 2008, at 09:09, Greg Robertson wrote: Thanks for the link, one last question (I hope) if I declare foo as a property and synthesize then I could use a category to override the foo and setFoo. But I was wondering if I could just skip the synthesize? Matt's suggestion is going to

Re: Can I split an implementation file?

2008-11-27 Thread mmalcolm crawford
On Nov 27, 2008, at 9:09 AM, Greg Robertson wrote: Thanks for the link, one last question (I hope) if I declare foo as a property and synthesize then I could use a category to override the foo and setFoo. But I was wondering if I could just skip the synthesize? If your intent is to provide

cString

2008-11-27 Thread Luca Ciciriello
Hi All.Recently I've installed the new Xcode 3.1.2 and I've removed my old Xcode 2.5.I've compiled with Xcode 3.1.2 (using the optional compiler GCC 4.2) one of the my Objective-C++ project. No problem, but I've got a warning about the code line: string elem = [[[gridArrayObjc objectAtIndex:i]

Re: cString

2008-11-27 Thread Mattias Arrelid
On Thu, Nov 27, 2008 at 20:48, Luca Ciciriello [EMAIL PROTECTED] wrote: Hi All.Recently I've installed the new Xcode 3.1.2 and I've removed my old Xcode 2.5.I've compiled with Xcode 3.1.2 (using the optional compiler GCC 4.2) one of the my Objective-C++ project. No problem, but I've got a

RE: cString

2008-11-27 Thread Luca Ciciriello
Thanks Mattias, UTF8String has solved my problem.Bye.Luca Date: Thu, 27 Nov 2008 20:54:11 +0100 From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Subject: Re: cString CC: cocoa-dev@lists.apple.com On Thu, Nov 27, 2008 at 20:48, Luca Ciciriello [EMAIL PROTECTED] wrote: Hi All.Recently I've

Re: cString

2008-11-27 Thread Scott Andrew
Depending on you neeeds you can use cStringUsingEncoding: or if you are ok using UTF8 encoded strings -UTF8String. The NSString documentation clearly states this. Scott On Nov 27, 2008, at 11:48 AM, Luca Ciciriello wrote: Hi All.Recently I've installed the new Xcode 3.1.2 and I've

registerDefaults error and NSCoding protocol

2008-11-27 Thread John Clayton
Hi, Question about registering defaults - I'd assumed the following would be valid, assuming that GuideSettings implements the NSCoding protocol - but my app doesn't like this and throws a bad access exception in CFRetain when I run this code: The bit that falls over is the

Re: registerDefaults error and NSCoding protocol

2008-11-27 Thread Bill Bumgarner
From the documentation: ... A default’s value must be a property list, that is, an instance of (or for collections a combination of instances of): NSData,NSString, NSNumber, NSDate, NSArray, or NSDictionary. If you want to store any other type of object, you should typically archive it to

Garbage collection leak in simple Core Data application

2008-11-27 Thread Mathieu Coursolle
Hi Cocoa developers, I created a simple garbage collected Core Data application using the Xcode template. I did not change much except that I added an empty window controller for my window, which is the file's owner of my .xib. I added logs in the init and finalize methods to make sure

Re: Garbage collection leak in simple Core Data application

2008-11-27 Thread Rob Keniger
On 28/11/2008, at 7:13 AM, Mathieu Coursolle wrote: Hi Cocoa developers, I created a simple garbage collected Core Data application using the Xcode template. I did not change much except that I added an empty window controller for my window, which is the file's owner of my .xib. I added

Re: Garbage collection leak in simple Core Data application

2008-11-27 Thread Bill Bumgarner
On Nov 28, 2008, at 8:42 AM, Rob Keniger wrote: You are adding the NSWindowController to your document using - addWindowController:, which retains the window controller. You must then release the window controller using -removeWindowController: so that the collector frees the object. Do

Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-11-27 Thread Michael Ash
On Thu, Nov 27, 2008 at 12:08 PM, Graham Cox [EMAIL PROTECTED] wrote: On 28 Nov 2008, at 3:18 am, Michael A. Crawford wrote: I assume I can sub-class the control but I wondering if there is a better way. I'm using a circular slider and would like it to rotate when I roll the scroll wheel up

Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-11-27 Thread Graham Cox
On 28 Nov 2008, at 4:08 am, Graham Cox wrote: On 28 Nov 2008, at 3:18 am, Michael A. Crawford wrote: I assume I can sub-class the control but I wondering if there is a better way. I'm using a circular slider and would like it to rotate when I roll the scroll wheel up or down. You

Re: Can I split an implementation file?

2008-11-27 Thread Andy Lee
On Nov 27, 2008, at 8:34 AM, Michael Ash wrote: Others have answered the direct question, I thought I would wander off into the realm of potentially unwanted advice. If your class is getting this large, then it may be a sign that your design is becoming unwieldy and you should actually be

Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-11-27 Thread Bill Bumgarner
On Nov 28, 2008, at 11:24 AM, Graham Cox wrote: Playing with this, the code below gives a nice feel for a big variety of sliders in my app and wraps properly with circular ones too. I was skeptical at first that this was a good idea but trying it out in the app I've quickly come to

Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-11-27 Thread Graham Cox
On 28 Nov 2008, at 11:46 am, Bill Bumgarner wrote: Categories are great for dividing a class's implementation (sometimes across frameworks -- NSAttributedString in Foundation and AppKit, for example) and great for adding new functionality to existing classes in isolation. But they are

Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-11-27 Thread Bill Bumgarner
On Nov 28, 2008, at 11:52 AM, Graham Cox wrote: In which case Apple should a) explicitly document this as a no-no, and b) disallow categories to install methods that already exist. I would have thought b) was possible, as when loading a category, I assume what's really happening is that the

Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-11-27 Thread Graham Cox
On 28 Nov 2008, at 11:46 am, Bill Bumgarner wrote: At best, your app's standard sliders will behave in a decidedly non- standard fashion. At worst, your app's standard sliders will crash. Could you explain how that's a real possibility? I don't see that. If Apple's implementation of

Quick Look with native types?

2008-11-27 Thread Jean-Nicolas Jolivet
I might be missing something obvious here but I'm reading the Quick Look companion guide and I can't seem to find any info about implementing QuickLook in my app for native types (only images actually)... All I can find is info about writing my own preview generators etc, do I need to do

Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-11-27 Thread Graham Cox
On 28 Nov 2008, at 12:19 pm, Graham Cox wrote: Even if they couldn't remove the functionality for legacy reasons they could start documenting it in a much more strongly worded fashion to state that this is simply not permitted. Just to emphasise the point, the full paragraph you quoted

Re: Scheme for efficiently archiving images.

2008-11-27 Thread Graham Cox
On 28 Nov 2008, at 12:30 am, Jens Miltner wrote: Well, you _can_ ask the NSImage or it's rep for a certain bitmap representation (see e.g. http://markmail.org/message/ urbmcjwh5vixoxfd). Even if the NSImage can't provide that data, you could still use the BSD layer to convert to e.g. a

Capturing the mouse and working out the mouse position

2008-11-27 Thread Christian Graus
Hi guys. Although I've subscribed to this list for months, this is my first post. I'm in the process of migrating from Windows development, so my questions may have a windows centric bent, in terms of my thinking in terms of how I'd do stuff under that platform. Basically, I have an NSTableView

Re: Capturing the mouse and working out the mouse position

2008-11-27 Thread Graham Cox
On 28 Nov 2008, at 2:02 pm, Christian Graus wrote: Hi guys. Although I've subscribed to this list for months, this is my first post. I'm in the process of migrating from Windows development, so my questions may have a windows centric bent, in terms of my thinking in terms of how I'd do

Re: Quick Look with native types?

2008-11-27 Thread Rob Keniger
On 28/11/2008, at 11:29 AM, Jean-Nicolas Jolivet wrote: I might be missing something obvious here but I'm reading the Quick Look companion guide and I can't seem to find any info about implementing QuickLook in my app for native types (only images actually)... All I can find is info

Re: Capturing the mouse and working out the mouse position

2008-11-27 Thread Christian Graus
Thanks for the reply. As it stands, we're using a single cell ( someone else actually wrote that part, but neither of us knows how to handle the mouse stuff that's cropping up now ). So, there's an event I can plug into that would give me the mouse position over the cell ? If you're saying I

Re: NSTrackingArea strange requirement

2008-11-27 Thread Rob Keniger
On 27/11/2008, at 10:22 PM, rajesh wrote: but I see a kind of problem with above approach as well. Since we are updating the TrackingAreas in updateTrackingAreas (removing and adding track areas) , my cursor (which is set to resizeUpDownCursor mouseEntered: ) seems to flicker when ever

Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-11-27 Thread Michael Ash
On Thu, Nov 27, 2008 at 7:24 PM, Graham Cox [EMAIL PROTECTED] wrote: Please don't do this! It will apply to every single slider in your process, even ones you didn't create yourself, Well, that is potentially a feature. I guess the point would be to test your UI thoroughly and make sure it

Re: Quick Look with native types?

2008-11-27 Thread Jean-Nicolas Jolivet
That's not really what I'm getting from Quick Look's programming guide... in the very first paragraph it says: For documents of common content types—notably HTML, RTF, plain text, TIFF, PNG, JPEG, PDF, and QuickTime movies—this support is automatic. However, applications with documents

Re: Quick Look with native types?

2008-11-27 Thread Jean-Nicolas Jolivet
mmm just in case I wasn't clear (I realize I might be looking at this from the wrong angle): I would want to use Quick Look to show preview of images in my app, I dont want to write a Quick Look plugin so that my custom document type can be previewed in the finder or anythign like that...

Re: Quick Look with native types?

2008-11-27 Thread Rob Keniger
On 28/11/2008, at 2:07 PM, Jean-Nicolas Jolivet wrote: mmm just in case I wasn't clear (I realize I might be looking at this from the wrong angle): I would want to use Quick Look to show preview of images in my app, I dont want to write a Quick Look plugin so that my custom document type

Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-11-27 Thread Bill Bumgarner
On Nov 28, 2008, at 12:19 PM, Graham Cox wrote: On 28 Nov 2008, at 11:46 am, Bill Bumgarner wrote: At best, your app's standard sliders will behave in a decidedly non- standard fashion. At worst, your app's standard sliders will crash. Could you explain how that's a real possibility? I

Re: What is the best way to get an NSSlider to respond to the mouse scroll wheel?

2008-11-27 Thread Sherm Pendley
On Nov 27, 2008, at 7:24 PM, Graham Cox wrote: Yep, that's a potentially more serious issue. It would be nice if a category had a way to check for an existing implementation and quietly no-op itself. Just checking respondsToSelector: doesn't work of course, always returning YES. Build

Re: Core Data modeling question

2008-11-27 Thread Jerry Krinock
On 2008 Nov, 27, at 8:11, Alexander Spohr wrote: Am 26.11.2008 um 22:08 schrieb Markus Schneider: Shall I use a MO class DAY and model the list as a to-many relationship? TASK - startDate

Binding : NSArrayController does not reflect changes to NSMutableArray

2008-11-27 Thread Mike Chambers
First, I am new to Cocoa, so I apologize if this question is super simple. I am currently reading through Cocoa Programming for Max OS X, and am trying to create a simple example of a NSTableView that is bound to an NSArrayController which is bound to an NSMutableArray in my application

Re: Binding : NSArrayController does not reflect changes to NSMutableArray

2008-11-27 Thread Mike Chambers
fyi I figured out the issue. I had mispelled one of the properties in my nib which was causing the problem. mike On Thu, Nov 27, 2008 at 12:12 AM, Mike Chambers [EMAIL PROTECTED] wrote: First, I am new to Cocoa, so I apologize if this question is super simple. I am currently reading through

I am trying to update the cfbundleversion key with agvtool and it does not seem to work

2008-11-27 Thread Steve O'Sullivan
Greetings all, I am noticing that when I try to upgrade my application using my installer, the upgrading application is skipped. It seems that the value in the dfbundleversion key value pair is not being updated when I run agvtool and the version held in cfbundleversion is quite old. I

Library Woes

2008-11-27 Thread Kaluriel Hargrove
I've been trying to add the freeimage library to my application but i keep getting this error. any ideas? dyld: Library not loaded: libfreeimage-3.11.0.dylib-i386 Referenced from: /Users/bob1/Documents/Quickpic/build/Debug/Quickpic.app/Contents/MacOS/Quickpic Reason: image not found

IKImageBrowserView and mouseDragged event

2008-11-27 Thread Sandeep Chayapathi
Greetings, In my app I have an IKImageBrowserView, and I want to make this an drag source. I have followed thedragging source docshttp://developer.apple.com/documentation/Cocoa/Conceptual/DragandDrop/Concepts/dragsource.html#//apple_ref/doc/uid/2976 but to no avail. In my view class the

Re: Binding : NSArrayController does not reflect changes to NSMutableArray

2008-11-27 Thread Ken Thomases
On Nov 27, 2008, at 2:12 AM, Mike Chambers wrote: First, I am new to Cocoa, so I apologize if this question is super simple. No, it's something that bites a lot of people. I am currently reading through Cocoa Programming for Max OS X, and am trying to create a simple example of a