Custom crop box for UIImagePickerController

2011-07-07 Thread Symadept
Hi, I want to resize the guide box visible in Camera or Albums app launched using UIImagePickerViewController. Is there a way to get custom Crop rect and Crop Box. Looking forward for quick reply. Regards symadept ___ Cocoa-dev mailing list

RE: Delay in reading cookie using NSHttpCookieStorage

2011-07-07 Thread Hirendra Rathor
Your problem looks to me like a common use case for the policy hurting functionality. File a bug at bugreport.apple.com and ask that it be changed. [Hirendra] Thanks for taking time to explain. As suggested, I filed a bug (ID: 9735505) at bugreport.apple.com (devforums.apple.com does not

RE: Delay in reading cookie using NSHttpCookieStorage

2011-07-07 Thread Hirendra Rathor
Hi Jens, Thanks for taking time and replying. I like the idea of custom URL. My current implementation is based on porting of code from other platforms to Mac and is a bit more involved than simply launching the application. However I see the value in suggestion and will give

Re: NIB loading cycle? (sequel to: Dynamically loading NIB files with a common stem)

2011-07-07 Thread Manfred Schwind
On Mac OS X, all top-level objects get an -awakeFromNib. On iOS, top-level objects do not get -awakeFromNib. Uh? This was news to me and I immediately tested this. My tests show: - On OS X all objects of the nib including the file's owner get an awakeFromNib. - On iOS also all objects of the

Re: NIB loading cycle? (sequel to: Dynamically loading NIB files with a common stem)

2011-07-07 Thread vincent habchi
Le 7 juil. 2011 à 11:43, Manfred Schwind li...@mani.de a écrit : - On OS X all objects of the nib including the file's owner get an awakeFromNib. - On iOS also all objects of the nib (including top-level objects!) but NOT the file's owner get an awakeFromNib. BTW, I can't find this

Re: NIB loading cycle? (sequel to: Dynamically loading NIB files with a common stem)

2011-07-07 Thread Roland King
it's documented in The NIB Object Life Cycle, a page you should have bookmarked!! It sends an awakeFromNib message to the appropriate objects in the nib file that define the matching selector: In Mac OS X, this message is sent to any interface objects that define the method. It is also sent to

Re: Loading Nibs which are self-ref

2011-07-07 Thread Kevin Muldoon
Yes, that was a typo. My email was acting weird. So, I'm not entirely certain Wim. I kinda feel I'm caught between the xCode 3 way of doing things and xCode 4 (and all the variants in between). Seems Obj-C/Cocoa is changing so fast I'm just not sure which way is right. Specifically, when using

Adding and editing a multi column row in NSTableView

2011-07-07 Thread lorenzo7620
I have an NSTableView whose columns are bound to an NSArrayController. The data displays correctly in the table and I can edit the individual cells; all good there. But, when I programmatically add a new item to the controller, a new row is added at the bottom of the table. This is not what

Re: Loading Nibs which are self-ref

2011-07-07 Thread Kevin Muldoon
Realizing I'm not making myself very clear. I have two questions. We have an application called WindowWindow with two classes. AppController.m (which is linked as a delegate of Files Owner) SecondWindow.m (as a subclass of NSWindowController with an init method calling self = [super

Re: NIB loading cycle? (sequel to: Dynamically loading NIB files with a common stem)

2011-07-07 Thread Kyle Sluder
On Jul 7, 2011, at 2:43 AM, Manfred Schwind li...@mani.de wrote: On Mac OS X, all top-level objects get an -awakeFromNib. On iOS, top-level objects do not get -awakeFromNib. Uh? This was news to me and I immediately tested this. My tests show: - On OS X all objects of the nib including

Re: Loading Nibs which are self-ref

2011-07-07 Thread Jens Alfke
On Jul 7, 2011, at 5:03 AM, Kevin Muldoon wrote: So, I'm not entirely certain Wim. I kinda feel I'm caught between the xCode 3 way of doing things and xCode 4 (and all the variants in between). I don’t see a difference. Xcode is just a tool; it doesn’t dictate the ways you develop code. If

Re: Core Data Predicate Question

2011-07-07 Thread Indragie Karunaratne
I came up with this code earlier: NSArray *searchTerms = [cleanedQuery componentsSeparatedByString:@ ]; NSPredicate *basePredicate = [NSPredicate predicateWithFormat:@SUBQUERY(keywords, $keyword, $keyword.name BEGINSWITH $QUERY).@count != 0]; NSMutableArray *subpredicates =

Re: NSDatePicker weirdness with time.

2011-07-07 Thread Sean McBride
On Wed, 6 Jul 2011 18:46:54 -0700, Trygve Inda said: I have worked around it of course, but there is no logical reason for the date/time controls to not configure themselves based on the locale. Usually, but not always. In some cases, one might want a date picker to always use ISO 8601,

App Delegate Methods

2011-07-07 Thread koko
In my app delegate applicationDidFinishLaunching is called but applicationWillFinishLaunching is not. Can anyone shed some light on this apparent anomaly? -koko___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: Loading Nibs which are self-ref

2011-07-07 Thread Kevin Muldoon
My God that knowledge was hard won. Still, I'm getting some unresponsive behavior. The usual way: You declare the button as an IBOutlet in SecondWindow’s instance variable declarations, and wire it up to the actual control in IB. Yes, this works now that I have wired window to

Re: App Delegate Methods

2011-07-07 Thread Shawn Erickson
On Thu, Jul 7, 2011 at 12:14 PM, koko k...@highrolls.net wrote: In my app delegate applicationDidFinishLaunching is called but applicationWillFinishLaunching is not. Can anyone shed some light on this apparent anomaly? As currently typed in your mail above neither of those are the methods

Re: App Delegate Methods

2011-07-07 Thread koko
Let me clarify: in my app delegate the method applicationDidFinishLaunching: is called while the method applicationWillFinishLaunching: How can this be? -koko On Jul 7, 2011, at 1:50 PM, Shawn Erickson wrote: On Thu, Jul 7, 2011 at 12:14 PM, koko k...@highrolls.net wrote: In my app

Re: App Delegate Methods

2011-07-07 Thread Shawn Erickson
On Thu, Jul 7, 2011 at 12:57 PM, koko k...@highrolls.net wrote: Let me clarify: in my app delegate the method applicationDidFinishLaunching: is called while the method applicationWillFinishLaunching: How can this be? Most likely a typo in your source code in the method name or some

Re: finder eject images

2011-07-07 Thread Corbin Dunn
On Jul 5, 2011, at 7:34 AM, Patrick Robertson wrote: This is extremely fragile. You have no guarantee this image will continue to exist, that it will always be in ICNS format, or that the CoreTypes bundle will even continue to exist. True, but this method has been working for our app for 8

Re: Loading Nibs which are self-ref

2011-07-07 Thread Jens Alfke
On Jul 7, 2011, at 12:45 PM, Kevin Muldoon wrote: Can I (or should I) hook up File's Owner as I would a subclass of NSWindowController? Thereby skipping creating a new object-subclassing as SecondWindow? That seems 'right'. That nicely separates my code from my UI, making it (bit) more

Re: App Delegate Methods

2011-07-07 Thread koko
Spelling seems correct: (copied from mm file): // application delegate methods /* applicationWillFinishLaunching */ - (void)applicationWillFinishLaunching:(NSNotification *)aNotification { NSLog(@applicationWillFinishLaunching); } and the delegate is hooked up in IB. So, is

Re: Loading Nibs which are self-ref

2011-07-07 Thread Kevin Muldoon
Well, I suppose that's what attracted me to this technique. When we call... secondWindow = [[SecondWindow alloc] init]; The init method within SecondWindow does this... self = [super initWithWindowNibName:@SecondWindow owner:self]; Meaning the Files Owner is SecondWindow --

Re: Loading Nibs which are self-ref

2011-07-07 Thread Kevin Muldoon
Ahh. Yes. I see what you're saying. And maybe you see where I was confused. This GUI approach to hooking up code/UI is nifty, but extremely difficult to explain/comprehend. As to xCode2,xCode3,xCode4, you'll notice one of the first things we used to have to do was create an AppController,

linking the same static library into two places

2011-07-07 Thread Kenny Leung
Hi All. Hopefully somebody can help me with this: I have a static library with utilities that I like to use everywhere (it's a static library because we use it on iPhone as well). So I link it in with a framwork that I'm writing, and also link it in with an application that uses that

NSMapTable on iOS?

2011-07-07 Thread Jens Alfke
Kind of surprised to discover that NSMapTable doesn’t exist on iOS (even the older procedural form of the API). I need a non-retaining dictionary — do I need to drop down to CFDictionary or is there some higher-level alternative? —Jens___ Cocoa-dev

Re: linking the same static library into two places

2011-07-07 Thread Jens Alfke
On Jul 7, 2011, at 3:58 PM, Kenny Leung wrote: Class X is implemented in both your framework and Your app. One of the two will be used. Which one is undefined. The same happens with dynamically loaded bundles, etc... Is there any good way around this? Not putting the classes into a

Re: App Delegate Methods

2011-07-07 Thread Greg Guerin
koko wrote: So, is there really an NSApplicationWillFinishLaunchingNotification or is Apple just pulling my leg? From the reference doc for the NSApplicationDelegate protocol: applicationWillFinishLaunching: Sent by the default notification center immediately ***before the application

Re: linking the same static library into two places

2011-07-07 Thread Greg Parker
On Jul 7, 2011, at 4:03 PM, Jens Alfke wrote: On Jul 7, 2011, at 3:58 PM, Kenny Leung wrote: Class X is implemented in both your framework and Your app. One of the two will be used. Which one is undefined. The same happens with dynamically loaded bundles, etc... Is there any good way

NSPopupbutton binding setter getter....

2011-07-07 Thread R
I'm trying to understand when NSPopupbutton calls setter and getters in bindings. I have an array, an array controller, a tableview, a labelview and a NSPopupbutton. The arraycontroller generates objects (via add/remove) and loads them into the tableview via a binding. Let's say we have a one

Re: App Delegate Methods

2011-07-07 Thread Jens Alfke
On Jul 7, 2011, at 4:10 PM, Greg Guerin wrote: What do you hope to accomplish with this event that you can't accomplish with applicationDidFinishLaunching: ? The only time I’ve ever had to use it was when I had to install some custom AppleEvent handlers before the app processed the

Re: linking the same static library into two places

2011-07-07 Thread Jens Alfke
On Jul 7, 2011, at 4:25 PM, Greg Parker wrote: This is less safe than you might like. On iOS and 64-bit Mac, you may end up with both copies of the class in use simultaneously. That means two separate invocations of +initialize, two separate locks for @synchronized([MyClass class]), etc.

Re: linking the same static library into two places

2011-07-07 Thread Greg Parker
On Jul 7, 2011, at 5:25 PM, Jens Alfke wrote: On Jul 7, 2011, at 4:25 PM, Greg Parker wrote: This is less safe than you might like. On iOS and 64-bit Mac, you may end up with both copies of the class in use simultaneously. That means two separate invocations of +initialize, two separate

getting last accessed date

2011-07-07 Thread Rick C.
Hi again, I'm using this code to get the last accessed date of a file: struct stat output; int ret = stat([aFile fileSystemRepresentation], output); struct timespec accessTime = output.st_atimespec; NSDate *aDate = [NSDate dateWithTimeIntervalSince1970:accessTime.tv_sec];

Re: getting last accessed date

2011-07-07 Thread Scott Ribe
On Jul 7, 2011, at 9:35 PM, Rick C. wrote: But it's just giving me today's date. There must be something obvious... Are you sure the last access time is not today? There, how was that for obvious ;-) -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303) 722-0567 voice

Re: getting last accessed date

2011-07-07 Thread Joar Wingfors
Hello Rick, The access date on a file is updated very frequently. I think that stat:ing the file is enough, and that happens all the time. If what you're looking for is the last *opened* date of the file, I think that your best bet is the kMDItemLastUsedDate spotlight metadata attribute. j o

Re: getting last accessed date

2011-07-07 Thread Rick C.
Thanks for the replies and yeah I get what you're saying. The only thing with the spotlight metadata is it will depend on the spotlight index being enabled correct? And yes it is the opened date I'm looking for. One more note, seems in terminal stat aFile works so I suppose I could use

Re: getting last accessed date

2011-07-07 Thread Scott Ribe
On Jul 7, 2011, at 11:19 PM, Rick C. wrote: One more note, seems in terminal stat aFile works so I suppose I could use nstask to do this as well? It does seem odd that the two would produce different results... -- Scott Ribe scott_r...@elevated-dev.com http://www.elevated-dev.com/ (303)

Re: getting last accessed date

2011-07-07 Thread Stephen J. Butler
On Fri, Jul 8, 2011 at 12:31 AM, Scott Ribe scott_r...@elevated-dev.com wrote: On Jul 7, 2011, at 11:19 PM, Rick C. wrote: One more note, seems in terminal stat aFile works so I suppose I could use nstask to do this as well? It does seem odd that the two would produce different results...