Deprecated methods usage

2011-08-03 Thread Vyacheslav Karamov
Hi All! Could I use deprecated methods in my application? I have to support OS X 10.4+ and for example need to obtain file modification date, so could I use [NSFileManager fileAttributesAtPath:traverseLink:] which is deprecated in 10.5? ___ Cocoa-d

Re: ARC and Singletons

2011-08-03 Thread Andreas Grosam
On Aug 3, 2011, at 2:29 AM, Dave Zarzycki wrote: > Karl, > > This is not on our todo list or any list that I know of. Please file a bug > report if this enhancement request is interesting to you. > > Thanks! :-) Oh, we need to file an enhancement request when we would like to have class vari

Re: Unnecessary Boolean Warning

2011-08-03 Thread Dale Miller
You are correct. I get that wrong a lot. But that reinforces my point. A decent language (IMHO) would not confuse things with two different "and's". And my typo "'1001'" for "OX1001" probably was a Freudian slip because of my fervent dislike of C's syntax for hex numbers. Or maybe it was to

Re: Long delay of NSPopUpButton first click

2011-08-03 Thread Rimas M.
Hi Glenn, Thank you for answering. Now I can understand why menu item title is black in fonts popup of iWork apps. Even if they are selected. Regards, RImas M. On Tue, Aug 2, 2011 at 6:13 PM, Glenn L. Austin wrote: > > Yes -- don't do that!!! > > You are asking the system to not only iterate th

Re: How to detect Time Machine volume?

2011-08-03 Thread Stephane Sudre
I agree that the idea is to skip the Time Machine directory (current or old), not the entire partition. On Tue, Aug 2, 2011 at 8:51 PM, Charles Srstka wrote: > On Aug 2, 2011, at 12:37 PM, Stephane Sudre wrote: > > Worse case: an old time machine partition has been replaced by a new > one. Since

Re: Deprecated methods usage

2011-08-03 Thread Gregory Weston
Vyacheslav Karamov wrote: > Could I use deprecated methods in my application? > I have to support OS X 10.4+ and for example need to obtain file > modification date, > so could I use [NSFileManager fileAttributesAtPath:traverseLink:] which > is deprecated in 10.5? Deprecation is your warning th

Re: Deprecated methods usage

2011-08-03 Thread Mike Abdullah
Yes, you have to use it if you want your app to run on 10.4. For extra points, check at runtime if the newer method is available, and use that instead. On 3 Aug 2011, at 08:16, Vyacheslav Karamov wrote: > Hi All! > > Could I use deprecated methods in my application? > I have to support OS X 10

NSTableView with autoResizing Column: How to trigger auto-resizing after setFrame:?

2011-08-03 Thread Daniel Vollmer
Hello all, I have a window covered with an NSTableView inside an NSScrollView. The tableview has a single column which is set to autoresize with the tableview. This works as expected when I resize the window, the column extends correctly to fill the newly available space. Now, what I'm trying

Re: quick look question

2011-08-03 Thread Rick Corteza
Hi again, I double-checked but isn't it that this one is just to create thumbnails? Actually running /usr/bin/qlmanage -p is exactly what I'm trying to do because I want to display short video clips not just still images. If only it didn't put [DEBUG] in the title bar it would probably be good e

Re: Unnecessary Boolean Warning

2011-08-03 Thread Scott Ribe
On Aug 3, 2011, at 1:53 AM, Dale Miller wrote: > A decent language (IMHO) would not confuse things with two different "and's". Well, there *are* two different and's, regardless of whether your favored languages allow you access to both or not. -- Scott Ribe scott_r...@elevated-dev.com http://w

Re: Unnecessary Boolean Warning

2011-08-03 Thread Thomas Davie
On 3 Aug 2011, at 14:29, Scott Ribe wrote: > On Aug 3, 2011, at 1:53 AM, Dale Miller wrote: > >> A decent language (IMHO) would not confuse things with two different "and's". > > Well, there *are* two different and's, regardless of whether your favored > languages allow you access to both or n

Re: Unnecessary Boolean Warning

2011-08-03 Thread Scott Ribe
On Aug 3, 2011, at 7:54 AM, Thomas Davie wrote: > Not really – both C ands are the same and… they're just operating on > different representations of booleans. No, they're not the same at all. One is a bitwise operation on binary ints. -- Scott Ribe scott_r...@elevated-dev.com http://www.eleva

Re: Unnecessary Boolean Warning

2011-08-03 Thread Thomas Davie
On 3 Aug 2011, at 15:15, Scott Ribe wrote: > On Aug 3, 2011, at 7:54 AM, Thomas Davie wrote: > >> Not really – both C ands are the same and… they're just operating on >> different representations of booleans. > > No, they're not the same at all. One is a bitwise operation on binary ints. Yes

Re: Unnecessary Boolean Warning

2011-08-03 Thread Jean-Daniel Dupas
Le 3 août 2011 à 16:40, Thomas Davie a écrit : > > On 3 Aug 2011, at 15:15, Scott Ribe wrote: > >> On Aug 3, 2011, at 7:54 AM, Thomas Davie wrote: >> >>> Not really – both C ands are the same and… they're just operating on >>> different representations of booleans. >> >> No, they're not the

finding my UIViewController

2011-08-03 Thread Roland King
I feel I've asked this question before but google doesn't think I have. My code is dealing with a button press in a control on a UITableViewCell in a UITableView which is contained in another UIView subclass and on and up through several views until eventually there is a topmost UIView which wa

Re: NSTableView with autoResizing Column: How to trigger auto-resizing after setFrame:?

2011-08-03 Thread Quincey Morris
On Aug 3, 2011, at 05:41, Daniel Vollmer wrote: > Now, what I'm trying to do is resize the tableview horizontally inside the > scrollview *without* changing the size of the window itself[1]. I can do that > easily enough by modifying its frame, but this seems to ignore the column > auto-resizin

NSSegmentedControl

2011-08-03 Thread koko
I have a NSSegmentedControl as an item in a toolbar. There are 4 segments each with a different image. When I build, create an installer package and install on my system the control draws as expected. Using the same installer package on a remote system the control does not draw the image for

Re: NSSegmentedControl

2011-08-03 Thread Jens Alfke
On Aug 3, 2011, at 11:51 AM, koko wrote: > I have a NSSegmentedControl as an item in a toolbar. There are 4 segments > each with a different image. > When I build, create an installer package and install on my system the > control draws as expected. > Using the same installer package on a remo

draggingEntered Not Working As Expected

2011-08-03 Thread Chris Tracewell
XCode 4, 10.6 GC -- I have an IKImageBrowserView which I have implemented drag and drop for. I have set my view controller as the image browser's drag delegate, registered for pasteboard drag types in awakeFromNib and implemented DnD protocol methods like so... -(void)awakeFromNib {

Re: NSSegmentedControl

2011-08-03 Thread koko
The path type for the images for segments 0 and 3 and segments 1 and 2 is "Relative to Enclosing Group". The images names all lower case. The remote systems is running OSXv10.5.8. Looking at fs_usage now. On Aug 3, 2011, at 12:59 PM, Jens Alfke wrote: > > On Aug 3, 2011, at 11:51 AM, koko wr

Re: NSSegmentedControl

2011-08-03 Thread Jens Alfke
On Aug 3, 2011, at 12:30 PM, koko wrote: > The path type for the images for segments 0 and 3 and segments 1 and 2 is > "Relative to Enclosing Group". No, I mean the image names as specified in the control in Interface Builder. —Jens smime.p7s Description: S/MIME cryptographic signature __

Drawing text like Lion's Mail

2011-08-03 Thread Andre Masse
Hi, In the new Mail, when there's no selection, the detail's view show "No Message Selected" in an what seems to be embossed text. My various attempts to emulate that, have failed. Well it kinda work but it's a bit ugly. Here's what I've done: - (BOOL)isFlipped { return YES; } - (void)dra

Problem with AXPosition

2011-08-03 Thread Diego Alvarez Nogueira
Hi, Why the "AXPosition" doesn't return a window position in another workspace like "AXSize"? Someone already had this problem? AXUIElementCopyAttributeValue(element, (CFStringRef)@"AXPosition", &thePosition); AXUIElementCopyAttributeValue(element, (CFStringRef)@"AXSize", &theSize); Thanks!

[RESOLVED] NSSegmentedControl

2011-08-03 Thread koko
So I set the images for seg 0 and seg 3 to those for seg 1 and seg 2 which were displaying All segs now display an image So, I made all images the same size as those that displayed. I noticed that one image that did not display has a resolution of 88.xxx pixels/inch the others were 72.01 so

New allowsExternalBinaryDataStorage in Core Data

2011-08-03 Thread Frédéric Testuz
Hello, I looked at the Core Data release notes of Lion, I also looked the "What's new in Core Data on Mac OS X" video of the WWDC 2011. And I have a question about the new allowsExternalBinaryDataStorage option for binary attribute. I did some test with an attribute for images. I can see that w

UITableViewController, with table view not the root of its nib?

2011-08-03 Thread Jens Alfke
I’ve got an iOS screen that incorporates a UITableView. This screen is run by a UIViewController subclass. I’d like to subclass UITableViewController instead, to get more table behaviors for free. The problem I’m running into is that the table view is not the root view of my nib. (There’s a text

Re: Drawing text like Lion's Mail

2011-08-03 Thread Jens Alfke
You can draw it in one pass using NSShadowAttributeName. —Jens smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact th

Re: UITableViewController, with table view not the root of its nib?

2011-08-03 Thread glenn andreas
On Aug 3, 2011, at 3:49 PM, Jens Alfke wrote: > I’ve got an iOS screen that incorporates a UITableView. This screen is run by > a UIViewController subclass. I’d like to subclass UITableViewController > instead, to get more table behaviors for free. The problem I’m running into > is that the ta

Re: draggingEntered Not Working As Expected

2011-08-03 Thread Raleigh Ledet
On Aug 3, 2011, at 12:29 PM, Chris Tracewell wrote: > XCode 4, 10.6 GC -- I have an IKImageBrowserView which I have implemented > drag and drop for. I have set my view controller as the image browser's drag > delegate, registered for pasteboard drag types in awakeFromNib and > implemented DnD

Re: Drawing text like Lion's Mail

2011-08-03 Thread Andre Masse
One less pass is good. Thanks. Unfortunately, text is not as clean as Mail at this point. Small characters like "e" loose sharpness (white space inside the character is reduced). Still trying to find a winner by mixing different values. I'm not so sure Mail is using Helvetica now. Thanks for y

Re: Drawing text like Lion's Mail

2011-08-03 Thread Thomas Davie
On 3 Aug 2011, at 22:40, Andre Masse wrote: > One less pass is good. Thanks. > > Unfortunately, text is not as clean as Mail at this point. Small characters > like "e" loose sharpness (white space inside the character is reduced). Still > trying to find a winner by mixing different values. I'm

Re: Drawing text like Lion's Mail

2011-08-03 Thread Andre Masse
Thanks but after having done 10+ screenshots and doing side by side comparisons, it clearly isn't Lucida Grande. It's very close to Helvetica but the kerning is different. Andre Masse On 03/08/2011, at 17:52 , Thomas Davie wrote: > > No – it's using the system font – Lucida Grande. > > Bob

Re: Crasher due to unsafe block implementation in -[NSTextView checkTextInRange:types:options:]?

2011-08-03 Thread Aki Inoue
Kyle, It appears you're right. Another approach is to use multiple field editor objects so that you keep the first editor content unmodified. Aki On 2011/08/02, at 18:37, Kyle Sluder wrote: > On Tue, Aug 2, 2011 at 6:09 PM, Aki Inoue wrote: >> Hi Tom, >> >> Definitely write a Radar. > > I

Re: Drawing text like Lion's Mail

2011-08-03 Thread Kyle Sluder
On Wed, Aug 3, 2011 at 3:26 PM, Andre Masse wrote: > Thanks but after having done 10+ screenshots and doing side by side > comparisons, it clearly isn't Lucida Grande. It's very close to Helvetica but > the kerning is different. Helvetica Neue? It's very clearly not Lucida Grande. --Kyle Slud

Re: Drawing text like Lion's Mail

2011-08-03 Thread Andre Masse
Good guess but no luck. Looks like a demi bold version of Helvetica, but since there's no font inside Mail's package, it can't be. Well, I don't really need to be perfect. Close but pretty would be enough. It's definitely 19.0pt its though. Could be drawn letter by letter, you never know :-) Th

Re: Drawing text like Lion's Mail

2011-08-03 Thread Andre Masse
Think I could be close if I could turn off anti-aliasing. Is there any way to do that in -drawRect ? Thanks, Andre Masse ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Conta

Re: Drawing text like Lion's Mail

2011-08-03 Thread Andre Masse
Forget that last one. Found how and it's worst :-) Andre Masse PS: if anybody want that, here's how: CGContextRef context = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort]; CGContextSetShouldAntialias(context, NO); On 03/08/2011, at 20:10 , Andre Masse wrote: > Think I could

Re: Unnecessary Boolean Warning

2011-08-03 Thread Graham Cox
On 04/08/2011, at 1:52 AM, Jean-Daniel Dupas wrote: > One important difference for instance is that if you write if (a() & b()), > both a() and b() will always be executed, while if you write if (a() && b()), > b() will be executed only if a() is true. The C language doesn't make any guarante

Re: Unnecessary Boolean Warning

2011-08-03 Thread Greg Parker
On Aug 3, 2011, at 5:56 PM, Graham Cox wrote: > On 04/08/2011, at 1:52 AM, Jean-Daniel Dupas wrote: >> One important difference for instance is that if you write if (a() & b()), >> both a() and b() will always be executed, while if you write if (a() && >> b()), b() will be executed only if a() is

Re: Unnecessary Boolean Warning

2011-08-03 Thread Graham Cox
On 04/08/2011, at 11:19 AM, Greg Parker wrote: >> This is a classic question for coding job interviews. > > Incorrect. Ah well, I guess I didn't get the job :) In my defence, I saw this in a job interview but it was prior to 1999. Maybe C99 tightened up on something that was previously vague

Re: Unnecessary Boolean Warning

2011-08-03 Thread Roland King
The C99 spec I can find on the net has 6.5.13 (3) and (4). 3. The && operator shall yield 1 if both of it's operands compare unequal to 0; otherwise it yields 0. The result has type int. 4. Unlike the bitwise binary & operator, the && operator guarantees left-to-right evaluation; there is a s

Correct way to use contextInfo with ARC

2011-08-03 Thread Kevin Bracey
Hi All, A case of me not grasping C or/and ARC;-) I'm trying to pass the NSMutableArray across the void to the didEndSelector so I can access it if the user clicks ok. /snippits NSMutableArray *someInfo = [NSArray arrayWithObjects:@"made" , @"it", @"across",. nil]; [holdAlert beginSheetModalF

Re: Unnecessary Boolean Warning

2011-08-03 Thread glenn andreas
On Aug 3, 2011, at 8:27 PM, Graham Cox wrote: > > On 04/08/2011, at 11:19 AM, Greg Parker wrote: > >>> This is a classic question for coding job interviews. >> >> Incorrect. > > > Ah well, I guess I didn't get the job :) > > In my defence, I saw this in a job interview but it was prior to 1

Re: Unnecessary Boolean Warning

2011-08-03 Thread Scott Ribe
On Aug 3, 2011, at 7:27 PM, Graham Cox wrote: > In my defence, I saw this in a job interview but it was prior to 1999. Maybe > C99 tightened up on something that was previously vague. Nope, been that way since K&R 1st edition ;-) -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-d

Re: Unnecessary Boolean Warning

2011-08-03 Thread Graham Cox
On 04/08/2011, at 11:36 AM, glenn andreas wrote: > More likely the somebody that interviewed you didn't have it correct in the > first place, scarring you for life... Well, that part's true :) I seem to recall I failed that question, the only one I did. So I got the lecture and never questio

Re: Drawing text like Lion's Mail

2011-08-03 Thread Andy Lee
Does F-Script Anywhere work on Lion? Maybe you can inspect the view and find a clue. A bit of a long shot if they're doing totally custom drawing, but might be worth a try. Maybe they're using a custom cell of some kind and you can look at the font settings. --Andy On Aug 3, 2011, at 7:18 PM,

Re: Unnecessary Boolean Warning

2011-08-03 Thread Andy Lee
On Aug 3, 2011, at 9:51 PM, Graham Cox wrote: > I think the point they wanted to get across was that they didn't want to see > code like this: > > if( someFunction() && someOtherFunction()){ ... } > > instead of: > > if( someFunction()) > { >if( someOtherFunction()) >{ > >

Re: Unnecessary Boolean Warning

2011-08-03 Thread Preston Sumner
On Aug 3, 2011, at 8:10 PM, Andy Lee wrote: > On Aug 3, 2011, at 9:51 PM, Graham Cox wrote: >> I think the point they wanted to get across was that they didn't want to see >> code like this: >> >> if( someFunction() && someOtherFunction()){ ... } >> >> instead of: >> >> if( someFunction()) >>

Re: Unnecessary Boolean Warning

2011-08-03 Thread Graham Cox
On 04/08/2011, at 1:17 PM, Preston Sumner wrote: > I find short-circuit evaluation easier to read and much more concise, and, of > course, it's always nice to avoid unnecessary levels of nesting. I wouldn't necessarily disagree, but companies often have their own coding standards that forbid

How to Identify if the device is used in iAD supported Regions

2011-08-03 Thread Sasikumar JP
I am planning to use iAD for my iOS application. As the iAD available only in USA,UK,France,Italia,Deutschland,España AppStores. I want to display iAD only for supported regions. This will avoid displaying "Test Advertisement" from iAD.I can use AdMob for all other regions. I am not sure, how to

Re: Drawing text like Lion's Mail

2011-08-03 Thread Andre Masse
I've downloaded it and looks like it works on Lion. Never used it, so I may have to spend some time looking at tutorials. Thanks for the suggestion, Andre Masse On 03/08/2011, at 22:02 , Andy Lee wrote: > Does F-Script Anywhere work on Lion? Maybe you can inspect the view and find > a clue.

Re: Unnecessary Boolean Warning

2011-08-03 Thread Andy Lee
On Aug 3, 2011, at 11:20 PM, Graham Cox wrote: > On 04/08/2011, at 1:17 PM, Preston Sumner wrote: > >> I find short-circuit evaluation easier to read and much more concise, and, >> of course, it's always nice to avoid unnecessary levels of nesting. > > > I wouldn't necessarily disagree, but com