Fast user switching notifications

2013-03-11 Thread Jean Suisse
Dear All, There may be several approaches to solve the issue I am about to describe, either on the userland side or on the kernel side... or in-between, using a daemon. Current situation A bsd kernel extension communicates with a regular userland application (called theApp). The kext gathers s

Re: Objective-C Question

2013-03-11 Thread John McCall
On Mar 11, 2013, at 2:02 PM, Dave wrote: > > On 11 Mar 2013, at 20:53, John McCall wrote: > >> On Mar 11, 2013, at 1:33 PM, Dave wrote: >>> On 11 Mar 2013, at 20:26, Mike Abdullah wrote: > > I had assumed (and I thought I'd done something like this before) that > the: > >>>

Re: Objective-C Question

2013-03-11 Thread Greg Parker
On Mar 11, 2013, at 1:55 PM, Dave wrote: > Not sure I understand: > > if from an Instance - Method, I do: > > [super someMehod]; > > It calls -someMehod in the superclass. > > if from an instance + Method I do: > > [super someMethod], then surely it's an error because this isn't an instance?

Re: Objective-C Question

2013-03-11 Thread Keary Suska
On Mar 11, 2013, at 2:55 PM, Dave wrote: > On 11 Mar 2013, at 20:50, Jens Alfke wrote: > >> >> On Mar 11, 2013, at 1:33 PM, Dave wrote: >> >>> There isn't a >>> -newDict >>> method defined, so how come I didn't get a complier error? >> >> Because the receiver is a Class, so the method is +new

Re: Objective-C Question

2013-03-11 Thread Kyle Sluder
On Mon, Mar 11, 2013, at 01:55 PM, Dave wrote: > Not sure I understand: > > if from an Instance - Method, I do: > > [super someMehod]; > > It calls -someMehod in the superclass. > > if from an instance + Method I do: > > [super someMethod], then surely it's an error because this isn't an >

Re: Objective-C Question

2013-03-11 Thread Mike Abdullah
On 11 Mar 2013, at 20:55, Dave wrote: > > On 11 Mar 2013, at 20:50, Jens Alfke wrote: > >> >> On Mar 11, 2013, at 1:33 PM, Dave wrote: >> >>> There isn't a >>> -newDict >>> method defined, so how come I didn't get a complier error? >> >> Because the receiver is a Class, so the method is +n

Re: Objective-C Question

2013-03-11 Thread Lee Ann Rucker
On Mar 11, 2013, at 1:45 PM, Dave wrote: >>> myDict = [[super class] newDict]; >> >> This should be [super newDict]. > >> -- Seth > > > Surely that would call the Instance Method (and there isn't one), I think the > correct code is: > > [[self superclass] newDict]; > > as someone else all

Re: Objective-C Question

2013-03-11 Thread Mike Abdullah
On 11 Mar 2013, at 20:49, Dave wrote: > On 11 Mar 2013, at 20:45, Mike Abdullah wrote: > > Confused now, I thought you meant +. > > There is no instance of the class to call [super newDict] on? > > There is no: > > -NewDict method, just +newDict. > > So, surely [super newDict] should error?

Re: Objective-C Question

2013-03-11 Thread John McCall
On Mar 11, 2013, at 1:45 PM, Dave wrote: > On 11 Mar 2013, at 20:30, Seth Willits wrote: >> On Mar 11, 2013, at 1:21 PM, Dave wrote: >> >>> +(NSMutableDictionary*) newDict >>> { >>> return [[NSMutableDictionary alloc] init]; >>> } >> >> (I hope you're using ARC otherwise this is a memory leak.)

Re: Objective-C Question

2013-03-11 Thread Dave
On 11 Mar 2013, at 20:53, John McCall wrote: On Mar 11, 2013, at 1:33 PM, Dave wrote: On 11 Mar 2013, at 20:26, Mike Abdullah wrote: I had assumed (and I thought I'd done something like this before) that the: myDict = [[super class] newDict]; statement would call newDict in BaseClass??

Re: Objective-C Question

2013-03-11 Thread Dave
On 11 Mar 2013, at 20:50, Jens Alfke wrote: On Mar 11, 2013, at 1:33 PM, Dave wrote: There isn't a -newDict method defined, so how come I didn't get a complier error? Because the receiver is a Class, so the method is +newDict, which exists. Not sure I understand: if from an Instan

Re: Objective-C Question

2013-03-11 Thread John McCall
On Mar 11, 2013, at 1:33 PM, Dave wrote: > On 11 Mar 2013, at 20:26, Mike Abdullah wrote: >>> >>> I had assumed (and I thought I'd done something like this before) that the: >>> >>> myDict = [[super class] newDict]; >>> >>> statement would call newDict in BaseClass Instead it calls the vers

Re: Objective-C Question

2013-03-11 Thread Dave
On 11 Mar 2013, at 20:45, Mike Abdullah wrote: On 11 Mar 2013, at 20:33, Dave wrote: On 11 Mar 2013, at 20:26, Mike Abdullah wrote: I had assumed (and I thought I'd done something like this before) that the: myDict = [[super class] newDict]; statement would call newDict in BaseClass

Re: Objective-C Question

2013-03-11 Thread Jens Alfke
On Mar 11, 2013, at 1:33 PM, Dave wrote: > There isn't a > -newDict > method defined, so how come I didn't get a complier error? Because the receiver is a Class, so the method is +newDict, which exists. —Jens ___ Cocoa-dev mailing list (Cocoa-dev@li

Re: Objective-C Question

2013-03-11 Thread Jens Alfke
On Mar 11, 2013, at 1:26 PM, Dave wrote: > I had assumed (and I thought I'd done something like this before) that the: > myDict = [[super class] newDict]; > statement would call newDict in BaseClass Instead it calls the version in > NewClass and goes into an infinite loop!! No, what you wa

Re: Objective-C Question

2013-03-11 Thread Dave
On 11 Mar 2013, at 20:30, Seth Willits wrote: On Mar 11, 2013, at 1:21 PM, Dave wrote: +(NSMutableDictionary*) newDict { return [[NSMutableDictionary alloc] init]; } (I hope you're using ARC otherwise this is a memory leak.) Yes, but it's only an example so don't worry about that, and, a

Re: Objective-C Question

2013-03-11 Thread Mike Abdullah
On 11 Mar 2013, at 20:33, Dave wrote: > > On 11 Mar 2013, at 20:26, Mike Abdullah wrote: >>> >>> I had assumed (and I thought I'd done something like this before) that the: >>> >>> myDict = [[super class] newDict]; >>> >>> statement would call newDict in BaseClass Instead it calls the ve

Re: Objective-C Question

2013-03-11 Thread David Duncan
On Mar 11, 2013, at 1:30 PM, Seth Willits wrote: > On Mar 11, 2013, at 1:21 PM, Dave wrote: > >> +(NSMutableDictionary*) newDict >> { >> return [[NSMutableDictionary alloc] init]; >> } > > (I hope you're using ARC otherwise this is a memory leak.) A 'new' prefix is defined as returning an ow

Re: Objective-C Question

2013-03-11 Thread Andy Lee
On Mar 11, 2013, at 4:30 PM, Seth Willits wrote: > On Mar 11, 2013, at 1:21 PM, Dave wrote: > >> +(NSMutableDictionary*) newDict >> { >> return [[NSMutableDictionary alloc] init]; >> } > > (I hope you're using ARC otherwise this is a memory leak.) Not if the caller knows to observe the rule ab

Re: Objective-C Question

2013-03-11 Thread Dave
On 11 Mar 2013, at 20:26, Mike Abdullah wrote: I had assumed (and I thought I'd done something like this before) that the: myDict = [[super class] newDict]; statement would call newDict in BaseClass Instead it calls the version in NewClass and goes into an infinite loop!! Yes. [sup

Re: Objective-C Question

2013-03-11 Thread Seth Willits
On Mar 11, 2013, at 1:21 PM, Dave wrote: > +(NSMutableDictionary*) newDict > { > return [[NSMutableDictionary alloc] init]; > } (I hope you're using ARC otherwise this is a memory leak.) > myDict = [[super class] newDict]; This should be [super newDict]. -- Seth _

Re: Objective-C Question

2013-03-11 Thread H Miersch
On 11. Mar 2013, at 20:21, Dave wrote: try myDict = [super newDict]; ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.app

Objective-C Question

2013-03-11 Thread Dave
Typeo: return [[NSMutableDictionary alloc] init]; should be: return myDict; --- Hi, Take the following example: @interface BaseClass +(NSMutableDictionary*) newDict; @end @implementation BaseClass +(NSMutableDictionary*) newDict

Re: Objective-C Question

2013-03-11 Thread Mike Abdullah
On 11 Mar 2013, at 20:21, Dave wrote: > Hi, > > Take the following example: > > @interface BaseClass > > +(NSMutableDictionary*) newDict; > > @end > > @implementation BaseClass > > +(NSMutableDictionary*) newDict > { > > > return [[NSMutableDictionary alloc] init]; > } > > > @class New

Objective-C Question

2013-03-11 Thread Dave
Hi, Take the following example: @interface BaseClass +(NSMutableDictionary*) newDict; @end @implementation BaseClass +(NSMutableDictionary*) newDict { return [[NSMutableDictionary alloc] init]; } @class NewClass; @interface NewClass : BaseClass +(NSMutableDictionary*) newDict; @end #

Re: [OT] Sync vs ASync Server Comms

2013-03-11 Thread Dave
On 25 Feb 2013, at 22:45, Steve Sisak wrote: At 3:18 PM + 2/25/13, Dave wrote: On 25 Feb 2013, at 13:57, Steve Sisak wrote: Created A, B, C, make C dependent on A, B, submit all of them to an NSOperationQueue and wait for C to complete (or put your completion code on a block dependent

Re: [OT] Sync vs ASync Server Comms

2013-03-11 Thread Dave
On 25 Feb 2013, at 15:45, Kyle Sluder wrote: On Mon, Feb 25, 2013, at 07:18 AM, Dave wrote: Agreed. but that is true of anything, I am comfortable with Multi- Threading so it's not really an issue for me. Someone who's truly comfortable with multithreading would be relishing the opportunity

Typesetter - Fragment Generation

2013-03-11 Thread Seth Willits
I'm subclassing NSATSTypesetter to add custom line wrapping behavior which indents wrapped lines relative to the starting line's indentation (like Xcode). To do this, I'm overriding - getLineFragmentRect:usedRect:remainingRect:forStartingGlyphAtIndex:... and for wrapped lines am modifying the

Re: Issue with makeKeyAndOrderFront

2013-03-11 Thread Ken Thomases
On Mar 11, 2013, at 3:15 AM, anni saini wrote: > My app is just having NSStatusBar menu such as Adium. On right click context > menu, I'm calling some window to open. > > //Calling method > myWindow = [[MyWindowViewController alloc]init]; > myWindow.data = @"abc"; > [myWindow show:self]; > > //

Re: Problem with using a Navigation Controller in Xcode

2013-03-11 Thread gary . gardner
My steps are: 1) Launch XCode 2) Create a new project 3) Select Single View Application 4) Give a Project Name 5) Select Device iPhone 6) Click on MainStoryboard.storyboard 7) Delete what's there so that it's blank 8) Add New file Objective-C class subclass UIViewController 9) Uncheck iPad and unc

Re: UITableView disabled scrolling Cell selection

2013-03-11 Thread Luke Hiesterman
If you want the behavior of a series of buttons, I'd have a series of buttons. Table view cells simply don't behave like buttons. If it makes it easier for you, it might make sense to put buttons inside table view cells. Luke On Mar 11, 2013, at 4:38 AM, "Ben" wrote: > Hi, > > I have a UIT

Re: Problem with using a Navigation Controller in Xcode

2013-03-11 Thread Fritz Anderson
I must not be doing what you are. I don't see a problem. On 10 Mar 2013, at 5:48 PM, gary.gard...@brokensoftware.com wrote: > I am using XCode 4.6 and created a project. > > I am using a Single View Application type of project I selected iPhone only. I checked the Use Storyboards box in the new

UITableView disabled scrolling Cell selection

2013-03-11 Thread Ben
Hi, I have a UITableView which I have disabled scrolling on. When a user touches a cell it is selected as required, however when a user touches, drags then releases (on that same cell) no selection of the cell happens. I understand that in normal use this would be the correct behaviour(as a

Issue with makeKeyAndOrderFront

2013-03-11 Thread anni saini
Hi, My app is just having NSStatusBar menu such as Adium. On right click context menu, I'm calling some window to open. //Calling method myWindow = [[MyWindowViewController alloc]init]; myWindow.data = @"abc"; [myWindow show:self]; //Called method - (void)show:(NSWindow*)parentWindow {    [myPa