How to set focus on NSMenu (make it get key events)?
Hi, I have a status menu with a NSSearchField and menu items. When search field is active and user presses up down arrows, I'd like to start menu tracking, that is that the user will be able to move with arrow keys between menu items. I can catch moveUp and moveDown selectors. How can I cause the menu to become a key responder? Thanks, Nava Nava Carmon ncar...@mac.com Think good and it will be good! ___ 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: Performance issue
On 26.08.2010, at 20:37, Ken Thomases wrote: Shark and most of the instruments in Instruments are statistical samplers, not exact function-call measurement. Also, Vijay already mentioned familiarity with Instruments. I am sorry, my mistake. I must have read instruments tool as something else the first time round. -- Uli Kusterer The Witnesses of TeachText are everywhere... http://www.masters-of-the-void.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: NSOpenPanel -setAllowedFileTypes
On 27.08.2010, at 02:00, k...@highrolls.net wrote: Our market (machine embroidery) realizes 29 file types. A customer may have a machine that recognizes 3 or 4 of these. Giving them the ability to filter file types from an open panel is quite reasonable and has nothing to do with their preference of Mac over Windows. A few usability suggestions (unrelated to the actual solving of the problem, which has happened elsewhere): 1) The typical choice for selecting among choices would be an NSPopUpButton. Menus on the Mac support type-ahead, so unless you *need* the user to be able to specify an arbitrary extension, a combo box is actually more work (as you'd have to reject useless extensions your app can't deal with). NSPopUpButton already does that. 2) Your design puts the onus on the user to decide what types their machine suggests. A design that is more kind to less technical users would be if your app queried what devices are attached, looked up in a table what types this device supports, and made the filter default to only accepting the types the machine supports. If users are likely to detach devices, you could at least remember the devices your app has seen and put them at the top of the menus. But really, just getting rid of the menu will remove a source of confusion. 3) Why reject any types of files? If the user has embroidery files, they probably want to embroider them on an attached machine. It'd be much nicer to your users, instead of forcing them to filter the files they can't have for a (for them) arbitrary reason, if you converted files to whatever type their machine supports best. -- Uli Kusterer The Witnesses of TeachText are everywhere... http://www.masters-of-the-void.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: NSOpenPanel -setAllowedFileTypes
On 27.08.2010, at 02:00, k...@highrolls.net wrote: Check this out and comment please http://highrolls.net/open_filter.png PS - What's with all the small controls? I'd be quite hard pressed to use this on a 27in iMac. You have enough room, so I'd recommend switching those back to normal. 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: How to set focus on NSMenu (make it get key events)?
On Aug 27, 2010, at 3:34 AM, Nava Carmon ncar...@mac.com wrote: Hi, I have a status menu with a NSSearchField and menu items. When search field is active and user presses up down arrows, I'd like to start menu tracking, that is that the user will be able to move with arrow keys between menu items. I can catch moveUp and moveDown selectors. How can I cause the menu to become a key responder? You've asked essentially the same question three times now in the past few days. In your first posting, you acknowledged that this topic has been discussed on the list recently and the conclusion was to not use NSMenu. Yet you do not want to heed this advice. There is simply no way to do what you want to do using NSMenu. You must use a custom borderless window. I'm sorry you started down the path of using NSMenu and must now throw out that code—it was a logical first step, and one that many others, including myself, have taken and encountered the same problems as you. But you cannot remain attached to your existing code. It will never do what you need, and therefore keeping it around has no value to you. Right now you are exhibiting what economists refer to as the sunk cost fallacy: you're concerned about the effort you've already invested in the NSMenu solution, when there's nothing you can do about that. What you need to be thinking about is what can come from continuing to invest additional effort into your current approach—the answer, of course, is nothing. --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: How to change name and location of core dump files
Thanks a lot Mark. I will try this and post the code :) -Parimal Das On Thu, Aug 26, 2010 at 10:27 PM, Mark Ritchie mark.ritc...@mac.com wrote: Hey! On 26/Aug/2010, at 7:29 AM, Parimal Das wrote: How i can change this core name to a more readable one, say core.myApp. Also can i change the default location of core generation?? Be careful as this is controlled system wide, not per process. ;-) And to be clear, I've not messed with this in a long long time so please try on a TEST system first! sysctl is what you're looking for: $ sysctl -a kern.corefile kern.corefile: /cores/core.%P From bsd/kern/kern_proc.c in xnu-1504.7.4 (OSX 10.6.4) /* * proc_core_name(name, uid, pid) * Expand the name described in corefilename, using name, uid, and pid. * corefilename is a printf-like string, with three format specifiers: * %N name of process (name) * %P process id (pid) * %U user id (uid) * For example, %N.core is the default; they can be disabled completely * by using /dev/null, or all core files can be stored in /cores/%U/%N-%P. * This is controlled by the sysctl variable kern.corefile (see above). */ Enjoy! M. -- -- Warm Regards, Parimal Das Webyog Softworks ___ 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
Odd question about UIViews in UIScrollView
I have a UIScrollView that I am placing custom UIViews into. Album covers with metadata. Right now just for testing, when I create the UIView to add to the scroll view, I am also setting an int variable in the UIView... AlbumCover *lad = [[AlbumCover alloc] initWithFrame:CGRectMake(190, 5, 200, 200)]; [lad setAlbumCover:@lad.jpg firstLine:@The Number of the Beast secondLine:@Live After Death thirdLine:@Iron Maiden isCurrent:NO index:1]; covers = [[AlbumCoverDisplay alloc] initWithFrame:CGRectMake(0, 50, 320, 300)]; [self.view addSubview:covers]; [covers addAlbum:test]; Inside each album cover UIView I have declared an int in the .h called myIndex. When the setAlbumCover method is called, I set myIndex = index. I am logging the int value (which I've declared in my .h interface as it's set by the method. These values are correct as I see them NSLogged. The trouble is inside each AlbumCover view, I have a touchesBegan method where I determine single or double touches. On a single I do: NSLog(@%d,myIndex); Sometimes its correct, and sometimes it's off by one (if it was supposed to be 0 it will log 1). So sometimes it's off by one (+). If I flip through views in the scroll view (pagination enabled), a view that was reporting correctly wlll report incorrectly when it comes back into view. This is not going to be my final implementation (I plan on doing this in a much better fashion), but wondering why. If I set tags the same way, they too seem to get off by 1 (I trace [self tag] from within the album cover itself and it can get screwed up too). Is this a noob error on my part (I assume that it is)? Google Voice: (508) 656-0622 Twitter: eric_dolecki XBoxLive: edolecki PSN: eric_dolecki http://blog.ericd.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
Re: Odd question about UIViews in UIScrollView
After further investigation and me turning background color on and alpha down, I seem to have overlapping album covers, thus the wonky index reporting. Sorry for the noise. Google Voice: (508) 656-0622 Twitter: eric_dolecki XBoxLive: edolecki PSN: eric_dolecki http://blog.ericd.net On Fri, Aug 27, 2010 at 9:23 AM, Eric E. Dolecki edole...@gmail.com wrote: I have a UIScrollView that I am placing custom UIViews into. Album covers with metadata. Right now just for testing, when I create the UIView to add to the scroll view, I am also setting an int variable in the UIView... AlbumCover *lad = [[AlbumCover alloc] initWithFrame:CGRectMake(190, 5, 200, 200)]; [lad setAlbumCover:@lad.jpg firstLine:@The Number of the Beast secondLine:@Live After Death thirdLine:@Iron Maiden isCurrent:NO index:1]; covers = [[AlbumCoverDisplay alloc] initWithFrame:CGRectMake(0, 50, 320, 300)]; [self.view addSubview:covers]; [covers addAlbum:test]; Inside each album cover UIView I have declared an int in the .h called myIndex. When the setAlbumCover method is called, I set myIndex = index. I am logging the int value (which I've declared in my .h interface as it's set by the method. These values are correct as I see them NSLogged. The trouble is inside each AlbumCover view, I have a touchesBegan method where I determine single or double touches. On a single I do: NSLog(@%d,myIndex); Sometimes its correct, and sometimes it's off by one (if it was supposed to be 0 it will log 1). So sometimes it's off by one (+). If I flip through views in the scroll view (pagination enabled), a view that was reporting correctly wlll report incorrectly when it comes back into view. This is not going to be my final implementation (I plan on doing this in a much better fashion), but wondering why. If I set tags the same way, they too seem to get off by 1 (I trace [self tag] from within the album cover itself and it can get screwed up too). Is this a noob error on my part (I assume that it is)? Google Voice: (508) 656-0622 Twitter: eric_dolecki XBoxLive: edolecki PSN: eric_dolecki http://blog.ericd.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
Re: Workaround for Symbol not found: _SCDynamicStoreCreate on 10.4?
Thanks a lot, Greg! The reordering workaround makes me feel funny inside, but it does appear to work. rdar://problem/8363909 has been filed. -Sidney On Tue, Aug 24, 2010 at 2:51 AM, Greg Parker gpar...@apple.com wrote: On Aug 23, 2010, at 12:46 PM, Greg Parker wrote: On Aug 23, 2010, at 12:20 PM, Sidney San Martín wrote: I'm developing for 10.4.11 and up, using -respondsToSelector: and NSClassFromString() to target different OSs at runtime, and it's gone super-smoothly so far. I just ran into an issue I can't figure out on my own. When I link to the System Configuration framework and IOKit, and target 10.4, calling some SystemConfiguration framework functions crashes my application with Symbol not found: _SCDynamicStoreCreate. This happens if I use any base SDK newer than 10.4, which is a bad thing for this project. This looks like a bug in the SDKs. I don't see the appropriate magic symbols that tell the linker the OS version when the function moved from IOKit to SystemConfiguration. You should file a bug report. You can use dlsym() to work around the problem. You can also be able to work around this by fiddling with the framework link order in your build. The problem is that you want the symbol from SystemConfiguration, but instead you're getting the symbol from IOKit. This dies on 10.4 because the symbol was not in IOKit then. If you can modify the link order so that SystemConfiguration comes before IOKit in the linker command, then the linker should choose the symbol from SystemConfiguration. To do this in Xcode: 1. Find your app in the Targets list on the left side of the project window. 2. Open the Link Binary With Libraries build phase. 3. Drag SystemConfiguration.framework to the top of the list. -- Greg Parker Runtime Wrangler ___ 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: Performance issue
On Fri, Aug 27, 2010 at 1:34 AM, Uli Kusterer witness.of.teacht...@gmx.net wrote: On 26.08.2010, at 20:37, Ken Thomases wrote: Shark and most of the instruments in Instruments are statistical samplers, not exact function-call measurement. Also, Vijay already mentioned familiarity with Instruments. I am sorry, my mistake. I must have read instruments tool as something else the first time round. Actually Instruments is more then just statistical samplers. Instruments can track actual events and even incorporate dtrace scripts/probes that track function calls, etc. http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/CreatingaCustomInstrument/CreatingaCustomInstrument.html ___ 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
Troubles with custom view inside NSScrollView
Dear list, I have a simple OS X app with custom view (controlsView) which contains lots of different controls. This controlsView has a fixed size, so I want to put it in the middle of a scrollview with a gap around it, so that its size is independent of the size of the application window. This scrollview will reside in the right pane of a splitview (if that matters). I have it more or less working but not very nicely. I can get the controlsView to remain fixed size and the scrollview does the right thing, but to do this I have to switch off autosizing for the custom view of the scrollview. This creates two problems: 1) my controlsView is pinned to the bottom left of the scrollview and I would like it at the top left 2) if I make the app window big enough, I can see the edges of the custom view that belongs to the scrollview. All of this tells me I'm doing something wrong. Anybody got any good pointers to any examples of such a layout? A picture speaks a thousand words, so it should look something like this: https://files.me.com/martinhewitson/06jf2e Best wishes, Martin Martin Hewitson Albert-Einstein-Institut Max-Planck-Institut fuer Gravitationsphysik und Universitaet Hannover Callinstr. 38, 30167 Hannover, Germany Tel: +49-511-762-17121, Fax: +49-511-762-5861 E-Mail: martin.hewit...@aei.mpg.de WWW: http://www.aei.mpg.de/~hewitson ___ 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
TARGET_OS_MAC section generates a compile error on an iPhone project?
Hello, I have code that's part of a framework and I'd like to port it to iOS. I tried isolating the code like so: // // RootViewController.m // iPhoneTest #import RootViewController.h @implementation RootViewController #pragma mark - #pragma mark View lifecycle - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; } - (NSUInteger)systemPageSize { static NSUInteger __sSystemPageSize = NSNotFound; #if TARGET_OS_MAC if (NSNotFound == __sSystemPageSize) { NSTask *task = [[NSTask alloc] init]; // do something here... [task release]; } #elif TARGET_OS_IPHONE // do something here... #endif return __sSystemPageSize; } When I compile the standard iPhone boilerplate app from Xcode I get the following error: /Users/tciuro/Desktop/iPhoneTest/Classes/RootViewController.m: In function '-[RootViewController systemPageSize]': /Users/tciuro/Desktop/iPhoneTest/Classes/RootViewController.m:23: error: 'NSTask' undeclared (first use in this function) /Users/tciuro/Desktop/iPhoneTest/Classes/RootViewController.m:23: error: (Each undeclared identifier is reported only once /Users/tciuro/Desktop/iPhoneTest/Classes/RootViewController.m:23: error: for each function it appears in.) /Users/tciuro/Desktop/iPhoneTest/Classes/RootViewController.m:23: error: 'task' undeclared (first use in this function) {standard input}:59:non-relocatable subtraction expression, L_OBJC_SELECTOR_REFERENCES_0 minus L001$pb {standard input}:59:symbol: L_OBJC_SELECTOR_REFERENCES_0 can't be undefined in a subtraction expression {standard input}:54:non-relocatable subtraction expression, L_OBJC_CLASSLIST_SUP_REFS_$_0 minus L001$pb {standard input}:54:symbol: L_OBJC_CLASSLIST_SUP_REFS_$_0 can't be undefined in a subtraction expression {standard input}:unknown:Undefined local symbol L_OBJC_CLASSLIST_SUP_REFS_$_0 {standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_0 I know NSTask doesn't exist on iOS, so I was hoping to implement the method that would work for both Mac and iOS by specifying TARGET_OS_MAC and TARGET_OS_IPHONE. What am I missing? Thanks, -- Tito ___ 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: TARGET_OS_MAC section generates a compile error on an iPhone project?
Read this: http://sealiesoftware.com/blog/archive/2010/8/16/TargetConditionalsh.html --Kyle Sluder (Sent from the road) On Aug 27, 2010, at 1:47 PM, Tito Ciuro tci...@mac.com wrote: Hello, I have code that's part of a framework and I'd like to port it to iOS. I tried isolating the code like so: // // RootViewController.m // iPhoneTest #import RootViewController.h @implementation RootViewController #pragma mark - #pragma mark View lifecycle - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; } - (NSUInteger)systemPageSize { static NSUInteger __sSystemPageSize = NSNotFound; #if TARGET_OS_MAC if (NSNotFound == __sSystemPageSize) { NSTask *task = [[NSTask alloc] init]; // do something here... [task release]; } #elif TARGET_OS_IPHONE // do something here... #endif return __sSystemPageSize; } When I compile the standard iPhone boilerplate app from Xcode I get the following error: /Users/tciuro/Desktop/iPhoneTest/Classes/RootViewController.m: In function '-[RootViewController systemPageSize]': /Users/tciuro/Desktop/iPhoneTest/Classes/RootViewController.m:23: error: 'NSTask' undeclared (first use in this function) /Users/tciuro/Desktop/iPhoneTest/Classes/RootViewController.m:23: error: (Each undeclared identifier is reported only once /Users/tciuro/Desktop/iPhoneTest/Classes/RootViewController.m:23: error: for each function it appears in.) /Users/tciuro/Desktop/iPhoneTest/Classes/RootViewController.m:23: error: 'task' undeclared (first use in this function) {standard input}:59:non-relocatable subtraction expression, L_OBJC_SELECTOR_REFERENCES_0 minus L001$pb {standard input}:59:symbol: L_OBJC_SELECTOR_REFERENCES_0 can't be undefined in a subtraction expression {standard input}:54:non-relocatable subtraction expression, L_OBJC_CLASSLIST_SUP_REFS_$_0 minus L001$pb {standard input}:54:symbol: L_OBJC_CLASSLIST_SUP_REFS_$_0 can't be undefined in a subtraction expression {standard input}:unknown:Undefined local symbol L_OBJC_CLASSLIST_SUP_REFS_$_0 {standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_0 I know NSTask doesn't exist on iOS, so I was hoping to implement the method that would work for both Mac and iOS by specifying TARGET_OS_MAC and TARGET_OS_IPHONE. What am I missing? Thanks, -- Tito ___ 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/kyle.sluder%40gmail.com This email sent to kyle.slu...@gmail.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: TARGET_OS_MAC section generates a compile error on an iPhone project?
On Aug 27, 2010, at 10:47 AM, Tito Ciuro wrote: - (NSUInteger)systemPageSize { static NSUInteger __sSystemPageSize = NSNotFound; #if TARGET_OS_MAC if (NSNotFound == __sSystemPageSize) { NSTask *task = [[NSTask alloc] init]; // do something here... [task release]; } #elif TARGET_OS_IPHONE // do something here... #endif return __sSystemPageSize; } There is no reason to use NSTask for this on the desktop. Just call getpagesize() on either platform. -- David Duncan ___ 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: TARGET_OS_MAC section generates a compile error on an iPhone project?
Excellent! Thanks Kyle! -- Tito On 27/08/2010, at 14:02, Kyle Sluder wrote: Read this: http://sealiesoftware.com/blog/archive/2010/8/16/TargetConditionalsh.html --Kyle Sluder (Sent from the road) On Aug 27, 2010, at 1:47 PM, Tito Ciuro tci...@mac.com wrote: Hello, I have code that's part of a framework and I'd like to port it to iOS. I tried isolating the code like so: // // RootViewController.m // iPhoneTest #import RootViewController.h @implementation RootViewController #pragma mark - #pragma mark View lifecycle - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; } - (NSUInteger)systemPageSize { static NSUInteger __sSystemPageSize = NSNotFound; #if TARGET_OS_MAC if (NSNotFound == __sSystemPageSize) { NSTask *task = [[NSTask alloc] init]; // do something here... [task release]; } #elif TARGET_OS_IPHONE // do something here... #endif return __sSystemPageSize; } When I compile the standard iPhone boilerplate app from Xcode I get the following error: /Users/tciuro/Desktop/iPhoneTest/Classes/RootViewController.m: In function '-[RootViewController systemPageSize]': /Users/tciuro/Desktop/iPhoneTest/Classes/RootViewController.m:23: error: 'NSTask' undeclared (first use in this function) /Users/tciuro/Desktop/iPhoneTest/Classes/RootViewController.m:23: error: (Each undeclared identifier is reported only once /Users/tciuro/Desktop/iPhoneTest/Classes/RootViewController.m:23: error: for each function it appears in.) /Users/tciuro/Desktop/iPhoneTest/Classes/RootViewController.m:23: error: 'task' undeclared (first use in this function) {standard input}:59:non-relocatable subtraction expression, L_OBJC_SELECTOR_REFERENCES_0 minus L001$pb {standard input}:59:symbol: L_OBJC_SELECTOR_REFERENCES_0 can't be undefined in a subtraction expression {standard input}:54:non-relocatable subtraction expression, L_OBJC_CLASSLIST_SUP_REFS_$_0 minus L001$pb {standard input}:54:symbol: L_OBJC_CLASSLIST_SUP_REFS_$_0 can't be undefined in a subtraction expression {standard input}:unknown:Undefined local symbol L_OBJC_CLASSLIST_SUP_REFS_$_0 {standard input}:unknown:Undefined local symbol L_OBJC_SELECTOR_REFERENCES_0 I know NSTask doesn't exist on iOS, so I was hoping to implement the method that would work for both Mac and iOS by specifying TARGET_OS_MAC and TARGET_OS_IPHONE. What am I missing? Thanks, -- Tito ___ 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/kyle.sluder%40gmail.com This email sent to kyle.slu...@gmail.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: TARGET_OS_MAC section generates a compile error on an iPhone project?
On 27/08/2010, at 14:05, David Duncan wrote: On Aug 27, 2010, at 10:47 AM, Tito Ciuro wrote: - (NSUInteger)systemPageSize { static NSUInteger __sSystemPageSize = NSNotFound; #if TARGET_OS_MAC if (NSNotFound == __sSystemPageSize) { NSTask *task = [[NSTask alloc] init]; // do something here... [task release]; } #elif TARGET_OS_IPHONE // do something here... #endif return __sSystemPageSize; } There is no reason to use NSTask for this on the desktop. Just call getpagesize() on either platform. -- David Duncan Great to know. I'll update the code right away. Thanks Duncan, -- Tito ___ 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
Changing tabview tab order with IB 3.2.3
In the old IB, at least at version 3.1.2, it was possible to re-order tabs in a tab view by clicking a tab and then using the left and right arrow keys move that tab in the order. But with IB 3.2.3, the arrow keys just change which tab is selected (eg the left arrow key will deselect the current tab and select the tab immediately to the left). I have tried the usual easter eggs, such as holding down Alt while selecting the tab or when hitting the arrow keys. So far no luck. Does anyone know how to re-order tabview tabs in the current IB? thanks ___ 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
Transparant button click
Hi, What would be the best way to create a button with a partially transparent image on a nsview that would only respond to mouse clicks that are on the non-transparent part of the image ? Thanks ! -- Erik Colson___ 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