Re: knowing when WebView is done

2008-06-06 Thread Adam R. Maxwell
On Jun 6, 2008, at 10:06 PM, Timothy Ritchey wrote: Out of curiosity, did you ever check the retain counts on your webview objects? Never. Since the frameworks retain/(auto)release stuff all the time behind your back, logging -retainCount is worse than useless, in my opinion. If somet

Re: knowing when WebView is done

2008-06-06 Thread Timothy Ritchey
Out of curiosity, did you ever check the retain counts on your webview objects? I create my webview with: - (void)setUrl:(NSString *)value { [self willChangeValueForKey:@"url"]; [self setPrimitiveUrl:value]; [self didChangeValueForKey:@"url"]; NSRect rect = NSMakeRect(0, 0, 90

Re: Garbage collector vs variable lifetime

2008-06-06 Thread Bill Bumgarner
On Jun 6, 2008, at 9:16 PM, Ken Thomases wrote: And... we're back to retain/release. The issue is, how can one know when this technique is necessary? The supposed rules of GC are, if it's in a stack variable, it's safe. The compiler here is doing something behind the programmer's back, wh

Re: Garbage collector vs variable lifetime

2008-06-06 Thread Ken Thomases
On Jun 6, 2008, at 10:48 PM, Antonio Nunes wrote: On 7 Jun 2008, at 01:42, Bill Bumgarner wrote: The easiest way to do this is to simply to use data once after the for() loop: NSData* data = ; const unsigned char* bytes = [data bytes]; NSUInteger count = [data length

Re: Garbage collector vs variable lifetime

2008-06-06 Thread Bill Bumgarner
On Jun 6, 2008, at 5:36 PM, Quincey Morris wrote: Thanks, and to Shawn for the same suggestion. It's a pragmatic solution I can deal with. A little inner voice insists on asking, though, how we know some future version of the compiler might not optimize '[data self]' upwards before the loop,

Re: Garbage collector vs variable lifetime

2008-06-06 Thread Antonio Nunes
On 7 Jun 2008, at 01:42, Bill Bumgarner wrote: The easiest way to do this is to simply to use data once after the for() loop: NSData* data = ; const unsigned char* bytes = [data bytes]; NSUInteger count = [data length]; for (NSUInteger i = 0; i < count; i++)

Re: Cocoa n00b frustrations

2008-06-06 Thread Michael Ash
On Thu, Jun 5, 2008 at 9:32 AM, Charles Jenkins <[EMAIL PROTECTED]> wrote: > Hi! Despite the fact that you have heard from me before on this list, I am > still an newbie trying to struggle through writing my first Cocoa app. > > I have experienced a couple of frustrations that I would like to share

Re: IKImageBrowserView is bonkers

2008-06-06 Thread Adam R. Maxwell
On Jun 6, 2008, at 8:13 PM, Ken Ferry wrote: On Fri, Jun 6, 2008 at 4:16 PM, Adam R. Maxwell <[EMAIL PROTECTED]> wrote: On Jun 6, 2008, at 3:57 PM, j o a r wrote: The images probably have an embedded thumbnail / preview that is not updated when you rotate the main image using "jpegtran". M

Re: IKImageBrowserView is bonkers

2008-06-06 Thread Ken Ferry
On Fri, Jun 6, 2008 at 4:16 PM, Adam R. Maxwell <[EMAIL PROTECTED]> wrote: > > On Jun 6, 2008, at 3:57 PM, j o a r wrote: > >> >> On Jun 6, 2008, at 3:50 PM, Randall Meadows wrote: >> >>> The images are captured from a digital camera, which is oriented in a >>> portrait fashion. Once downloaded fr

Re: using Undo with portable C++ data model

2008-06-06 Thread Peter Zegelin
On 07/06/2008, at 12:16 PM, John Richetta wrote: I have some core engine code that is written in C++, with the intent of keeping it portable. I only have a Cocoa implementation of my outer application, at present, so it's been a slightly academic exercise, but so far, most of the code in

Re: using Undo with portable C++ data model

2008-06-06 Thread Erik Buck
There are many pure C++ applications in the world that implement undo. You don't have to use the Cocoa undo at all if portability is important. Implement undo in C++ using the Command pattern or whatever technique you want. Then integrate Cocoa GUI support via menu items etc. for invokin

using Undo with portable C++ data model

2008-06-06 Thread John Richetta
I have some core engine code that is written in C++, with the intent of keeping it portable. I only have a Cocoa implementation of my outer application, at present, so it's been a slightly academic exercise, but so far, most of the code in my data model remains substantially portable. Now, a

Re: OK on Enter, not Return

2008-06-06 Thread Jim Correia
On Jun 6, 2008, at 2:19 PM, Andrew Merenbach wrote: I believe that you might do some magic with -keyDown: Douglas (and Aki) periodically answer this question. In most situations, overriding keyDown: is the wrong solution to your problem. When you want to customizes key events in NSTextView

Re: Garbage collector vs variable lifetime

2008-06-06 Thread George Stuart
On Jun 6, 2008, at 7:05 PM, Ricky Sharp wrote: On Jun 6, 2008, at 6:42 PM, Bill Bumgarner wrote: Sorry -- let me clarify. If the was either released in a different thread or if were explicitly released in the above code, then you would see the same crash. I didn't mean to imply t

Re: Core Data Questions

2008-06-06 Thread David Wilson
On Fri, Jun 6, 2008 at 8:06 PM, Gordon Apple <[EMAIL PROTECTED]> wrote: >Our data hierarchy has six objects, all of which inherit from "BaseList" > which contains a dictionary (props) and an array (subList). These lists are > chained (i.e., the six subclasses). So in the first-attempt data mo

Re: Garbage collector vs variable lifetime

2008-06-06 Thread Quincey Morris
On Jun 6, 2008, at 16:42, Bill Bumgarner wrote: The easiest way to do this is to simply to use data once after the for() loop: NSData* data = ; const unsigned char* bytes = [data bytes]; NSUInteger count = [data length]; for (NSUInteger i = 0; i < count; i++)

Re: Regular Expressions?

2008-06-06 Thread John C. Randolph
On Jun 6, 2008, at 2:10 AM, Allison Newman wrote: you don't have to fully learn Objective C's syntax at the same time as Cocoa. Ok, all kinds of alarm bells just went off. Obj-C is a very small delta from C, and if you avoid learning it, you will regret it. -jcr __

Re: Core Data Questions

2008-06-06 Thread Gordon Apple
Our data hierarchy has six objects, all of which inherit from "BaseList" which contains a dictionary (props) and an array (subList). These lists are chained (i.e., the six subclasses). So in the first-attempt data model, baselist.sublist is a one-to-many looping back to BaseList. However

Re: Garbage collector vs variable lifetime

2008-06-06 Thread Ricky Sharp
On Jun 6, 2008, at 6:42 PM, Bill Bumgarner wrote: Sorry -- let me clarify. If the was either released in a different thread or if were explicitly released in the above code, then you would see the same crash. I didn't mean to imply that would be released under non-GC without some

Re: Garbage collector vs variable lifetime

2008-06-06 Thread Clark Cox
On Fri, Jun 6, 2008 at 4:27 PM, Quincey Morris <[EMAIL PROTECTED]> wrote: > > On Jun 6, 2008, at 15:48, Bill Bumgarner wrote: > >> In any case, you need to make sure that stays alive throughout the >> entire lifespan of the bytes pointer. > > But the puzzling question is: how? CFRetain/CFRelease

Re: Garbage collector vs variable lifetime

2008-06-06 Thread Bill Bumgarner
On Jun 6, 2008, at 4:24 PM, Ricky Sharp wrote: On Jun 6, 2008, at 5:48 PM, Bill Bumgarner wrote: On Jun 6, 2008, at 3:23 PM, Quincey Morris wrote: In a GC-only app, I frequently use a pattern along these lines: NSData* data = ; const unsigned char* bytes = [data bytes];

Re: Garbage collector vs variable lifetime

2008-06-06 Thread Shawn Erickson
On Fri, Jun 6, 2008 at 4:27 PM, Quincey Morris <[EMAIL PROTECTED]> wrote: > But the puzzling question is: how? Send a message to the NSData object after the block is done with the byte pointer. ([data self]) -Shawn ___ Cocoa-dev mailing list (Cocoa-de

Re: Garbage collector vs variable lifetime

2008-06-06 Thread Bill Bumgarner
On Jun 6, 2008, at 4:18 PM, Hamish Allan wrote: On Fri, Jun 6, 2008 at 11:48 PM, Bill Bumgarner <[EMAIL PROTECTED]> wrote: The garbage collector does not currently interpret inner pointers as something that can keep an encapsulating object alive. But it's not the inner pointers I would expect t

Re: Garbage collector vs variable lifetime

2008-06-06 Thread Nick Zitzmann
On Jun 6, 2008, at 5:24 PM, Ricky Sharp wrote: I'm a bit confused by this. In non-GC, data would not be released during the loop execution. Let's assume that it was autoreleased during the 'get it from somewhere'. It would only be actually released when execution returns to the main run

Re: Garbage collector vs variable lifetime

2008-06-06 Thread Quincey Morris
On Jun 6, 2008, at 15:48, Bill Bumgarner wrote: The garbage collector does not currently interpret inner pointers as something that can keep an encapsulating object alive. Thus, the behavior is undefined and that it changes between debug and release builds -- between optimization levels o

Re: Garbage collector vs variable lifetime

2008-06-06 Thread Ricky Sharp
On Jun 6, 2008, at 5:48 PM, Bill Bumgarner wrote: On Jun 6, 2008, at 3:23 PM, Quincey Morris wrote: In a GC-only app, I frequently use a pattern along these lines: NSData* data = ; const unsigned char* bytes = [data bytes]; NSUInteger count = [data length]; for

Re: Garbage collector vs variable lifetime

2008-06-06 Thread Hamish Allan
On Fri, Jun 6, 2008 at 11:48 PM, Bill Bumgarner <[EMAIL PROTECTED]> wrote: > The garbage collector does not currently interpret inner pointers as > something that can keep an encapsulating object alive. But it's not the inner pointers I would expect to keep the object alive -- it's the fact that

Re: IKImageBrowserView is bonkers

2008-06-06 Thread Adam R. Maxwell
On Jun 6, 2008, at 3:57 PM, j o a r wrote: On Jun 6, 2008, at 3:50 PM, Randall Meadows wrote: The images are captured from a digital camera, which is oriented in a portrait fashion. Once downloaded from the camera, the images are rotated (using jpegtran) to a "normal" orientation, the EX

Re: Core Data Questions

2008-06-06 Thread Mike Abdullah
On 6 Jun 2008, at 16:12, David Wilson wrote: On Fri, Jun 6, 2008 at 6:59 PM, Gordon Apple <[EMAIL PROTECTED]> wrote: I'm currently trying to evaluate whether or not Core Data is a viable storage system in our application. Although I've been through the tutorials, Refs, and searches, I sti

Re: Core Data Questions

2008-06-06 Thread David Wilson
On Fri, Jun 6, 2008 at 6:59 PM, Gordon Apple <[EMAIL PROTECTED]> wrote: >I'm currently trying to evaluate whether or not Core Data is a viable > storage system in our application. Although I've been through the > tutorials, Refs, and searches, I still have questions: > > 1. Our data hierarchy

Re: knowing when WebView is done

2008-06-06 Thread Adam R. Maxwell
On Jun 5, 2008, at 7:03 PM, Timothy Ritchey wrote: even if I track frame commit/finish load as suggested in the thread, if I try to get rid of the webview, the world falls down around me when it can't push out that last delegate call of didReceiveTitle. I generally send stopLoading: to a we

Core Data Questions

2008-06-06 Thread Gordon Apple
I'm currently trying to evaluate whether or not Core Data is a viable storage system in our application. Although I've been through the tutorials, Refs, and searches, I still have questions: 1. Our data hierarchy model does not seem to fit into the Core Data object model. (At least I haven'

Re: IKImageBrowserView is bonkers

2008-06-06 Thread j o a r
On Jun 6, 2008, at 3:50 PM, Randall Meadows wrote: The images are captured from a digital camera, which is oriented in a portrait fashion. Once downloaded from the camera, the images are rotated (using jpegtran) to a "normal" orientation, the EXIF is edited to match (using exiftool, since

Re: Using NSSortDescriptor to reverse sort an NSArray containing NSString objects

2008-06-06 Thread Adam R. Maxwell
On Jun 6, 2008, at 2:51 PM, Ken Thomases wrote: On Jun 6, 2008, at 4:16 PM, Adam R. Maxwell wrote: On Friday, June 06, 2008, at 02:07PM, "George Stuart" <[EMAIL PROTECTED] > wrote: The suggestion of using a keyPath of @"self" presents another question: 1) I assume NSSortDescriptor is us

IKImageBrowserView is bonkers

2008-06-06 Thread Randall Meadows
So I have an IKImageBrowserView in my window. It's supplied by a IKImageBrowserViewDataSource object. The images are captured from a digital camera, which is oriented in a portrait fashion. Once downloaded from the camera, the images are rotated (using jpegtran) to a "normal" orientation,

Re: Garbage collector vs variable lifetime

2008-06-06 Thread Bill Bumgarner
On Jun 6, 2008, at 3:23 PM, Quincey Morris wrote: In a GC-only app, I frequently use a pattern along these lines: NSData* data = ; const unsigned char* bytes = [data bytes]; NSUInteger count = [data length]; for (NSUInteger i = 0; i < count; i++) s

Garbage collector vs variable lifetime

2008-06-06 Thread Quincey Morris
In a GC-only app, I frequently use a pattern along these lines: NSData* data = ; const unsigned char* bytes = [data bytes]; NSUInteger count = [data length]; for (NSUInteger i = 0; i < count; i++) something = bytes [i]; The "release" (but not the "

Re: Using NSSortDescriptor to reverse sort an NSArray containing NSString objects

2008-06-06 Thread Ken Thomases
On Jun 6, 2008, at 4:16 PM, Adam R. Maxwell wrote: On Friday, June 06, 2008, at 02:07PM, "George Stuart" <[EMAIL PROTECTED] > wrote: The suggestion of using a keyPath of @"self" presents another question: 1) I assume NSSortDescriptor is using valueForKeyPath:, which in turns calls valueFor

Re: Regular Expressions?

2008-06-06 Thread Stephen J. Butler
On Fri, Jun 6, 2008 at 10:13 AM, glenn andreas <[EMAIL PROTECTED]> wrote: > One other possible solution is to use the JavaScriptCore and make a > JSStringRef (which works with unichars like NSString), and use JavaScript's > regex support - that way the results will at least have consistent indices,

Re: Regular Expressions?

2008-06-06 Thread Jens Alfke
On 6 Jun '08, at 8:13 AM, glenn andreas wrote: One other possible solution is to use the JavaScriptCore and make a JSStringRef (which works with unichars like NSString), and use JavaScript's regex support - that way the results will at least have consistent indices, work well with non-ASCI

Re: Using NSSortDescriptor to reverse sort an NSArray containing NSString objects

2008-06-06 Thread Adam R. Maxwell
On Friday, June 06, 2008, at 02:07PM, "George Stuart" <[EMAIL PROTECTED]> wrote: >The suggestion of using a keyPath of @"self" presents another question: >1) I assume NSSortDescriptor is using valueForKeyPath:, which in >turns calls valueForKey: some number of times, to get the object for >

Re: Using NSSortDescriptor to reverse sort an NSArray containing NSString objects

2008-06-06 Thread George Stuart
On Jun 6, 2008, at 2:26 PM, Andrew Merenbach wrote: Quoting Ken Thomases <[EMAIL PROTECTED]>: On Jun 6, 2008, at 3:43 AM, George Stuart wrote: NSSortDescriptor *desc = [[NSSortDescriptor alloc] initWithKey:nil ascending:NO selector:@selector(localizedCompare:)]; NSArray *sortedArray = [u

Re: OK on Enter, not Return

2008-06-06 Thread James Walker
Ken Thomases wrote: On Jun 6, 2008, at 1:19 PM, Andrew Merenbach wrote: What about making alt-Enter/alt-Return add a newline, while leaving Return and Enter both to do the job of activating the OK button? Indeed, that's both the convention and the default behavior of the Cocoa text binding s

Re: OK on Enter, not Return

2008-06-06 Thread Andrew Merenbach
Quoting Clark Cox <[EMAIL PROTECTED]>: On Fri, Jun 6, 2008 at 11:19 AM, Andrew Merenbach <[EMAIL PROTECTED]> wrote: but bear in mind that the latest-gen MacBooks (of which I have one) do not have separate Return and Enter keys -- just one. Isn't there one just to the right of the right comman

Re: OK on Enter, not Return

2008-06-06 Thread Clark Cox
On Fri, Jun 6, 2008 at 11:19 AM, Andrew Merenbach <[EMAIL PROTECTED]> wrote: > but bear in mind that > the latest-gen MacBooks (of which I have one) do not have separate Return > and Enter keys -- just one. Isn't there one just to the right of the right command key? > (Maybe the fn button change

[OT] DAQ Plot and Vvidget Workshop At University Of Pittsburgh

2008-06-06 Thread lbland
hi- For those in the Pittsburgh area and not at WWDC: DAQ Plot and Vvidget Workshop At University Of Pittsburgh See: http://www.vvi.com/workshops/2008/0612pitt.html Cocoa developer questions welcome! thanks!- -lance ___ Cocoa-dev mailing lis

Re: OK on Enter, not Return

2008-06-06 Thread Andrew Merenbach
Quoting Douglas Davidson <[EMAIL PROTECTED]>: On Jun 6, 2008, at 11:19 AM, Andrew Merenbach wrote: I believe that you might do some magic with -keyDown: -- I'm sure that someone else will have more knowledge about this -- but bear in mind that the latest-gen MacBooks (of which I have one

Re: OK on Enter, not Return

2008-06-06 Thread Ken Thomases
On Jun 6, 2008, at 1:19 PM, Andrew Merenbach wrote: What about making alt-Enter/alt-Return add a newline, while leaving Return and Enter both to do the job of activating the OK button? Indeed, that's both the convention and the default behavior of the Cocoa text binding system. Cheers, Ke

Re: OK on Enter, not Return

2008-06-06 Thread Douglas Davidson
On Jun 6, 2008, at 11:19 AM, Andrew Merenbach wrote: I believe that you might do some magic with -keyDown: -- I'm sure that someone else will have more knowledge about this -- but bear in mind that the latest-gen MacBooks (of which I have one) do not have separate Return and Enter keys --

Re: Using NSSortDescriptor to reverse sort an NSArray containing NSString objects

2008-06-06 Thread Andrew Merenbach
Quoting Ken Thomases <[EMAIL PROTECTED]>: On Jun 6, 2008, at 3:43 AM, George Stuart wrote: NSSortDescriptor *desc = [[NSSortDescriptor alloc] initWithKey:nil ascending:NO selector:@selector(localizedCompare:)]; NSArray *sortedArray = [unsortedArray sortedArrayUsingDescriptors:[NSArray arr

RE: how to build c++ file and create its instance in anotherobjective-c class

2008-06-06 Thread Kartik Ganesan
Can you please provide a sample with one cocoa file (.m & .h) and c++ file (.mm & .h) plase? Thanks Kartik -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jean-Daniel Dupas Sent: Friday, June 06, 2008 11:00 AM To: Tang Ke Cc: Cocoa-dev@lists.apple.co

Re: Using NSSortDescriptor to reverse sort an NSArray containing NSString objects

2008-06-06 Thread Ken Thomases
On Jun 6, 2008, at 3:43 AM, George Stuart wrote: NSSortDescriptor *desc = [[NSSortDescriptor alloc] initWithKey:nil ascending:NO selector:@selector(localizedCompare:)]; NSArray *sortedArray = [unsortedArray sortedArrayUsingDescriptors: [NSArray arrayWithObject:desc]]; [desc release]; That se

Re: Regular Expressions?

2008-06-06 Thread James Montgomerie
On 6 Jun 2008, at 08:03, Jens Alfke wrote: On 6 Jun '08, at 3:23 AM, Jason Stephenson wrote: As a long time UNIX programmer, I'll suggest looking into the regexp library that already comes with OS X. man regcomp on the command line to find out how to use. It doesn't look as though this lib

Re: OK on Enter, not Return

2008-06-06 Thread Andrew Merenbach
Quoting James Walker <[EMAIL PROTECTED]>: I have a dialog containing an NSTextField and an OK button. I'd like the Enter key to act as an equivalent for the OK button, but the Return key to add a line break to the text. What's the best way to do that? I believe that you might do some magic w

Re: [Newbie] Proper class releasing

2008-06-06 Thread Vijay Malhan
On Fri, Jun 6, 2008 at 11:29 PM, Jon Keon <[EMAIL PROTECTED]> wrote: > Hi Vijay, > > > > Thanks for the response. > > > > The line *[newBaddie attachManagerRef:self]; *is passing itself (the > baddie manager) to the Baddie instance so that when the Baddie has expired > it can call [managerRef rem

RE: [Newbie] Proper class releasing

2008-06-06 Thread Jon Keon
Hi Vijay, Thanks for the response. The line [newBaddie attachManagerRef:self]; is passing itself (the baddie manager) to the Baddie instance so that when the Baddie has expired it can call [managerRef removeMe:self] which tells the manager to remove the Baddie from its array. I'm gath

OK on Enter, not Return

2008-06-06 Thread James Walker
I have a dialog containing an NSTextField and an OK button. I'd like the Enter key to act as an equivalent for the OK button, but the Return key to add a line break to the text. What's the best way to do that? -- James W. Walker, Innoventive Software LLC

Re: [Newbie] Proper class releasing

2008-06-06 Thread Vijay Malhan
On Fri, Jun 6, 2008 at 9:41 PM, Jon Keon <[EMAIL PROTECTED]> wrote: > > Hi All, > > I'm having a problem with creating new instances of classes after other > instances of them have been released. > > I have a class called BaddieManager. > > In this class I have a NSMutableArray that holds instance

Re: knowing when WebView is done

2008-06-06 Thread Rush Manbert
Darn, I thought I had a code example in my library, but I must have decided that I really didn't need to know when the load completed, because I don't have anything implemented. I did take a look at the "Loading Resources" chapter of the "Web Kit Objective-C Programming Guide" to try and re

Re: Regular Expressions?

2008-06-06 Thread Vincent E.
When I mentioned "perl -pe 's/\b(.*?)/\u\L$1/g'" I actually wasn't asking for any ObjC method with a look-alike syntax. I actually wouldn't give a damn about "how" ("s///g") to pass a regex pattern to a method. ;) I was rather asking whether RegExKit (or even RegExKitLite?) would generally

Re: [Newbie] Proper class releasing

2008-06-06 Thread Kyle Sluder
On Fri, Jun 6, 2008 at 12:11 PM, Jon Keon <[EMAIL PROTECTED]> wrote: > I have a class called BaddieManager. Any time you use the word Manager when programming in an MVC context blaring alarm bells should go off in your head. It seems like you're actually trying to write a model-controller object,

Re: Drawing over a QTCaptureView

2008-06-06 Thread Gordon Apple
Here it is. There can be two capture views that use this (one within the main presentation window plus a miniature in the A/V inspector panel), or switch to one capture view in a separate video window. We hope to eventually encode and stream same video. I'd like to get control of the iSi

Re: List Guidelines and Resources

2008-06-06 Thread Scott Anguish
On Jun 6, 2008, at 3:43 AM, Nicko van Someren wrote: On 27 May 2008, at 09:30, Scott Anguish wrote: [thanks to mmalc for posting the guidelines.. they've been recently updated and the new version is below] Scott, For the benefit of those who have been on the list a while, perhaps when y

Re: NSWindow does not support utility styleMask 0x10 ???

2008-06-06 Thread Keary Suska
6/6/08 9:05 AM, also sprach [EMAIL PROTECTED]: > Yes, I do see this input. Since way back when I did create this NSWindow > with IB 2.x, I went to the trouble of starting over with a new NSWindow and > I still get the same set utility mask error in my NSLog window. Also, > what's really wierd wh

Re: Regular Expressions?

2008-06-06 Thread David Hoerl
dream cat7 wrote: > I agree that to be able to use that syntax is highly desirable, and indeed missing from all the cocoa libraries that I have looked at. One way would be a category addition to NSString class, which would call the perl -pe 's/\b(.*?)/\u\L$1/g' for you and return the resu

[Newbie] Proper class releasing

2008-06-06 Thread Jon Keon
Hi All, I'm having a problem with creating new instances of classes after other instances of them have been released. I have a class called BaddieManager. In this class I have a NSMutableArray that holds instances of Baddies. So I create a new instance, place it my array and when the Baddies

Re: Regular Expressions?

2008-06-06 Thread dream cat7
... pcre takes utf8 strings ... utf-16 is supported by RegexKitLite & lib ICU ... NSString and CFString are implemented as utf-16 On 6 Jun 2008, at 16:02, Jason Stephenson wrote: Replying to myself here, which I know is generally a bad thing, but this thought just came to me. I have yet to

Re: NSWindow does not support utility styleMask 0x10 ???

2008-06-06 Thread Andrew Merenbach
Hi, John, My greatest apologies if this is a long shot, but did you make sure to set your window to be an NSPanel, instead of an NSWindow? Under Leopard, I have found that only NSPanels (someone do correct me if I'm way off here!!!) -- which are of course of a subclass of NSWindow, but h

Re: App hangs when displaying any sheet in 10.5 [SOLVED]

2008-06-06 Thread Michael Vannorsdel
I suspect since the method had no prototype the compiler just assumed the default id return type, but due to a bug didn't generate a warning. The problem is most likely the calling method was expecting the return value to be an integer (id; pointer) but instead is a float. Even with a cas

Re: App hangs when displaying any sheet in 10.5 [SOLVED]

2008-06-06 Thread j o a r
On Jun 5, 2008, at 10:26 PM, Graham Cox wrote: I guess the question is, given an object type 'id', which method signature will the compiler go with? Does the return type affect the method signature? (In C++ it doesn't for example), so two methods: - (CGPoint) position; - (float) position

Re: Regular Expressions?

2008-06-06 Thread Jens Alfke
On 6 Jun '08, at 8:02 AM, Jason Stephenson wrote: I have yet to find a regex library that handles UTF-16 well, if at all. I actually spent a couple of hours yesterday trying to mangle some UTF-16 files in Perl using regular expressions. I gave up and did it in Emacs, the only environment w

Re: detect URL change

2008-06-06 Thread Jens Alfke
I don't think a Safari plug-in is the right way to do this. For one, it will only work in Safari, not in any other browser. Two, it uses undocumented APIs that can and do change from one release to the next, making it difficult to support. Three, it's not the right layer — what you really w

Re: Regular Expressions?

2008-06-06 Thread Jason Stephenson
glenn andreas wrote: [wrote about how using regex is not a good idea, particularly with NSString and unicode. Pretty much the same things that Jens wrote earlier.] Yes, that's all very true. Regex is a poor choice if you're working on non-ASCII text. I'm generally not doing so, but just yeste

Re: how to build c++ file and create its instance in another objective-c class

2008-06-06 Thread Jean-Daniel Dupas
That's odd, when I search iPhone + NDA on this list a got a lots of answer like thoses ones: “As ever, the iPhone SDK is under the NDA you agreed to. You cannot discuss it here.” “This is the point where we slam up hard against the non-disclosure agreement to which we all had to agree to

Re: Regular Expressions?

2008-06-06 Thread glenn andreas
On Jun 6, 2008, at 5:23 AM, Jason Stephenson wrote: Hi, You've gotten a lot of decent answers so far. As a long time UNIX programmer, I'll suggest looking into the regexp library that already comes with OS X. man regcomp on the command line to find out how to use. Note that NSStrings ar

Re: NSWindow does not support utility styleMask 0x10 ???

2008-06-06 Thread John Love
Keary Suska wrote: === Here's a clue: http://lists.apple.com/archives/Cocoa-dev/2007/Nov/msg02233.html === Yes, I do see this input. Since way back when I did create this NSWindow with IB 2.x, I went to the trouble of starting over with a new NSWindow and I still get the same set utility mask

Re: how to build c++ file and create its instance in another objective-c class

2008-06-06 Thread Tang Ke
Hi Jean, Merci! I tried to rename it to Adder.mm, also tried to rename my viewcontroller to viewcontroller.mm, it didn't work. I searched google, ADC, and cocoadev.com, and really couldn't find an answer. Cheers, Tang 2008/6/6 Jean-Daniel Dupas <[EMAIL PROTECTED]>: > > Le 6 juin 08 à 16:53, T

Re: Regular Expressions?

2008-06-06 Thread Jens Alfke
On 6 Jun '08, at 3:23 AM, Jason Stephenson wrote: As a long time UNIX programmer, I'll suggest looking into the regexp library that already comes with OS X. man regcomp on the command line to find out how to use. It doesn't look as though this library is Unicode-aware. The strings it take

Re: Regular Expressions?

2008-06-06 Thread Jason Stephenson
Replying to myself here, which I know is generally a bad thing, but this thought just came to me. I have yet to find a regex library that handles UTF-16 well, if at all. I actually spent a couple of hours yesterday trying to mangle some UTF-16 files in Perl using regular expressions. I gave up

Re: how to build c++ file and create its instance in another objective-c class

2008-06-06 Thread Jean-Daniel Dupas
Le 6 juin 08 à 16:53, Tang Ke a écrit : Hi, I'm new to iphone os programming and my project involves to build c+ + files within the xcode cocoa touch environment. So i tried to create a new cocoa touch project and use the interface builder to add a button and a label. So that when i press

how to build c++ file and create its instance in another objective-c class

2008-06-06 Thread Tang Ke
Hi, I'm new to iphone os programming and my project involves to build c++ files within the xcode cocoa touch environment. So i tried to create a new cocoa touch project and use the interface builder to add a button and a label. So that when i press the button, the label would show the result of th

Re: Regular Expressions?

2008-06-06 Thread Jason Stephenson
dream cat7 wrote: I agree that to be able to use that syntax is highly desirable, and indeed missing from all the cocoa libraries that I have looked at. One way would be a category addition to NSString class, which would call the perl -pe 's/\b(.*?)/\u\L$1/g' for you and return the result as

Re: Converting a MenuRef to a NSMenu

2008-06-06 Thread Kyle Sluder
On Fri, Jun 6, 2008 at 10:32 AM, Felipe Monteiro de Carvalho <[EMAIL PROTECTED]> wrote: > Is this maybe impossible? Maybe. Why don't you wait and see if someone has an answer for you? --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com

Re: Converting a MenuRef to a NSMenu

2008-06-06 Thread Felipe Monteiro de Carvalho
Is this maybe impossible? thanks, -- Felipe Monteiro de Carvalho ___ 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 cocoa-dev-admins(at)lists.apple.com

Re: Regular Expressions?

2008-06-06 Thread dream cat7
I agree that to be able to use that syntax is highly desirable, and indeed missing from all the cocoa libraries that I have looked at. One way would be a category addition to NSString class, which would call the perl -pe 's/\b(.*?)/\u\L$1/g' for you and return the result as an NSString..

Re: Regular Expressions?

2008-06-06 Thread Dave DeLong
I've used OgreKit before and found it's worked pretty well. http://www8.ocn.ne.jp/%7esonoisa/OgreKit/index.html Dave On Fri, Jun 6, 2008 at 1:31 AM, Cemil Browne <[EMAIL PROTECTED]> wrote: > Hi all, > > This might be a really silly question - but am I missing something obvious? > Is there any s

Re: Regular Expressions?

2008-06-06 Thread Vincent E.
Right, but that's a very trivial string replacement with no advanced modifications. I had thing like this perl script for changing case to "word caps" in mind: echo 'some test text' | perl -pe 's/\b(.*?)/\u\L$1/g' search pattern would be "\b(.*?)" replacement pattern would be "\u\L$1" I wo

Re: Converting a CFImageRef to a NSImage

2008-06-06 Thread Uli Kusterer
Am 06.06.2008 um 03:05 schrieb Felipe Monteiro de Carvalho: On Thu, Jun 5, 2008 at 9:59 PM, Nick Zitzmann <[EMAIL PROTECTED]> wrote: Are you sure the app is connected to the window server? Did you remember to call NSApplicationLoad() before locking focus? Thank you very much =) Now it works

Re: Regular Expressions?

2008-06-06 Thread dream cat7
No that would require finding rangeOfRegex followed by a call to replaceCharactersInRange NSRange range = [theString rangeOfRegex:@"regex" capture:0]; if( ! NSEqualRanges(range, ((NSRange){NSNotFound, 0} )) ) [theString replaceCharacter

Re: IB Plugin Exchange / Apple Pro Apps Elements?

2008-06-06 Thread Alastair Houghton
On 4 Jun 2008, at 01:08, Brad Gibbs wrote: Is there an IB 3.0 plugin exchange I haven't been able to find through Google? Some place where developers could share or trade IB plugins they've built? Specifically, I'm looking for the darker look-and-feel of Apple's Pro apps, like Aperture a

Re: Installing Spin Control alone

2008-06-06 Thread Vijay Malhan
On Fri, Jun 6, 2008 at 5:02 PM, parag vibhute <[EMAIL PROTECTED]> wrote: > The information which we get in Sample is very basic. It gives you the complete stack. You'll get the method call on which the thread is waiting. And that's more or less similar to what SpinControl samples out? Anyway, yo

Re: Installing Spin Control alone

2008-06-06 Thread parag vibhute
The information which we get in Sample is very basic. I need to find out the statement no. which is causing the application hanged. I have built the application in Debug mode. Thanks, Palav On Fri, Jun 6, 2008 at 4:52 PM, Vijay Malhan <[EMAIL PROTECTED]> wrote: > Not sure if this is possible wit

Re: Installing Spin Control alone

2008-06-06 Thread Vijay Malhan
Not sure if this is possible without installing development tools. However you can try using "Sample" in Activity Monitor(App/Utilities) on the hanged app. (Double Click the hanged app in Activity Monitor to get console window and hit "Sample") Thanks. - Vijay On Fri, Jun 6, 2008 at 4:43 PM, par

Re: Drawing over a QTCaptureView

2008-06-06 Thread douglas a. welton
Gordon, Would you post a snippet of your code. I'm curious as to how you're approaching this. regards, douglas On Jun 5, 2008, at 9:26 PM, Gordon Apple wrote: After receiving this, I tried something similar for clipping. After I cut in the filter, it worked for a few seconds, then s

Installing Spin Control alone

2008-06-06 Thread parag vibhute
Hi all, I am sending this mail to this list because it is part of debugging cocoa application. I have implemented an application which hangs rarely on user's machine. To find out the cause, I to install "Spin control" application on user's machine but without needing to install XCode. I did copyi

Re: Regular Expressions?

2008-06-06 Thread Jason Stephenson
Hi, You've gotten a lot of decent answers so far. As a long time UNIX programmer, I'll suggest looking into the regexp library that already comes with OS X. man regcomp on the command line to find out how to use. I've used it for years in my C applications on UNIX and UNIX-like operating sy

Re: Regular Expressions?

2008-06-06 Thread Vincent E.
But RegexKitLite does not support substitution, does it? Regex pattern matching is one thing, regex string substitution another. On Jun 6, 2008, at 11:34 AM, dream cat7 wrote: Perhaps also consider RegexKitLite, which is written by the same author. The difference is it links to shared libicu

Re: Regular Expressions?

2008-06-06 Thread dream cat7
Perhaps also consider RegexKitLite, which is written by the same author. The difference is it links to shared libicu thats already distributed in the os. No need to embed some specific version of PCRE library into your app included with the regexkit (saves ~1.6mb in the bundle). Also the

Re: Regular Expressions?

2008-06-06 Thread Allison Newman
On Friday, June 06, 2008, at 10:24AM, <[EMAIL PROTECTED]> wrote: >As big of a fan as I am of both RubyCocoa and PyObjC, I would never >recommend either of them for use by someone relatively new to Cocoa >(of which it sounds like the OP might be). > >Even with the awesome quality of the bridge

Re: Regular Expressions?

2008-06-06 Thread Hamish Allan
On Fri, Jun 6, 2008 at 8:31 AM, Cemil Browne <[EMAIL PROTECTED]> wrote: > This might be a really silly question - but am I missing something obvious? > Is there any support at all for regular expressions in the Cocoa libraries? You can use NSPredicate for regexp matching, though no substitution

  1   2   >