Re: programmitically creating nstextfield

2010-04-14 Thread Kyle Sluder
On Wed, Apr 14, 2010 at 9:24 PM, mark wrote: > window=[[NSWindow alloc] initWithContentRect:r styleMask:0 Use the NSBorderlessWindowMask symbolic constant instead of passing 0. >        backing:NSBackingStoreRetained defer:NO]; As the documentation says, do not use NSBackingStoreRetained, or in

iPhone: A memory leak I can't explain

2010-04-14 Thread Tino Rachui
Hi, in my app I'm accessing the photo library (in my opinion exactly as in sample programs I have seen from Apple). When leak-testing the app on the iPhone using Instrument the following leak is being reported (see stack trace) and I don't know the root cause. Does anybody has seen this before per

Re: programmitically creating nstextfield

2010-04-14 Thread Jens Alfke
--Jens {via iPad} On Apr 14, 2010, at 9:48 PM, Ron Fleckner wrote: > >> NSRect r={{NSMaxX(w)-96, NSMaxY(w)-ToolbarHeightForWindow(relativeToWindow) >> -titleBarHeight(relativeToWindow)-24}, >> {256, 64}}; > > NSRect r = NSMakeRect(... ); The original syntax is correct too. I

Re: programmitically creating nstextfield

2010-04-14 Thread Ron Fleckner
On 15/04/2010, at 2:24 PM, mark wrote: Would someone please tell me why this text field will not show. It is driving me spastic. The window and text field are valid. And there are no errors. The window shows but the text field does not. relativeToWindow is valid. NSRect w=[relativeToWindow f

programmitically creating nstextfield

2010-04-14 Thread mark
Would someone please tell me why this text field will not show. It is driving me spastic. The window and text field are valid. And there are no errors. The window shows but the text field does not. relativeToWindow is valid. NSRect w=[relativeToWindow frame]; NSRect r={{NSMaxX(w)-96, NSMaxY(w)-

Re: Question about -awakeAfterusingCoder:

2010-04-14 Thread Graham Cox
On 15/04/2010, at 11:48 AM, Murat Konar wrote: > I've always avoided using setters in init methods for exactly the problem > you've run into. A setter's behavior can depend on an object's state, and by > definition, the object's state is not really properly setup *during* init. I agree in ge

Re: NSNumberFormatter not working for me ?

2010-04-14 Thread Murat Konar
I think Greg's point is that NSNumberFormatter is designed to format numbers which represent quantities. A phone number not a quantity, it's just a string of characters which happen to be digits. _murat On Apr 14, 2010, at 6:38 PM, Bill Hernandez wrote: On Apr 14, 2010, at 5:25 PM, Greg Gu

Re: Question about -awakeAfterusingCoder:

2010-04-14 Thread Murat Konar
I've always avoided using setters in init methods for exactly the problem you've run into. A setter's behavior can depend on an object's state, and by definition, the object's state is not really properly setup *during* init. _murat On Apr 14, 2010, at 6:23 PM, Graham Cox wrote: Hi all,

Re: NSNumberFormatter not working for me ?

2010-04-14 Thread Graham Cox
On 15/04/2010, at 11:38 AM, Bill Hernandez wrote: > // I have already run a routine to strip all non digits by this time Don't forget that phone numbers can start with '+' to mean 'whatever the international dialling prefix for your country is'. --Graham

Re: NSNumberFormatter not working for me ?

2010-04-14 Thread Bill Hernandez
On Apr 14, 2010, at 5:25 PM, Greg Guerin wrote: > Your code formats strings (more specifically, characters in strings). It > does not format numbers, as such. This is the work-around that I did because I could not make do with NSNumberFormatter. > By "number" I mean a binary numeric value (fl

Xcode 3.23 broke my code signing

2010-04-14 Thread Steve Mykytyn
Project that built fine for weeks fails to pass validation, won't run when installed. Ran Xcode uninstall, reinstalled from scratch, same deal. Other than randomly trying stuff, does anyone have a known working procedure for fixing this??? Hard to think of a less productive way to waste time.

Question about -awakeAfterusingCoder:

2010-04-14 Thread Graham Cox
Hi all, Got a slightly awkward problem I'm trying to find a good solution to. I have a number of objects forming a class hierarchy where e.g. C subclasses B which subclasses A. A has a 'locked' property which locks it preventing changes to several other properties. B and C add further propertie

Re: NSNumberFormatter not working for me ?

2010-04-14 Thread Greg Guerin
Bill Hernandez wrote: I've worked with lots of number formatters over the years, and that is what they do, format numbers into strings, any kind of string... I looked at the header file for NSNumberFormatter, and there seem to be 9,000,000+ methods, it is amazing. Buried in there, there has

Re: base64Binary

2010-04-14 Thread Jean-Daniel Dupas
Me too for Apple frameworks, but not for libcrypto and other bsd libraries. Using them for cross OS dev (compile using 10.6 SDK and deploy on 10.4) is a mess. They don't use availability macros, and weak linking and so are error prone and sometime impossible to link properly (especially libcry

Re: base64Binary

2010-04-14 Thread joby abraham
Hi Bialecki, It always better use library which provided by MAC OS. Thanks& regards, Joby Abraham. On Thu, Apr 15, 2010 at 02:17, Jean-Daniel Dupas wrote: > Google provide some class to do that too. > > See GTMBase64 classes at > http://code.google.com/p/google-toolbox-for-mac/source/browse/#sv

Re: base64Binary

2010-04-14 Thread Jean-Daniel Dupas
Google provide some class to do that too. See GTMBase64 classes at http://code.google.com/p/google-toolbox-for-mac/source/browse/#svn/trunk/Foundation Le 14 avr. 2010 à 22:00, joby abraham a écrit : > Hi Bialecki, > > for base64 encoding/decoding you can use openSSL Library which providing by

Re: Efficiently iterating files on the iPhone

2010-04-14 Thread Dave DeLong
I don't know how many files I'll be iterating, since I'm working on a library that will (hopefully) end up included in many applications. My reason for wanting to optimize this as much as possible is so that it's as least invasive as possible to other developers who use this. But, judging from

Re: Efficiently iterating files on the iPhone

2010-04-14 Thread Chris Parker
On 14 Apr 2010, at 12:39 PM, Dave DeLong wrote: > I'm trying to find a fast and efficient way to iterate a folder on the > iPhone. On the Mac, I'd create an FSIterator and use FSGetCatalogInfoBulk > (so I can retrieve permissions, file type, resource/data fork size, etc). > However, FSIterat

Re: Efficiently iterating files on the iPhone

2010-04-14 Thread Jens Alfke
On Apr 14, 2010, at 12:39 PM, Dave DeLong wrote: If I have to, I can use the NSFileManager APIs, but then I'd have to grab the entire directory listing at once (instead of getting it in chunks), and then iteratively ask for each item's attributes. It seems rather inefficient, and I want t

Re: base64Binary

2010-04-14 Thread joby abraham
Hi Bialecki, for base64 encoding/decoding you can use openSSL Library which providing by MAC OS. I can give you code snippets for encoding and decoding string. #include #include - (NSString *)base64EncodedString { // Construct an OpenSSL context BIO *context = BIO_new(BIO_s_mem());

Re: NSNumberFormatter not working for me ?

2010-04-14 Thread Bill Hernandez
On Apr 14, 2010, at 1:04 PM, Murat Konar wrote: > Actually, setting the formatter behavior does work (it does allow you to use > setFormat: to set a format string). The remaining problem is that I don't > think NSNumberFormatter allows the arbitray digit-by-digit formatting of > numbers that y

Efficiently iterating files on the iPhone

2010-04-14 Thread Dave DeLong
Hi everyone, I'm trying to find a fast and efficient way to iterate a folder on the iPhone. On the Mac, I'd create an FSIterator and use FSGetCatalogInfoBulk (so I can retrieve permissions, file type, resource/data fork size, etc). However, FSIterator and FSGetCatalogInfo* are part of the Cor

Unrecognized selector sent to NSMapTable

2010-04-14 Thread Ivan Sergeyenko
Hi, I keep getting segfaults and "unrecognized selector" exceptions in my garbage-collected code running on 10.5.8, while the same code works fine on 10.6.3 (stack traces posed below). It doesn't help that the crashes/exceptions happen deep in the framework code and I can't find any documentation

base64Binary

2010-04-14 Thread Bartosz Bialecki
Hi everyone, I have some problem. I'm writing a web service client and one of my xml request require a data encoded as base64Binary. I'm using NSData type in my application but data are encoded as base64. Do you know any solution? Best regards, Bartosz Bialecki

Time zone Issue with NSDate in Snow Leopard

2010-04-14 Thread joby abraham
Hi All, In SnowLeopard I am facing one issue with time zone change. Once we change time zone after launching application, this time zone change we can not get it inside our application using *NSDate* until*Quit* and *Re-launch. *In Leopard it works as per our expectation. In Leopard NSDate return

Loading a Custom View made in IB into tabViewItem(s)

2010-04-14 Thread A
Greetings, I have the following problem: *Set up: -I created a Custom View in Interface Builder that holds a number of other controls within it (text boxes, buttons, etc.) -I created a Controller class for that View that I connected to it via the Controller "cube" from the Library in IB -There

Re: Playing DVD Programmatically?

2010-04-14 Thread Laurent Daudelin
On Apr 14, 2010, at 11:29, David Duncan wrote: > On Apr 14, 2010, at 11:14 AM, Laurent Daudelin wrote: > >> Maybe not a Cocoa question but I couldn't find any list on lists.apple.com >> that seems related to that. >> >> How can I play a DVD (commercial or not) programmatically, preferably using

Re: Playing DVD Programmatically?

2010-04-14 Thread David Duncan
On Apr 14, 2010, at 11:14 AM, Laurent Daudelin wrote: > Maybe not a Cocoa question but I couldn't find any list on lists.apple.com > that seems related to that. > > How can I play a DVD (commercial or not) programmatically, preferably using > Cocoa? The DVD Playback Framework should allow you

Playing DVD Programmatically?

2010-04-14 Thread Laurent Daudelin
Maybe not a Cocoa question but I couldn't find any list on lists.apple.com that seems related to that. How can I play a DVD (commercial or not) programmatically, preferably using Cocoa? -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDaudelin http://nemesy

Re: NSNumberFormatter not working for me ?

2010-04-14 Thread Murat Konar
Actually, setting the formatter behavior does work (it does allow you to use setFormat: to set a format string). The remaining problem is that I don't think NSNumberFormatter allows the arbitray digit-by- digit formatting of numbers that you expect. _murat On Apr 13, 2010, at 8:54 PM, Bill

Re: Font Style Names for iPhone/iPad

2010-04-14 Thread Gordon Apple
Yes, but no support for actually doing anything useful with CoreText. Can't comment on eventualities, but let's just say I'm not happy. (Sneezy from pollen, Sleepy from too much coding, Grumpy about lack of text support, but definitely not Happy :-) On 4/14/10 10:10 AM, "Matt Moriarity" wrote

Re: Drawing a path and making an object follow that path IPHONE

2010-04-14 Thread Steve Christensen
You could probably start by studying the documentation for CGPathRef, which lets you create, manipulate and draw bezier paths. These are C, not Objective-C API calls, but they work perfectly fine in an Objective-C application. iPhone OS 3.2 adds UIBezierPath, with wraps these calls, but if