Re: Moving oneself to /Applications (or ~/Applications)

2009-02-22 Thread Adam Leonard
you don't have to worry about where iPhoto is putting your photos, and the iPhone has no GUI file system access at all. Also as Gruber notes, the vast majority of people who don't like these features and want complete control of the file system are programmers, i.e., the peo

Re: Equivalent ?

2009-01-17 Thread Adam Leonard
hurts readability. Sometimes, doing the following makes code a bit more readable: if ([foo didSomethingWork] != NO) ... since the only value interpreted as false is 0, and NO is always equivalent to 0. Adam Leonard On Jan 18, 2009, at 12:54AM, Michael wrote: Hi all, I am curious as to whethe

Re: NSDictionary mutability test

2008-12-08 Thread Adam Leonard
rks doing this. Or are there other concerns, like breaking the technique here of checking for the classForCoder? Like people have been saying, that seems like bad design to me anyway. Adam Leonard ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.co

Re: Autorelease Question

2008-11-21 Thread Adam Leonard
, -release-, -autorelease, and -retainCount). The rules of memory management suggest this code is fine too. Therefore, I can only conclude that the generalization made by this page in the documentation (for beginners no less) is simply wrong. Adam Leonard On Nov 21, 2008, at 10:33AM, Fil

Re: Autorelease Question

2008-11-21 Thread Adam Leonard
about, and (c) is not even true in the case of some methods, including [NSString string] So I'll file a bug. Adam Leonard On Nov 21, 2008, at 9:43AM, Kyle Sluder wrote: On Thu, Nov 20, 2008 at 11:53 PM, Luke Hiesterman <[EMAIL PROTECTED]> wrote: So thinking gets in the way of un

Re: Autorelease Question

2008-11-20 Thread Adam Leonard
"the data object could not be created" I think this is a bug in the documentation. I am curious to know what others think. Adam Leonard ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Re: Autorelease Question

2008-11-20 Thread Adam Leonard
g and return an appropriate value. But since you know it's a singleton (through appropriate documentation), you really shouldn't be doing any memory management with it. Adam Leonard On Nov 20, 2008, at 5:12AM, Alexander Spohr wrote: Just to clarify: Am 19.11.2008 um 23:43

Re: NSData text representation

2008-06-19 Thread Adam Leonard
+[NSPropertyListSerialization dataFromPropertyList:format:errorDescription:] should do what you want too in Cocoa. Adam Leonard On Jun 19, 2008, at 1:15 PM, Andreas Monitzer wrote: On Jun 19, 2008, at 20:50, Trygve Inda wrote: In my plist (xml1 format) I see something like

Re: Time Machine Helpers

2008-06-19 Thread Adam Leonard
this in 10.6, please file a bug report. Adam Leonard On Jun 19, 2008, at 1:09 PM, Omar Qazi wrote: I want to enable my application to be able to display it's own interface when time machine opens, so that users can see what the data in the application looked like at that point in

Re: argument checks

2008-06-11 Thread Adam Leonard
the problem with just doing NSNumber *myNum = nil; ? You can reassign it to a usable NSNumber object later, and if you don't, checking for equality with nil (or just doing if(!myNum) ) will let you catch that error. Or am I missing something in your question.... Adam Leonard On Jun 11,

Re: Updating a progress bar from a code loop

2008-06-10 Thread Adam Leonard
ll be unresponsive, but it will synchronously redraw the progress bar. You can also use this in combination with -setUseThreadedAnimation to make the animation run smoothly. Adam Leonard On Jun 10, 2008, at 10:59 PM, Graham Cox wrote: On 11 Jun 2008, at 2:40 pm, j o a r wrote: On J

Re: Spotlight sources w/o actual files?

2008-06-10 Thread Adam Leonard
o use with any online data source. Check it out here:http://caffeinatedcocoa.com/blog/?p=14 Email me off list if you want to try developing for it, or if you have any questions. Adam Leonard On Jun 10, 2008, at 1:07 AM, Rasmus Andersson wrote: I would like to create a Spotlight plugin

Re: A simple doubt about array

2008-06-10 Thread Adam Leonard
olumn]; } @end and (after importing the category interface), you can call it with one clean line like [array objectAtRow:0 column:0] Adam Leonard On Jun 10, 2008, at 12:22 PM, Sidnei Vladisauskis wrote: Hi, I'm making in a simple puzzle...It´s working perfect, but I'm wit

Re: launching standard apps with NSTask

2008-06-10 Thread Adam Leonard
user terminates the application, you can also use NSWorkspace. See the documentation for NSWorkspaceDidTerminateApplicationNotification Adam Leonard On Jun 10, 2008, at 4:22 PM, Memo Akten wrote: Hi, that looks great thanks, I've just been looking through the documentation, but I

Re: detect URL change

2008-06-05 Thread Adam Leonard
here, etc. Adam Leonard On Jun 5, 2008, at 5:06 PM, Mauricio Camayo wrote: Hi list. I'm currently making my own parental control plugin, using SIMBL to patch it to Safari. I made it trought XCode using a Cocoa Bundle type of project, as exercise, put a new menu on the menu bar and

Re: Hillegass book memory question

2008-06-02 Thread Adam Leonard
ynthesizer release]. I am sure this is discussed elsewhere in the book. Hope that makes sense. Adam Leonard On Jun 2, 2008, at 9:39 PM, Ashley Perrien wrote: I'm working my way through the 3rd edition and have a question specifically on speech synthesizer in chapter 5. It's my un

Re: fundamental question: how do I call controller methods from other classes?

2008-05-21 Thread Adam Leonard
g containing the new status. and I am feeling quite dumn here. You shouldn't. This is a tricky topic. You should only feel DUMB for spelling it wrong :) Adam Leonard On May 21, 2008, at 8:15 PM, Matthew Youney wrote: Jens, Shawn, Thanks. I have my application working, however not ex

Re: Accessing variables across classes

2008-05-18 Thread Adam Leonard
our models (myMutableArray) to your view (myView). Adam Leonard On May 18, 2008, at 10:03 PM, Joey None wrote: Hello all, I hope someone can help me with this. I have my ApplicationDelegate which contains a couple of NSMutableArrays with data in them. Then I have a few CustomNSVie

Re: List Running apps and windows

2008-05-04 Thread Adam Leonard
some code to do that: http://caffeinatedcocoa.com/blog/?p=12 (look towards the bottom) Adam Leonard ___ 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

Re: Newbie Question: Controls not redrawing on changes

2008-05-04 Thread Adam Leonard
Hi, Did you see Michael Ash's message? That certainly seems like the problem to me. Just change backing:NSBackingStoreRetained to NSBackingStoreBuffered and see if that works. Adam Leonard On May 4, 2008, at 3:23 PM, Christopher Kempke wrote: Thanks to those folks who have

Re: is this badly written code?

2008-04-14 Thread Adam Leonard
a method to get it in the delegate's class. Adam Leonard On Apr 14, 2008, at 7:53 PM, Adam Gerson wrote: In cocoa its very tempting to write a single line of code like: NSManagedObject *selectedTreeObject = [self delegate] mainWindowController] treeController] selectedObjects] object

Re: Autorelease question

2008-04-03 Thread Adam Leonard
loc" "new" or "copy" are autoreleased. Once you understand how everything works and learn to follow the rules, you will understand why that does not make any difference whatsoever. If you want me to clarify anything I have said, fee

Re: Autorelease question

2008-04-03 Thread Adam Leonard
h into all this. As long as you fulfill your side of the contract, trust that Cocoa will fulfill its side. Adam Leonard thanks On Apr 3, 2008, at 10:10 PM, Rob Keniger wrote: On 04/04/2008, at 11:54 AM, Dmitry Markman wrote: if I comment all those releases (excerpt [pool release]) then app

Re: Autorelease question

2008-04-03 Thread Adam Leonard
always be the case that an object not created with alloc, copy, etc. will be in an autorelease pool. It might be a singleton or cached in some way. These are usually implementation details, but just watch out. Adam Leonard ___ Cocoa-de

Re: Convenience initializer not working: "unrecognized selector"

2008-03-12 Thread Adam Leonard
always be using a [[MyClass alloc]init] pattern. So, the Fraction class does not respond to the selector - initWith:over:, but the object returned by [Fraction alloc] will. Hope that makes sense! Those little +'s and -'s can be confusing. Adam Leonard On Mar 12, 2008, at

Re: NSURLDownload and userInfo

2008-03-12 Thread Adam Leonard
treated as a standard pattern. I have also seen some open source projects that use it. I still think your approach is completely valid though; it really depends on how much control you need. Adam Leonard On Mar 12, 2008, at 9:05 AM, Jens Alfke wrote: On 12 Mar '08, at 12:39 AM, T

Re: NSURLDownload and userInfo

2008-03-11 Thread Adam Leonard
event having to create wrapper classes. The data is tied to the NSURLDownload object itself, and there is no need to do any extra work to get it in one of the delegate methods. Adam Leonard On Mar 11, 2008, at 6:37 AM, Trygve Inda wrote: Or, yet another solution: Just subclass NSURLConne

Re: NSURLDownload and userInfo

2008-03-10 Thread Adam Leonard
Or, yet another solution: Just subclass NSURLConnection (say MyUserInfoURLConnection), add a userInfo ivar, drop in some accessors, and you are good to go. :) [userInfoConnection userInfo]; Adam Leonard On Mar 10, 2008, at 6:52 PM, Jens Alfke wrote: On 10 Mar '08, at 6:35 PM, Ben La

Re: Grabbing current Safari webpage url

2008-03-06 Thread Adam Leonard
the title of the webpage, just substitute "name" for "URL" Then, call it with NSApplescript and grab the result with an NSAppleEventDescriptor Adam Leonard On Mar 6, 2008, at 9:27 PM, Adam P Jenkins wrote: You can use Scripting Bridge to do the same things you could

Re: NSPreferencePane with my own private framework?

2008-03-05 Thread Adam Leonard
In your preference pane project, make sure @loader_path/../Frameworks is in the target's Framework Search Paths. If that doesn't work, you might also try @bundle_path (set in both the preference pane and framework) Adam Leonard On Mar 5, 2008, at 3:44 PM, Ryan wrote: Thanks for

Re: Reading word at mouse pointer w/o Universal Access

2008-03-02 Thread Adam Leonard
it a while ago here: http://caffeinatedcocoa.com/blog/?p=12 There is also some sample code included. Adam Leonard On Mar 2, 2008, at 6:24 AM, Ryan Homer wrote: Steve, While I agree that the user should decide whether or not to allow the application to access another's text, to me, t