Re: wait for sheet result

2010-01-07 Thread Graham Cox
On 08/01/2010, at 4:24 PM, Jerry Krinock wrote: > The Sheet Programming Guide notes that Cocoa does not support nested (or > "piled on top of one another") sheets, and states that your app should make > sure this never happens, but doesn't give you any assistance in doing so. > Given that she

Re: CGImageCreate performance

2010-01-07 Thread Steve Christensen
If I'm understanding you correctly, it sounds like you're effectively displaying a window into a larger image. If that's the case, how about tiling the big image and creating sections wrapped in CGImages that intersect the display area? You could then manage a cache where tiles get purged o

Re: Problem creating Core Data mapping file

2010-01-07 Thread Jerry Krinock
On 2010 Jan 07, at 12:07, lorenzo7...@gmail.com wrote: > Added a new model version > Set the current version to my new version > Now I want to add a new mapping model to the project. I select "New FIle" > from the File menu and from the MacOS X section, I select "Mapping Model". I > name the fi

Re: NSScroller

2010-01-07 Thread David Blanton
Let me cogitate on your superb answer for a bit. I'll be back. Thanks. On Jan 7, 2010, at 10:14 PM, Graham Cox wrote: On 08/01/2010, at 3:58 PM, David Blanton wrote: If a scroll view's content view is larger than the scroll view then the scroll view generates scrollers - correct? Let me

Re: NSScroller

2010-01-07 Thread Graham Cox
On 08/01/2010, at 3:58 PM, David Blanton wrote: > If a scroll view's content view is larger than the scroll view then the > scroll view generates scrollers - correct? > > Let me try to get to some of the REALLY > > 1. I want to always make the content view some factor larger than the scroll >

Re: NSScroller

2010-01-07 Thread David Blanton
If a scroll view's content view is larger than the scroll view then the scroll view generates scrollers - correct? Let me try to get to some of the REALLY 1. I want to always make the content view some factor larger than the scroll view to keep the scroller knobs a uniform size. 2. If the

Re: NSScroller

2010-01-07 Thread Graham Cox
On 08/01/2010, at 3:21 PM, David Blanton wrote: > I wan to send to my model code that the user scrolled the view and I want to > know by how much. > > So, I thought I would implement trackKnob but I don't know how To get the scroll position of the scrolled view is much more useful than

Re: NSScroller

2010-01-07 Thread David Blanton
I mentioned NSDocument app simce that is where I am and the content is contained in a scroll view. I wan to send to my model code that the user scrolled the view and I want to know by how much. So, I thought I would implement trackKnob but I don't know how On Jan 7, 2010, at 9:04 PM,

Re: Why do bindings make my image disabled?

2010-01-07 Thread Michael Bishop
Thank you very much! I really appreciate you taking the time to look at that. I could not for the life of me figure that out. _ michael On Jan 2, 2010, at 8:57 PM, Jim Correia wrote: > On Jan 1, 2010, at 5:39 PM, Michael Bishop wrote: > >> What I have been able to figure out is that using bind

Re: NSScroller

2010-01-07 Thread Graham Cox
On 08/01/2010, at 2:52 PM, David Blanton wrote: > Is there an 'easy' way to get NSScroller events in an NSDocument app? > > I would like to know where the knob is. The knob's position is just the -floatValue (or -intValue) of the scroller control. What are you trying to do? NSDocument is no

NSScroller

2010-01-07 Thread David Blanton
Is there an 'easy' way to get NSScroller events in an NSDocument app? I would like to know where the knob is. -db ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the

Re: Debugging Services menu in Leopard

2010-01-07 Thread Kevin Walzer
Oops, to answer my other question: http://www.cocoadev.com/index.pl?DiscoveringSystemServices -- Kevin Walzer Code by Kevin http://www.codebykevin.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderat

Re: Debugging Services menu in Leopard

2010-01-07 Thread Kevin Walzer
On 1/7/10 10:51 AM, Kevin Walzer wrote: Does anyone have any idea why Service Scrubber would see my service but it doesn't show up in the services menu? --Kevin OK, since my previous question may have been too specific, here's a more general one: Does anyone know of a Cocoa (or other) AP

Re: Is it possible to change the color of selected columns in NSTableView?

2010-01-07 Thread Gerriet M. Denkmann
On 8 Jan 2010, at 00:35, Andreas K?nner wrote: > > I want to change the default dark blue color for selected columns in > NSTableView to a light gray. Is this possible at all? In order make selected cells light blue I use a subclass of NSTextFieldCell which has only one method: - (NSColor *

Re: Julian date

2010-01-07 Thread Deborah Goldsmith
The underlying ICU calendar implementation has an API ucal_setGregorianChange, but this function is not available at the Cocoa level. Please file a bug if you’d like to access this through NSCalendar. Deborah On Jan 7, 2010, at 10:22 AM, Kyle Sluder wrote: > On Thu, Jan 7, 2010 at 8:44 AM, Ale

Re: CGImageCreate performance

2010-01-07 Thread David Blanton
Let me clarify. There will be various graphic images in the bitmap that he user can grab handles on and resize. There will be simulation of stitching (as in sewing machine) going on. These are all calculated / created in underlying portable code (we use it in Windows). On Jan 7, 2010, a

Re: CGImageCreate performance

2010-01-07 Thread Graham Cox
On 08/01/2010, at 12:36 PM, David Blanton wrote: > CGImageRetain(m_CGImageRef); Any reason why you are retaining the image twice? --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Re: CGImageCreate performance

2010-01-07 Thread Rob Keniger
On 08/01/2010, at 11:36 AM, David Blanton wrote: > The performance issue comes from the fact the user will be dragging this > bitmap around so I a regenerating m_bitmap.m_array constantly. I'm not sure what your app does, but have you considered using a Core Animation layer to host the bitma

CGImageCreate performance

2010-01-07 Thread David Blanton
If David Duncan would comment on performance issues using his suggested approach: CGColorSpaceRef colorSpace; colorSpace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB); CGDataProviderRef provider = CGDataProviderCreateWithData (NULL,m_bitmap.m_array, 4*m_bitmap.m_pixel

Re: Problems Fading Out Music

2010-01-07 Thread Chunk 1978
graham, thanks for your patients and for the detailed response! i was able to immediately solve my broken logic after reading it. thanks again. On Thu, Jan 7, 2010 at 7:19 PM, Graham Cox wrote: > > On 08/01/2010, at 6:17 AM, Chunk 1978 wrote: > >> ok i'll use NSTimer instead of performSelector:

Re: ColorSpace Question

2010-01-07 Thread Graham Cox
On 08/01/2010, at 10:51 AM, David Blanton wrote: > I have been using > > CGContextRefcontext; > context = CGBitmapContextCreate (m_bitmap.m_array.m_array, > m_bitmap.m_array.m_pixelsx, m_bitmap.m_array.m_pixelsy, 8, > m_bitmap.m_array.m_pixelsx * 4, > colorSpace,kCGImageAlphaNoneSki

Re: Optimizing View Drawing Code

2010-01-07 Thread Stephen Blinkhorn
OK Nick, thanks, will look into that tonight. On 7 Jan 2010, at 18:16, Nick Zitzmann wrote: On Jan 7, 2010, at 4:58 PM, Stephen Blinkhorn wrote: The real cause seems to be all the view setup messaging that needs to happen after I mark the view with setNeedsDisplay:YES. My top hit in shar

Re: NSPopupButton menu not showing in custom view for NSMenuItem

2010-01-07 Thread Graham Cox
On 08/01/2010, at 5:48 AM, Eric Schlegel wrote: > > On Jan 7, 2010, at 7:16 AM, Daniel Meachum wrote: > >> I'm trying to use an NSPopupButton inside of a view nested in an NSMenuItem >> (development for OS X 10.6 only). The menu is created but it refuses to >> popup/out of the button. No Cons

Re: Problems Fading Out Music

2010-01-07 Thread Graham Cox
On 08/01/2010, at 6:17 AM, Chunk 1978 wrote: > ok i'll use NSTimer instead of performSelector:withObject:afterDelay, > it should be easier to track this way. however, i'm still having an > issue with executing logic for the callback method: > > so i set the timer to fire ever 0.15 seconds with

Re: Optimizing View Drawing Code

2010-01-07 Thread Nick Zitzmann
On Jan 7, 2010, at 4:58 PM, Stephen Blinkhorn wrote: > The real cause seems to be all the view setup messaging that needs to happen > after I mark the view with setNeedsDisplay:YES. My top hit in shark is: > objc_msgSend (seems wrong for an app doing mostly DSP :). That's because you're proba

Optimizing View Drawing Code

2010-01-07 Thread Stephen Blinkhorn
Hello, I'm using Cocoa for the GUI of some audio plugins I'm writing. In the GUI I have the need for accurate level metering via 16 meters spread around at various points in the GUI. For satisfactory results I need to update the screen 20 times a second. This is causing a lot of CPU ov

Re: Revolving scoreboard

2010-01-07 Thread Hal Mueller
Quartz Composer is very well suited for this sort of problem. Take a look at the sample code and Xcode templates. Hal ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

ColorSpace Question

2010-01-07 Thread David Blanton
I have been using CGContextRefcontext; context = CGBitmapContextCreate (m_bitmap.m_array.m_array, m_bitmap.m_array.m_pixelsx, m_bitmap.m_array.m_pixelsy, 8, m_bitmap.m_array.m_pixelsx * 4, colorSpace,kCGImageAlphaNoneSkipFirst| kCGBitmapByteOrder32Host); CGImageRelease(m_BitmapI

Re: binding NSComboBox default selection

2010-01-07 Thread Mazen M. Abdel-Rahman
From: Quincey Morris Subject: Re: binding NSComboBox default selection To: cocoa-dev Message-ID: Content-Type: text/plain; charset=us-ascii > > > On Jan 7, 2010, at 09:02, Mazen M. Abdel-Rahman wrote: > >> NSString * defaultSelectionValue = [myDS defaultSelectionValue]; >> >> NSUInteger defa

Re: NSBitMapImageRep Woes

2010-01-07 Thread David Blanton
Answered my own question ... apologize for the noise! On Jan 7, 2010, at 4:05 PM, David Blanton wrote: Thanks to all. I have my bitmap being drawn but it is upside down. Do isFlipped play any role in this / how do I get it to draw right side up without inverting my raw data? For those inte

Re: NSBitMapImageRep Woes

2010-01-07 Thread David Blanton
Thanks to all. I have my bitmap being drawn but it is upside down. Do isFlipped play any role in this / how do I get it to draw right side up without inverting my raw data? For those interested this is the correct definition of NSBitMapImageRep: m_ptrs[0] = (unsigned char*)m_bitmap.

Re: A password strength checker

2010-01-07 Thread Gideon King
If you Google "password strength algorithm", there are a bunch of algorithms with source code. HTH Gideon___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderator

Re: iPhone: validate a NSString for US zipcode

2010-01-07 Thread Kirk Kerekes
In my testing NSDictionary's objectForKey: is extremely fast, with NSSet's member: coming in second and everything else trailing waayyy back. I was using simple immutable keys and complex, mutable objects, which may have affected the results. YMMV. So if you make a dictionary where the ZIPs ar

Re: iPhone: validate a NSString for US zipcode

2010-01-07 Thread David Duncan
I can say I meant it in the way that BJ describes. However, the Cocoa documentation does describe them in the way that Dave states, so consider my sense on this particular point reversed :). On Jan 7, 2010, at 2:17 PM, BJ Homer wrote: > Well, depends on what you mean by ordered. NSArray retains

Re: iPhone: validate a NSString for US zipcode

2010-01-07 Thread BJ Homer
Well, depends on what you mean by ordered. NSArray retains insertion order. NSSet does not. But NSSet may be sorting things on insertion (like you'd get with a binary tree structure), while NSArray cannot assume any particular order. So from the NSArray implementor's standpoint, the array is unorde

Re: A password strength checker

2010-01-07 Thread Greg Guerin
Martin Hewitson wrote: Is anybody aware of a reasonable algorithm or some code that can be used to test/check the strength of a password? I'd like to give a kind of score or a color (red,yellow,green). I've looked at cracklib, but that doesn't give a score, really. Google keywords: passw

Re: iPhone: validate a NSString for US zipcode

2010-01-07 Thread Sean McBride
On 1/7/10 1:44 PM, David Duncan said: >> To help make this thread more Cocoa-y, I would like to ask: Do the >NSSet and NSArray methods like -containsObject perform in a fashion >comparable to a home-rolled binary search? I greatly prefer to use the >Cocoa stuff rather than try to remember/learn ho

Re: iPhone: validate a NSString for US zipcode

2010-01-07 Thread Dave DeLong
That's backwards. NSArray is ordered; NSSet is not. Dave On Jan 7, 2010, at 2:44 PM, David Duncan wrote: > Since NSArray is unordered I would not expect its containsObject to do better > than O(n). If NSSet is an ordered container, it should be able to do O(lg n). smime.p7s Description: S/MI

Re: iPhone: validate a NSString for US zipcode

2010-01-07 Thread Eric E. Dolecki
I am using the Yahoo! weather service. If I send it a zipcode that doesn't resolve to a city location, it does return a chunk of error XML - so I am using that as my validation now. I put up an alert notifying that the supplied zipcode doesn't work so another can be tried. It's not as nice as supp

Re: iPhone: validate a NSString for US zipcode

2010-01-07 Thread David Duncan
On Jan 7, 2010, at 10:00 AM, Paul Bruneau wrote: > To help make this thread more Cocoa-y, I would like to ask: Do the NSSet and > NSArray methods like -containsObject perform in a fashion comparable to a > home-rolled binary search? I greatly prefer to use the Cocoa stuff rather > than try to r

Re: Trouble with dragging and file promises

2010-01-07 Thread Nick Zitzmann
On Jan 7, 2010, at 2:34 PM, Dave DeLong wrote: > And the promised files delegate method still isn't getting called. (The > entirety of my source code is pasted here: http://pastie.org/770718 ) I don't know if it will help, but once upon a time, I solved this problem by subclassing NSBrowser

Re: Trouble with dragging and file promises

2010-01-07 Thread Dave DeLong
If I just do: - (BOOL)browser:(NSBrowser *)browser writeRowsWithIndexes:(NSIndexSet *)rowIndexes inColumn:(NSInteger)column toPasteboard:(NSPasteboard *)pasteboard { [pasteboard declareTypes:[NSArray arrayWithObject:NSFilesPromisePboardType] owner:self]; return YES; } Then when

Re: Trouble with dragging and file promises

2010-01-07 Thread Nick Zitzmann
On Jan 7, 2010, at 1:43 PM, Dave DeLong wrote: > In a nutshell, what am I doing wrong, and where is the clear documentation? Did you try the pasteboard type "NSFilesPromisePboardType", not attaching any data, and implementing the promised files delegate method? That should work, according to t

Re: iPhone: validate a NSString for US zipcode

2010-01-07 Thread Lorenzo Thurman
> > > I've been googling but haven't seen yet how to best validate a 5-digit > zipcode for use in the US (without using a webservice). > > I have the NSString, I just need to validate it. I know zero RegExp, is > there a formatter I can use? > > > I actually ran into a similar issue with one of my

Re: A password strength checker

2010-01-07 Thread Seth Willits
On Jan 7, 2010, at 12:45 PM, Martin Hewitson wrote: > Sorry, I didn't express myself properly in the original mail. I'm looking to > include such functionality in a Cocoa app. But the thing you point to is > exactly what I want to implement. I dug around AppKit to include Apple's implementatio

Re: Drawing A Mutable String

2010-01-07 Thread Fritz Anderson
On 7 Jan 2010, at 2:29 PM, Michael Craig wrote: >if ([theDeck.cardPile count] == 0) { >[infoStr appendString: @"\n\nThe deck is empty."]; // > *2* >} >if (gameCon.invalidStack) { >[infoStr appendString: @"\n\nThat's an invalid stack."];// > *1* >

Re: Drawing A Mutable String

2010-01-07 Thread Quincey Morris
On Jan 7, 2010, at 12:29, Michael Craig wrote: >NSDictionary *infoAtts = [NSDictionary > dictionaryWithObjectsAndKeys: [NSFont > labelFontOfSize:infoFontSize], NSFontAttributeName, > rightAligned, > NSParagraphStyleAt

Re: Drawing A Mutable String

2010-01-07 Thread Andy Lee
Looks fine to me. Is there any chance the correct text *is* being drawn but is subsequently erased or drawn over by something else in the rest of the drawRect: method? --Andy On Thursday, January 07, 2010, at 03:29PM, "Michael Craig" wrote: >Hi all, >This has me completely boggled. > >I've

Re: A password strength checker

2010-01-07 Thread Martin Hewitson
Sorry, I didn't express myself properly in the original mail. I'm looking to include such functionality in a Cocoa app. But the thing you point to is exactly what I want to implement. Thanks, Martin On Jan 7, 2010, at 9:15 PM, Philip Ershler wrote: > > On Jan 7, 2010, at 12:51 PM, Martin Hew

Trouble with dragging and file promises

2010-01-07 Thread Dave DeLong
Hi everyone, I'm trying to figure out how file promises work, and I've hit an impasse. Here's what I've got set up: I have a simple item-based NSBrowser that's displaying my hard drive hierarchy. When I drag something out of the browser, I'd like to create a simple text file at the drop loca

Drawing A Mutable String

2010-01-07 Thread Michael Craig
Hi all, This has me completely boggled. I've got a GameController with some BOOL instance variables that it uses to make certain gamestate information available to other objects. I've also got a GameView that looks at those BOOLs and conditionally appends an NSMutableString before it gets drawn. T

Re: binding NSComboBox default selection

2010-01-07 Thread Quincey Morris
On Jan 7, 2010, at 09:02, Mazen M. Abdel-Rahman wrote: > NSString * defaultSelectionValue = [myDS defaultSelectionValue]; > > NSUInteger defaultSelectionIndex = [myDS comboBox:self > indexOfItemWithStringValue:defaultSelectionValue]; > > [self selectItemAtIndex:defaultSelectionIndex]; >

Re: A password strength checker

2010-01-07 Thread Philip Ershler
On Jan 7, 2010, at 12:51 PM, Martin Hewitson wrote: > Dear list, > > Is anybody aware of a reasonable algorithm or some code that can be used to > test/check the strength of a password? I'd like to give a kind of score or a > color (red,yellow,green). I've looked at cracklib, but that doesn't

Implementing search field in core-data app

2010-01-07 Thread Martin Hewitson
Dear list, I have a fairly basic core-data model with a set of Category entities, each category contains then a set of Item entities. What I want to do is implement a search field which searches all items from all categories - something like the searching is done in Mail.app. I'm not really su

Problem creating Core Data mapping file

2010-01-07 Thread lorenzo7620
This is my first foray into Core Data, so forgive me if I've missed something basic. I'm adding a new model version to my project and so far I've done this: Added a new model version Set the current version to my new version Now I want to add a new mapping model to the project. I select "New F

A password strength checker

2010-01-07 Thread Martin Hewitson
Dear list, Is anybody aware of a reasonable algorithm or some code that can be used to test/check the strength of a password? I'd like to give a kind of score or a color (red,yellow,green). I've looked at cracklib, but that doesn't give a score, really. Best wishes, Martin ~~

Re: iPhone: validate a NSString for US zipcode

2010-01-07 Thread Chris Williams
As someone who lives in a zip code that was added in 2004, yet STILL shows up as invalid in countless databases, I can't stress this point enough. Do not maintain data yourself that someone else has a reason/motivation and the resources to maintain. Just send it to the service, and catch the f

Re: Problems Fading Out Music

2010-01-07 Thread Chunk 1978
ok i'll use NSTimer instead of performSelector:withObject:afterDelay, it should be easier to track this way. however, i'm still having an issue with executing logic for the callback method: so i set the timer to fire ever 0.15 seconds with this: currentVolume =+ targetVolume / (fadeDuration / 0.

Re: Julian date

2010-01-07 Thread Thomas Wetmore
Here a couple methods that go to and from modified julian day numbers to values. These algorithms are found in a number of standard sources for astronomical computing. These are methods from a date class that I use. They only thing necessary to know about that class is that three of its instanc

Re: iPhone: validate a NSString for US zipcode

2010-01-07 Thread Steve Christensen
As others have pointed out, letting the service do the validation takes the onus off of your app to keep itself up-to-date. If you get an error, though, I would let the user know that the zip code is invalid and give them an opportunity to fix it or choose a different one. The user shouldn

Re: Julian date

2010-01-07 Thread Fritz Anderson
On 7 Jan 2010, at 12:22 PM, Kyle Sluder wrote: > There is no standalone Julian calendar in Cocoa. The only way to > interpret dates relative to a Julian calendar is if they correspond to > Gregorian dates prior to October 1582. I believe the OP may be interested in the Julian _day_ (civil or astr

Re: NSPopupButton menu not showing in custom view for NSMenuItem

2010-01-07 Thread Eric Schlegel
On Jan 7, 2010, at 7:16 AM, Daniel Meachum wrote: > I'm trying to use an NSPopupButton inside of a view nested in an NSMenuItem > (development for OS X 10.6 only). The menu is created but it refuses to > popup/out of the button. No Console messages are displayed or UI feedback. I > originally

Re: Julian date

2010-01-07 Thread Matt Neuburg
On Thu, 7 Jan 2010 11:44:39 -0500, Alexander Cohen said: >Hello, > >How should i go about creating a NSDate object from a julian date NSTimeInterval. Is this the sort of thing you're after? http://www.astro.uu.nl/~strous/AA/en/reken/juliaansedag.html m. -- matt neuburg, phd = m...@tidbits.com,

NSPopupButton menu not showing in custom view for NSMenuItem

2010-01-07 Thread Daniel Meachum
I'm trying to use an NSPopupButton inside of a view nested in an NSMenuItem (development for OS X 10.6 only). The menu is created but it refuses to popup/out of the button. No Console messages are displayed or UI feedback. I originally found the problem while programmatically creating the view b

Re: help system structure

2010-01-07 Thread Ron Fleckner
On 07/01/2010, at 4:24 PM, Shane wrote: I'm trying to implement a help system and don't understand the structure. Here's how my current XCode project is laid out. MyApp |- AquaticPrime.framework |- build |- English.lproj |- images |- Importer |- includes |- MyApp-Info.plist |-

Re: Julian date

2010-01-07 Thread Kyle Sluder
On Thu, Jan 7, 2010 at 8:44 AM, Alexander Cohen wrote: > How should i go about creating a NSDate object from a julian date > NSTimeInterval. NSTimeIntervals have no sense of calendar. They describe seconds elapsed since the reference date. There is no standalone Julian calendar in Cocoa. The on

Re: iPhone: validate a NSString for US zipcode

2010-01-07 Thread Eric E. Dolecki
The webservice reports a city not found error - to which I can default to a known zipcode instead. On Thu, Jan 7, 2010 at 12:32 PM, Henry McGilton (Boulevardier) < appledevelo...@trilithon.com> wrote: > > On Jan 7, 2010, at 8:53 AM, Eric E. Dolecki wrote: > > I don't care about the city, just tha

Re: Julian date

2010-01-07 Thread Nick Zitzmann
On Jan 7, 2010, at 9:44 AM, Alexander Cohen wrote: > How should i go about creating a NSDate object from a julian date > NSTimeInterval. You'd have to subtract 86,400 seconds for each leap day that occurred on the Julian calendar that did not occur on the Gregorian calendar starting from the

Re: iPhone: validate a NSString for US zipcode

2010-01-07 Thread Paul Bruneau
On Jan 7, 2010, at 12:29 PM, David Duncan wrote: Given that you would likely want to do this test with a binary search I don't see any reason why it should be slow (effectively you can do the entire search with about 17*k compares). To help make this thread more Cocoa-y, I would like to ask

Re: wait for sheet result

2010-01-07 Thread Rainer Standke
Thanks again, Graham. This was actually the key to solving it. I had been hung up on the idea to present the sheet for each item as the item became available, i.e. within the same loop that generates the items. Which, of course, lead to the run-away train situation. What I am doing now inst

Subject: Re: NSEvent timestamp is zero

2010-01-07 Thread Kirk Kerekes
> 1. I have an NSButton that toggles an operation between active and suspended. > 2. At some point the operation completes and I process the results of the > operation. > 3. The user can still toggle the operation for the few seconds that the > result is being processed. > Don't discard, preve

Re: help system structure

2010-01-07 Thread Matt Neuburg
On Wed, 6 Jan 2010 23:24:22 -0600, Shane said: >I'm trying to implement a help system and don't understand the >structure. Here's how my current XCode project is laid out. > >MyApp > |- AquaticPrime.framework > |- build > |- English.lproj > |- images > |- Importer > |- includes > |-

Re: iPhone: validate a NSString for US zipcode

2010-01-07 Thread Henry McGilton (Boulevardier)
On Jan 7, 2010, at 8:53 AM, Eric E. Dolecki wrote: > I don't care about the city, just that the zip code will work. On an iPhone > testing against an array of 42,305 values... could that be pretty quick? > Seems like a large set to go through looking. I'm sending the value to a > webservice to re

Re: iPhone: validate a NSString for US zipcode

2010-01-07 Thread Keary Suska
On Jan 7, 2010, at 9:53 AM, Eric E. Dolecki wrote: > I don't care about the city, just that the zip code will work. On an iPhone > testing against an array of 42,305 values... could that be pretty quick? > Seems like a large set to go through looking. I'm sending the value to a > webservice to ret

Re: iPhone: validate a NSString for US zipcode

2010-01-07 Thread David Duncan
On Jan 7, 2010, at 8:53 AM, Eric E. Dolecki wrote: > I don't care about the city, just that the zip code will work. On an iPhone > testing against an array of 42,305 values... could that be pretty quick? > Seems like a large set to go through looking. I'm sending the value to a > webservice to ret

Re: iPhone: validate a NSString for US zipcode

2010-01-07 Thread Alastair Houghton
On 7 Jan 2010, at 16:11, Eric E. Dolecki wrote: > I've been googling but haven't seen yet how to best validate a 5-digit > zipcode for use in the US (without using a webservice). > > I have the NSString, I just need to validate it. I know zero RegExp, is > there a formatter I can use? It might b

Re: iPhone: validate a NSString for US zipcode

2010-01-07 Thread Sherm Pendley
On Thu, Jan 7, 2010 at 11:53 AM, Eric E. Dolecki wrote: > I don't care about the city, just that the zip code will work. On an iPhone > testing against an array of 42,305 values... could that be pretty quick? > Seems like a large set to go through looking. I'm sending the value to a > webservice t

Re: iPhone: validate a NSString for US zipcode

2010-01-07 Thread Greg Guerin
Eric E. Dolecki wrote: I don't care about the city, just that the zip code will work. On an iPhone testing against an array of 42,305 values... could that be pretty quick? Seems like a large set to go through looking. I'm sending the value to a webservice to return weather data. Use an

Is it possible to change the color of selected columns in NSTableView?

2010-01-07 Thread Andreas Känner
Hi, I want to change the default dark blue color for selected columns in NSTableView to a light gray. Is this possible at all? Best regards, Andreas ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mode

binding NSComboBox default selection

2010-01-07 Thread Mazen M. Abdel-Rahman
Hi All, I have an NSComboBox that is bound to a datasource. I want to programatically select a default selection when the sheet the combobox is in is first displayed. To do so I am doing the following: NSString * defaultSelectionValue = [myDS defaultSelectionValue]; NSUInteger defaultSelecti

Re: iPhone: validate a NSString for US zipcode

2010-01-07 Thread Eric E. Dolecki
I don't care about the city, just that the zip code will work. On an iPhone testing against an array of 42,305 values... could that be pretty quick? Seems like a large set to go through looking. I'm sending the value to a webservice to return weather data. On Thu, Jan 7, 2010 at 11:45 AM, Paul Bru

Re: iPhone: validate a NSString for US zipcode

2010-01-07 Thread Paul Bruneau
I'm a little unclear what you are asking, but I'll tell what I know. You just want to know if a 5 digit zip code is a valid one? Or do you want to compare it to the list of valid city names that are assigned to it? (yes it can be more than one, ugh) They are (from a non-USPS point of view)

Julian date

2010-01-07 Thread Alexander Cohen
Hello, How should i go about creating a NSDate object from a julian date NSTimeInterval. thx AC___ 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 coco

iPhone: validate a NSString for US zipcode

2010-01-07 Thread Eric E. Dolecki
I've been googling but haven't seen yet how to best validate a 5-digit zipcode for use in the US (without using a webservice). I have the NSString, I just need to validate it. I know zero RegExp, is there a formatter I can use? ___ Cocoa-dev mailing lis

Debugging Services menu in Leopard

2010-01-07 Thread Kevin Walzer
I'm developing an application that registers a service with the Services menu in Leopard (10.5.8). I've based much of the code on Apple's documentation of services, and I have correctly set up my info.plist file with the appropriate keys. The application launches and runs fine. However, the app

Re: Bindings blues

2010-01-07 Thread Paul Sanders
You might learn something about what's going on by putting a breakpoint on [NSTableView reloadData]. If this is getting called unnecessarily often that could be the cause of your performance problems. Whether there's anything you can do about it is another thing, of course. I imagine binding

Re: Bindings blues

2010-01-07 Thread jonat...@mugginsoft.com
On 7 Jan 2010, at 00:04, Rob Keniger wrote: > > I've fought this problem too, it's a regression in 10.6 as the problems don't > exist under 10.5. It occurs when you have a lot of bindings and a lot of > objects being tracked by the controller. Please file a bug report and refer > to my bug num

Yet another NSTreeController memory issue

2010-01-07 Thread Jean-Daniel Dupas
Hi, I'm using NSTreeController to display an object graph in an outline view. The object graph is not CoreData based, this is a very simple model where each object represent a node and may have an array of children. I do something very simple. I create a root node and insert it to the tree con

Re: NSEvent timestamp is zero

2010-01-07 Thread jonat...@mugginsoft.com
On 7 Jan 2010, at 11:09, Graham Cox wrote: > > On 07/01/2010, at 9:07 PM, jonat...@mugginsoft.com wrote: > >> Once the operation is done and processed I don't want to respond to any >> previous mouse click events that remain in the event queue for that button. >> Filtering on the timestamp seem

Re: NSEvent timestamp is zero

2010-01-07 Thread Graham Cox
On 07/01/2010, at 9:07 PM, jonat...@mugginsoft.com wrote: > Once the operation is done and processed I don't want to respond to any > previous mouse click events that remain in the event queue for that button. > Filtering on the timestamp seemed like the way to go. Or alternatively just flush

Re: NSEvent timestamp is zero

2010-01-07 Thread jonat...@mugginsoft.com
n 7 Jan 2010, at 03:31, Rob Keniger wrote: > > On 07/01/2010, at 10:47 AM, jonat...@mugginsoft.com wrote: > >> I am trying to filter my NSEvents by timestamp but some, with event type of >> NSAppKItDefined, have a zero timestamp. >> >> I can work around this by calculating a timestamp value fo