UITextField not shrinking text

2011-02-01 Thread Remco Poelstra
Hi, When I set an UILabel to adjustFontSizeToFitWidth=YES with a fontSize of 10, the label behaves as expected when I place long text in the label. When I do the same for an UITextField, the text shrinks a bit, but not to font size 10. Does anybody know why that is? Kind regards, Remco Poelst

Re: worker thread iterating over array - SLOW

2011-02-01 Thread Peter Lübke
Ken, you really made the whole issue clear to me. I ran my app in the debugger with breakpoints inside the methods of the objects in the array, and as you say, every single method is executed in the main thread! I'll have a look at YAMessageQueue. Thanks again for your great input, Peter

Re: what are the disadvantages in keeping libraries and input files inside app bundle

2011-02-01 Thread John Joyce
/usr/local/lib is intended for command line tools. Not for applications with a UI. On Feb 1, 2011, at 7:05 AM, Paul M wrote: > > On 29/01/2011, at 2:08 AM, Dave Carrigan wrote: > >> This is the preferred method of deployment. Experienced Mac users hate it >> when an installation scatters crud

layer contents briefly appearing stretched when resizing

2011-02-01 Thread Roland King
I have a UIView subclass in my iOS app and the content for that UIView is 3 CALayers, each with a bitmap image for their content, added as sublayers of the UIView's layer. Each of the CALayers is the full size of the UIView's layer (they have transparency to composite them together). When the

Re: New to internationalization

2011-02-01 Thread Uli Kusterer
On 01.02.2011, at 01:15, Bruce Cresanta wrote: > I would like to internationalize my app. Does anyone know of a good > tutorial. The docs are pretty good, but a tutorial would be helpful. I > plan to target 2 languages to begin with. I did this: http://lmgtfy.com/?q=interface+builder+loca

Re: -[CALayer setContents:] slower in iOS 4.2?

2011-02-01 Thread David Duncan
On Jan 31, 2011, at 4:12 PM, Julian Wood wrote: > We grab the appropriate image portion from the spriteAtlas using > CGImageCreateWithImageInRect(CGImageRef image, CGRect rect). In general, we > haven't been hitting the memory limit on the device with this approach, and > when it does, it recov

NSShowNonLocalizedStrings?

2011-02-01 Thread Stephane Sudre
Is the NSShowNonLocalizedStrings default values supposed to work as described in the documentation? "If you set this default to YES (in the global domain or in the application’s domain), then when the method can’t find a localized string in the table, it logs a message to the console and capitaliz

Re: layer contents briefly appearing stretched when resizing

2011-02-01 Thread David Duncan
On Feb 1, 2011, at 4:32 AM, Roland King wrote: > I have a UIView subclass in my iOS app and the content for that UIView is 3 > CALayers, each with a bitmap image for their content, added as sublayers of > the UIView's layer. Each of the CALayers is the full size of the UIView's > layer (they ha

Re: Bizarre behaviour of NSFontDescriptor and/or NSCharacterSet

2011-02-01 Thread Aki Inoue
Brian, The font descriptor here describes a query matching font descriptors containing the character set equals to the supplied set. Since it's unlikely to have fonts with just "0123456789", for example, it should return 0 result. If you're seeing something different, please file a bug. To wha

Re: text orientation/positioning with layout manager

2011-02-01 Thread Aki Inoue
With a flipped environment, the CTM presumably describes a coordinate system starting from the top left corner. So, you're right that all graphics operations including the glyph rendering show up side down. What the Text System does is to apply an inverted text matrix to compensate the flipped

Re: UITextField not shrinking text

2011-02-01 Thread Matt Neuburg
On Tue, 1 Feb 2011 09:03:43 +0100, Remco Poelstra said: >Hi, > >When I set an UILabel to adjustFontSizeToFitWidth=YES with a fontSize of 10, >the label behaves as expected when I place long text in the label. When I do >the same for an UITextField, the text shrinks a bit, but not to font size 10

Re: layer contents briefly appearing stretched when resizing

2011-02-01 Thread Matt Neuburg
On Tue, 1 Feb 2011 20:32:27 +0800, Roland King said: >I have a UIView subclass in my iOS app and the content for that UIView is 3 >CALayers, each with a bitmap image for their content, added as sublayers of >the UIView's layer. Each of the CALayers is the full size of the UIView's >layer (they

Sending email with attachments

2011-02-01 Thread lorenzo7620
How can one go about doing this and support 10.4-10.6? There are links all over the place pointing to deprecated API's (NSMailDelivery) or frameworks that are 10.5+ (EDMessage, Scripting Bridge), but nothing I can use. All I want to do is open the default mail application, create a new messag

Re: text orientation/positioning with layout manager

2011-02-01 Thread David F.
On Feb 1, 2011, at 1:38 PM, Aki Inoue wrote: > What the Text System does is to apply an inverted text matrix to compensate > the flipped CTM automatically (inside -[NSFont setInContext:]) so that the > text is rendered correctly regardless of the rendering context flippedness. Aki, is it reall

Re: Sending email with attachments

2011-02-01 Thread John Joyce
On Feb 2, 2011, at 7:13 AM, lorenzo7...@gmail.com wrote: > How can one go about doing this and support 10.4-10.6? There are links all > over the place pointing to deprecated API's (NSMailDelivery) or frameworks > that are 10.5+ (EDMessage, Scripting Bridge), but nothing I can use. All I > want

Re: text orientation/positioning with layout manager

2011-02-01 Thread Graham Cox
On 02/02/2011, at 9:14 AM, David F. wrote: > To me, this seems like a mis-feature. There are plenty of situations where you want a bit of text drawn in a non-flipped context - button titles, for example. You don't need a complex layout but the actual glyphs still need to come out right. If th

Re: text orientation/positioning with layout manager

2011-02-01 Thread Kyle Sluder
On Tue, Feb 1, 2011 at 2:23 PM, Graham Cox wrote: > Personally I'd prefer if all contexts/views were flipped by default, as that > seems more natural as a programmer, but that's another argument (and another > one that's never going to change). You already have your wish on iOS. :) --Kyle Slud

Re: text orientation/positioning with layout manager

2011-02-01 Thread Kyle Sluder
On Tue, Feb 1, 2011 at 2:14 PM, David F. wrote: > Aki, is it really a good idea for the text system to automatically apply an > inverted text matrix?  The text is *not* rendered correctly just by applying > an inverted text matrix to the font:  for example, underlines and > strikethroughs aren'

Re: Sending email with attachments

2011-02-01 Thread Tim Schröder
Lorenzo, at least with Thunderbird I have found it impossible to communicate with from a Cocoa app. Mail.app, Entourage, Outlook 2011 and Postbox should work with AppleScript which you can address from within your app with the NSAppleScript class. In principle, you just need to give an instance

Re: Sending email with attachments

2011-02-01 Thread Lorenzo Thurman
Thanks for the reply. Yep, I know there are a variety of mail clients out there, so not everyone uses Mail. And that sucks. This program is actually a port of an iPhone application for which, different mail clients are not a problem. But at least to start, I'm only going to support Mail. I'll likel

Re: Sending email with attachments

2011-02-01 Thread Lorenzo Thurman
Thanks for the reply. I'll likely go this route for now and just exclude support for all non-Mail.app clients. On Tue, Feb 1, 2011 at 4:33 PM, Tim Schröder wrote: > Lorenzo, > > at least with Thunderbird I have found it impossible to communicate with > from a Cocoa app. Mail.app, Entourage, Outl

Re: text orientation/positioning with layout manager

2011-02-01 Thread Aki Inoue
Probably my choice of word, "compensate", caused a little misunderstanding. 8-) The Text System does generally assume the coordinate to be flipped. Since the font rendering follows the graphics state, you get the text rendered up side down if you don't apply the inverted text matrix in the flippe

Re: Recursive blocks

2011-02-01 Thread Glen Low
Chris On 30/01/2011, at 2:26 AM, Chris Suter wrote: The use of a block here looks pretty ugly in my opinion. I don't see returning more than one type as being a big deal. Also, in the function case, I don't believe there's a need for the GKGraph * parameter; you can use self. Having said

Re: -[CALayer setContents:] slower in iOS 4.2?

2011-02-01 Thread Julian Wood
That was the key! Performance is good again. Thanks very much for the tip. Julian On 2011-02-01, at 10:26 AM, David Duncan wrote: > On Jan 31, 2011, at 4:12 PM, Julian Wood wrote: > >> We grab the appropriate image portion from the spriteAtlas using >> CGImageCreateWithImageInRect(CGImageRef

inherited implicitly created member is no member?

2011-02-01 Thread Matt Neuburg
I got a little surprise today: @interface MySuperClass : NSObject { } @property (nonatomic, copy) NSString* text; @end @implementation MySuperClass @synthesize text; @end @interface MySubClass : MySuperClass... And now, in MySubClass, if I try to talk about self->text, I get: 'struct MySubCl

Re: inherited implicitly created member is no member?

2011-02-01 Thread Kyle Sluder
On Tue, Feb 1, 2011 at 7:14 PM, Matt Neuburg wrote: > Of course I can fix this in several ways, of which the most obvious is to > declare the ivar "text" explicitly in the interface for MySuperClass. But I'm > curious; why does it happen? I thought declaring the property without the > ivar mean

Re: inherited implicitly created member is no member?

2011-02-01 Thread John Joyce
On Feb 2, 2011, at 12:14 PM, Matt Neuburg wrote: > I got a little surprise today: > > @interface MySuperClass : NSObject { > } > @property (nonatomic, copy) NSString* text; > @end > > @implementation MySuperClass > @synthesize text; > @end > > @interface MySubClass : MySuperClass... > > And n

Re: inherited implicitly created member is no member?

2011-02-01 Thread John Joyce
Actually, the last bit on the same page I linked to seems to indicate that there should be a synthesized ivar... Maybe it depends on the Project Build Settings...? They talk about the legacy runtime versus the modern runtime. But I think it is much more readable to have declarations in the @inte

Re: inherited implicitly created member is no member?

2011-02-01 Thread Matt Neuburg
On Feb 1, 2011, at 7:23 PM, Kyle Sluder wrote: > On Tue, Feb 1, 2011 at 7:14 PM, Matt Neuburg wrote: >> Of course I can fix this in several ways, of which the most obvious is to >> declare the ivar "text" explicitly in the interface for MySuperClass. But >> I'm curious; why does it happen? I t

Re: inherited implicitly created member is no member?

2011-02-01 Thread Kyle Sluder
On Tue, Feb 1, 2011 at 7:31 PM, Matt Neuburg wrote: > Wait, you're going too fast for me. You say this makes no guarantee about the > storage, but in fact an ivar "text" does get generated, since I can say > self->text in the superclass; that's the whole point of implicit ivar > generation. So

Re: inherited implicitly created member is no member?

2011-02-01 Thread Greg Parker
On Feb 1, 2011, at 7:42 PM, Kyle Sluder wrote: > On Tue, Feb 1, 2011 at 7:31 PM, Matt Neuburg wrote: >> Wait, you're going too fast for me. You say this makes no guarantee about >> the storage, but in fact an ivar "text" does get generated, since I can say >> self->text in the superclass; that's

Re: Bizarre behaviour of NSFontDescriptor and/or NSCharacterSet

2011-02-01 Thread Brian Schack
Aki, Many thanks for the reply. Taking your suggestion, I found three possible routes to rewriting the function (given below). All seem to work. One uses NSFontManager and NSFont: NSArray *fontNames = [[NSFontManager sharedFontManager] availableFonts]; for (NSString *fontName in fontNa

[iPhone] Is it possible to search and detect Bluetooth [MFI] headset or other [MFI] device with SDK

2011-02-01 Thread Tharindu Madushanka
Hi, I would like to know whether its possible from iPhone SDK app to detect and find the Name of a [MFI] Bluetooth device other than an iPhone or iPod touch. If its possible could someone kindly provide few guides to look into it. Thanks and Kind Regards, Tharindu __

Re: [iPhone] Is it possible to search and detect Bluetooth [MFI] headset or other [MFI] device with SDK

2011-02-01 Thread Rick Mann
I don't think it is. The app can't really get at the BT radio hardware, and only sees things that have already been paired via the Settings app. -- Rick On Feb 1, 2011, at 20:36:15, Tharindu Madushanka wrote: > Hi, > > I would like to know whether its possible from iPhone SDK app to detect an

Re: Bizarre behaviour of NSFontDescriptor and/or NSCharacterSet

2011-02-01 Thread Aki Inoue
I would recommend using the 3rd method. The first approach is instantiating an NSFont instance for all available faces. Instantiating NSFont has additional costs over just querying font descriptors (the font instance references graphics attributes, for example). The resource should be deallocated