Drawing a path and making an object follow that path IPHONE

2010-04-13 Thread charisse napeÿfffff1as
Hello, I'm a newbie at iphone development and I was wondering if somebody can point out how to create a simple app where I can draw a simple path with loops or curves from point a to b and then make an object follow that path from a to b. Anybody can give me a sample code or something so I can

UITabBarItem's frame?

2010-04-13 Thread Mike Manzano
Hello, Is there a way to get a UITabBarItem's frame? I'd like to implement a popover-like menu whose arrow points to a particular UITabBarItem (on the iPhone, not iPad). However, UITabBarItems are not views and have no frame property. I noticed in the iPad API that the equivalent

Button frame to screen rect

2010-04-13 Thread Jack Carbaugh
What would be the easiest way to convert the frame rect of a button in a window to a screen rect ? My goal is to have a window animate out from this button. For some reason (perhaps lack of coffee), i'm not able to wrap my brain around the various convert methods for views. Thanks! Jack

Colorful buttons of different shapes

2010-04-13 Thread Abhijeet Singh
Hi,I am porting my Win32 application to Mac. I am new to Cocoa. In my Windows Win32 application I have a window in that there is a 3 X 8 matrix of 24 buttons. Buttons are labeled as 124. Each button has 3 states. Unused Round shape green color(Default state) SelectedSquare shape orange color

Re: Colorful buttons of different shapes

2010-04-13 Thread Graham Cox
On 13/04/2010, at 9:58 PM, Abhijeet Singh wrote: effect.Should I use NSMatrix of buttons? It would be a straightforward solution. If yes than how can i set color and shape of buttons? You'd probably need a NSButtonCell subclass. Drawing alternative appearances is pretty easy that only

Re: UITabBarItem's frame?

2010-04-13 Thread Luke the Hiesterman
Please file an enhancement request. Luke On Apr 13, 2010, at 12:12 AM, Mike Manzano wrote: Hello, Is there a way to get a UITabBarItem's frame? I'd like to implement a popover-like menu whose arrow points to a particular UITabBarItem (on the iPhone, not iPad). However, UITabBarItems are

[MEET] Columbia, MD CocoaHeads - April 13th

2010-04-13 Thread Eric Gorr
The next meeting of Columbiao CocoaHeads will be held on Tuesday, April 13 at 6:30 PM at Nemetschek North America, Inc. Up-to-date agenda directions are available at: http://cocoaheads.org/us/ColumbiaMaryland/index.html ___ Cocoa-dev mailing list

Re: Font Style Names for iPhone/iPad

2010-04-13 Thread Fritz Anderson
On 12 Apr 2010, at 5:15 PM, Kyle Sluder wrote: Ah, in that case you're going to need to do a little bit more work. But CTFont does everything you need. Take a look at kCTFontStyleNameKey and friends. Has discussion of post-3.1 API been cleared? I understood that the moderator has to

Re: Button frame to screen rect

2010-04-13 Thread Fritz Anderson
On 13 Apr 2010, at 5:30 AM, Jack Carbaugh wrote: What would be the easiest way to convert the frame rect of a button in a window to a screen rect ? Search the documentation for symbols beginning with convert; among the results: convertBaseToScreen: Converts a given point from the

Re: Button frame to screen rect

2010-04-13 Thread Jack Carbaugh
Thanks for your help. From this then, I would use the origin point ... of the bounds or frame of the button rect, which would give me the equivalent in screen coordinates and then just adjust the width/height as necessary for my window ? Again, my thanks On Apr 13, 2010, at 10:42 AM,

Re: Font Style Names for iPhone/iPad

2010-04-13 Thread Kyle Sluder
On Apr 13, 2010, at 7:34 AM, Fritz Anderson fri...@manoverboard.org wrote: Has discussion of post-3.1 API been cleared? I understood that the moderator has to expressly say so, and I see no reason not to, but I never saw such a message. Also, the OP wanted a solution that worked for

Operation could not be completed. No such file or directory

2010-04-13 Thread koko
Using NSFileManager I get the error messaged referenced in the Subject Line. But, which is it referring to ... the copyItemAtPath or the toPath bool rtx2 = [[NSFileManager defaultManager] copyItemAtPath:prefsrcpath toPath:prefdstpath error:error]; -koko

Re: Operation could not be completed. No such file or directory

2010-04-13 Thread Kevin Perry
It's referring to the source path. The documentation specifically states that no file should exist at the destination path. So, one can deduce that NSFileManager wouldn't report a no such file error if there was no file there, since that is what is expected. -Kevin On Apr 13, 2010, at 11:31

Re: Operation could not be completed. No such file or directory

2010-04-13 Thread koko
Not true. I did bool exists = [[NSFileManager defaultManager] fileExistsAtPath:prefsrcpath]; on the source path and it returned true. I found the error though, my destination path was in error! -koko On Apr 13, 2010, at 12:43 PM, Kevin Perry wrote: It's referring to the source path.

Re: Operation could not be completed. No such file or directory

2010-04-13 Thread Jens Alfke
On Apr 13, 2010, at 11:31 AM, k...@highrolls.net wrote: Using NSFileManager I get the error messaged referenced in the Subject Line. But, which is it referring to ... the copyItemAtPath or the toPath Does the NSError’s info dict have a key that gives the offending path? (If not, it should —

Re: Operation could not be completed. No such file or directory

2010-04-13 Thread Jens Alfke
On Apr 13, 2010, at 11:43 AM, Kevin Perry wrote: It's referring to the source path. The documentation specifically states that no file should exist at the destination path. So, one can deduce that NSFileManager wouldn't report a no such file error if there was no file there It would, if

Re: NSArrayController in entity mode and permutations (CoreData question)

2010-04-13 Thread vincent habchi
Le 12 avr. 2010 à 22:22, Kyle Sluder a écrit : On Mon, Apr 12, 2010 at 12:12 PM, vincent habchi vi...@macports.org wrote: Besides, the proxy solution has one advantage: since the object in the NSArrayController reacts to actions performed on buttons linked to it, I think it is better to

Re: Operation could not be completed. No such file or directory

2010-04-13 Thread koko
and yes, it was an error in the toPath, it was missing its first path component. And duh, the userInfo gives the offending path .. On Apr 13, 2010, at 12:55 PM, Jens Alfke wrote: On Apr 13, 2010, at 11:43 AM, Kevin Perry wrote: It's referring to the source path. The documentation

Re: NSArrayController in entity mode and permutations (CoreData question)

2010-04-13 Thread vincent habchi
Le 12 avr. 2010 à 23:17, Quincey Morris a écrit : I think I'm confused now about what scenario we are talking about. Are you saying that the object you insert with [NSArrayController insertObject...] is *not* a NSManagedObject, but is a proxy object that is linked to the NSManagedObject?

How does an NSTextField know that it's value has changed?

2010-04-13 Thread Brian Postow
I have a textfield that can either be edited by hand, or set through another control. (It's a page number, so you can jump to page 16 by typing in 16, or you can page up and down with the next/prev buttons) I have the value of the text field bound to an int page variable. It seems to work

Re: How does an NSTextField know that it's value has changed?

2010-04-13 Thread Kyle Sluder
On Tue, Apr 13, 2010 at 1:43 PM, Brian Postow brian.pos...@acordex.com wrote: I have a textfield that can either be edited by hand, or set through another control. (It's a page number, so you can jump to page 16 by typing in 16, or you can page up and down with the next/prev buttons) I have

Re: How does an NSTextField know that it's value has changed?

2010-04-13 Thread Joanna Carter
Hi Brian The problem seems to be that I'm changing the value of the textfield programatically, but some part isn't getting the message. And this is your problem. If you change the value of a text field by typing into it, then that value is sent to the property on the model, but this is not

Re: How does an NSTextField know that it's value has changed?

2010-04-13 Thread Joanna Carter
Hi Brian And this is your problem. If you change the value of a text field by typing into it, then that value is sent to the property on the model, but this is not true for programatic changes. The MVC pattern and bindings work when you change the value in the model programatically, not

NSNumberFormatter not working for me ?

2010-04-13 Thread Bill Hernandez
I am calling a method that I pass a phone number string 1234567890 and should return (123) 456-7890 but sure enough, that is not what is happening... Any Ideas ? Bil Hernandez Plano, Texas I created a simple demo below : $ clang_gen --- shows : ** BUILD SUCCEEDED ** Build and Analyze shows

Re: How does an NSTextField know that it's value has changed?

2010-04-13 Thread Brian Postow
On Apr 13, 2010, at 4:59 PM, Kyle Sluder wrote: On Tue, Apr 13, 2010 at 1:43 PM, Brian Postow brian.pos...@acordex.com wrote: I have a textfield that can either be edited by hand, or set through another control. (It's a page number, so you can jump to page 16 by typing in 16, or you can

Re: NSNumberFormatter not working for me ?

2010-04-13 Thread Keary Suska
On Apr 13, 2010, at 3:15 PM, Bill Hernandez wrote: I am calling a method that I pass a phone number string 1234567890 and should return (123) 456-7890 but sure enough, that is not what is happening... You are asking the NSNumberFormatters to format a string, which it does not do (hence the

Re: NSNumberFormatter not working for me ?

2010-04-13 Thread Jens Alfke
On Apr 13, 2010, at 2:49 PM, Keary Suska wrote: You are asking the NSNumberFormatters to format a string, which it does not do (hence the class name). No he isn't. Viz: NSInteger theInt = [aNumberString intValue]; NSNumber *theNum = [NSNumber numberWithInt:theInt]; NSString

Re: NSNumberFormatter not working for me ?

2010-04-13 Thread Keary Suska
On Apr 13, 2010, at 3:55 PM, Jens Alfke wrote: On Apr 13, 2010, at 2:49 PM, Keary Suska wrote: You are asking the NSNumberFormatters to format a string, which it does not do (hence the class name). No he isn't. Viz: NSInteger theInt = [aNumberString intValue]; NSNumber *theNum

Re: NSNumberFormatter not working for me ?

2010-04-13 Thread Bill Hernandez
On Apr 13, 2010, at 5:18 PM, Keary Suska wrote: Sorry, I missed that. Anyway, it may be because the format is being interpreted using 10.4 behavior, in which case the format may not be valid and may be ignored. Have you tried single-quoting all non-hash marks (pound signs) to eliminate

Re: NSNumberFormatter not working for me ?

2010-04-13 Thread Keary Suska
On Apr 13, 2010, at 4:26 PM, Bill Hernandez wrote: On Apr 13, 2010, at 5:18 PM, Keary Suska wrote: Sorry, I missed that. Anyway, it may be because the format is being interpreted using 10.4 behavior, in which case the format may not be valid and may be ignored. Have you tried

Re: NSNumberFormatter not working for me ?

2010-04-13 Thread Murat Konar
For one thing, the docs say that -setFormat: is for use with formatters using NSNumberFormatterBehavior10_0 behavior. Have you set the formatters behavior? _murat On Apr 13, 2010, at 2:15 PM, Bill Hernandez wrote: I am calling a method that I pass a phone number string 1234567890 and

Re: NSNumberFormatter not working for me ?

2010-04-13 Thread Kyle Sluder
On Tue, Apr 13, 2010 at 3:39 PM, Keary Suska cocoa-...@esoteritech.com wrote: I think the issue remains that the format you are passing is not considered a valid format, and is getting ignored. You can confirm this by providing a valid number format for comparison. I tend to use a custom

Re: NSNumberFormatter not working for me ?

2010-04-13 Thread Bill Hernandez
On Apr 13, 2010, at 5:39 PM, Keary Suska wrote: I think the issue remains that the format you are passing is not considered a valid format, and is getting ignored. You can confirm this by providing a valid number format for comparison. I tend to use a custom formatter for this purpose,

Re: NSNumberFormatter not working for me ?

2010-04-13 Thread Bill Hernandez
On Apr 13, 2010, at 5:50 PM, Murat Konar wrote: For one thing, the docs say that -setFormat: is for use with formatters using NSNumberFormatterBehavior10_0 behavior. Have you set the formatters behavior? murat, No, just the way the code showed. Here's from the docs : -- From what I can

Re: NSNumberFormatter not working for me ?

2010-04-13 Thread Bill Hernandez
On Apr 13, 2010, at 6:01 PM, Kyle Sluder wrote: Things like phone numbers, zip codes, and order numbers aren't really numbers. They're labels composed of digits. Numbers are typically useful for quantities, and that's where number formatters are appropriate. Custom formatters that convert

Re: NSNumberFormatter not working for me ?

2010-04-13 Thread Kyle Sluder
On Tue, Apr 13, 2010 at 4:29 PM, Bill Hernandez m...@mac-specialist.com wrote: Even so, I converted the string to an NSNumber and used the formatter against a number, not a string. What I'm saying is that a telephone number should never become an NSNumber. Which means it should never be

Re: NSNumberFormatter not working for me ?

2010-04-13 Thread Graham Cox
On 14/04/2010, at 9:01 AM, Kyle Sluder wrote: Things like phone numbers, zip codes, and order numbers aren't really numbers. They're labels composed of digits. Numbers are typically useful for quantities, and that's where number formatters are appropriate. Custom formatters that convert from

Re: NSNumberFormatter not working for me ?

2010-04-13 Thread Murat Konar
If you don't explicitly set a formatter behavior, you are probably getting the newest behavior NSNumberFormatterBehavior10_4, and - setFormat: does require the older NSNumberFormatterBehavior10_0 behavior. That's why your string is being returned unchanged. As far as the formatter is

Cocoaheads Lake Forest meeting Wednesday, 4/14, from 7-9pm

2010-04-13 Thread Scott Ellsworth
CocoaHeads Lake Forest will be meeting on the second Wednesday of the month. We will be meeting at the Orange County Public Library (El Toro) community room, 24672 Raymond Way, Lake Forest, CA 92630 Please join us from 7pm to 9pm on Wednesday, 4/14. We will be discussing the now-public iPad 3.2

Re: NSNumberFormatter not working for me ? [SOLVED]

2010-04-13 Thread Bill Hernandez
This is a great forum, I can't believe all the people that pitched in to help... Thanks everybody for all the time and help... This is actually a really nice number formatting method that will go in my BHUtility.m You can format any way you want Notice that the first three results are 10

Re: NSNumberFormatter not working for me ?

2010-04-13 Thread Bill Hernandez
On Apr 13, 2010, at 8:09 PM, Murat Konar wrote: If you don't explicitly set a formatter behavior, you are probably getting the newest behavior NSNumberFormatterBehavior10_4, and -setFormat: does require the older NSNumberFormatterBehavior10_0 behavior. That's why your string is being