Re: KVC and @ as key

2009-04-15 Thread Micha Fuhrmann
Thanks, that worked great. On 15 avr. 09, at 12:39, Jeremy W. Sherman wrote: Hi Micha, -[NSDictionary objectForKey:] has no such problems. You can use that to grab the values of keys beginning with an at sign instead of -valueForKey:. —Jeremy On Wed, Apr 15, 2009 at 12:19 AM, Micha Fuhrmann

Re: CIImage resize optimisation

2009-04-15 Thread Raphael Sebbe
Hi, well if you look at the entire pipeline, it may well be something like this: yuv-resize to 640x480-RGB-GL texture upload-lanczos filtering to 320-(either on screen, or bus reading for file writing) You may have 2 resize ops and a GPU upload (and download?) which are all expansive. I can see

localizedCompare: with Thai

2009-04-15 Thread Gerriet M. Denkmann
This is the logical order of the Thai word for low: THAI CHARACTER TO TAO, THAI CHARACTER MAI EK, THAI CHARACTER SARA AM and this is the order usually used in writing (bottom to top): THAI CHARACTER TO TAO, THAI CHARACTER SARA AM, THAI CHARACTER MAI EK. Both strings look (at least in 10.5.6)

Spell check based on text color

2009-04-15 Thread Ryan Joseph
I'm wanting NSSpellChecker to ignore certain ranges of text in a NSTextView based on color. I implemented shouldSetSpellingState:range: which was successful in not underlining words that are in the colored ranges but in the spelling panel or with the check spelling command it still selects

Table with all Key-Value Pairs

2009-04-15 Thread Gerriet M. Denkmann
I have My Array Controller which displays it's items (NSDictionaries) in an NSTableView. So far so good. But now I want to have another NSTableView which has two columns Key and Value and which shows all Key-Value-pairs of My Array Controller.selection (or My Array

Re: Issues with BAS sample on 10.4.11

2009-04-15 Thread Olivier Palliere
Hi again, Reading again the sampleapp.m from BAS sample, it could be related to the Technical QA QA1277 (credentials globally cached) Will get back to you if I find anything. Oli./. On 04/15/09, Olivier Palliere oliv...@sunprotectingfactory.com wrote: Hi everyone, I am using the Better

Re: sending email form Cocoa app using Mail

2009-04-15 Thread Reza Farhad
That would be lots of work for just sending through registration information. Is it at all possible to avoid setting up mail, or does mail pickup other settings from other app as the default app has to be set in Mail Reza On 15 Apr 2009, at 12:41, Robert Martin wrote: Perhaps add a

sending email form Cocoa app using Mail

2009-04-15 Thread Reza Farhad
Dear All I want to update my app from using NSMailDelivery to using scripting Bridge with Mail to take care of all my emailing from my Cocoa app. I just have this question, what happens if the user is not using Mail and has only setup an alternative email client such as entourage.

Re: sending email form Cocoa app using Mail

2009-04-15 Thread Robert Martin
Perhaps add a preference item for the user to select a mail app from a list - I guess you'd have to know up front which scriptable apps you support in order to send the correct messages. On Apr 15, 2009, at 7:06 AM, Reza Farhad wrote: I want to update my app from using NSMailDelivery to

Re: sending email form Cocoa app using Mail

2009-04-15 Thread Chris Suter
Hi Reza, On Wed, Apr 15, 2009 at 9:06 PM, Reza Farhad r...@qu-s.eu wrote: I want to update my app from using  NSMailDelivery to using scripting Bridge with Mail to take care of all my emailing from my Cocoa app. I just have this question, what happens if the user is not using Mail and has

Re: Table with all Key-Value Pairs

2009-04-15 Thread Volker in Lists
Hi Gerriet, I recently played around with NSDictionaryController and it was simpler than I thought. You should be able to use the selection of your array controller as source for your Dictionary controller, and then bind the columns of a table view to key and value of your dictionary

String Allocation inside drawRect:...

2009-04-15 Thread Carlos Eduardo Mello
Hi, I am calling the code below inside drawRect: in my custom view, so I can draw the string inside the view. It fails miserably every time. Is it, by any, chance illegal to allocate a string inside drawRect? Could anyone think of a reason twhy his call should just refuse to do its thing?

Re: String Allocation inside drawRect:...

2009-04-15 Thread I. Savant
On Wed, Apr 15, 2009 at 9:43 AM, Carlos Eduardo Mello carloseme...@gmail.com wrote: I am calling the code below inside drawRect: in my custom view, so I can draw the string inside the view. It fails miserably every time. Is it, by any, chance illegal to allocate a string inside drawRect?

Re: String Allocation inside drawRect:...

2009-04-15 Thread Graham Cox
On 15/04/2009, at 11:43 PM, Carlos Eduardo Mello wrote: I am calling the code below inside drawRect: in my custom view, so I can draw the string inside the view. It fails miserably every time. In what way? Is it, by any, chance illegal to allocate a string inside drawRect? It's not

unrecognized selector sent to instance

2009-04-15 Thread Jason Stephenson
Hello, all. I am stumped by the error message in the subject of this email. I have spent several hours looking over my code, googling the list archives, etc. Typically, it seems that the error in question occurs at runtime when someone has a memory management issue in their application, and

filteredArrayUsingPredicate and points

2009-04-15 Thread Alexey Baev
Hi. I have class MyDot. This class has function: - (BOOL) containsPoint: (NSPoint) pt; I have also NSArray, which contains several MyDot objects: NSArray* dots; I want to get new array NSArray* newDots which contains MyDot objects and for these dots containsPoint:(NSPoint)pt = YES. How can I

Re: String Allocation inside drawRect:...

2009-04-15 Thread I. Savant
On Wed, Apr 15, 2009 at 9:55 AM, Graham Cox graham@bigpond.com wrote: It's not illegal, though many will tell you it's not best practice To elaborate: According to the documentation (and good sense), -drawRect: should be as quick / lightweight as possible since it could be called many

Objective-C/Cocoa open source Twitter client

2009-04-15 Thread Nick Toumpelis
Hi, Just wanted to let you know that I've released my (beta) Obj-C/Cocoa twitter client (Canary) as open source here: http://github.com/macsphere/canary , under an MIT-style license. It is a fully-fledged client, with multi-user support, multiple timelines, filters, TwitPic support,

Re: unrecognized selector sent to instance

2009-04-15 Thread Bill Bumgarner
On Apr 15, 2009, at 7:04 AM, Jason Stephenson wrote: So, the error that I get at runtime makes it appear that my SIGIOBzip2OutputStream does not respond to the - [initToFileAtPath:append:] selector, but it does. In the debugger, it looks as though SIGIOBzip2OutputStream's super class is the

Re: unrecognized selector sent to instance

2009-04-15 Thread BJ Homer
On Wed, Apr 15, 2009 at 9:02 AM, Bill Bumgarner b...@mac.com wrote: On Apr 15, 2009, at 7:04 AM, Jason Stephenson wrote: So, the error that I get at runtime makes it appear that my SIGIOBzip2OutputStream does not respond to the -[initToFileAtPath:append:] selector, but it does. In the

Re: unrecognized selector sent to instance

2009-04-15 Thread Jason Stephenson
Thanks, Bill. I did read the documentation, and in the very documents you point out it says: To create a subclass of NSOutputStream you may have to implement initializers for the type of stream data supported and suitably reimplement existing initializers. You must also provide complete

Re: unrecognized selector sent to instance

2009-04-15 Thread Jason Stephenson
Thanks to Bill and BJ. Don't I feel silly. I have a new implementation of the output stream class that works. (See attachement.) Now, I have five other NSInputStream/NSOutputStream subclasses to modify and test. Y'know, when I first started coding these classes the other day, I heard a

Re: unrecognized selector sent to instance

2009-04-15 Thread Bill Bumgarner
On Apr 15, 2009, at 8:12 AM, BJ Homer wrote: Seems to be concrete to me. Nevertheless, calling it on super does throw an exception; you might just try calling [super init] and see what happens. // NSOutputStream is an abstract class representing the base functionality of a write stream.

Re: unrecognized selector sent to instance

2009-04-15 Thread John C. Randolph
Jason, I just tried dropping your code into a new Foundation Tool project, and it looks like your problem happens when your subclass of NSOutputStream sends [super initToFileAtPath:append:]. Check the subclassing notes on NSOutputStream. It looks like it's a class cluster, and

Re: unrecognized selector sent to instance

2009-04-15 Thread Jason Stephenson
Bill Bumgarner wrote: On Apr 15, 2009, at 8:12 AM, BJ Homer wrote: Seems to be concrete to me. Nevertheless, calling it on super does throw an exception; you might just try calling [super init] and see what happens. // NSOutputStream is an abstract class representing the base functionality

Re: C: treated as a path component

2009-04-15 Thread Keary Suska
On Apr 14, 2009, at 5:57 PM, Dragan Milić wrote: Hell all, Let's suppose I've got NSString @C:omponent , which represents the name of a file. Is there a way to instruct NSString class not to treat a leading single letter followed by a column as a path separator? Namely, I need this one

Re: Best way to get a non-repeating random number?

2009-04-15 Thread Peter Castine
On 14-Apr-2009, at 22:32, Ricky Sharp wrote: Personally, for all things random, I now use the Mersenne Twister algorithm. Again, it depends for what. Mersenne is bursty: it precalcs a buffer of 624 values at a time, then it just reads out a value (and performs a little magic on it) for

sending emails using URLRequest and php

2009-04-15 Thread Reza Farhad
dear all I am looking at using URLRequest and php to configure my app to send an email by sending a post to a form and then the form sending me an email. I have very little understanding of this process and any help would be appreciated. I know this has been discussed here before, but

Re: sending emails using URLRequest and php

2009-04-15 Thread Reza Farhad
Danny That is what I did think initially and I tried that, but did not have any luck. If open the php page in safari I do get a mail sent but not if I try it from my code. Reza On 15 Apr 2009, at 17:54, Danny Thuering wrote: Hi, You have to set the URL of your request to the URL of

Re: sending emails using URLRequest and php

2009-04-15 Thread Peter Blazejewicz
hi Reza, On Apr 15, 2009, at 7:04 PM, Reza Farhad wrote: That is what I did think initially and I tried that, but did not have any luck. If open the php page in safari I do get a mail sent but not if I try it from my code. Reza Have a look into some ADC documentation, e.g. Creating

Anyone know where the build constants are defined at?

2009-04-15 Thread Sam Krishna
Hi all, Does anyone know where the build constants are defined at? I'm specifically looking for the definition of the following constants: TARGET_IPHONE_SIMULATOR TARGET_IPHONE_OS and also where are the SDK build constants defined? I want to be able to check for differences b/t the iPhone

Re: Anyone know where the build constants are defined at?

2009-04-15 Thread Dave DeLong
Hold down the command key and double click on it, and it'll show you where it is. =) Cheers, Dave On Apr 15, 2009, at 11:19 AM, Sam Krishna wrote: Hi all, Does anyone know where the build constants are defined at? I'm specifically looking for the definition of the following constants:

Re: updating NSTextField with key validation?

2009-04-15 Thread David Scheidt
On Apr 14, 2009, at 12:02 PM, David Scheidt wrote: On Apr 14, 2009, at 11:54 AM, Kyle Sluder wrote: You want to make the text field continuous. Be aware that this will also cause your changes to be committed, not just validated, continuously. Do you mean the checkbox in IB labelled

Re: stopping an application

2009-04-15 Thread Greg Guerin
Anders Holm wrote: I don't see any mention of considering sending a signal to PID xyz? See the original post: http://lists.apple.com/archives/cocoa-dev/2009/Apr/msg00886.html -- GG ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

[ANN] ObjectiveFlickr 2.0, a Flickr API framework for Mac and iPhone

2009-04-15 Thread Lukhnos D. Liu
Hi all, ObjectiveFlickr is a Flickr API framework written in Objective-C, designed for both Mac and iPhone app development. Version 2.0 is a complete rewrite aiming to target different Apple platforms/SDKs and to simplify class interface design. This version also comes with an example iPhone

Re: filteredArrayUsingPredicate and points

2009-04-15 Thread Jim Turner
On Wed, Apr 15, 2009 at 9:05 AM, Alexey Baev b...@belightsoft.com wrote: Hi. I have class MyDot. This class has function: - (BOOL) containsPoint: (NSPoint) pt; I have also NSArray, which contains several MyDot objects: NSArray* dots; I want to get new array NSArray* newDots which

Master-detail interface, multiple selection, and mixed state checkbox state transitions

2009-04-15 Thread Sean McBride
Hi all, I have a master-detail interface. NSTableView is the master; a checkbox is the detail. The checkbox corresponds to a boolean property of my model object, and is so bound. In the case of multiple selection in the tableview, I'd like the checkbox to show 'mixed state' as appropriate.

Re: C: treated as a path component

2009-04-15 Thread Charles Srstka
On Apr 15, 2009, at 10:51 AM, Keary Suska wrote: On Apr 14, 2009, at 5:57 PM, Dragan Milić wrote: Hell all, Let's suppose I've got NSString @C:omponent , which represents the name of a file. Is there a way to instruct NSString class not to treat a leading single letter followed by a

Re: sending email form Cocoa app using Mail

2009-04-15 Thread has
Reza Farhad wrote: I want to update my app from using NSMailDelivery to using scripting Bridge with Mail to take care of all my emailing from my Cocoa app. I just have this question, what happens if the user is not using Mail and has only setup an alternative email client such as entourage.

Daylight Savings Time

2009-04-15 Thread Greg Robertson
I have put together some code from various sites such as this one: http://blog.coriolis.ch/2009/02/20/relative-date-to-now/ Basically I would like to display records for a week duration but I am unsure how to handle daylight savings time. Is there a way to see if daylight savings time has or will

Networking

2009-04-15 Thread Filip van der Meeren
I am trying to create a networking feature for my application. What should I use? - BSD Sockets - CF... - NSSocketPort - ... And where is some decent information about the subject. I would love to work a bit closer with the Core Foundation, but I am afraid it is going down the same drain

Re: Networking

2009-04-15 Thread I. Savant
On Wed, Apr 15, 2009 at 3:29 PM, Filip van der Meeren fi...@code2develop.com wrote: I am trying to create a networking feature for my application. What should I use? You're going to have to be more specific than that. What *kind* of networking feature? Loading a web resource? Acting as a

Re: C: treated as a path component

2009-04-15 Thread Greg Guerin
Charles Srstka wrote: I tried this, and it doesn't seem to have anything to do with HFS+ paths, as Cocoa abstracts colons away into slashes there anyway. What's more, it only does this if you have only one letter before the colon, as in @C:omponent. If you use @CC:omponent instead, it

Re: Networking

2009-04-15 Thread Filip van der Meeren
On 15 Apr 2009, at 21:39, I. Savant wrote: On Wed, Apr 15, 2009 at 3:29 PM, Filip van der Meeren fi...@code2develop.com wrote: I am trying to create a networking feature for my application. What should I use? You're going to have to be more specific than that. What *kind* of networking

Re: Daylight Savings Time

2009-04-15 Thread Peter Duniho
On Apr 15, 2009, at 11:53 AM, Greg Robertson wrote: I have put together some code from various sites such as this one: http://blog.coriolis.ch/2009/02/20/relative-date-to-now/ Basically I would like to display records for a week duration but I am unsure how to handle daylight savings time. Is

How to test if object is KVO observer?

2009-04-15 Thread Andreas Eriksson
Is there a way to test if an object is a KVO observer of a different object? Something like -[a isObserving:b forKeyPath:@akeypath]? / Andreas ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

3 iPhone SDK Questions

2009-04-15 Thread Steve Cronin
Folks; I haven't stuck my toe in the iPhone water yet. I know I could find the answers to these by digging but I've been asked to find out the answers quickly... 1) Does the iPhone support the Cocoa AddressBook.framework? If so, do the AB change notifications also work? 2) We believe

Re: 3 iPhone SDK Questions

2009-04-15 Thread Luke the Hiesterman
On Apr 15, 2009, at 12:54 PM, Steve Cronin wrote: Folks; I haven't stuck my toe in the iPhone water yet. I know I could find the answers to these by digging but I've been asked to find out the answers quickly... 1) Does the iPhone support the Cocoa AddressBook.framework? If so, do the

Re: 3 iPhone SDK Questions

2009-04-15 Thread Kyle Sluder
On Wed, Apr 15, 2009 at 3:54 PM, Steve Cronin steve_cro...@mac.com wrote: 1) Does the iPhone support the Cocoa AddressBook.framework?  If so, do the AB change notifications also work? Address Book is a C API on iPhone.

Re: Networking

2009-04-15 Thread I. Savant
On Wed, Apr 15, 2009 at 3:42 PM, Filip van der Meeren fi...@code2develop.com wrote: Acting as a p2p service. I feel like I'm fishing for cats with string ... The best I can do with this level of information is point you here:

Re: 3 iPhone SDK Questions

2009-04-15 Thread Luke the Hiesterman
On Apr 15, 2009, at 1:04 PM, Kyle Sluder wrote: 2) We believe that the iPhone does NOT support AppleScript, is there any inter-application communication mechanism? You can still use sockets and pipes. This assumes that you could have another application running simultaneously, which

Re: How to test if object is KVO observer?

2009-04-15 Thread I. Savant
On Wed, Apr 15, 2009 at 3:51 PM, Andreas Eriksson aeriks...@gmail.com wrote: Is there a way to test if an object is a KVO observer of a different object? Something like -[a isObserving:b forKeyPath:@akeypath]? The easy answer: Look up NSKeyValueObserving protocol's -observationInfo and check

Re: 3 iPhone SDK Questions

2009-04-15 Thread Greg Guerin
Kyle Sluder wrote: You can still use sockets and pipes. Only if you can keep both apps running at the same time, or have some kind of longer-lived shared intermediary. I think the OP needs to clarify exactly what is expected from an inter-application communication mechanism. The

Re: C: treated as a path component

2009-04-15 Thread Jean-Daniel Dupas
Le 15 avr. 09 à 01:57, Dragan Milić a écrit : Hell all, Let's suppose I've got NSString @C:omponent , which represents the name of a file. Is there a way to instruct NSString class not to treat a leading single letter followed by a column as a path separator? Namely, I need this one

Re: Master-detail interface, multiple selection, and mixed state checkbox state transitions

2009-04-15 Thread Sean McBride
On 4/15/09 2:58 PM, I. Savant said: The problem is that clicking the checkbox, as per documentation, cycles through [the 3 states] in this order: on, off, mixed, on, and so forth.  But I don't want the user to be able to choose 'mixed state'. I want this transition: Google NSButton

Re: Master-detail interface, multiple selection, and mixed state checkbox state transitions

2009-04-15 Thread I. Savant
On Wed, Apr 15, 2009 at 4:42 PM, Sean McBride s...@rogue-research.com wrote: Correct.  But as you say, it seems that it should do that.  So I created a test app and it behaves as expected there.  I added a 2nd checkbox in my real app and bound it identically.  That one works, and the other

Re: warning for unsigned parameter, signed argument with NSUInteger

2009-04-15 Thread Sean McBride
On 4/14/09 10:03 PM, Roland King said: I have this definition using NSUInteger -(id)initWithXExtent:(NSUInteger)xExtent yExtent:(NSUInteger)yExtent; and I was stupidly calling it like this GameBoard *gb = [ [ GameBoard alloc ] initWithXExtent:5 yExtent:-10 ]; and I didn't get a

Re: warning for unsigned parameter, signed argument with NSUInteger

2009-04-15 Thread Sean McBride
On 4/15/09 1:53 PM, Greg Parker said: I have way more warnings than that enabled and I don't get a warning either. I don't think there is one. File a bug. -Wconversion will warn about this (Also, warn if a negative integer constant expression is implicitly converted to an unsigned type.) But

Re: 3 iPhone SDK Questions

2009-04-15 Thread Kyle Sluder
This assumes that you could have another application running simultaneously, which you cannot. Yeah that's me being stupid. The functionality still exists, however, if you need to communicate with an external entity over the network. --Kyle Sluder

How to hook up IB actions to existing object (like File's Owner)?

2009-04-15 Thread Sidney San Martín
I want to hook up actions and bindings in a nib (loaded with +[NSBundle loadNibNamed:owner:]) to an object other than File's Owner (one which will already exist when the nib is loaded). Can I create a reference to a second object in Interface Builder without causing it to be instantiated and hook

Re: 3 iPhone SDK Questions

2009-04-15 Thread Dave Camp
On Apr 15, 2009, at 12:54 PM, Steve Cronin wrote: I haven't stuck my toe in the iPhone water yet. I know I could find the answers to these by digging but I've been asked to find out the answers quickly... 1) Does the iPhone support the Cocoa AddressBook.framework? If so, do the AB change

Re: Daylight Savings Time

2009-04-15 Thread Gregory Weston
Greg Robertson wrote: Basically I would like to display records for a week duration but I am unsure how to handle daylight savings time. Is there a way to see if daylight savings time has or will occur? If you want to see whether a DST switch happens during a given interval, just subtract

DevDays Ireland

2009-04-15 Thread Matt Johnston
Hi folks Next week, we've organised two developer days: Dublin on the 23rd April Belfast on the 24th April Leading into BarCampBelfast on the 25th April. The DevDays are focussed on iPhone development but Mac devs are also welcome. We currently have over 100 people coming to each day - some

How to control the window by cocoa

2009-04-15 Thread Joe Yi
hello everybody:These days I beginning to develop a application with xcode. the program confine the window,make it can‘t be resize. and limit the frame of the window .make it can't out of the area of the screen. When the border of the window touch the border of the screen. It'll come out a

Re: sending emails using URLRequest and php

2009-04-15 Thread Danny Thuering
Hi, You have to set the URL of your request to the URL of your php. Not to the URL of your HTML page. Bye Danny Sent from iPhone On 15.04.2009, at 18:45, Reza Farhad r...@qu-s.eu wrote: dear all I am looking at using URLRequest and php to configure my app to send an email by sending a

Combing Bindings with Target-Action

2009-04-15 Thread Jeff Hutchison
I've pored over the documentation pretty thoroughly but haven't found anything applicable to my situation. I am combining the use of bindings and target-action. My testing shows it works, but I wanted a sanity check. Example of what I am doing: 1. A NSTextField is bound to property foo of model

NSOpenGLView and antialiasing

2009-04-15 Thread rqtikk
I'm doing as described in the documentation: http://developer.apple.com/DOCUMENTATION/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_fsaa/opengl_fsaa.html#//apple_ref/doc/uid/TP40001987-CH405-SW2 Yet it's not working. I just made a simple class that inherits from NSOpenGLView. Do I have to

Re: Reading in dictionary from txt file: options for speed

2009-04-15 Thread Marcel Weiher
On Apr 14, 2009, at 11:12 , Miles wrote: I'm trying to find the best way to load in a 2MB text file of dictionary words and be able to do quick searches. Simply loading the uncompressed txt file takes about 0.5 seconds which I can handle. What do you do to load the txt file? 0.5

Re: localizedCompare: with Thai

2009-04-15 Thread Deborah Goldsmith
Yes, it's correct behavior. localizedCompare: compares logically, not visually. If you did a diacritic-insensitive compare, they would compare equal, because MAI EK is primary ignorable. Deborah Goldsmith Apple Inc. golds...@apple.com On Apr 15, 2009, at 12:13 AM, Gerriet M. Denkmann

Re: Daylight Savings Time

2009-04-15 Thread Deborah Goldsmith
There is also [NSTimeZone nextDaylightSavingTimeTransition] and [NSTimeZone nextDaylightSavingTimeTransitionAfterDate:], both available in 10.5 or later. Deborah Goldsmith Apple Inc. golds...@apple.com On Apr 15, 2009, at 2:41 PM, Gregory Weston wrote: Greg Robertson wrote: Basically I

Re: The efficiency of swapping endianness on an iPhone?

2009-04-15 Thread Marcel Weiher
On Apr 14, 2009, at 17:22 , Harry G wrote: Hi, I'm currently writing an app for iphone that downloads large tables of text and images , and my server outputs big endian. Hmm...I would generally expect both text and images to be endian- neutral, are you sure byte-order is an issue? How

Re: Best way to pass large objects between tasks?

2009-04-15 Thread Marcel Weiher
On Apr 12, 2009, at 23:26 , Oleg Krupnov wrote: I haven't tried either of the methods I mentioned so far (because I'm lazy, sorry:), but what I have tried is I created NSData from the large object by using NSKeyedArchiver. It has taken forever, so that I had to force-quit the process. Yes,

Apple's PredicateEditorSample returns [self init] in -awakeFromNib ?!?

2009-04-15 Thread Jerry Krinock
I just noticed that in Apple's PredicateEditorSample, the window controller's -awakeFromNib returns [self init]... - (id)awakeFromNib { ... ... return [self init] ; } Here's the whole source: http://developer.apple.com/samplecode/PredicateEditorSample/listing5.html I see no

Re: localizedCompare: with Thai

2009-04-15 Thread Gerriet M. Denkmann
On 16 Apr 2009, at 06:01, Deborah Goldsmith wrote: Yes, it's correct behavior. localizedCompare: compares logically, not visually. If you did a diacritic-insensitive compare, they would compare equal, because MAI EK is primary ignorable. But then: why does localizedCompare: think KO

Re: updating NSTextField with key validation?

2009-04-15 Thread Sidney San Martín
I'm writing this from my iPhone so method names may be off, but it might be worth trying willChangeValueForKey and didChangeValueForKey from your validation code if you need to update the text field's value without changing focus. Also, if I recall correctly, the docs state that you should never

Re: Reading in dictionary from txt file: options for speed

2009-04-15 Thread WT
Hi Marcel, that's quite impressive. On the simulator on my machine, it took 0.007 seconds, consistently. Learned something new with your message. Thanks! Wagner On Apr 16, 2009, at 12:35 AM, Marcel Weiher wrote: I would do the following: 1. map the file into memory using -[NSData

-viewDidMoveToWindow without subclassing? NSViewController?

2009-04-15 Thread Jerry Krinock
I have the contentView of an NSTabViewItem controlled by an NSViewController. I need to run code in there to initialize things when the nib is loaded, but not before the view has a -window. Putting the code in -awakeFromNib is no good because it will not yet be in a window if another tab

Re: localizedCompare: with Thai

2009-04-15 Thread Deborah Goldsmith
Or does it follow some rule like: The order of consecutive Nonspacing_Marks does not matter ? For Thai, that's correct. The Thai collation tailoring forces normalization. See: http://unicode.org/cldr/data/common/collation/th.xml (You'll need to view source if you look at that in Safari.)

Re: -viewDidMoveToWindow without subclassing? NSViewController?

2009-04-15 Thread Graham Cox
On 16/04/2009, at 12:09 PM, Jerry Krinock wrote: I have the contentView of an NSTabViewItem controlled by an NSViewController. I need to run code in there to initialize things when the nib is loaded, but not before the view has a -window. Putting the code in -awakeFromNib is no good

Re: static method to create CABasicAnimation: does this create a memory leak?

2009-04-15 Thread Marcel Weiher
On Apr 9, 2009, at 17:00 , Miles wrote: I have created a static method creating and returning an animation that I use in various places in my application. Class method, please. Pretty please with sugar on top. :-) Nothing static about it... Cheers, Marcel

Re: C: treated as a path component

2009-04-15 Thread Steve Christensen
On Apr 15, 2009, at 1:34 PM, Jean-Daniel Dupas wrote: Le 15 avr. 09 à 01:57, Dragan Milić a écrit : Hell all, Let's suppose I've got NSString @C:omponent , which represents the name of a file. Is there a way to instruct NSString class not to treat a leading single letter followed by a

Re: -viewDidMoveToWindow without subclassing? NSViewController?

2009-04-15 Thread Jerry Krinock
On 2009 Apr 15, at 19:15, Graham Cox wrote: The usual way is to implement -windowDidLoad (a NSWindowController method) and put your code in there. This is called when the window is first shown by the window controller, since windows are constructed lazily. Thanks Graham, but after

Re: -viewDidMoveToWindow without subclassing? NSViewController?

2009-04-15 Thread Graham Cox
On 16/04/2009, at 12:59 PM, Jerry Krinock wrote: On 2009 Apr 15, at 19:15, Graham Cox wrote: The usual way is to implement -windowDidLoad (a NSWindowController method) and put your code in there. This is called when the window is first shown by the window controller, since windows are

Re: How to control the window by cocoa

2009-04-15 Thread Kyle Sluder
2009/4/15 Joe Yi joe8...@gmail.com: Please tell me some idea and some ways. http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSWindow_Class/Reference/Reference.html --Kyle Sluder ___ Cocoa-dev mailing list

Re: Combing Bindings with Target-Action

2009-04-15 Thread Kyle Sluder
On Wed, Apr 15, 2009 at 3:04 PM, Jeff Hutchison hutchison.j...@gmail.com wrote: I am relying on the binding messages to complete before the target-action message - is this an OK idea? Why not just register as an observer of the bound property? --Kyle Sluder

Fwd: C: treated as a path component

2009-04-15 Thread Jeremy W. Sherman
You could also use basename(3) instead of Cocoa/CF calls. Since it could modify the passed-in string, you'll need to either use -[NSString getFileSystemRepresentation:maxLength:] or copy the string returned by -[NSString fileSystemRepresentation]. Of course, if you're worried about the path

Re: Combing Bindings with Target-Action

2009-04-15 Thread Jeremy W. Sherman
I am relying on the binding messages to complete before the target-action message - is this an OK idea? It sounds like you already know the answer to that. It's likely not worth the trouble of trying to straighten out the race condition, when you can just dodge the problem entirely and use KVO,

Re: NSOpenGLView and antialiasing

2009-04-15 Thread Kevin Cathey
Unfortunately, yes. Make sure your +defaultPixelFormat has the attributes NSOpenGLPFASampleBuffers set to 1, and NSOpenGLPFASamples set to something like 4, 8, or 16. Kevin -- Kevin Cathey On 15 Apr 2009, at 15:31, rqtikk wrote: I'm doing as described in the

Re: Apple's PredicateEditorSample returns [self init] in -awakeFromNib ?!?

2009-04-15 Thread Michael Ash
On Wed, Apr 15, 2009 at 9:03 PM, Jerry Krinock je...@ieee.org wrote: I just noticed that in Apple's PredicateEditorSample, the window controller's -awakeFromNib returns [self init]... - (id)awakeFromNib {    ...    ...    return [self init] ; } Here's the whole source:  

Re: -viewDidMoveToWindow without subclassing? NSViewController?

2009-04-15 Thread Michael Ash
On Wed, Apr 15, 2009 at 10:09 PM, Jerry Krinock je...@ieee.org wrote: I have the contentView of an NSTabViewItem controlled by an NSViewController.  I need to run code in there to initialize things when the nib is loaded, but not before the view has a -window. Putting the code in

Re: How to control the window by cocoa

2009-04-15 Thread Andrew Farmer
On 14 Apr 09, at 23:32, Joe Yi wrote: hello everybody:These days I beginning to develop a application with xcode. the program confine the window,make it can‘t be resize. You can do this from Interface Builder. Look in the properties for a window. and limit the frame of the window