Re: Toolbar Icon Workflow

2010-06-27 Thread Paul Sanders
> if you use a PDF, it has the resolution independence, but will look fuzzy at > non-native resolutions But if a PDF contains only vector graphics elements it has no native resolution so it should scale to any size reasonably well. Just don't put any bitmaps in there. Here's a simple example

Re: Toolbar Icon Workflow

2010-06-27 Thread Graham Cox
On 27/06/2010, at 11:00 AM, Gideon King wrote: > - if you use a PDF, it has the resolution independence, but will look fuzzy > at non-native resolutions It shouldn't, as it has no native resolution. What can happen though is that NSImage caches it to a bitmap and reuses the bitmap, which can

Re: Toolbar Icon Workflow

2010-06-27 Thread vincent habchi
Le 27 juin 2010 à 12:42, Graham Cox a écrit : > It shouldn't, as it has no native resolution. What can happen though is that > NSImage caches it to a bitmap and reuses the bitmap, which can become fuzzy > when scaled up. You could investigate turning off caching on the image to > avoid that. >

Re: Toolbar Icon Workflow

2010-06-27 Thread Gideon King
I think the issue is more to do with the scaling leaving the lines moved from the pixel boundaries, and with only 24 or 32 pixels to play with, it's pretty noticeable when it blurs across two pixels. Gideon On 27/06/2010, at 8:42 PM, Graham Cox wrote: > > On 27/06/2010, at 11:00 AM, Gideon K

Re: Toolbar Icon Workflow

2010-06-27 Thread Graham Cox
On 27/06/2010, at 11:26 PM, Gideon King wrote: > I think the issue is more to do with the scaling leaving the lines moved from > the pixel boundaries, and with only 24 or 32 pixels to play with, it's pretty > noticeable when it blurs across two pixels. Hmm, I see. One thing I've noticed is t

Weak-linking a class

2010-06-27 Thread Graham Cox
How do I test for the existence of a Cocoa class at runtime that could be absent on an earlier system? The situation is that I want to use NSCache instead of NSMutableDictionary somewhere. The object is created as a singleton when it's first used, but I can't quite see how I should decide which

Re: Weak-linking a class

2010-06-27 Thread Andy Lee
NSClassFromString()? Or maybe some objc_xxx runtime function? --Andy On Jun 27, 2010, at 9:50 AM, Graham Cox wrote: > How do I test for the existence of a Cocoa class at runtime that could be > absent on an earlier system? > > The situation is that I want to use NSCache instead of NSMutableD

Re: Weak-linking a class

2010-06-27 Thread Graham Cox
On 27/06/2010, at 11:55 PM, Andy Lee wrote: > NSClassFromString()? Or maybe some objc_xxx runtime function? > > --Andy D'oh, of course. Just tired... ;-) --Graham ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin r

Re: Toolbar Icon Workflow

2010-06-27 Thread Gideon King
I'm just using a standard NSToolbarItem. In any case, I doubt that would change anything if the line is being drawn on two pixels. With the way I am doing it, I can get it right on the pixels every time, and in many cases I want to adjust things a bit between the 24 and 32 pixel images anyway, s

Re: C arrays as __block variables

2010-06-27 Thread David Catmull
I had a situation where I was accessing a C array from inside a block. It worked fine until I upgraded to Xcode 3.2.3; then I started to get errors. -- David Catmull uncom...@uncommonplace.com http://www.uncommonplace.com/ ___ Cocoa-dev mailing list

Re: C arrays as __block variables

2010-06-27 Thread Matt Neuburg
>>> In the example I listed below, I have a __block variable inside a block that >>> is fixed length array and I can access it via NSLog(@"char %c", array1[0]); Sure, but I'm talking about a __block variable declared outside the block: int arr[1]; ^(){ arr[0];}; // compile error __

[Possible Bug] Keyboard causes popover content view to scroll out of bounds

2010-06-27 Thread PCWiz
Hi, I have a popover that contains a UITableView. This UITableView has a cell with a text field in it: http://cl.ly/1b50a21ca8202d22db1b When the popover opens near the bottom of the screen, and I tap the text field to edit it, the keyboard comes up, and the popover moves up to avoid being cover

Re: C arrays as __block variables

2010-06-27 Thread Bill Bumgarner
On Jun 26, 2010, at 11:09 PM, Tony Romano wrote: > - (void)_copyOrMoveURLs:(SEL) s opMove:(BOOL)op src:(NSDictionary *)URLs > completionHandler:(void (^)(NSDictionary *newURLs, NSError > *error))handler > { > > __block char array1[5]; > array1[0] = 'W'; > > >

Re: Weak-linking a class

2010-06-27 Thread Ken Ferry
See also < http://www.sealiesoftware.com/blog/archive/2009/09/09/objc_explain_Weak-import_classes.html >. -Ken On Sun, Jun 27, 2010 at 7:02 AM, Graham Cox wrote: > > On 27/06/2010, at 11:55 PM, Andy Lee wrote: > > > NSClassFromString()? Or maybe some objc_xxx runtime function? > > > > --Andy >

Text rendered in NSImage is fuzzy

2010-06-27 Thread Dave Fernandes
I'm trying to render text in System font in an NSImage as shown below. The NSImage is displayed *unscaled* in an NSImageView. However, the text does not look as good as when rendered in an NSView. Is there any way to get crisp clean text in an NSImage? Thanks, Dave // Render an image into a

Re: Text rendered in NSImage is fuzzy

2010-06-27 Thread Uli Kusterer
On 27.06.2010, at 22:12, Dave Fernandes wrote: > I'm trying to render text in System font in an NSImage as shown below. The > NSImage is displayed *unscaled* in an NSImageView. However, the text does not > look as good as when rendered in an NSView. Is there any way to get crisp > clean text in

Re: Text rendered in NSImage is fuzzy

2010-06-27 Thread Ken Ferry
I don't think this is likely to be the problem in this case. Text looks good no matter where you draw it. In this case, I think the problem is more likely either (1) A lack of what Quartz calls font smoothing, more popularly known as subpixel rendering

Re: Text rendered in NSImage is fuzzy

2010-06-27 Thread Kyle Sluder
On Jun 27, 2010, at 1:47 PM, Ken Ferry wrote: > I would guess (1) is more likely. Dave, if you were to read that wikipedia > article and think about it carefully, you would realize that doing full > featured transparency with font smoothing would require six channels (red, > red alpha, green, gre

using UTF-32 in NSString.

2010-06-27 Thread Georg Seifert
Hi, Does anyone has information on how to use Unicode code points higher than 0x. I need to add some supplementary multilingual plane code points to a NSString. I can use something like this: NSString *aString = @"\\u0001ABCD"; //this prints fine but the [aString length] is 2 But

Re: Text rendered in NSImage is fuzzy

2010-06-27 Thread Kyle Sluder
On Jun 27, 2010, at 2:18 PM, Kyle Sluder wrote: > > It's only a latent bug if Apple ever gets serious about resolution > independence on the Mac. And Apple has shown no interest in ultra-high DPI at > all. They certainly didn't make it a tentpole feature of a new product or > anything like th

Re: Text rendered in NSImage is fuzzy

2010-06-27 Thread David Duncan
On Jun 27, 2010, at 2:18 PM, Kyle Sluder wrote: > Be aware that this means CATextLayer will suffer the same problem. It even > does if you specify a background color for the layer. If you're using Core > Animation and want subpixel antialiasing, you have to do it yourself. Due to the way that

Re: using UTF-32 in NSString.

2010-06-27 Thread Aki Inoue
Georg, NSString/CFString is conceptually an object wrapping around UTF-16 character array (just like many other string objects). The length 2 returned from your example is, thus, the expected behavior. When you're creating a string with Universal Character Names that containing non-BMP points

Re: using UTF-32 in NSString.

2010-06-27 Thread Greg Guerin
Georg Seifert wrote: Does anyone has information on how to use Unicode code points higher than 0x. NSString is UTF-16. Use surrogate pairs. -- GG ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

Re: Text rendered in NSImage is fuzzy

2010-06-27 Thread Dave Fernandes
Looks like (1) was the problem. Filling with white before drawing the text worked. Thanks! On 2010-06-27, at 4:47 PM, Ken Ferry wrote: > I don't think this is likely to be the problem in this case. Text looks good > no matter where you draw it. > > In this case, I think the problem is more li

Re: using UTF-32 in NSString.

2010-06-27 Thread Clark Cox
On Sun, Jun 27, 2010 at 2:18 PM, Georg Seifert wrote: > Hi, > > Does anyone has information on how to use Unicode code points higher than > 0x. > I need to add some supplementary multilingual plane code points to a NSString. > > I can use something like this: >        NSString *aString = @"\\

Re: Custom Toolbar

2010-06-27 Thread Scott Anguish
Richard sent me the pic off list (I think it was) uh, there are a whole lot of toolbar items. And it is a vertical product. Those often bend the rules due to internal design constraints. And often, damn the HIG, full speed ahead. The number of key combinations required to do all the things he s

Re: Read "File Sharing" status

2010-06-27 Thread Kyle Sluder
On Sun, Jun 27, 2010 at 10:11 PM, wrote: > I want to list the shared local folders only if smb file sharing is enabled. > Currently I am scanning the smb port to get this information. Also Ps command > works to check if smb server is running. But the problem is that if, "File > sharing" is dis