Crash in NSControl's sizeToFit

2010-01-31 Thread slasktrattena...@gmail.com
This looks like a bug in AppKit but I'm not sure. Any ideas? (I cannot reproduce the problem.) Thanks. 2010-01-23 17:34:40 +: *** Terminating app due to uncaught exception 'NSGenericException', reason: '*** Collection was mutated while being enumerated.{type = mutable dict, count = 4,

Re: NSTextView Drag and Drop

2010-01-31 Thread Ross Carter
On Jan 30, 2010, at 9:25 PM, Jon Buys wrote: What is the best way to get access to the file that is dropped on an NSTextView. I don't want to embed the file in the view, but I'd like to copy the file somewhere else and add arbitrary text in its place. I'm thinking I should be looking at

Re: NSXML and invalid UTF8 characters

2010-01-31 Thread Andrew Thompson
I'm a little surprised that no one else mentioned it, but are you sure that you actually want to strip the characters? As Sixten Otto said For what it's worth, another common cause of problems with stuff pasted from Word (at least on the web), is Word docs that contain characters from the

Re: should I use CALayer .. ?

2010-01-31 Thread Scott Anguish
On Jan 29, 2010, at 6:05 AM, Roland King wrote: I'm failing to understand I think exactly what CALayer gives me and thus whether or not it's good for something I'm working on. I've read the documentation pretty thoroughly I think but I'm not getting it. Target here is IPhone OS, which

Re: Detect Tap on Word in UILabel?

2010-01-31 Thread Scott Anguish
Why would you want to do this, vs using a button? How would the user know they should tap on that word? On Jan 30, 2010, at 6:54 PM, Samuel Ford wrote: Is it possible to detect which word was tapped in a UILabel in Cocoa Touch? It seems like it should be a pretty easy thing to do, but I'm

Re: should I use CALayer .. ?

2010-01-31 Thread Scott Anguish
On Jan 31, 2010, at 2:56 PM, Scott Anguish wrote: The CA objects have three methods that they can draw. And, with the exception of assigning an image to the contents property, all are analogous with drawRect:. I should clarify this.. in that all drawing occurs in the same code

Tabbing between cells in a complex control

2010-01-31 Thread Charles Jenkins
I have defined * A subclass of NSActionCell named CJIndicatorCell * A subclass of NSControl named CJDistributionControl The distribution control will contain more than one indicator cell. I have had no problem designing the control to the point where the cells can draw themselves and the

Re: Detect Tap on Word in UILabel?

2010-01-31 Thread Samuel Ford
I want to be able to display arbitrary text on a view and respond to taps on the words independently. I guess it probably would be easier to parse the text out into words and just drop down custom buttons into some kind of flow layout. On Jan 31, 2010, at 2:57 PM, Scott Anguish wrote: Why

Re: OpenAL and file size

2010-01-31 Thread Chunk 1978
oh i see. i have to do that myself. since i'm new at audio programming, i just assumed that the point of Extended Audio File was to load and play a large audio file piecemeal - that it did it for me as part of the framework. can you refer to me to samples or appropriate documentation so that i

Re: Tabbing between cells in a complex control

2010-01-31 Thread Matthew Lindfield Seager
On Monday, February 1, 2010, Charles Jenkins wrote: P.S. Is it okay to post one's own source code on this forum for the purpose of getting assistance? Sorry I can't help with your actual question but the answer to your other question is a resounding yes. Posting code helps preempt the common

Re: NSTableView Column Header Restrictions?

2010-01-31 Thread Daniel Wambold
Previous problem solved: A few weeks ago, I posted a question pertaining to trouble I was having when tableView column header cell titles contained period (.) characters. After working around it, I recently discovered the source of my problem and I figured I'd post just in case anyone else

Re: determining HTML text encoding

2010-01-31 Thread Rainer Standke
Hello again, it turns out that the WebKit.framework includes the header for DOMDocument. Nonetheless, I seem to be unable to get anything out of the DOMDocument but (null). Any other ideas? Thanks, Rainer On Jan 29, 2010, at 15:30 , Jens Alfke wrote: On Jan 29, 2010, at 12:33 PM,

WebView Loading Images from Local Filesystem

2010-01-31 Thread Jon Buys
Hello, I have a WebView where I am loading html like this: NSString *baseContextFile = [[NSBundle mainBundle] pathForResource:@base ofType:@html];

Re: Tabbing between cells in a complex control

2010-01-31 Thread Graham Cox
On 01/02/2010, at 7:03 AM, Charles Jenkins wrote: I have defined * A subclass of NSActionCell named CJIndicatorCell * A subclass of NSControl named CJDistributionControl The distribution control will contain more than one indicator cell. I have had no problem designing the control to the

SetFrontProcessWithOptions and NSPanel

2010-01-31 Thread Chris Idou
I've got a NSPanel HUD that I need to be able to pop up above other applications, but I need to pop only the HUD, and not other windows in my application. So naturally I'm using: SetFrontProcessWithOptions(psn, kSetFrontProcessFrontWindowOnly); However, it still pops up all my windows, and

updating NSView on separate thread

2010-01-31 Thread livinginlosangeles
I have overlaid a transparent window over my NSDocument's main window. My intent is to draw textual notifications to it, such as Processing..., 20 things selected The idea is partially experimental, etc. I thought it would be neat to display a spinning icon in the a subclassed content view

Re: updating NSView on separate thread

2010-01-31 Thread Kyle Sluder
On Sun, Jan 31, 2010 at 4:19 PM, livinginlosange...@mac.com wrote: I have overlaid a transparent window over my NSDocument's main window. My intent is to draw textual notifications to it, such as Processing..., 20 things selected The idea is partially experimental, etc. I thought it

Re: NSTableView Column Header Restrictions?

2010-01-31 Thread Quincey Morris
On Jan 31, 2010, at 13:16, Daniel Wambold wrote: Previous problem solved: A few weeks ago, I posted a question pertaining to trouble I was having when tableView column header cell titles contained period (.) characters. After working around it, I recently discovered the source of my problem

NSProgressIndicator Stuck after unhiding + other triggers. Demo App.

2010-01-31 Thread Jerry Krinock
After many hours of troubleshooting, I've isolated strange behavior of an NSProgressIndicator in one of my projects into a demo app. If, when using an determinate NSProgressIndicator repeatedly to show progress in different tasks and all of the following are true: * Hide it between tasks * Let

convert password from SecKeychainFindGenericPassword to NSString

2010-01-31 Thread Stuart Malin
I acquire a password from a keychain using SecKeychainFindGenericPassword. That provides a non null terminated c string and a length. I had been using [NSString stringWithCString: length:] to get an NSString instance of the password. However, the +stringWithCString:length: method was deprecated

Re: convert password from SecKeychainFindGenericPassword to NSString

2010-01-31 Thread Kyle Sluder
On Sun, Jan 31, 2010 at 5:51 PM, Stuart Malin stu...@zhameesha.com wrote: I acquire a password from a keychain using SecKeychainFindGenericPassword. That provides a non null terminated c string and a length. I had been using [NSString stringWithCString: length:] to get an NSString instance of

Re: convert password from SecKeychainFindGenericPassword to NSString

2010-01-31 Thread Stephen J. Butler
On Sun, Jan 31, 2010 at 7:51 PM, Stuart Malin stu...@zhameesha.com wrote: I acquire a password from a keychain using SecKeychainFindGenericPassword. That provides a non null terminated c string and a length. I had been using [NSString stringWithCString: length:] to get an NSString instance of

sine wave

2010-01-31 Thread Chunk 1978
i'm searching for a general algorithm to produce a cartesian sine wave that outputs numbers, which i suppose would be based on maximum distance (range) from Y while using a timer. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: convert password from SecKeychainFindGenericPassword to NSString

2010-01-31 Thread Stuart Malin
On Jan 31, 2010, at 9:12 PM, Kyle Sluder wrote: On Sun, Jan 31, 2010 at 5:51 PM, Stuart Malin stu...@zhameesha.com wrote: I acquire a password from a keychain using SecKeychainFindGenericPassword. That provides a non null terminated c string and a length. I had been using [NSString

Re: sine wave

2010-01-31 Thread Graham Cox
On 01/02/2010, at 1:22 PM, Chunk 1978 wrote: i'm searching for a general algorithm to produce a cartesian sine wave that outputs numbers, which i suppose would be based on maximum distance (range) from Y while using a timer. v = range * sin(t) --Graham

Re: convert password from SecKeychainFindGenericPassword to NSString

2010-01-31 Thread Kyle Sluder
On Sun, Jan 31, 2010 at 6:28 PM, Stuart Malin stu...@zhameesha.com wrote: If I use +dataWithBytes:length: then I need to specify a length 1 greater, and that additional byte must be set to 0 (to null terminate the string). So, I could use NSMutableData, then -resetBytesInRange: to zero out

Re: convert password from SecKeychainFindGenericPassword to NSString

2010-01-31 Thread Jens Alfke
No. You don't want to pass a null terminated string to anything but the methods that explicitly take a C string. Anything else just wants the characters, with no nulls. --Jens {via iPhone} On Jan 31, 2010, at 6:28 PM, Stuart Malin stu...@zhameesha.com wrote: On Jan 31, 2010, at 9:12

Re: sine wave

2010-01-31 Thread Glenn L. Austin
On Jan 31, 2010, at 6:46 PM, Graham Cox wrote: On 01/02/2010, at 1:22 PM, Chunk 1978 wrote: i'm searching for a general algorithm to produce a cartesian sine wave that outputs numbers, which i suppose would be based on maximum distance (range) from Y while using a timer. v = range *

Re: bind:toObject:withKeyPath:options: Unidirectional or Bidirectional?

2010-01-31 Thread Matt Neuburg
On Fri, 29 Jan 2010 22:52:34 -0800, Jerry Krinock je...@ieee.org said: [this1] This clearly states, twice, that ind:toObject:withKeyPath:options: creates something which is bidirectional. [this2] This tells me that, as a minimum, a binding is only unidirectional. How do you know when a binding is

Re: Highlighting search results in table

2010-01-31 Thread Matt Neuburg
On Sun, 31 Jan 2010 00:42:39 +1000, Grant Christensen gran...@bigpond.net.au said: I have a NSTableView bound to an array controller. I am using an NSSearchField to create a predicate for my search, and setting it on the array controller. All works perfect. I was wondering if there is any simple

Re: sine wave

2010-01-31 Thread Graham Cox
On 01/02/2010, at 1:59 PM, Glenn L. Austin wrote: On Jan 31, 2010, at 6:46 PM, Graham Cox wrote: On 01/02/2010, at 1:22 PM, Chunk 1978 wrote: i'm searching for a general algorithm to produce a cartesian sine wave that outputs numbers, which i suppose would be based on maximum distance

[Moderator] Re: sine wave

2010-01-31 Thread Scott Anguish
This isn’t applicable to Cocoa. On Jan 31, 2010, at 9:22 PM, Chunk 1978 wrote: i'm searching for a general algorithm to produce a cartesian sine wave that outputs numbers, which i suppose would be based on maximum distance (range) from Y while using a timer.

Re: updating NSView on separate thread

2010-01-31 Thread Patrick Cusack
As I understand then, all drawRect methods must be made from the main thread. If I have a process running in the main thread, like an import thread which mike take 5 seconds, then it impossible for me to have a secondary thread which can update an NSView concurrently while the main thread is

Re: Tabbing between cells in a complex control

2010-01-31 Thread Charles Jenkins
Graham, you are absolutely right. Sorry about the incorrect terminology. And...you put me on the right path! Tabbing in my control now works! ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Re: updating NSView on separate thread

2010-01-31 Thread Patrick Cusack
What I want to do is this: display a spinning icon in a transparent overlay window (I can do this no problem) while my program is saving, printing PDFs, etc. These methods as typically defined in NSDocument do not have areas where you can inject a call to update a progress bar. I'm thinking

Re: WebView Loading Images from Local Filesystem

2010-01-31 Thread Jens Alfke
On Jan 31, 2010, at 1:24 PM, Jon Buys wrote: I'd like to be able to load images using an img tag in my HTML from my ~/Library/Application Support/ directory. I've been trying to use baseURL, but I get strange results when I create a file URL that points to my Application Support

Re: updating NSView on separate thread

2010-01-31 Thread Jens Alfke
On Jan 31, 2010, at 9:13 PM, Patrick Cusack wrote: What I want to do is this: display a spinning icon in a transparent overlay window (I can do this no problem) while my program is saving, printing PDFs, etc. These methods as typically defined in NSDocument do not have areas where you can

Re: OpenAL and file size

2010-01-31 Thread Jens Alfke
On Jan 31, 2010, at 12:56 PM, Chunk 1978 wrote: can you refer to me to samples or appropriate documentation so that i can learn how to accomplish this? i'm thinking it would be ideal to supply my code with a file size limit, so that if a particular sound file is larger than to only play

Re: NSXML and invalid UTF8 characters

2010-01-31 Thread Jens Alfke
On Jan 31, 2010, at 9:42 AM, Andrew Thompson wrote: 0x80 to 0x9F in codepage 1252 inclues the Euro sign, the bullet (option-8 on the mac) the en-dash and em-dash... i.e. all things that will be found even in English text. (Reference http://msdn.microsoft.com/en-us/goglobal/cc305145.aspx)

Re: Crash in NSControl's sizeToFit

2010-01-31 Thread Jens Alfke
On Jan 31, 2010, at 7:39 AM, slasktrattena...@gmail.com wrote: This looks like a bug in AppKit but I'm not sure. Any ideas? (I cannot reproduce the problem.) No, it's a bug in 'myProject' — it's calling AppKit from a background thread, which is generally not allowed: 13 AppKit

Re: sine wave

2010-01-31 Thread David Rowland
On Jan 31, 2010, at 6:22 PM, Chunk 1978 wrote: i'm searching for a general algorithm to produce a cartesian sine wave that outputs numbers, which i suppose would be based on maximum distance (range) from Y while using a timer. //Make the transition from buffer to buffer seamless, and

NSDocument save as bug

2010-01-31 Thread Half Activist
Hello, In a NSDocument based application, my document class handles 3 different kinds of documents, 1 as a viewer and 2 as an editor. Actually, I wished it could handle the 2 types as an editor but here is what happens: When I only have 1 type everything is ok as you

How to upload a picture or movie existed in the iphone to a given server?

2010-01-31 Thread James
Hello, everyone Now I am developing an iphone app. One key function I want to implement is that it can upload some picture or movie file existed in the iphone to a specified server? So, I expect someone give me some directions. for example, which protocol should I use? Are

Re: NSDocument save as bug

2010-01-31 Thread Alexey Zakhlestin
On 01.02.2010, at 10:13, Half Activist wrote: Hello, In a NSDocument based application, my document class handles 3 different kinds of documents, 1 as a viewer and 2 as an editor. Actually, I wished it could handle the 2 types as an editor but here is what happens: When