Cocoa Bindings Gotcha: 'Conditionally Sets Editable'
I just spent an hour trying to figure out why a text view (NSTextView) whose ‘Editable’ checkbox I had switched off was editable when the app ran. The problem was that I had bound its ‘Attributed String’ binding, and in the options of this binding, 'Conditionally Sets Editable’ was switched on. Cocoa Bindings Reference says that this option "determines if the editable state of the user interface item is automatically configured based on the controller's selection. If YES, the item's editable state is configured automatically. The user interface item will not be editable when the value represents a multiple selection, unless the selected objects are considered equal.” I cannot think of a use case for this bindings option in a text view. I am even more incredulous that this bindings option is ON by default. ___ 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: Core Data : Opt Out of SQLite WAL is nullified after File > Duplicate ?
On 2014 Jan 26, at 20:28, Glenn L. Austin wrote: > Migration may fail as the WAL file for the old store isn't removed before > attempting to open the new, migrated store -- which doesn't match the old > store's WAL file… Glenn, just to be clear, is the “migration” you are referring to here the thing that happens when a user opens an old document with a newer version of your app that has an updated data model? ___ 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: Presenting modal vc repositions root vc
Well, by chance I found the cause of the problem, although I don't understand why. In my root view controller, I had this code, based on a StackOverflow answer I found about positioning a custom UIToolbar such that it would not be obscured by the status bar: - (void) viewWillLayoutSubviews { self.view.frame = [UIScreen mainScreen].applicationFrame; [super viewWillLayoutSubviews]; } I did this many months ago, probably before this technote: https://developer.apple.com/library/ios/qa/qa1797/_index.html Anyway, removing that fixed all the weird behaviors. I don't know how or why. It seems that presenting a modal, full-screen VC from the root VC shortly after viewDidAppear causes a couple of things: - The current root view controller is removed from the window, and the presented VC is made the root. - The application frame changes size. Removing that code, and installing the top layout guide constraint on the UIToolbar seems to have fixed the resize issue, but not another issue I have where removing a sub view of the root view controller causes the UIBarButtonItems' text to shrink. This one still eludes me. On Jan 25, 2014, at 16:37 , Rick Mann wrote: > I can't figure this out. I've got a view hierarchy that's been working fine. > I added a modal, full-screen tutorial to my storyboard that's triggered on a > segue from a button in a popover-contained table view. That works fine, too. > > Now I'm trying to display the same tutorial the first time the user runs the > app. I get it from the root view controller's storyboard, and call -[self > presentViewController:animated:completion:] on it. Just before presenting it, > I see my entire view hierarchy shrink down (to what might be portrait width > in landscape mode; it's a landscape-only app). Elements inside a smaller, > too, not just repositioned. > > After the modal VC is dismissed, you see the shrunken view, then it snaps > back to full size, but the UIBarButtonItems stay shrunken. > > Why is this happening? Why does Apple not test anything any more? > > -- > 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/rmann%40latencyzero.com > > This email sent to rm...@latencyzero.com -- Rick signature.asc Description: Message signed with OpenPGP using GPGMail ___ 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
CGCMSUtilsGetICCProfileDescription is obsolote
Hi, with one of my apps I recently see the following message in the logs, especially on 10.9.1: The function `CGCMSUtilsGetICCProfileDescription' is obsolete and will be removed in an upcoming update. Unfortunately, this application, or a library it uses, is using this obsolete function, and is thereby contributing to an overall degradation of system performance. Well, I never call that method directly, and have no idea what is that function. This probably triggered in a library I am using, but I cannot find where is the problem, since I cannot find a way to reproduce that weird loggings all the time… weird. Do you have any ideas? Thanks, Tamas ___ 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: Presenting modal vc repositions root vc
On Jan 27, 2014, at 2:44 PM, Rick Mann wrote: > Well, by chance I found the cause of the problem, although I don't understand > why. In my root view controller, I had this code, based on a StackOverflow > answer I found about positioning a custom UIToolbar such that it would not be > obscured by the status bar: > > - (void) > viewWillLayoutSubviews > { >self.view.frame = [UIScreen mainScreen].applicationFrame; >[super viewWillLayoutSubviews]; > } Basically a view or view controller should never modify their external coordinate system, and this does that. There are a great many places where a parent view controller or window assume they have full control over the views of their children, and doing stuff like this breaks that control pretty handidly. -- 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Presenting modal vc repositions root vc
On Jan 27, 2014, at 14:57 , David Duncan wrote: > Basically a view or view controller should never modify their external > coordinate system, and this does that. There are a great many places where a > parent view controller or window assume they have full control over the views > of their children, and doing stuff like this breaks that control pretty > handidly. > Indeed. Well, it had the desired effect for many, many months, so it got forgotten. The new status bar behavior induced a lot of stuff like this. The official solution, AFAICT, won't work for non-storyboard projects, either (since they don't have top & bottom layout guides). -- Rick signature.asc Description: Message signed with OpenPGP using GPGMail ___ 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
Separators line between table view cells is inonsistent
I have a grouped-style table view, with a section that is populated dynamically with the results of a Bluetooth LE scan. As items appear in the middle of the list (they're sorted by name), sometimes the separating line between cells doesn't draw or draws an inconsistent length. Any idea what might be causing this? The cells are custom, but straightforward in that they're just made up of UILabel and UIActivityIndicator views, using autolayout in a storyboard. -- Rick signature.asc Description: Message signed with OpenPGP using GPGMail ___ 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: Presenting modal vc repositions root vc
On Mon, Jan 27, 2014, at 03:01 PM, Rick Mann wrote: > > On Jan 27, 2014, at 14:57 , David Duncan wrote: > > > Basically a view or view controller should never modify their external > > coordinate system, and this does that. There are a great many places where > > a parent view controller or window assume they have full control over the > > views of their children, and doing stuff like this breaks that control > > pretty handidly. > > > > Indeed. Well, it had the desired effect for many, many months, so it got > forgotten. > > The new status bar behavior induced a lot of stuff like this. The > official solution, AFAICT, won't work for non-storyboard projects, either > (since they don't have top & bottom layout guides). Layout guides work just fine regardless of use of storyboards. But because layout guides are owned by the _view controller_, not the view, there is nowhere for IB to offer them in non-storyboard views. You can still use them in an override of -updateViewConstraints just fine. --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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Presenting modal vc repositions root vc
On Jan 27, 2014, at 15:31 , Kyle Sluder wrote: > Layout guides work just fine regardless of use of storyboards. But > because layout guides are owned by the _view controller_, not the view, > there is nowhere for IB to offer them in non-storyboard views. Well, since a NIB can be owned by a view controller, it seems to me that IB could provide layout guide widgets when that's the case. -- Rick signature.asc Description: Message signed with OpenPGP using GPGMail ___ 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: Presenting modal vc repositions root vc
On Mon, Jan 27, 2014, at 03:39 PM, Rick Mann wrote: > > On Jan 27, 2014, at 15:31 , Kyle Sluder wrote: > > > Layout guides work just fine regardless of use of storyboards. But > > because layout guides are owned by the _view controller_, not the view, > > there is nowhere for IB to offer them in non-storyboard views. > > Well, since a NIB can be owned by a view controller, it seems to me that > IB could provide layout guide widgets when that's the case. Storyboard object graphs are much more restricted than NIB object graphs. The relationship between view controllers and their views is much more concrete within a storyboard. NIBs are much more flexible—you can specify the _class_ of File's Owner, but that object does not exist in the NIB at design time. Therefore the constraint object can't be encoded into the nib. Labeling File's Owner as a UIViewController also implies absolutely nothing about the relationship between the view controller and the view—the view controller might manually load the NIB with itself as File's Owner for purposes other than assigning its own view. These difficulties are theoretically surmountable and you should file an enhancement request asking Apple to do so. But as it stands, the only way to use the layout guides for views loaded from NIBs is in code. --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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
UIPopover problems in iOS 6, but not 7
I have a UINavigationController and UITableViewController in a UIPopover. It seems to work correctly in iOS 7, but in iOS 6, the UITableView's contentSize seems to be incorrect, and you can't scroll to the bottom of the table view. The table view is driven by an NSFetchedResultsController. iOS 6 does not seem to respect the Explicit Size setting in the storyboard for the popover segue, and I wonder if that's related. I did just try setting the explicit size on the view controller contained within the UINavigationController, and it seems to be respecting it now. But this wasn't necessary at all on iOS 7. Is it possible to set the popover size (mainly the width) based on autolayout of the contained views, in a way that works consistently between iOS 6 and 7? -- Rick signature.asc Description: Message signed with OpenPGP using GPGMail ___ 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: CGCMSUtilsGetICCProfileDescription is obsolote
On Jan 27, 2014, at 2:53 PM, Tamas Nagy wrote: > Well, I never call that method directly, and have no idea what is that > function. This probably triggered in a library I am using, but I cannot find > where is the problem, since I cannot find a way to reproduce that weird > loggings all the time… weird. > > Do you have any ideas? Stick a breakpoint on it. -- 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
Mismatched viewWillAppear/viewDidDisapper calls possible?
Should it ever be possible for there to be a mismatch between -viewWillAppear: and -viewDidDisappear:? I suppose it is possible, since the docs say the Appear methods aren't called in a popover in some circumstances (which I think is really bad). But, in my experience, they are indeed usually called, except in one circumstance when certain user events come during an animation. The end result is that I'm not able to reliably add and then remove KVObservers, because the viewDidDisappear: call is not happening. -- Rick signature.asc Description: Message signed with OpenPGP using GPGMail ___ 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: Mismatched viewWillAppear/viewDidDisapper calls possible?
On Mon, Jan 27, 2014, at 08:15 PM, Rick Mann wrote: > Should it ever be possible for there to be a mismatch between > -viewWillAppear: and -viewDidDisappear:? I suppose it is possible, since > the docs say the Appear methods aren't called in a popover in some > circumstances (which I think is really bad). Yes, it happens quite frequently. See the WWDC video on view controller containment. --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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Core Data : Opt Out of SQLite WAL is nullified after File > Duplicate ?
Hi Mike, For your packaged store, I think wal is a better solution as Apple as chosen to enable it by default on both OSX and iOS. But for NSPersistentDocument, this is the wrong choice as documents must be made of one file to avoid confusion for users manipulating files manually in the finder (even if the rollback journaling mode with "delete" option could produce a temporary journaling file too). About the Duplicate / Save As bug : I have also raised an incident. The DTS person from Apple confirmed to me that this is a bug and agree with me that there are two workarounds : - Temporary change the Base SDK back to 10.8 (very near term solution that I have chosen) - Use method swizzling on NSPersistentStoreCoordinator method "- (NSPersistentStore *)migratePersistentStore:store toURL:URL options:options withType:storeType error:error" to pass the same store options as the original store. (swizzling is dangerous but I might use it when I need to use 10.9 Base SDK) Romain. Le 25 janv. 2014 à 23:23, Mike Abdullah a écrit : > > On 21 Jan 2014, at 21:24, Jerry Krinock wrote: > >> >> On 2014 Jan 21, at 09:02, Mike Abdullah wrote: >> >>> If it helps, I maintain https://github.com/karelia/BSManagedDocument as a >>> nice way to have a package-based document using Core Data. >> >> Thank you, Mike. Now I have two reasons to start using BSManagedDocument :) >> >> Also, I have now confirmed the bug with a sample project and filed it, see >> below. > > Thanks Jerry. > > Sadly yes, some sort of migration would be required if you weren’t using a > package-based format to start with (if you were, there’s a decent variety of > hooks available in BSManagedDocument to customise it to match your existing > layout). > > Presently BSManagedDocument is set up to configure Core Data to use the > old-style journal (as I still support 10.6). However, the more I read on the > subject, the more I wonder if this is worth it. Since the actual persistent > store is kept safely hidden from the user inside of the package, is there > actually any harm in using the new style journal, does anybody know? > > > ___ > > 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/feedback%40rhapsoft.com > > This email sent to feedb...@rhapsoft.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
Cocoa app screen update issues on Mavericks
Hi,Recently I have compiled my application on Mac 10.9 (Mavericks). Screens are stopped updating. Its a multithreading application. GUI is made in Cocoa/Objc and secondary threads are posix threads and C. I updates my screens on getting message from secondary threads. I have a table view to show the current status of application and a toolbar in my window. If I leave the application (do not touch mouse or keyboard) then after a point table view stops updating and toolbar buttons are also not updated (they are supposed to enable/disable depending upon app status). As soon as I click my window screen gets updated. Same application if compiled and run on 10.8 works perfectly.I originally created this app on 10.6 and it still works fine on 10.6.I made following changes in the project settings to compile and run it on 10.9Build Settings > Base SDK: Latest OS X (10.9)Deployment> Deployment Target>OS X 10.6Thanks & RegardsAbhijeetGet Yourself a cool, short @in.com Email ID now! ___ 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: Separators line between table view cells is inonsistent
Rick Mann schreef op 28-1-2014 0:25: I have a grouped-style table view, with a section that is populated dynamically with the results of a Bluetooth LE scan. As items appear in the middle of the list (they're sorted by name), sometimes the separating line between cells doesn't draw or draws an inconsistent length. Any idea what might be causing this? The cells are custom, but straightforward in that they're just made up of UILabel and UIActivityIndicator views, using autolayout in a storyboard. It seems this is a bug in iOS7. I've the same problems. Even Mail doesn't draw the separators correctly at all times. I hope they will fix it in 7.1. 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: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com