Re: Icon Overlay on Mac OSX

2012-08-01 Thread Charles Srstka
On Aug 2, 2012, at 12:47 AM, Jens Alfke wrote: > On Jul 18, 2012, at 2:42 AM, Alfian Busyro wrote: > >> I tried this CTBadge, and it gave me a custom application icon after I run >> it. >> So a little bit different with what I want to do though. >> Do you have any idea how to implement this to

Re: Icon Overlay on Mac OSX

2012-08-01 Thread Jens Alfke
On Jul 18, 2012, at 2:42 AM, Alfian Busyro wrote: > I tried this CTBadge, and it gave me a custom application icon after I run it. > So a little bit different with what I want to do though. > Do you have any idea how to implement this to the finder , without injecting > it like dropbox did. Se

Re: reading preferences from com.apple.mail under 10.8

2012-08-01 Thread Jens Alfke
On Jul 31, 2012, at 8:07 AM, Rob McBroom wrote: > Hello. I’m trying to read Mail’s preferences to find a suitable SMTP server > so users don’t have to re-enter such configuration details. It seems to have > stopped working and I can’t find a [documented] reason. Probably Mail changed where it

Re: NSTask: auxiliary executable does not see its data file

2012-08-01 Thread Jens Alfke
On Jul 30, 2012, at 8:08 AM, Daniel Stein wrote: > The tool tries to open the file with an ordinary call to fopen(): > f = fopen("my.data",READ_MODE); Of course this assumes the current directory is the one containing the my.data file. By default it won't be, because the tool inherits the curr

Re: Threading issue

2012-08-01 Thread Jens Alfke
On Jul 20, 2012, at 12:04 PM, Bruce Sherwood wrote: > However, the Cocoa GUI environment and interact loop are required to > be in the primary thread, so the challenge is to have the visual > module set up the Cocoa environment, with the user's program running > in a secondary thread. This soun

Re: Icon Overlay on Mac OSX

2012-08-01 Thread Charles Srstka
On Jul 18, 2012, at 4:42 AM, Alfian Busyro wrote: > Hi Gideon, > Thanks for your reply. > > I tried this CTBadge, and it gave me a custom application icon after I run it. > So a little bit different with what I want to do though. > Do you have any idea how to implement this to the finder , witho

reading preferences from com.apple.mail under 10.8

2012-08-01 Thread Rob McBroom
Hello. I’m trying to read Mail’s preferences to find a suitable SMTP server so users don’t have to re-enter such configuration details. It seems to have stopped working and I can’t find a [documented] reason. I’ve tried NSUserDefaults *mailPrefs = [[NSUserDefaults alloc] init]; NSArray

Re: Trying to capture raw touch events on the trackpad

2012-08-01 Thread Zongyao Qu
is mView an iboutlet member? and where [mView setAcceptsTouchEvents:YES] get called? awakeFromNib or init? Best Regards, Zongyao QU 2012/7/27 Akhil Jindal : > Hi all, > > I'm trying to capture raw touch events on the trackpad to define my own > gesture events. I've gone through the documentation

NSTask: auxiliary executable does not see its data file

2012-08-01 Thread Daniel Stein
[I posted this at discussions.apple.com, but realise that this is probably a more appropriate venue for a technical question] I am writing a simple Cocoa-ObjectiveC wrapper around a command-line tool written in C, and understand the basics of using NSTask, NSPipe, NSFileHandle and multiple

Re: searching through all user accounts

2012-08-01 Thread Marcus Karlsson
On Sun, Jul 29, 2012 at 06:23:14PM +0800, Rick C. wrote: > Hi, > > I have a search app which normally searches through the current users home > directory using NSTask and find command. If I wanted to make it search > through all user accounts could I ask some advice on what is the best way to

I2C question - what is correct mailing list

2012-08-01 Thread Vitaly Bondar
Hello, This is question to cocoa-dev moderators. I had asked twice question about IOKit/i2c interface, but this messages was blocked as i understand. Can you please help to find correct mailing list for my question. Thank you. ___ Cocoa-dev mailin

I2C communication to display (ddc/ci)

2012-08-01 Thread Vitaly Bondar
Hello, I have faced problem with IOI2CSendRequest function from "IOKit/i2c/IOI2CInterface.h" If this mailing list is wrong for asking this question, please direct me to correct place. Apple example for fetching EDID from display (using of oxA0 and oxA1 addresses) works fine. (http://www

IOI2CSendRequest problem

2012-08-01 Thread Vitaly Bondar
Hello, I hope that here is correct place to ask about IOKit. I have faced problem with IOI2CSendRequest function from "IOKit/i2c/IOI2CInterface.h" Apple example for fetching EDID from display (using of oxA0 and oxA1 addresses) works fine. But when i'm trying to use 0x6e/0x6F addresses -

Threading issue

2012-08-01 Thread Bruce Sherwood
I want to make a version of VPython (vpython.org) that is based on Cocoa (the Mac version is currently based on Carbon). The VPython API permits the following short user program, which displays a 3D cube moving to the right, and you can rotate and zoom the camera with the mouse: from visual impor

What is the equivalent Cocoa window level of Carbon kUtilityWindowClass?

2012-08-01 Thread Volker Schumacher
Hi, I am working on a cocoa application that creates both normal cocoa windows and cocoa windows that are initialized with carbon windows. All windows should be floating above all applications. For the cocoa windows i set the window level to NSTornOffMenuWindowLevel, and for the carbon windows

UITableView Reorder View

2012-08-01 Thread Sarang Kapadia
Hello, I am using a UITableView and need a way to: 1. Stretch the reorder grip across the cells to allow the user to reorder cells by touching any point within the cell 2. Hide and unhide the reorder grip based on the cell selection status Currently we are accessing a private class

Re: Icon Overlay on Mac OSX

2012-08-01 Thread Alfian Busyro
Hi Gideon, Thanks for your reply. I tried this CTBadge, and it gave me a custom application icon after I run it. So a little bit different with what I want to do though. Do you have any idea how to implement this to the finder , without injecting it like dropbox did. With Regards, Alfian O

Re: Sorting NSArray -- advice on how to accomplish a "simple" alpha ordering?

2012-08-01 Thread Graham Cox
On 02/08/2012, at 1:53 AM, Alex Zavatone wrote: > not having sorted dicts (in a straightforward way) is an offense to all that > it holy and good. I disagree. Dictionaries by their nature are not "sorted" because they are random-access containers. Separating the responsibility for sorting int

Re: -[NSFileHandle readInBackgroundAndNotify] opens the file again

2012-08-01 Thread Fritz Anderson
On 1 Aug 2012, at 3:58 PM, Rick Mann wrote: > I know how to run instruments. Show me the documentation that tells me how to > actually do something with Allocations. If you look at my previous email on > the subject, you can see that I ran Allocations way back when it was > suggested, and foun

Baffled by AVCaptureVideoPreviewLayer

2012-08-01 Thread lobs...@neu.edu
I'm having trouble getting AVCaptureVideoPreviewLayer to work in OSX 10.8, XCode 4.4 . I'm trying to use the NSView mMovieView as the port. @property (nonatomic, strong) IBOutlet NSView *mMovieView; @property (nonatomic, strong) IBOutlet CALayer *movie

Re: -[NSFileHandle readInBackgroundAndNotify] opens the file again

2012-08-01 Thread Rick Mann
On Aug 1, 2012, at 14:45 , Fritz Anderson wrote: > On 1 Aug 2012, at 3:58 PM, Rick Mann wrote: > >> I know how to run instruments. Show me the documentation that tells me how >> to actually do something with Allocations. If you look at my previous email >> on the subject, you can see that I r

Re: Sorting NSArray -- advice on how to accomplish a "simple" alpha ordering?

2012-08-01 Thread Alex Zavatone
Stupid extra brackets. This works fine: NSArray *aRowArray = [customerFilters objectsForKeys: sectionArray notFoundMarker: @""] ; On Aug 1, 2012, at 12:45 PM, Jens Alfke wrote: > > On Aug 1, 2012, at 8:57 AM, Alex Zavatone wrote: > >> sectionArray = [[NSMutableArray alloc] init]; >> r

Re: Sorting NSArray -- advice on how to accomplish a "simple" alpha ordering?

2012-08-01 Thread Alex Zavatone
Stupid extra brackets. This works fine: NSArray *aRowArray = [customerFilters objectsForKeys: sectionArray notFoundMarker: @""] ; On Aug 1, 2012, at 12:45 PM, Jens Alfke wrote: > > On Aug 1, 2012, at 8:57 AM, Alex Zavatone wrote: > >> sectionArray = [[NSMutableArray alloc] init]; >> r

Re: Sorting NSArray -- advice on how to accomplish a "simple" alpha ordering?

2012-08-01 Thread Conrad Shultz
On Aug 1, 2012, at 2:24 PM, Alex Zavatone wrote: > Hmm. The row accessor is doing something quite unexpected. > > Automatic Reference Counting Issue: Receiver type 'NSDictionary' for instance > message does not declare a method with selector 'objectsForKeys:' > > Since when does an NSDictio

Re: Sorting NSArray -- advice on how to accomplish a "simple" alpha ordering?

2012-08-01 Thread Andy Lee
Never used it myself, but the method I see in the docs is called objectsForKeys:notFoundMarker:. --Andy On Aug 1, 2012, at 5:24 PM, Alex Zavatone wrote: > Hmm. The row accessor is doing something quite unexpected. > > Automatic Reference Counting Issue: Receiver type 'NSDictionary' for ins

Re: Sorting NSArray -- advice on how to accomplish a "simple" alpha ordering?

2012-08-01 Thread Alex Zavatone
Hmm. The row accessor is doing something quite unexpected. Automatic Reference Counting Issue: Receiver type 'NSDictionary' for instance message does not declare a method with selector 'objectsForKeys:' Since when does an NSDictionary on iOS 5.0 not declare a selector for objectForKeys:? On

Re: -[NSFileHandle readInBackgroundAndNotify] opens the file again

2012-08-01 Thread Rick Mann
On Aug 1, 2012, at 9:37 , Jens Alfke wrote: > > On Aug 1, 2012, at 3:33 AM, Rick Mann wrote: > >> I don't know how to use the Allocations instrument. I've filed a bug: >> 12004852. It contains my Xcode project. > > The word "RTFM" comes to mind. Instruments isn't the most intuitive app in

Re: Sorting NSArray -- advice on how to accomplish a "simple" alpha ordering?

2012-08-01 Thread Jens Alfke
On Aug 1, 2012, at 8:57 AM, Alex Zavatone wrote: > sectionArray = [[NSMutableArray alloc] init]; > rowArray = [[NSMutableArray alloc] init]; > for (id key in customerFilters) { > id myRowData = [customerFilters objectForKey:key]; > [sectionArray addObject: key]; > [rowArr

Re: Sorting NSArray -- advice on how to accomplish a "simple" alpha ordering?

2012-08-01 Thread Jens Alfke
On Aug 1, 2012, at 6:00 AM, Erik Stainsby wrote: > What I have come up with is this: > > [sortkeys sortUsingComparator:^NSComparisonResult(id obj1, id obj2) { > return [(NSString*)obj1 compare:(NSString*)obj2 ]; > } ]; > > Is this a sane approach ? Seems a bit fussy t

Re: -[NSFileHandle readInBackgroundAndNotify] opens the file again

2012-08-01 Thread Jens Alfke
On Aug 1, 2012, at 3:33 AM, Rick Mann wrote: > I don't know how to use the Allocations instrument. I've filed a bug: > 12004852. It contains my Xcode project. The word "RTFM" comes to mind. Instruments isn't the most intuitive app in the world, but it does have documentation, and if you're sm

Re: Sorting NSArray -- advice on how to accomplish a "simple" alpha ordering?

2012-08-01 Thread Andy Lee
On Aug 1, 2012, at 12:08 PM, Alex Zavatone wrote: >> If your comparison is only going to be a single method call with a single >> parameter like this, then probably a bit simpler to use: >> >> [sortkeys sortUsingSelector:@selector(compare:)]; > > What's the reason for not using caseInsensi

Re: Sorting NSArray -- advice on how to accomplish a "simple" alpha ordering?

2012-08-01 Thread Alex Zavatone
On Aug 1, 2012, at 10:38 AM, Michael Babin wrote: > On Aug 1, 2012, at 8:00 AM, Erik Stainsby wrote: > >> So I have a dictionary like so: >> >> NSDictionary * countries = [NSDictionary dictionaryWithObjects:[NSArray >> arrayWithObjects:@"Australia",@"Canada",@"United Kingdom",@"United

Re: Sorting NSArray -- advice on how to accomplish a "simple" alpha ordering?

2012-08-01 Thread Alex Zavatone
I'm also working on this for the simple reason that it just appears that not having sorted dicts (in a straightforward way) is an offense to all that it holy and good. Matt Galloway and others have already published methods for doing this, but sometimes, the learning is in the doing. What I'm

Re: Sorting NSArray -- advice on how to accomplish a "simple" alpha ordering?

2012-08-01 Thread Alex Zavatone
I'm also working on this for the simple reason that it just appears that not having sorted dicts (in a straightforward way) is an offense to all that it holy and good. Matt Galloway and others have already published methods for doing this, but sometimes, the learning is in the doing. What I'm

Re: Sorting NSArray -- advice on how to accomplish a "simple" alpha ordering?

2012-08-01 Thread Keary Suska
On Aug 1, 2012, at 7:00 AM, Erik Stainsby wrote: > Hi Mark, > > So I have a dictionary like so: > > NSDictionary * countries = [NSDictionary dictionaryWithObjects:[NSArray > arrayWithObjects:@"Australia",@"Canada",@"United Kingdom",@"United > States",nil] forKeys:[NSArray arrayWithObje

Re: Repositioning another app's windows?

2012-08-01 Thread Rainer Brockerhoff
On Aug 1, 2012, at 11:38 , cocoa-dev-requ...@lists.apple.com wrote: > Date: Wed, 01 Aug 2012 01:07:15 -0500 > From: Charles Srstka > Message-ID: > > On Jul 31, 2012, at 11:18 PM, Jerry Krinock wrote: > >> Neither way is 100% reliable. Accessibility probably requires that "Enable >> Access f

Re: Sorting NSArray -- advice on how to accomplish a "simple" alpha ordering?

2012-08-01 Thread Gerriet M. Denkmann
On 1 Aug 2012, at 21:38, Michael Babin wrote: > > On Aug 1, 2012, at 8:00 AM, Erik Stainsby wrote: > >> So I have a dictionary like so: >> >> NSDictionary * countries = [NSDictionary dictionaryWithObjects:[NSArray >> arrayWithObjects:@"Australia",@"Canada",@"United Kingdom",@"United

Re: Sorting NSArray -- advice on how to accomplish a "simple" alpha ordering?

2012-08-01 Thread Michael Babin
On Aug 1, 2012, at 8:00 AM, Erik Stainsby wrote: > So I have a dictionary like so: > > NSDictionary * countries = [NSDictionary dictionaryWithObjects:[NSArray > arrayWithObjects:@"Australia",@"Canada",@"United Kingdom",@"United > States",nil] forKeys:[NSArray arrayWithObjects:@"au",@"c

Re: Sorting NSArray -- advice on how to accomplish a "simple" alpha ordering?

2012-08-01 Thread Erik Stainsby
Hi Mark, So I have a dictionary like so: NSDictionary * countries = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@"Australia",@"Canada",@"United Kingdom",@"United States",nil] forKeys:[NSArray arrayWithObjects:@"au",@"ca",@"uk",@"us",nil]]; I want to present them alp

Re: NSTask and NSPipe has buffering issues?

2012-08-01 Thread Mr. Gecko
Thank you! That makes lots of sense and I was able to fix my code. I knew that I sometimes got zero length data, but never knew why. Now that I know it's the end of file… I can make lots of use of this knowledge. Thanks for the help. On Jul 31, 2012, at 11:20 PM, Ken Thomases wrote: > NSPipe

Re: -[NSFileHandle readInBackgroundAndNotify] opens the file again

2012-08-01 Thread Rick Mann
On Jul 16, 2012, at 12:02 , Greg Parker wrote: > > On Jul 13, 2012, at 7:46 PM, Rick Mann wrote: > >> I'm using NSFileHandle in an ARC app on OS X Lion to read from a serial port. >> >> Everything works fine 'till I go to close the port. I open the port with >> POSIX calls, set up some stuf