Can't keep disabled UIBarButtonItem text white

2013-07-10 Thread Rick Mann
I have some UIBarButtonItems in a toolbar showing some app status. They're 
disabled, because there's no action if you tap, but I want them to appear 
white, so I set the disabled color to white.

One of these, and some other image items (that are also disabled) are hidden 
and shown depending on the app state. I use -setItems:animated: to do this. 
When I do, I see them flash white, then dim to the disabled color.

Is this a bug? Is there a workaround?

Thanks,

-- 
Rick




___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Dynamically change file name extension in NSSavePanel when extension is hidden

2013-07-10 Thread Antonio Nunes
Hi,

I show an NSSavePanel that offers the option to hide the file extension. It 
also offers the user to switch between saving .txt and .rtf formats.

When the user changes the format, the following code is run:

- (IBAction)formatForTextExportChanged:(id)sender
{
self.textExportFormat = [sender indexOfSelectedItem];

NSString *path = 
self.currentSavePanel.nameFieldStringValue.stringByDeletingPathExtension;

switch (self.textExportFormat) {
case 0:
path = [path stringByAppendingPathExtension:@txt];
break;
case 1:
path = [path stringByAppendingPathExtension:@rtf];
break;
}

self.currentSavePanel.nameFieldStringValue = path;

[[NSUserDefaults standardUserDefaults] setValue:[NSNumber 
numberWithInteger:self.textExportFormat]

 forKey:ANTextExportFormatKey];
}

This works fine when the extension is being shown. However, when the extension 
is not shown, although the code appears to work while in the panel, when the 
panel is dismissed, the URL returned has the extension of the original format. 
How do I ensure the URL returned b the save panel ends on the user selected 
choice, even when the extension is hidden? I can't directly set the save 
panel's URL since it is read only. SInce the app is snadboxed, I need the save 
panel to return the correct URL, otherwise we later don't have permission to 
write to the URL, if I change it afterwards.

-António


There is a world of difference between
searching for happiness and choosing
to be happy.





___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Bundle Identifiers - and application support directory

2013-07-10 Thread Peter Hudson
I am trying to create an application support directory for my app ( on 10.8.3 )

I am using this piece of example code ( from the docs ) :-



NSString* bundleID = [[NSBundle mainBundle] bundleIdentifier];
NSFileManager*fm = [NSFileManager defaultManager];
NSURL*dirPath = nil;

// Find the application support directory in the home directory.
NSArray* appSupportDir = [fm URLsForDirectory:NSApplicationSupportDirectory
inDomains:NSUserDomainMask];
if ([appSupportDir count]  0)
{
// Append the bundle ID to the URL for the
// Application Support directory
dirPath = [[appSupportDir objectAtIndex:0] 
URLByAppendingPathComponent:bundleID];

// If the directory does not exist, this method creates it.
// This method call works in OS X 10.7 and later only.
NSError*theError = nil;
if (![fm createDirectoryAtURL:dirPath withIntermediateDirectories:YES
   attributes:nil error:theError])
{
// Handle the error.
}
}


When I run the code,  bundleID  is nil.  
Is there something that I have to do to give my bundle an ID ?
I have checked the methods of NSBundle ( and NSBundle docs generally ) but 
cannot see anything that looks promising.


Ultimately, I need to store some user modifiable files - 
I am assuming that   NSApplicationSupportDirectory  is the correct place to do 
this.


Peter






___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Dynamically change file name extension in NSSavePanel when extension is hidden

2013-07-10 Thread Antonio Nunes
Looks like I've found a workaround:

- (IBAction)formatForTextExportChanged:(id)sender
{
self.textExportFormat = [sender indexOfSelectedItem];

NSString *path = 
self.currentSavePanel.nameFieldStringValue.stringByDeletingPathExtension;

switch (self.textExportFormat) {
case 0:
path = [path stringByAppendingPathExtension:@txt];
self.currentSavePanel.allowedFileTypes = @[@txt];
break;
case 1:
path = [path stringByAppendingPathExtension:@rtf];
self.currentSavePanel.allowedFileTypes = @[@rtf];
break;
}

self.currentSavePanel.nameFieldStringValue = path;

[[NSUserDefaults standardUserDefaults] setValue:[NSNumber 
numberWithInteger:self.textExportFormat]

 forKey:ANTextExportFormatKey];
}

By setting the desired file type as the only allowable, the save panel now also 
returns the correct file extension, even if the user chose to hide the 
extension. If there is a better solution, please tell.

-António

On 10 Jul, 2013, at 10:47 , Antonio Nunes devli...@sintraworks.com wrote:

 Hi,
 
 I show an NSSavePanel that offers the option to hide the file extension. It 
 also offers the user to switch between saving .txt and .rtf formats.
 
 When the user changes the format, the following code is run:
 
 - (IBAction)formatForTextExportChanged:(id)sender
 {
self.textExportFormat = [sender indexOfSelectedItem];
 
NSString *path = 
 self.currentSavePanel.nameFieldStringValue.stringByDeletingPathExtension;
 
switch (self.textExportFormat) {
case 0:
path = [path stringByAppendingPathExtension:@txt];
break;
case 1:
path = [path stringByAppendingPathExtension:@rtf];
break;
}
 
self.currentSavePanel.nameFieldStringValue = path;
 
[[NSUserDefaults standardUserDefaults] setValue:[NSNumber 
 numberWithInteger:self.textExportFormat]
   
  forKey:ANTextExportFormatKey];
 }
 
 This works fine when the extension is being shown. However, when the 
 extension is not shown, although the code appears to work while in the panel, 
 when the panel is dismissed, the URL returned has the extension of the 
 original format. How do I ensure the URL returned b the save panel ends on 
 the user selected choice, even when the extension is hidden? I can't directly 
 set the save panel's URL since it is read only. SInce the app is snadboxed, I 
 need the save panel to return the correct URL, otherwise we later don't have 
 permission to write to the URL, if I change it afterwards.
 
 -António
 
 
 There is a world of difference between
 searching for happiness and choosing
 to be happy.
 
 
 
 
 
 ___
 
 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:
 https://lists.apple.com/mailman/options/cocoa-dev/devlists%40sintraworks.com
 
 This email sent to devli...@sintraworks.com

-
Perfume is the forgiveness
that the trampled flower casts
upon the heel that crushes it.
-




___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Bundle Identifiers - and application support directory

2013-07-10 Thread Mike Abdullah

On 10 Jul 2013, at 11:25, Peter Hudson peter.hud...@me.com wrote:

 I am trying to create an application support directory for my app ( on 10.8.3 
 )
 
 I am using this piece of example code ( from the docs ) :-
 
 
 
 NSString* bundleID = [[NSBundle mainBundle] bundleIdentifier];
NSFileManager*fm = [NSFileManager defaultManager];
NSURL*dirPath = nil;
 
// Find the application support directory in the home directory.
NSArray* appSupportDir = [fm URLsForDirectory:NSApplicationSupportDirectory
inDomains:NSUserDomainMask];
if ([appSupportDir count]  0)
{
// Append the bundle ID to the URL for the
// Application Support directory
dirPath = [[appSupportDir objectAtIndex:0] 
 URLByAppendingPathComponent:bundleID];
 
// If the directory does not exist, this method creates it.
// This method call works in OS X 10.7 and later only.
NSError*theError = nil;
if (![fm createDirectoryAtURL:dirPath withIntermediateDirectories:YES
   attributes:nil error:theError])
{
// Handle the error.
}
}
 
 
 When I run the code,  bundleID  is nil.  
 Is there something that I have to do to give my bundle an ID ?
 I have checked the methods of NSBundle ( and NSBundle docs generally ) but 
 cannot see anything that looks promising.

The bundle ID is set in your app's Info.plist. I'm surprised that Xcode will 
even let you build an app without one though.


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

How to prevent UITableView from scrolling when inserting in CoreData?

2013-07-10 Thread Laurent Daudelin
Hello.

I have a UITableView and a NSFetchedResultsController. I’ve implemented to 
NSFetchedResultsController delegate methods in my custom controller object. The 
problem I have is when I receive data from the server and store it in the 
CoreData database, if the current sort makes the inserted rows appear above the 
currently visible row, the tableview will scroll down, which is quite annoying.

Is there any way to prevent this?

Thanks for any pointer, info or help!

-Laurent.
-- 
Laurent Daudelin
AIM/iChat/Skype:LaurentDaudelin 
http://www.nemesys-soft.com/
Logiciels Nemesys Software  
laur...@nemesys-soft.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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Bundle Identifiers - and application support directory

2013-07-10 Thread Peter Hudson
Thanks Mike.  I have now set an ID for my bundle and it is feeding through 
happily.

Now I can set an ID,  the docs suggest the format 
com.companyDomainName.appName   for the directory name in Application Support.
I notice that very few other applications use this format - they tend to use 
just the name of the app.

Is there a good reason to follow the suggested naming convention ?

Peter



On 10 Jul 2013, at 14:33, Mike Abdullah mabdul...@karelia.com wrote:

 
 On 10 Jul 2013, at 11:25, Peter Hudson peter.hud...@me.com wrote:
 
 I am trying to create an application support directory for my app ( on 
 10.8.3 )
 
 I am using this piece of example code ( from the docs ) :-
 
 
 
 NSString* bundleID = [[NSBundle mainBundle] bundleIdentifier];
   NSFileManager*fm = [NSFileManager defaultManager];
   NSURL*dirPath = nil;
 
   // Find the application support directory in the home directory.
   NSArray* appSupportDir = [fm URLsForDirectory:NSApplicationSupportDirectory
   inDomains:NSUserDomainMask];
   if ([appSupportDir count]  0)
   {
   // Append the bundle ID to the URL for the
   // Application Support directory
   dirPath = [[appSupportDir objectAtIndex:0] 
 URLByAppendingPathComponent:bundleID];
 
   // If the directory does not exist, this method creates it.
   // This method call works in OS X 10.7 and later only.
   NSError*theError = nil;
   if (![fm createDirectoryAtURL:dirPath withIntermediateDirectories:YES
  attributes:nil error:theError])
   {
   // Handle the error.
   }
   }
 
 
 When I run the code,  bundleID  is nil.  
 Is there something that I have to do to give my bundle an ID ?
 I have checked the methods of NSBundle ( and NSBundle docs generally ) but 
 cannot see anything that looks promising.
 
 The bundle ID is set in your app's Info.plist. I'm surprised that Xcode will 
 even let you build an app without one though.
 


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Bundle Identifiers - and application support directory

2013-07-10 Thread Mike Abdullah

On 10 Jul 2013, at 15:01, Peter Hudson peter.hud...@me.com wrote:

 Thanks Mike.  I have now set an ID for my bundle and it is feeding through 
 happily.
 
 Now I can set an ID,  the docs suggest the format 
 com.companyDomainName.appName   for the directory name in Application Support.
 I notice that very few other applications use this format - they tend to use 
 just the name of the app.

Really? In my experience pretty much everything uses the correct format.
 
 Is there a good reason to follow the suggested naming convention ?

1) It removes the chance of two apps conflicting for the same name
2) I'm pretty certain Apple won't approve you for the app store without 
conforming to the rules


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Bundle Identifiers - and application support directory

2013-07-10 Thread Scott Ribe
On Jul 10, 2013, at 8:27 AM, Mike Abdullah wrote:

 On 10 Jul 2013, at 15:01, Peter Hudson peter.hud...@me.com wrote:
 
 Now I can set an ID,  the docs suggest the format 
 com.companyDomainName.appName   for the directory name in Application 
 Support.
 I notice that very few other applications use this format - they tend to use 
 just the name of the app.
 
 Really? In my experience pretty much everything uses the correct format.

Nope, not even close. Here's mine for reference:

1Password   DMG Canvas  Logitech
Remote Desktop  TurboTax
A Better Finder Rename 8DVD Player  MacHg   
RipIt   TurboTax 2012
Acorn   DashMacSQL  
Roxio   Ubiquity
AddressBook DashcodeMactracker  
SEIntelligence  Unison 2
Adobe   Developer   Microsoft   
SMART Utility   VMware Fusion
Aladdin DockMindVision 
DownloadsSMARTReporter   Versions
ApertureDragThing   MobileSync  
SMARTReporter.log   XRay Plugins
AppStoreFile Buddy  Mozilla 
SQLEditor   Xcode
Apple   FileXaminer Multiplex   
SQLGrinder  Yahoo! Sync
Application Loader  Firefox Net Monitor 
Sandvox com.apple.QuickLook
AquaMinds   FullCircle  NetNewsWire 
Screen Sharing  com.apple.TCC
Audio Recorder 3.0 Scripts  GarageBand  NiXPS   
Seasonality com.elevated-dev.teamfile
Automator   Gitbox  NoteBook
Shark   com.intuit.TurboTax.2012
Azureus Google  
NotificationCenter  ShoveBox
com.mactrackerapp.Mactracker
BBEdit  Google EarthOmni Group  
Skype   com.nanotalons.iconfinder.plist
BBEdit Backups  Google SketchUp 6   OmniOutliner 3  
Soulver com.sribe.pedcard
Backup  Google Video Player OmniWeb 5   
SourceTree  eSellerate
BeLight SoftwareGraphicConverterOsiriX  
SpamSieve   eSuite4X
BitTorrent  Growl   PCalc   
Spell Catcher   iCal
CSSEdit IOXpertsPDFpen  
SubRosaSoft iLifeMediaBrowser
ChronoSync  ITunesSoftwareService   PDFpenPro   
SuperDuper! iLifePageLayout
Clarify Instruments PDFshrink 2 
SyncServicesiPhone Simulator
CocoaPacketAnalyzer Interarchy  PGnJ
TerminaliSQL-Viewer
Console Interface Builder 3.0   PlistEdit Pro   
Tinderbox   iWeb
Core Image Fun HouseKodak EasyShare Preview 
TinkerTool  iWork
Cornerstone L8457789100 Project Builder 
TorusKnotSoftware   ilexsoft
CrashReporter   LaunchCodes Quartz Composer 
Transmission
DEVONthink  Little Snitch   RapidWeaver 
TrueCrypt

-- 
Scott Ribe
scott_r...@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice





___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Bundle Identifiers - and application support directory

2013-07-10 Thread Scott Ribe
On Jul 10, 2013, at 8:58 AM, Peter Hudson wrote:

 Bearing in mind that we do not sell on the app store ( and its unlikely we 
 ever will )  does anyone know the rationale behind the 
 documented way of specifying the directory name and the obvious disparity 
 with real life ?

No. Maybe a holdover from the days before bundles and bundle identifiers???

 Is there a good reason for the documented way of doing this ?

Well, I think so. App names can be localized, can be changed by the user, might 
even be changed by the publisher (pro 3.0), can be subject to conflict from 
dummies who put an app out without checking to see if the name is already 
used... But bundle identifiers in theory stay the same, and if specified 
properly are unique, and can always correspond to the app no matter what you or 
anyone else does to the app's name.

Too bad *APPLE* chooses to set such a sloppy example...

-- 
Scott Ribe
scott_r...@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice





___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Bundle Identifiers - and application support directory

2013-07-10 Thread Peter Hudson
Thanks Scott.
That opens up some interesting possibilities for managing the development of 
the app going forward.
As you say, shame Apple sets such a sloppy example.

Peter



On 10 Jul 2013, at 16:04, Scott Ribe scott_r...@elevated-dev.com wrote:

 On Jul 10, 2013, at 8:58 AM, Peter Hudson wrote:
 
 Bearing in mind that we do not sell on the app store ( and its unlikely we 
 ever will )  does anyone know the rationale behind the 
 documented way of specifying the directory name and the obvious disparity 
 with real life ?
 
 No. Maybe a holdover from the days before bundles and bundle identifiers???
 
 Is there a good reason for the documented way of doing this ?
 
 Well, I think so. App names can be localized, can be changed by the user, 
 might even be changed by the publisher (pro 3.0), can be subject to 
 conflict from dummies who put an app out without checking to see if the name 
 is already used... But bundle identifiers in theory stay the same, and if 
 specified properly are unique, and can always correspond to the app no matter 
 what you or anyone else does to the app's name.
 
 Too bad *APPLE* chooses to set such a sloppy example...
 
 -- 
 Scott Ribe
 scott_r...@elevated-dev.com
 http://www.elevated-dev.com/
 (303) 722-0567 voice
 
 
 
 


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Bundle Identifiers - and application support directory

2013-07-10 Thread Giacomo Tufano
Il giorno 10/lug/2013, alle ore 16:43, Scott Ribe scott_r...@elevated-dev.com 
ha scritto:

 Nope, not even close. Here's mine for reference:
 
 1Password DMG Canvas  Logitech
 Remote Desktop  TurboTax
 […]

Scott, my observations do not agree with yours…

I get BundleIDs for apps from an app of mine via the NSRunningApplication 
bundleIdentifier property and, to be honest, I ever get correctly formed bundle 
identifiers.

As example I get, from your list (for the app I have) I get:
1Password: ws.agile.1Password
Acorn: com.flyingmeat.Acorn4
AddressBook: com.apple.AddressBook
Aperture: com.apple.Aperture
Fusion: com.vmware.fusion
Microsoft Word: com.microsoft.Word
Apple Pages: com.apple.iWork.Pages.

I *think* this property comes from the bundle id (at least, it comes from 
bundle id for my applications) so I deduce the convention is usually followed…

Ciao,
gt

---
Giacomo Tufano
http://www.ilTofa.com/

Ever tried. Ever failed. No matter. Try again. Fail again. Fail better. (S. 
Beckett)


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Can't keep disabled UIBarButtonItem text white

2013-07-10 Thread Rick Aurbach
Rick,

I haven't tried this, so I don't know whether it will work, but…

have you tried leaving the buttons enabled but disabling user interaction for 
them? Of course, if that works then it leaves open the larger question of 
whether your UI goals are best served by displaying buttons that can't be 
pushed...

 I have some UIBarButtonItems in a toolbar showing some app status. They're 
 disabled, because there's no action if you tap, but I want them to appear 
 white, so I set the disabled color to white.
 
 One of these, and some other image items (that are also disabled) are hidden 
 and shown depending on the app state. I use -setItems:animated: to do this. 
 When I do, I see them flash white, then dim to the disabled color.
 
 Is this a bug? Is there a workaround?
 
 Thanks,
 
 --
 Rick

Cheers,

Rick Aurbach
Aurbach  Associates, Inc.

___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Bundle Identifiers - and application support directory

2013-07-10 Thread Scott Ribe
On Jul 10, 2013, at 9:26 AM, Giacomo Tufano wrote:

 Scott, my observations do not agree with yours…
 
 I get BundleIDs for apps from an app of mine via the NSRunningApplication 
 bundleIdentifier property and, to be honest, I ever get correctly formed 
 bundle identifiers.
 
 As example I get, from your list (for the app I have) I get:
 1Password: ws.agile.1Password
 Acorn: com.flyingmeat.Acorn4
 AddressBook: com.apple.AddressBook
 Aperture: com.apple.Aperture
 Fusion: com.vmware.fusion
 Microsoft Word: com.microsoft.Word
 Apple Pages: com.apple.iWork.Pages.
 
 I *think* this property comes from the bundle id (at least, it comes from 
 bundle id for my applications) so I deduce the convention is usually followed…

The convention that we're talking about is that the apps' directories in 
Application Support should be named by bundle identifier, not by application 
name. The list that I provided was the result of ls Application\ Support, so as 
you can see the convention of using bundle identifiers is generally not 
followed.

-- 
Scott Ribe
scott_r...@elevated-dev.com
http://www.elevated-dev.com/
(303) 722-0567 voice





___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Bundle Identifiers - and application support directory

2013-07-10 Thread Giacomo Tufano
Il giorno 10/lug/2013, alle ore 17:43, Scott Ribe scott_r...@elevated-dev.com 
ha scritto:

 On Jul 10, 2013, at 9:26 AM, Giacomo Tufano wrote:
 
 Scott, my observations do not agree with yours…
 I *think* this property comes from the bundle id (at least, it comes from 
 bundle id for my applications) so I deduce the convention is usually 
 followed…
 
 The convention that we're talking about is that the apps' directories in 
 Application Support should be named by bundle identifier, not by application 
 name. The list that I provided was the result of ls Application\ Support, so 
 as you can see the convention of using bundle identifiers is generally not 
 followed.

Oh. I misunderstood... Sorry for the noise. :)


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Bundle Identifiers - and application support directory

2013-07-10 Thread Steve Mills
On Jul 10, 2013, at 10:26:22, Giacomo Tufano g...@iltofa.com wrote:

 Il giorno 10/lug/2013, alle ore 16:43, Scott Ribe 
 scott_r...@elevated-dev.com ha scritto:
 
 Nope, not even close. Here's mine for reference:
 
 1PasswordDMG Canvas  Logitech
 Remote Desktop  TurboTax
 […]
 
 Scott, my observations do not agree with yours…
 
 I get BundleIDs for apps from an app of mine via the NSRunningApplication 
 bundleIdentifier property and, to be honest, I ever get correctly formed 
 bundle identifiers.
 
 As example I get, from your list (for the app I have) I get:
 1Password: ws.agile.1Password
 Acorn: com.flyingmeat.Acorn4

One of you is talking about bundle identifiers and one of you is talking about 
the folder name. Somebody didn't read the full question.

--
Steve Mills
office: 952-818-3871
home: 952-401-6255
cell: 612-803-6157



___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Bundle Identifiers - and application support directory

2013-07-10 Thread Mike Abdullah

On 10 Jul 2013, at 15:43, Scott Ribe scott_r...@elevated-dev.com wrote:

 On Jul 10, 2013, at 8:27 AM, Mike Abdullah wrote:
 
 On 10 Jul 2013, at 15:01, Peter Hudson peter.hud...@me.com wrote:
 
 Now I can set an ID,  the docs suggest the format 
 com.companyDomainName.appName   for the directory name in Application 
 Support.
 I notice that very few other applications use this format - they tend to 
 use just the name of the app.
 
 Really? In my experience pretty much everything uses the correct format.
 
 Nope, not even close. Here's mine for reference:
 
 1Password DMG Canvas  Logitech
 Remote Desktop  TurboTax
 A Better Finder Rename 8  DVD Player  MacHg   
 RipIt   TurboTax 2012
 Acorn DashMacSQL  
 Roxio   Ubiquity
 AddressBook   DashcodeMactracker  
 SEIntelligence  Unison 2
 Adobe Developer   Microsoft   
 SMART Utility   VMware Fusion
 Aladdin   Dock
 MindVision DownloadsSMARTReporter   Versions
 Aperture  DragThing   MobileSync  
 SMARTReporter.log   XRay Plugins
 AppStore  File Buddy  Mozilla 
 SQLEditor   Xcode
 Apple FileXaminer Multiplex   
 SQLGrinder  Yahoo! Sync
 Application LoaderFirefox Net Monitor 
 Sandvox com.apple.QuickLook
 AquaMinds FullCircle  NetNewsWire 
 Screen Sharing  com.apple.TCC
 Audio Recorder 3.0 ScriptsGarageBand  NiXPS   
 Seasonality com.elevated-dev.teamfile
 Automator Gitbox  NoteBook
 Shark   com.intuit.TurboTax.2012
 Azureus   Google  
 NotificationCenter  ShoveBox
 com.mactrackerapp.Mactracker
 BBEditGoogle EarthOmni 
 Group  Skype   
 com.nanotalons.iconfinder.plist
 BBEdit BackupsGoogle SketchUp 6   
 OmniOutliner 3  Soulver 
 com.sribe.pedcard
 BackupGoogle Video Player OmniWeb 
 5   SourceTree  eSellerate
 BeLight Software  GraphicConverterOsiriX  
 SpamSieve   eSuite4X
 BitTorrentGrowl   PCalc   
 Spell Catcher   iCal
 CSSEdit   IOXpertsPDFpen  
 SubRosaSoft iLifeMediaBrowser
 ChronoSyncITunesSoftwareService   PDFpenPro   
 SuperDuper! iLifePageLayout
 Clarify   Instruments 
 PDFshrink 2 SyncServicesiPhone 
 Simulator
 CocoaPacketAnalyzer   Interarchy  PGnJ
 TerminaliSQL-Viewer
 Console   Interface Builder 3.0   
 PlistEdit Pro   Tinderbox   iWeb
 Core Image Fun House  Kodak EasyShare Preview 
 TinkerTool  iWork
 Cornerstone   L8457789100 Project Builder 
 TorusKnotSoftware   ilexsoft
 CrashReporter LaunchCodes Quartz Composer 
 Transmission
 DEVONthinkLittle Snitch   RapidWeaver 
 TrueCrypt

Ah, sorry, you're talking about the folder name here, right? I misunderstood 
and thought we still talking about the raw bundle identifier.


___

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:

mobile_house_arrest

2013-07-10 Thread koko
My iPad App starts up and I get this message in the Console numerous times:

mobile_house_arrest[6942] Error: Max open files: 78

But, I have opened no files.  So is this a valid message or some errant iOS 
thing?

-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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Bundle Identifiers - and application support directory

2013-07-10 Thread Quincey Morris
On Jul 10, 2013, at 08:43 , Scott Ribe scott_r...@elevated-dev.com wrote:

 The convention that we're talking about is that the apps' directories in 
 Application Support should be named by bundle identifier, not by application 
 name. The list that I provided was the result of ls Application\ Support, so 
 as you can see the convention of using bundle identifiers is generally not 
 followed.

The convention has always been or, rather than instead of. The choice is 
still documented here:


https://developer.apple.com/library/mac/#documentation/FileManagement/Conceptual/FileSystemProgrammingGUide/FileSystemOverview/FileSystemOverview.html

 The Library Directory Stores App-Specific Files
 
 Application Support
 
 All content in this directory should be placed in a custom subdirectory whose 
 name is that of your app’s bundle identifier or your company.

My vague recollection is that it used to say something like or your app name 
too. A similar description here:


https://developer.apple.com/library/mac/#documentation/FileManagement/Conceptual/FileSystemProgrammingGUide/MacOSXDirectories/MacOSXDirectories.html

doesn't mention the alternatives at all:

 OS X Library Directory Details
 
 Application Support
 
 By convention, all of these items should be put in a subdirectory whose name 
 matches the bundle identifier of the app.

so it's possible that we're seeing a change in the convention in progress.

My guess is that  the app-name variant was previously preferred because 
Application Support was always envisioned as a folder that users might have a 
reason to visit in the Finder. But in sandboxed apps, Application Support 
doesn't seem to have as big a role to play as before.

___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Bundle Identifiers - and application support directory

2013-07-10 Thread Seth Willits
On Jul 10, 2013, at 7:01 AM, Peter Hudson wrote:

 Now I can set an ID,  the docs suggest the format 
 com.companyDomainName.appName   for the directory name in Application Support.
 I notice that very few other applications use this format - they tend to use 
 just the name of the app.
 
 Is there a good reason to follow the suggested naming convention ?

For what it's worth, my apps all used to use the application name, but are 
moving to using the bundle identifier. One good reason to use it is that it's 
unique and consistent with file names elsewhere, such as in the Preferences 
folder. It's not major, but it certainly makes sense to me.

One *downside* to using it: if your application uses your app's name as a file 
extension for document packages, your app support folder becomes a file package 
as well. Oops.

My guess is, like Quincey's, that Application Support should never be opened by 
a user (see the fact that ~/Library is completely hidden now) and Apple decided 
to change the convention.

Either way, it's not important to anything AFAICT.


--
Seth Willits




___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Unrecognized selector in release build, not in debug build

2013-07-10 Thread Uli Kusterer
On Jul 10, 2013, at 4:01 AM, Rick Mann rm...@latencyzero.com wrote:
 Yes, I'm aware. That's everything Xcode shows; that's the full stack. I had 
 hoped breaking on that message would break at the point of the send, not at 
 the point of handling the unrecognized selector. 

Is this backtrace in Xcode's debugger, or in a log file? If the former, have 
you tried moving the slider at the bottom of the window? It sometimes gets 
changed accidentally and then tries to be smart and remove irrelevant symbols 
(which might just be relevant in your case).

Cheers,
-- Uli Kusterer
The Witnesses of TeachText are everywhere...
http://www.zathras.de


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Unrecognized selector in release build, not in debug build

2013-07-10 Thread Uli Kusterer
On Jul 10, 2013, at 6:04 AM, Rick Mann rm...@latencyzero.com wrote:
 First, Xcode's project-wide search is returning only one instance of remove 
 for a Textual-contain-search-term-case-insensitive search. Grep returns 
 hundreds.

 You've probably set the search options wrong. There's textual, regex, symbol 
definitions and symbol references that you can search for (you see the options 
in the little magnifying glass menu under Show Find Options). If you pick 
e.g. Symbol Definitions and type in remove, you probably get one function 
somewhere instead of removeObject: call sites.

Cheers,
-- Uli Kusterer
The Witnesses of TeachText are everywhere...
http://www.zathras.de


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: NSOutlineViews and Mountain Lion

2013-07-10 Thread Alex Zavatone
Thanks Eddy, though I recall it being introduced in Mountain Lion, though I 
could be wrong on that.

Thanks much for finding that in the docs, I wasn't able to find anything. 

With this information, do you know if it would be at all possible to use this 
to disable the animations in the Finder, Xcode and possibly system wide?

I'm looking for any hidden settings using these techniques in the hopes that I 
can find the source of many irritating animations (Safari download flying icon) 
and turn them off.  

http://arcticmac.home.comcast.net/~arcticmac/tutorials/gdbFindingPrefs.html
http://superuser.com/questions/455755/how-to-explore-more-defaults-write-tweaks-on-os-x

And a comprehensive list of those known:
https://github.com/mathiasbynens/dotfiles/blob/master/.osx

Thanks again.  Much appreciated.  I don't know why we're given these 
capabilities by default not given a clear switch to turn them off.



On Jul 10, 2013, at 12:14 PM, Eddy T wrote:

 IIRC, it's worked that way since at least Lion. The docs state this somewhere 
 (couldn't find it right now though), that you can disable this behavior by 
 wrapping the expand/collapse calls with a 0 duration animation; I've done 
 this in a subclass of NSOutlineView but I think just wrapping the call works 
 as well:
 
 - (void)expandItem:(id)item expandChildren:(BOOL)expandChildren
 {
 [NSAnimationContext beginGrouping];
 [[NSAnimationContext currentContext] setDuration:0];
 [super expandItem:item expandChildren:expandChildren];
 [NSAnimationContext endGrouping];
 }
 
 
 
 On Mon, Jul 8, 2013 at 3:55 PM, Alex Zavatone z...@mac.com wrote:
 I've noticed that since Mountain Lion, when clicking on a disclosure triangle 
 in an NSOutlineView, there is an animation of the content rolling out or 
 rolling back up.
 
 Is there a way to disable this and have the content display or hide instantly 
 as it was before, where the content display or hiding was instant?
 
 All this absolutely everything must be animated approach in the current Mac 
 OS is something I am not enjoying at all.
 
 If there is an NSUserDefaults setting to globally set the animation time of a 
 disclosure triangle content rollout/rollup to 0 or disable the animation 
 completely, I'd love to know what it is.
 
 Thanks in advance.
 
 
 ___
 
 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:
 https://lists.apple.com/mailman/options/cocoa-dev/eddy.imac.2%40gmail.com
 
 This email sent to eddy.ima...@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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

NSSortDescriptor for A -- B -- C relationships

2013-07-10 Thread Devarshi Kulshreshtha
I am trying to initialize a NSFetchedResultsController.

In the data model I have 3 entities related to each other like this:

A -- B -- C

Entity 'A' has a property 'name' and entity 'C' has property 'someDate'.

I want to get all managedObjects belonging to entity 'A', sorted in
below order, when I fire a fetch request against it:

1. 'someDate' == today's date (AND) ascending order by name

2. ascending order by name

ie. first it should enlist the objects in 'A' for which 'someDate' in
'C' is today's date, this list should be further sorted by 'name',
then it should enlist remaining objects in 'A' (for which 'someDate'
!= today's date) sorted by 'name'

Please suggest how can I achieve it in a single fetch request.

-- 
Thanks,

Devarshi

___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Unrecognized selector in release build, not in debug build

2013-07-10 Thread Rick Mann

On Jul 10, 2013, at 09:58 , Uli Kusterer witness.of.teacht...@gmx.net wrote:

 Is this backtrace in Xcode's debugger, or in a log file? If the former, have 
 you tried moving the slider at the bottom of the window? It sometimes gets 
 changed accidentally and then tries to be smart and remove irrelevant symbols 
 (which might just be relevant in your case).

Yup, I've finally learned to check this first. It was all the way to the right, 
so nothing was being hidden. (I really hate that slider.)

-- 
Rick




___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Unrecognized selector in release build, not in debug build

2013-07-10 Thread Gary L. Wade
Is it possible you've got an array controller (or other related object)
that got over-released and a pointer for it is now pointing at something
else? Or maybe you were converting from a pre-NSObjectController code base
(using a subclass of NSObject like in the old days) to
NSObjectController or its related subclasses and something didn't get
converted over or compiled right for your release build?
--
Gary L. Wade
http://www.garywade.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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Unrecognized selector in release build, not in debug build

2013-07-10 Thread Rick Mann

On Jul 10, 2013, at 12:53 , Gary L. Wade garyw...@desisoftsystems.com wrote:

 Is it possible you've got an array controller (or other related object)
 that got over-released and a pointer for it is now pointing at something
 else? Or maybe you were converting from a pre-NSObjectController code base
 (using a subclass of NSObject like in the old days) to
 NSObjectController or its related subclasses and something didn't get
 converted over or compiled right for your release build?

Thanks, Gary. I did eventually find it. It was one of those a-ha! moments. I 
remembered I had some release-only code that did, in fact, try to remove an 
object from an immutable array. Kicking myself because I distinctly remember 
thinking as I wrote it to get a mutable copy first, which I failed to do.

A combination of bad debugging info and broken search made it very hard to find.

-- 
Rick




___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

MODERATOR NOTE: Re: NSOutlineViews and Mountain Lion

2013-07-10 Thread Chris Hanson
There is no supported way to disable the various controls' animations on a 
system-wide basis.

*** Any discussion of unsupported/reverse-engineered ways to do so (or to do 
anything else) is against the list rules, and therefore should not take place 
on the list. ***

Furthermore, requests for a supported way to disable animations system-wide 
should be filed at http://bugreport.apple.com rather than sent here.

An example of a post that would be on-topic here is a question like How can I 
make the NSOutlineView in my app not animate?

  -- Chris
  -- your other cocoa-dev mod


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Can't keep disabled UIBarButtonItem text white

2013-07-10 Thread Rick Mann

On Jul 10, 2013, at 08:28 , Rick Aurbach r...@aurbach.com wrote:

 I haven't tried this, so I don't know whether it will work, but…
 
 have you tried leaving the buttons enabled but disabling user interaction for 
 them? Of course, if that works then it leaves open the larger question of 
 whether your UI goals are best served by displaying buttons that can't be 
 pushed...

Unfortunately, there's no userInteractionEnabled property.

And, in this case, they don't have the appearance of buttons. They're just 
UIBarButtonItems because for whatever reason, Apple chose not to make these 
things UIViews.

Here's a screenshot:

http://cl.ly/image/000P2Y1v2D2j


-- 
Rick




___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: MODERATOR NOTE: Re: NSOutlineViews and Mountain Lion

2013-07-10 Thread Alex Zavatone
But Chris, how do I know if it is unsupported, unless I ask for a solution or 
try to find one?

I'm looking for a solution to disable a behaviour I find a usability regression 
I don't want to get slammed for looking.  How to I know if I don't ask?

On Jul 10, 2013, at 4:12 PM, Chris Hanson wrote:

 There is no supported way to disable the various controls' animations on a 
 system-wide basis.
 
 *** Any discussion of unsupported/reverse-engineered ways to do so (or to do 
 anything else) is against the list rules, and therefore should not take place 
 on the list. ***
 
 Furthermore, requests for a supported way to disable animations system-wide 
 should be filed at http://bugreport.apple.com rather than sent here.
 
 An example of a post that would be on-topic here is a question like How can 
 I make the NSOutlineView in my app not animate?
 
  -- Chris
  -- your other cocoa-dev mod
 


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Can't keep disabled UIBarButtonItem text white

2013-07-10 Thread Luther Baker
Which constructor are you using?


http://developer.apple.com/library/ios/#documentation/uikit/reference/UIBarButtonItem_Class/Reference/Reference.html

- 
(id)initWithCustomView:(UIViewhttp://developer.apple.com/library/ios/documentation/uikit/reference/UIView_Class/UIView/UIView.html#//apple_ref/doc/c_ref/UIView
 *)*customView*
*
*
The bar button item created by this method does not call the action method
of its target in response to user interactions. Instead, the bar button
item expects the specified custom view to handle any user interactions and
provide an appropriate response.*
*



On Wed, Jul 10, 2013 at 3:54 PM, Rick Mann rm...@latencyzero.com wrote:


 On Jul 10, 2013, at 08:28 , Rick Aurbach r...@aurbach.com wrote:

  I haven't tried this, so I don't know whether it will work, but…
 
  have you tried leaving the buttons enabled but disabling user
 interaction for them? Of course, if that works then it leaves open the
 larger question of whether your UI goals are best served by displaying
 buttons that can't be pushed...

 Unfortunately, there's no userInteractionEnabled property.

 And, in this case, they don't have the appearance of buttons. They're just
 UIBarButtonItems because for whatever reason, Apple chose not to make these
 things UIViews.

 Here's a screenshot:

 http://cl.ly/image/000P2Y1v2D2j


 --
 Rick




 ___

 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:
 https://lists.apple.com/mailman/options/cocoa-dev/lutherbaker%40gmail.com

 This email sent to lutherba...@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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Can't keep disabled UIBarButtonItem text white

2013-07-10 Thread Rick Mann
I'm building it in IB.

On Jul 10, 2013, at 15:46 , Luther Baker lutherba...@gmail.com wrote:

 Which constructor are you using?
 
 
 http://developer.apple.com/library/ios/#documentation/uikit/reference/UIBarButtonItem_Class/Reference/Reference.html
 
 - 
 (id)initWithCustomView:(UIViewhttp://developer.apple.com/library/ios/documentation/uikit/reference/UIView_Class/UIView/UIView.html#//apple_ref/doc/c_ref/UIView
 *)*customView*
 *
 *
 The bar button item created by this method does not call the action method
 of its target in response to user interactions. Instead, the bar button
 item expects the specified custom view to handle any user interactions and
 provide an appropriate response.*
 *
 
 
 
 On Wed, Jul 10, 2013 at 3:54 PM, Rick Mann rm...@latencyzero.com wrote:
 
 
 On Jul 10, 2013, at 08:28 , Rick Aurbach r...@aurbach.com wrote:
 
 I haven't tried this, so I don't know whether it will work, but…
 
 have you tried leaving the buttons enabled but disabling user
 interaction for them? Of course, if that works then it leaves open the
 larger question of whether your UI goals are best served by displaying
 buttons that can't be pushed...
 
 Unfortunately, there's no userInteractionEnabled property.
 
 And, in this case, they don't have the appearance of buttons. They're just
 UIBarButtonItems because for whatever reason, Apple chose not to make these
 things UIViews.
 
 Here's a screenshot:
 
http://cl.ly/image/000P2Y1v2D2j
 
 
 --
 Rick
 
 
 
 
 ___
 
 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:
 https://lists.apple.com/mailman/options/cocoa-dev/lutherbaker%40gmail.com
 
 This email sent to lutherba...@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:
 https://lists.apple.com/mailman/options/cocoa-dev/rmann%40latencyzero.com
 
 This email sent to rm...@latencyzero.com


-- 
Rick




___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Can't keep disabled UIBarButtonItem text white

2013-07-10 Thread Rick Aurbach
Well, since a UIBarButtonItem is a UIBarItem, you might try explicitly using 
the UIBarItem method setTitleTextAttributes:forState:, specifying the disabled 
state. (You'll need to do this in code (such as viewWillAppear:), since IB 
doesn't disclose the information. I'm guessing here, but my guess is that 
grayed text is the default text attribute for the disabled state, unless 
explicitly overwritten.

Rick Aurbach

On Jul 10, 2013, at 5:53 PM, Rick Mann rm...@latencyzero.com wrote:

 I'm building it in IB.
 
 On Jul 10, 2013, at 15:46 , Luther Baker lutherba...@gmail.com wrote:
 
 Which constructor are you using?
 
 
 http://developer.apple.com/library/ios/#documentation/uikit/reference/UIBarButtonItem_Class/Reference/Reference.html
 
 - 
 (id)initWithCustomView:(UIViewhttp://developer.apple.com/library/ios/documentation/uikit/reference/UIView_Class/UIView/UIView.html#//apple_ref/doc/c_ref/UIView
 *)*customView*
 *
 *
 The bar button item created by this method does not call the action method
 of its target in response to user interactions. Instead, the bar button
 item expects the specified custom view to handle any user interactions and
 provide an appropriate response.*
 *
 
 
 
 On Wed, Jul 10, 2013 at 3:54 PM, Rick Mann rm...@latencyzero.com wrote:
 
 
 On Jul 10, 2013, at 08:28 , Rick Aurbach r...@aurbach.com wrote:
 
 I haven't tried this, so I don't know whether it will work, but…
 
 have you tried leaving the buttons enabled but disabling user
 interaction for them? Of course, if that works then it leaves open the
 larger question of whether your UI goals are best served by displaying
 buttons that can't be pushed...
 
 Unfortunately, there's no userInteractionEnabled property.
 
 And, in this case, they don't have the appearance of buttons. They're just
 UIBarButtonItems because for whatever reason, Apple chose not to make these
 things UIViews.
 
 Here's a screenshot:
 
   http://cl.ly/image/000P2Y1v2D2j
 
 
 --
 Rick
 
 
 
 
 ___
 
 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:
 https://lists.apple.com/mailman/options/cocoa-dev/lutherbaker%40gmail.com
 
 This email sent to lutherba...@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:
 https://lists.apple.com/mailman/options/cocoa-dev/rmann%40latencyzero.com
 
 This email sent to rm...@latencyzero.com
 
 
 -- 
 Rick
 
 
 



___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Can't keep disabled UIBarButtonItem text white

2013-07-10 Thread Rick Mann

On Jul 10, 2013, at 16:07 , Rick Aurbach r...@aurbach.com wrote:

 Well, since a UIBarButtonItem is a UIBarItem, you might try explicitly using 
 the UIBarItem method setTitleTextAttributes:forState:, specifying the 
 disabled state. (You'll need to do this in code (such as viewWillAppear:), 
 since IB doesn't disclose the information. I'm guessing here, but my guess is 
 that grayed text is the default text attribute for the disabled state, unless 
 explicitly overwritten.

Sorry if I wasn't clear in the original post. This is exactly what I do, and 
has served me well, until I started removing and re-adding the items to the 
toolbar so that I could hide them when not applicable.

-- 
Rick




___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

[MEET] CocoaHeadsNYC this Thursday

2013-07-10 Thread Andy Lee
When: Thursday, July 11, 2013, 6:30-7:45PM, followed by dinner at Spice, at 8th 
and 22nd (*not* the other Spice nearby).
What: Our guest Michele Titolo has kindly volunteered to give a talk entitled 
Mastering the Project File:

Do you frequently hear yourself say Don't touch the project file!, Who 
overrode my changes? or Where did my file go? If so, this talk is for you. 
We constantly put the project file on a pedestal of 
things-you-do-not-mess-with, but is this much caution really warranted? We'll 
cover tips, tricks, and solutions to promote harmony between you and your 
project file.

Where: Google, 76 9th Ave, New York, NY 10011

For details and directions, see http://www.cocoaheadsnyc.org/meeting/.

--Andy

___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com