UIImagePickerController is permanently blowing away the phone's own status bar.
At least for the duration of the app. I'm presenting a UI that's as close as I can come to the built-in camera app's: A controller brings up UIImagePickerController in camera mode, with an overlay at the bottom that has a library button on it. If the user presses the Library button, the overlay brings up another UIImagePickerController in library mode. This appears to be what the phone's own app does. It all works fine, except that the image-picker overwrites the status bar (the signal-strength meters and other status icons at the top of the screen), as seen here: http://farm6.static.flickr.com/5249/5362665729_65bbcd2834_b_d.jpg and they don't return when the pickers are dismissed. I've verified that all modally presented controllers up to this point are dismissed. It looks like it might be related to the fact that the first picker has already overwritten the status bar at the top, so it's not present for the second one. If you invoke the library-mode picker directly and dismiss it, the status bar returns. Has anyone seen this before and know a workaround? Seems kinda buggy. Thanks! Gavin ___ 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.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: UIImagePickerController is permanently blowing away the phone's own status bar.
I was able to work around it with [UIApplication sharedApplication].statusBarHidden = NO; ___ 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.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Mutable to-many relationship not observable
Op 15-1-2011 9:19, Ken Thomases schreef: Which will/didChange... methods do you use, when you've tested the manual notifications? Also, what does your -observeValueForKeyPath:ofObject:change:context: method look like? My suspicion is that you're using will/didChangeValueForKey: and your observe... method is expecting the value of the NSKeyValueChangeKindKey to be NSKeyValueChangeSetting. Instead, the automatic notifications from the mutating indexed accessors is more akin to what's generated by will/didChange:valuesAtIndexes:forKey:, and NSKeyValueChangeKindKey will be one of NSKeyValueChangeInsertion, NSKeyValueChangeRemoval, or NSKeyValueChangeReplacement. Your suspicion was right. I had implemented it completely the wrong way. Works perfect now. Thanks. Regards, Remco Poelstra ___ 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.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Get iphoto scripting bridge handle without starting iphoto?
My question is: can I get a scripting bridge handle on iPhoto without making iPhoto launch? Scripting Bridge is about sending Apple events to an application. That application must be running or you can't send it Apple events. That is Thanks a lot for these insights. (Thanks also to all the others who answered similarly.) So it seems like I either have to use ScriptingBridge (i.e., have iPhoto fire up) or use an unofficial API. I was just wondering who Mail.app does it with its photo browser ... BTW: I am wondering about another thing. Right now I get the iPhoto handle like this: iPhoto_ = [[SBApplication applicationWithBundleIdentifier:@com.apple.iPhoto] retain]; (which starts iPhoto), I also instantiate an object for the iphoto albums like this albums_ = [[[iPhoto_ albums] get] retain]; then the user probably plays around a little bit with my app. But what happens, if the user closes iPhoto (while my app is still running) and then continues to play with my app, which then continues to access the iPhoto_ and the albums_ objects?? Best regards, Gabriel. 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 the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Question about split view
On 2011-01-16, at 10:08 PM, Kyle Sluder wrote: I'm sure developers would love if the frameworks *did* manage memory correctly. In the absence of page/swap space for modified memory, I'm not sure what 'correctly' means. :-) To my way of thinking, the problem is that there's no well-defined and now we're back notification. Re-using the method that's normally called to load the startup state of a view doesn't quite cut it when the view should actually represent on-going state changes. Maybe an approach is to use didReceiveMemoryWarning to create a record of differences vs. startup and, if not nil, apply those in viewDidAppear. Another thought would be for the framework to have a 'dirty' flag to control whether a view could be unloaded/reloaded without harm. I guess I'll look at the possibility of preventing unloading (at least of the detail view), perhaps in combination with my own 'dirty' indicator. ___ 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.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSNotFound
On Sat, 15 Jan 2011 18:51:52 +, Thomas Davie said: NSNotFound could have *any* value, and in fact its value could change from cocoa version to cocoa version. Stop looking! If they change it, they'll break binary compatibility with existing apps. So it won't be changing. (Which isn't a reason to bypass it, but...) -- Sean McBride, B. Eng s...@rogue-research.com Rogue Researchwww.rogue-research.com Mac Software Developer Montréal, Québec, Canada ___ 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.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Gestures
My shipping app is developed with 10.6.6 SDK. Some MacBook customers have asked for gesture support. Can I do this? I have had no luck finding a reference. -koko ___ 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.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Gestures
On Mon, 17 Jan 2011 09:53:26 -0700, koko said: My shipping app is developed with 10.6.6 SDK. Some MacBook customers have asked for gesture support. Can I do this? I have had no luck finding a reference. Really? This worked for me (with google): mac os x gesture support site:developer.apple.com -- Sean McBride, B. Eng s...@rogue-research.com Rogue Researchwww.rogue-research.com Mac Software Developer Montréal, Québec, Canada ___ 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.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Gestures
On Mon, Jan 17, 2011 at 11:53 AM, koko k...@highrolls.net wrote: My shipping app is developed with 10.6.6 SDK. Some MacBook customers have asked for gesture support. Can I do this? I have had no luck finding a reference. Yes - the MacBook's screen isn't touch-sensitive, but its trackpad can generate a variety of gesture events. Have a look at: http://developer.apple.com/library/mac/#documentation/cocoa/conceptual/EventOverview/HandlingTouchEvents/HandlingTouchEvents.html sherm-- -- Cocoa programming in Perl: http://camelbones.sourceforge.net ___ 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.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
How to correctly load the bundle of a screen saver (was: How to change the product name with command line builds?)
On Jan 16, 2011, at 7:59 AM, Ken Thomases wrote: I've got an Xcode project that compiles and works fine. The short question now is: what is the proper way to change the bundle's name from the command line? Assuming your project is set up like normal (e.g. with Info.plist values based on build settings), it may be as simple as: xcodebuild -target Foo -configuration Release build PRODUCT_NAME=Foo2 Thanks a lot for your response. Unfortunately, it doesn't seem to be quite as simple as that. The executable I am working on is a screen saver. My Info.plist looks like this: keyCFBundleName/key string${PRODUCT_NAME}/string keyCFBundleExecutable/key string${EXECUTABLE_NAME}/string keyCFBundleIdentifier/key stringde.zach.${PRODUCT_NAME:rfc1034identifier}/string In the final packages, the variables are correctly replaced by the correct executable names, i.e., Foo and Foo2. However, when I run the screen savers (in System Preferences), the name of my screen saver, i.e., the value of CFBundleName is the same, whichever screen saver I use. It happens to be the one of the screen saver that got started first in SystemPreferences. And since I base the name of the preferences file on the bundle name, both screensavers Foo and Foo2 use the same preferences file. Here is how I load the bundle and determine the name of the screen saver running: NSBundle * bundle = [NSBundle bundleForClass:[self class]]; exec_name_ = [[bundle infoDictionary] objectForKey:@CFBundleName]; I tried NSBundle * bundle = [NSBundle mainBundle]; but that loads the bundle of SystemPreferences! I was considering to use [NSBundle bundleWithIdentifier: @de.zach.Foo] but I can't hard-code the identifier, since I don't know which screensaver it will be. Is there something like preprocessor macro expansion in Obj-C? Something like @de.zach. ## PRODUCT_NAME (that is C++ syntax, where PRODUCT_NAME is a preprocessor token, which can be set on the command line of gcc). Does anyone know how to do this properly? Thanks a lot in advance. Best regards, Gabriel. 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 the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Why can't a modal view controller present another in viewDidLoad?
On Jan 16, 2011, at 7:46 PM, Luke Hiesterman wrote: Delayed performance is not appropriate for something like this, because that fact that your view was just loaded is not a guarantee that it's about to be added to the view hierarchy. Delayed performance should not be used as a haphazard crutch because it seems to make a given problem go away. It should only be used when the problem and the purpose of the delayed perform are both well understood. Yes, fair enough. There are a lot of indeterminacies in the framework - for example, it might perform an animation for whose finish you get no notification, or you might need to wait until after the next redraw moment (as I call it) - and one gets into the habit of using delayed performance as a way of skirting these. But I certainly see why this is a different sort of case. m. On Jan 16, 2011, at 6:46 PM, Matt Neuburg m...@tidbits.com wrote: On Sun, 16 Jan 2011 13:47:06 -0800, G S stokest...@gmail.com said: On Sun, Jan 16, 2011 at 11:47 AM, Luke Hiesterman luket...@apple.com wrote: viewDidLoad is called the first time the view property of the vc is accessed - that's when loading happens. There is no guarantee that the view is in a window at that time, and presenting a modal vc on a vc whose view is not in a window does not make sense. Perhaps viewDidAppear is what you were looking for. Or just use delayed performance. I use delayed performance a *lot*. Like whipped cream, it covers a multitude of sins. m. -- matt neuburg, phd = m...@tidbits.com, http://www.tidbits.com/matt/ pantes anthropoi tou eidenai oregontai phusei Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf AppleScript: the Definitive Guide, 2nd edition http://www.tidbits.com/matt/default.html#applescriptthings Take Control of Exploring Customizing Snow Leopard http://tinyurl.com/kufyy8 RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html TidBITS, Mac news and reviews since 1990, http://www.tidbits.com ___ 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.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSNotFound
On Jan 17, 2011, at 08:28, Sean McBride wrote: On Sat, 15 Jan 2011 18:51:52 +, Thomas Davie said: NSNotFound could have *any* value, and in fact its value could change from cocoa version to cocoa version. Stop looking! If they change it, they'll break binary compatibility with existing apps. So it won't be changing. (Which isn't a reason to bypass it, but...) Some further musings on this subject: Yes, in one sense the actual value should be irrelevant, but in fact when NSNotFound is a possible value of a scalar that's truly numeric (such as a count or an index) you really *do* need to know what NSNotFound is. For example, you have to be careful not to increment a numeric quantity into NSNotFound. In this kind of situation (e.g. the documentation says returns a NSUInteger value representing the index of the matching item, or NSNotFound if no match is found) the usable value range is really 0 .. NSNotFound-1. That imposes a practical limit on the number of items, which the developer needs to know. In a slightly larger, conceptual sense, this means that unless you want to obsess over the specifics of *every* frameworks parameter *every* time you use one, the *practical*, everyday-use range of NSUInteger is 0 .. NSIntegerMax, not 0 .. NSUIntegerMax. In 32-bit, that's a 2 Gig item limit, not 4 Gigs. FWIW ___ 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.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Question about split view
On Mon, 17 Jan 2011 07:09:01 -0500, Phillip Mills phillip.mil...@acm.org said: To my way of thinking, the problem is that there's no well-defined and now we're back notification In general the advent of multitasking seems to have caught the framework with its pants down (and the documentation even more so). But even without this, there are notifications missing, as you're pointing out here. This is of a piece with the other thread we were just having about knowing when the view loaded by a view controller has actually been placed into the interface. You often have to fudge and put up clumsy boolean flags to work out where you are, always filled with trepidation that the undocumented implementation details may change without notice. m. -- matt neuburg, phd = m...@tidbits.com, http://www.apeth.net/matt/ A fool + a tool + an autorelease pool = cool! AppleScript: the Definitive Guide - Second Edition! http://www.apeth.net/matt/default.html#applescriptthings___ 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.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Gestures
On Mon, 17 Jan 2011 09:53:26 -0700, koko k...@highrolls.net said: My shipping app is developed with 10.6.6 SDK. Some MacBook customers have asked for gesture support. Can I do this? I have had no luck finding a reference. So here we go again. I'll say RTFM: http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/EventOverview/HandlingTouchEvents/HandlingTouchEvents.html ... and you'll say you knew about this but you wanted to do it some other way. m. -- matt neuburg, phd = m...@tidbits.com, http://www.apeth.net/matt/ A fool + a tool + an autorelease pool = cool! AppleScript: the Definitive Guide - Second Edition! http://www.apeth.net/matt/default.html#applescriptthings___ 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.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: How to correctly load the bundle of a screen saver (was: How to change the product name with command line builds?)
On Jan 17, 2011, at 12:06 PM, Gabriel Zachmann wrote: On Jan 16, 2011, at 7:59 AM, Ken Thomases wrote: xcodebuild -target Foo -configuration Release build PRODUCT_NAME=Foo2 Thanks a lot for your response. You're welcome. The executable I am working on is a screen saver. My Info.plist looks like this: keyCFBundleName/key string${PRODUCT_NAME}/string keyCFBundleExecutable/key string${EXECUTABLE_NAME}/string keyCFBundleIdentifier/key stringde.zach.${PRODUCT_NAME:rfc1034identifier}/string In the final packages, the variables are correctly replaced by the correct executable names, i.e., Foo and Foo2. However, when I run the screen savers (in System Preferences), the name of my screen saver, i.e., the value of CFBundleName is the same, whichever screen saver I use. It happens to be the one of the screen saver that got started first in SystemPreferences. I think that System Preferences, since it's loading plug-ins, requires that your classes have unique names. Otherwise, when it loads the plug-ins, the names conflict in the Objective-C runtime. The CFBundleName is not really the same. It's just that the second screen saver loaded isn't really loaded. It's finding the classes of the first one. Here is how I load the bundle and determine the name of the screen saver running: NSBundle * bundle = [NSBundle bundleForClass:[self class]]; Yeah, again, you would need to unique-ify the class names for this to work. exec_name_ = [[bundle infoDictionary] objectForKey:@CFBundleName]; I tried NSBundle * bundle = [NSBundle mainBundle]; but that loads the bundle of SystemPreferences! That's expected. I was considering to use [NSBundle bundleWithIdentifier: @de.zach.Foo] but I can't hard-code the identifier, since I don't know which screensaver it will be. Is there something like preprocessor macro expansion in Obj-C? Something like @de.zach. ## PRODUCT_NAME (that is C++ syntax, where PRODUCT_NAME is a preprocessor token, which can be set on the command line of gcc). Does anyone know how to do this properly? You can configure the Preprocessor Macro Definitions build setting and base some of its values on other build settings. That can effectively import build settings into the source. By the way, the correct C syntax would be: @de.zach. #PRODUCT_NAME That is, you don't want token pasting, you want stringifying (and rely on the fact that C concatenates adjacent string literals). You _would_ want token pasting if you were to incorporate a macro into a class name. Regards, Ken ___ 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.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Gestures
On Jan 17, 2011, at 2:16 PM, Matt Neuburg wrote: On Mon, 17 Jan 2011 09:53:26 -0700, koko k...@highrolls.net said: My shipping app is developed with 10.6.6 SDK. Some MacBook customers have asked for gesture support. Can I do this? I have had no luck finding a reference. So here we go again. I'll say RTFM: http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/EventOverview/HandlingTouchEvents/HandlingTouchEvents.html This will be important for desktop Macs, too, if the Magic Trackpad becomes popular. I love my Magic Trackpad -- when it works. I have to shut down my Mac, crawl under the desk, unplug the power cord and all the USB cables, plug the power cord back in, restart from the power button, plug all the USB cables back in, and then log in, three times a day on average. The Magic Trackpad is a BlueTooth device, but Apple's engineers tell me this is the correct workaround for a firmware issue having to do with a USB conflict. When the Magic Trackpad stops working, iTunes stops recognizing my iPhone 4 in its USB charging cradle, and certain other USB devices go flaky. Apple is working on it -- Bill Cheeseman - b...@cheeseman.name ___ 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.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Gestures
No, I did not know about the reference you have supplied. Thanks. But, why such caustic remarks? I find you outside the spirit of Apple. Perhaps you would be more comfortable with Windows developers. -koko I was using On Jan 17, 2011, at 12:16 PM, Matt Neuburg wrote: On Mon, 17 Jan 2011 09:53:26 -0700, koko k...@highrolls.net said: My shipping app is developed with 10.6.6 SDK. Some MacBook customers have asked for gesture support. Can I do this? I have had no luck finding a reference. So here we go again. I'll say RTFM: http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/EventOverview/HandlingTouchEvents/HandlingTouchEvents.html ... and you'll say you knew about this but you wanted to do it some other way. m. -- matt neuburg, phd = m...@tidbits.com, http://www.apeth.net/matt/ A fool + a tool + an autorelease pool = cool! AppleScript: the Definitive Guide - Second Edition! http://www.apeth.net/matt/default.html#applescriptthings ___ 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.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Gestures
On Jan 17, 2011, at 11:45 AM, koko wrote: No, I did not know about the reference you have supplied Oh, sorry. But that reference appears you search for gesture, so of course I assumed you knew about it. So perhaps you didn't actually search? It's polite to search the documentation before asking a question; you might find the answer and save bandwidth. m. -- matt neuburg, phd = m...@tidbits.com, http://www.tidbits.com/matt/ pantes anthropoi tou eidenai oregontai phusei Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf AppleScript: the Definitive Guide, 2nd edition http://www.tidbits.com/matt/default.html#applescriptthings Take Control of Exploring Customizing Snow Leopard http://tinyurl.com/kufyy8 RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html TidBITS, Mac news and reviews since 1990, http://www.tidbits.com ___ 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.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: How to correctly load the bundle of a screen saver
I think that System Preferences, since it's loading plug-ins, requires that your classes have unique names. Otherwise, when it loads the plug-ins, the names conflict in the Objective-C runtime. Thanks a lot! I have found this error message in the syslog: Class ArtSaverView is implemented in both /Users/zach/Library/Screen Savers/Foo.saver/Contents/MacOS/Foo and /Users/zach/Library/Screen Savers/Foo2.saver/Contents/MacOS/Foo2. One of the two will be used. Which one is undefined. That explains a lot. I have changed my code -- the good news is that most of the time, it works now; the bad news is that occasionally it does not work! In the header file, I declare my class like this: #ifdef SECOND_FOOSAVER_VIEW #define FOOVIEW FooSaver2View #else #define FOOVIEW FooSaverView #endif @interface FOOVIEW : ScreenSaverView { ... where SECOND_FOOSAVER_VIEW is declared in Similarly, I refer only to FOOVIEW in FooView.m In the initWithFrame method of FOOVIEW, I retrieve the bundle and plug-in name like so: NSBundle * bundle = [NSBundle bundleForClass:[self class]]; exec_name_ = [[bundle infoDictionary] objectForKey:@CFBundleName]; NSLog(@execname = %@\n, exec_name_ ); Now, everything works fine *most of the time*: I can run SystemPreferences, there is no more error message in syslog, I can select the different screen savers, set different preferences, the screen savers store them in the correct files, etc. BUT occasionally, when I run SystemPreferences, both screen savers exhibit the same behavior, i.e., they loaded the same preferences! This is also reflected in the syslog, where both screen savers logged the same execname! How can that happen? Puzzled, Gabriel. 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 the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Get iphoto scripting bridge handle without starting iphoto?
On Mon, Jan 17, 2011 at 3:34 AM, Gabriel Zachmann z...@tu-clausthal.de wrote: I was just wondering who Mail.app does it with its photo browser ... Mail.app is an Apple app, so it's free to use whatever undocumented private stuff it wants. It probably uses the private iLife media browser framework. Which, in turn, uses the XML files produced by the iLife apps. --Kyle Sluder ___ 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.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Gestures
Thanks Matt. Due to my inexperience I was searching 'Track Pad Gestures which did not yield any developer docs just user info. But all good now and I will be adding gestures for zoom and rotate! -koko On Jan 17, 2011, at 1:14 PM, Matt Neuburg wrote: On Jan 17, 2011, at 11:45 AM, koko wrote: No, I did not know about the reference you have supplied Oh, sorry. But that reference appears you search for gesture, so of course I assumed you knew about it. So perhaps you didn't actually search? It's polite to search the documentation before asking a question; you might find the answer and save bandwidth. m. -- matt neuburg, phd = m...@tidbits.com, http://www.tidbits.com/matt/ pantes anthropoi tou eidenai oregontai phusei Among the 2007 MacTech Top 25, http://tinyurl.com/2rh4pf AppleScript: the Definitive Guide, 2nd edition http://www.tidbits.com/matt/default.html#applescriptthings Take Control of Exploring Customizing Snow Leopard http://tinyurl.com/kufyy8 RubyFrontier! http://www.apeth.com/RubyFrontierDocs/default.html TidBITS, Mac news and reviews since 1990, http://www.tidbits.com ___ 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.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
proper use of Core Data
I want to run this by you guys that do Core Data so I can see if my understanding for wanting to use it is valid. I have a file which I load into my application that contains columns of numbers separated by whitespace (each column is usually marked with titles like inputs, outputs, etc…). This is how the user imports data into my application. So I read in my ascii file, parse it, then I can somehow store this data in Core Data and use the data model as the model for my MVC's? Does that sound about right? I was also hoping this would simplify getting data into my views over the current way I do things. ___ 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.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: proper use of Core Data
On 18/01/2011, at 11:33 AM, Shane wrote: then I can somehow store this data Yes, but you need to work out the 'somehow', which given the description so far, is about 99% of the work. Start with your model - what is it? How that model starts off in terms of a list of numbers in a file is a trivial implementation detail. --Graham ___ 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.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSNotFound
On Jan 17, 2011, at 11:50 AM, Quincey Morris wrote: Yes, in one sense the actual value should be irrelevant, but in fact when NSNotFound is a possible value of a scalar that's truly numeric (such as a count or an index) you really *do* need to know what NSNotFound is. For example, you have to be careful not to increment a numeric quantity into NSNotFound. In this kind of situation (e.g. the documentation says returns a NSUInteger value representing the index of the matching item, or NSNotFound if no match is found) the usable value range is really 0 .. NSNotFound-1. That imposes a practical limit on the number of items, which the developer needs to know. In a slightly larger, conceptual sense, this means that unless you want to obsess over the specifics of *every* frameworks parameter *every* time you use one, the *practical*, everyday-use range of NSUInteger is 0 .. NSIntegerMax, not 0 .. NSUIntegerMax. In 32-bit, that's a 2 Gig item limit, not 4 Gigs. I have been implementing some code which interoperates with a NSArrayController subclass. Cognizance of the numeric value of the indexing boundary conditions was a coding requirement. I was almost on the right path but got confused with 32-bit/64-bit and NSInteger/ NSUInteger. Thanks for stating this with such clarity. --Richard Somers ___ 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.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: How to change the product name with command line builds?
On 14.01.2011, at 14:55, Gabriel Zachmann wrote: A little bit of background information might be in order. I am writing a screensaver. Now some users would like to run two different instances (i.e., executables) of it concurrently, because they've got two monitors, and, in addition, they want to set different preferences for each instance. So, my idea was to just compile the program twice, once under the name Foo and once under the name Foo2. The Screen Saver Engine will create two instances of your NSView, one for each screen (except when clicking Test in System Preferences). Why not just change your code to allow specifying different settings for each screen? You can find out what screens are available by enumerating over the NSScreens and, when loading a preference, appending the screen's number to each preference key. Or even just to the domain and explicitly specifying the domain whenever you load a preference. When a view is created, you can ask its window for its screen in -viewWillMoveToWindow: and load your preferences appropriately. I think in the long run, this will not only be the faster approach, it will also be much more elegant. You can provide a decent UI to your users (maybe with a popup menu to select what screen to configure for). Cheers, -- Uli Kusterer The Witnesses of TeachText are everywhere... http://www.lookandfeelcast.com ___ 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.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: NSNotFound
On 17.01.2011, at 19:50, Quincey Morris wrote: In a slightly larger, conceptual sense, this means that unless you want to obsess over the specifics of *every* frameworks parameter *every* time you use one, the *practical*, everyday-use range of NSUInteger is 0 .. NSIntegerMax, not 0 .. NSUIntegerMax. In 32-bit, that's a 2 Gig item limit, not 4 Gigs. Which is good to know if you want to use NSNotFound in your own classes, but largely irrelevant if it is an index into a collection of objects, like NSArray. Because in that case, just storing the pointers to these items in an array (which takes 4 bytes in 32-bit, 8 in 64-bit) already restricts the number of items to a value below NSIntegerMax. After all, you'd already run out of address space around NSIntegerMax / 2 (NSUIntegerMax / sizeof(id), i.e. NSUIntegerMax / 4). And since you need memory for system libraries, and for the NSArray and stored object(s) itself (it could be an array containing the same object over and over, though), plus a stack and general memory management overhead, you'll lose a few bytes more. Considering Apple's frameworks change size with each system release, I don't think there is a way to reliably calculate an upper limit. If your application is likely to even vaguely get near the ballpark of NSIntegerMax / 2, you should probably look into implementing a virtual memory-like mechanism that swaps in/out objects from disk as needed. -- Uli Kusterer Sole Janitor http://www.the-void-software.com ___ 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.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Anybody have problems with plist settings not getting into or being honored by phone app?
Hi all. I added a couple of settings to my iOS project's plist: app does not run in background and icon already has gloss effects. I noticed that they weren't being honored in the device builds, although they appeared to be honored in the simulator builds. First I found that Xcode created the simulator device targets to point to different plists: the original, and the -copy version. This explained why the two additional settings were missing from the plist in the device build. I deleted the copy and changed the device target to point to the same plist as the simulator target. Now the settings are being copied into the device-build plist, but they aren't being honored. Anybody have any idea as to why? I deleted the application from the phone before testing, by the way. Thanks! Gavin ___ 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.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com