Re: Drawing same text and graphics in different CGContextRef

2023-09-22 Thread David Duncan via Cocoa-dev
> On Sep 22, 2023, at 12:44 PM, JPH wrote: > > Hi David, > > Trying to understand the mechanism you suggest ( I am not familiar with > the concept of context pushing - poping :(I ) > > NSGraphicsContext * newconte

Re: Drawing same text and graphics in different CGContextRef

2023-09-22 Thread David Duncan via Cocoa-dev
> On Sep 22, 2023, at 11:12 AM, JPH via Cocoa-dev > wrote: > > I am facing the following problems in drawing text and graphics in > CGContextRef of an NSview and Printing framework: > > 1) drawing text using: [finalString drawInRect:textBox > withAttributes:attributes]; > Works nicely

Re: CALayer shadows and CGContext clip rect

2023-01-11 Thread David Young via Cocoa-dev
On Tue, Jan 03, 2023 at 10:03:30AM -0800, David Duncan wrote: > While you may have solved your problem, your general approach is not one that > would be recommended – CALayers are not meant to be drawn into a context, but > rather added to a layer tree to be rendered by the system. For

Re: CALayer shadows and CGContext clip rect

2023-01-03 Thread David Duncan via Cocoa-dev
drawing your shadows with AppKit or CoreGraphics directly instead of using CoreAnimation as an intermediary. > On Jan 1, 2023, at 7:23 PM, David Young via Cocoa-dev > wrote: > > On Thu, Dec 15, 2022 at 08:59:24PM -0600, David Young via Cocoa-dev wrote: >> Is it possible tha

Re: CALayer shadows and CGContext clip rect

2023-01-01 Thread David Young via Cocoa-dev
On Thu, Dec 15, 2022 at 08:59:24PM -0600, David Young via Cocoa-dev wrote: > Is it possible that a CGContext clip path will clip a shadow cast inside > the clip path, if the CALayer whose content cast the shadow is fully > outside of the clip path? Any ideas why? Just in case it helps

CALayer shadows and CGContext clip rect

2022-12-15 Thread David Young via Cocoa-dev
clip path? Any ideas why? Dave -- David Young dyo...@pobox.comUrbana, IL(217) 721-9981 ___ 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 coco

test

2022-11-17 Thread David Young via Cocoa-dev
Testing, please disregard. Dave -- David Young dyo...@pobox.comUrbana, IL(217) 721-9981 ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at

Re: iOS UINavigation background removal.

2022-01-28 Thread David Duncan via Cocoa-dev
> On Jan 28, 2022, at 11:50 AM, Alex Zavatone wrote: > > Awesome. Thank you, David. > > > I stumbled across this too while going through Apple documentation. What’s > scary is that I have no idea why it works. > > self.navigationController!.naviga

Re: iOS UINavigation background removal.

2022-01-28 Thread David Duncan via Cocoa-dev
UINavigationBarAppearance *appearance = [UINavigationBarAppearance new]; [appearance configureWithTransparentBackground]; navigationItem.standardAppearance = appearance; Thats the simplest per-item way to do it. This does imply you adopt the new appearance APIs introduced in iOS 13. > On Jan 28,

NSTextView: displaying "virtual" symbols?

2021-11-01 Thread David Young via Cocoa-dev
ffect without introducing characters to my NSTextStorage. It looks like TextKit 2 lets one do something like this rather easily, but I'm leary of adopting it while it's so green. Is anyone aware of a "worked example" I can read for TextKit 1? Dave -- D

Re: Accessibility UIContentSizeCategory or current accessibility font setting

2021-10-18 Thread David Duncan via Cocoa-dev
> On Oct 18, 2021, at 10:51 AM, Alex Zavatone wrote: > > > >> On Oct 18, 2021, at 11:31 AM, David Duncan wrote: >> >> In general it's also preferred that you look at the traitCollection of the >> most relevant view for this information – there ar

Re: Accessibility UIContentSizeCategory or current accessibility font setting

2021-10-18 Thread David Duncan via Cocoa-dev
In general its also preferred that you look at the traitCollection of the most relevant view for this information – there are contexts for which the content size category may not match the global value (and there is API on UIView to restrict the overall range that you can apply as well). This al

Re: Scaling a UIImage

2020-11-02 Thread David Duncan via Cocoa-dev
you need an NSBitmapRep you can use -bestRepresentationForRect:context:hints:. But assuming your trying to get that NSImage somewhere other than into (say) an NSImageView, there may be better APIs or pathways to that solution. > -Carl > > >> On Nov 2, 2020, at 3:09 PM, David

Re: Scaling a UIImage

2020-11-02 Thread David Duncan via Cocoa-dev
> On Nov 2, 2020, at 2:59 PM, Carl Hoefs via Cocoa-dev > wrote: > > How can I correctly scale a UIImage from 3264x2448 down to 640x480 pixels? > > > I have an iOS app that interacts with a macOS server process. The iOS app > takes a 3264x2448 camera image, scales it to 640x480 pixels, and m

Re: Throttling drawing to vertical refresh

2020-10-23 Thread David Duncan via Cocoa-dev
chanism that only calls > -setNeedsDisplay every once in a while. So should I setup a timer based on > the monitor's refresh frequency rate that calls -setNeedsDisplay in intervals > of the monitor's vertical refresh rate or how is that supposed to be > implemented? > > On 19.1

Images in controls in dark mode

2020-07-24 Thread David Durkee via Cocoa-dev
what I'm doing wrong? David ___ 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

Images in UI in dark mode

2020-07-24 Thread David Durkee via Cocoa-dev
idea what I'm doing wrong? David ___ 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

Re: Customizing the Notarization Workflow fails

2020-05-04 Thread St John, David R via Cocoa-dev
Setting automatic code signing to Off and "Code Sign style" = Manual just means you have control over the certificate, developer team, etc. not that Xcode won't sign your product. There used to be a "Don't Code Sign" option which did as advertised but it hasn't been an option in a Xcode release

Re: Performance issue on macOS 10.15 obtaining display name for ~/Desktop, ~/Documents, and ~/Downloads

2020-04-19 Thread David M. Cotter via Cocoa-dev
this may be difficult for other to repro i have discovered it may have to do with permissions / entitlements that have been granted the app by the user, and that resetting all perms to default will "fix" the problem in the terminal, do this: > tccutil reset All i expect that after that, your de

Re: NSToolbar in Catalina

2020-03-23 Thread St John, David R via Cocoa-dev
I had a similar problem with .icns files showing weird graphics but on Mojave and earlier they were fine. I resolved the issue by using Icon Composer (on macOS 10.10) to extract the '.icns' file(s) to iconsets and then importing them into an Asset Library. The NSImage creation changed to use i

Re: Getting rid of "cannot check for malicious software"

2020-03-05 Thread St John, David R via Cocoa-dev
Read up on notarization, Catalina requires signed and notarized code. https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution Dave From: Cocoa-dev on behalf of Gabriel Zachmann via Cocoa-dev Sent: Thursday, March 5, 2020 9:

Re: Problem in the creation of Graphics context(NSGraphicsContext)

2020-03-04 Thread David Duncan via Cocoa-dev
You’ll need to explain how you are creating the NSBitmapImageRep (what methods your calling, what parameters your passing, etc) that you pass to this method before anyone can explain why this might be going wrong for you. > On Mar 3, 2020, at 10:19 PM, Sravan Kumar Lakkimsetti via Cocoa-dev >

Re: Preventing app from being restored or saving info in "Saved Application State"

2019-11-11 Thread David M. Cotter via Cocoa-dev
i too have this question > On Nov 10, 2019, at 5:39 PM, Lars C. Hassing via Cocoa-dev > wrote: > > I have developed two Cocoa apps, one launching the other helper app. > > If number two app crashes then macOS may ask the user if he wants to relaunch > it, > but it makes no sense launching it

Re: UIView block-based methods

2019-11-11 Thread David Duncan via Cocoa-dev
> On Nov 9, 2019, at 12:09 PM, Carl Hoefs via Cocoa-dev > wrote: > > I'm trying to keep some older iOS code going, but I'm getting a deprecation > warning on many UIView class methods: > > +beginAnimations:context: > +setAnimationBeginsFromCurrentState: > +setAnimationDuration: > +commitAnim

Re: Subclassing NSCollectionViewFlowLayout

2019-10-21 Thread David Duncan via Cocoa-dev
> On Oct 21, 2019, at 3:26 AM, Arved von Brasch via Cocoa-dev > wrote: > > Hello list, > > Thanks to someone on the list who provided me with a clue, I found that if I > add this to my NSCollectionViewItem subclass: > > override func viewWillAppear() { >super.viewWillAppear() >

Re: Need for Swift

2019-10-15 Thread David Swofford via Cocoa-dev
As another developer who procrastinated on converting the GUI for a large application away from Carbon, I have also found this discussion to be highly illuminating. My excuse is that I'm an academic, and while the users of my software appreciate the GUI, the absolute last way I want to spend my

Re: Need for Swift

2019-10-15 Thread David Brittain via Cocoa-dev
bscribe/Update your Subscription: > https://lists.apple.com/mailman/options/cocoa-dev/websites%40paperetto.com > > This email sent to websi...@paperetto.com > -- David Brittain da...@paperetto.com ___ Cocoa-dev mailing list (Cocoa-dev@lis

Re: Thoughts on Cocoa

2019-10-02 Thread David M. Cotter via Cocoa-dev
agreed. i'm a small one person company with about ten of thousand customers, half mac half windows. wrote for mac first, carbon C++ ported to windows by porting CoreFoundation, then simulating Carbon APIs for everything else it's taken me YEARS to try to switch to Cocoa, and i'm still not done

Re: Alerts in Xcode 11

2019-09-30 Thread David Duncan via Cocoa-dev
controller as it is used in > virtually all of the various view controllers. That's why I wanted it as a > function. > > -- Doug > >> On 30 September 2019, at 14:44, David Duncan wrote: >> >> What happens if you present it over your normal view cont

Re: Alerts in Xcode 11

2019-09-30 Thread David Duncan via Cocoa-dev
What happens if you present it over your normal view controller hierarchy instead of using another window? Has your application adopted UIWindowScene? > On Sep 30, 2019, at 5:36 PM, Doug Hardie via Cocoa-dev > wrote: > > I have some code that presents an alert to the user with information the

Re: Pausing an animation

2019-09-17 Thread David Duncan via Cocoa-dev
> On Sep 17, 2019, at 1:19 PM, Gabriel Zachmann via Cocoa-dev > wrote: > > I have a layer with two animations. > > I would like to pause this animation occasionally . > To do so, I set layer.speed = 0.0; > > In the past, this has worked (with slightly different animations). > However, in thi

Re: CABasicAnimation does not animate bounds.origin of a layer

2019-09-16 Thread David Duncan via Cocoa-dev
> On Sep 14, 2019, at 6:25 AM, Gabriel Zachmann via Cocoa-dev > wrote: > > Maybe, I haven't understood how the animation of the bounds property works, > or the bounds property of a CALayer itself , > or I am making a stupid mistake. > > Here is my code: > >CALayer * imgLayer = [C

Re: code signing fails to verify on 10.10?

2019-05-29 Thread David M. Cotter via Cocoa-dev
well, the solution was to just re-build the offending library with 10.9 as the target and all is well > On May 20, 2019, at 9:38 AM, David M. Cotter wrote: > > i saw this article: > https://stackoverflow.com/questions/41865537/how-does-apples-codesign-utility-decide-which-sha-a

Re: code signing fails to verify on 10.10?

2019-05-20 Thread David M. Cotter
elated, but the odd thing is that the app launches FINE on 10.9, or 10.11 and later. why fail only on 10.10? > On May 19, 2019, at 8:38 PM, David M. Cotter wrote: > > I’m developing on 10.14.4 > using Xcode 9.4.1 > signing via command line (not via xcode) > > my app wo

code signing fails to verify on 10.10?

2019-05-19 Thread David M. Cotter
p/kJams 2.app/Contents/MacOS/InstallTool > --validated:/Users/davec/Desktop/kJams 2.app/Contents/MacOS/InstallTool > /Users/davec/Desktop/kJams 2.app: valid on disk > /Users/davec/Desktop/kJams 2.app: satisfies its Designated Requirement and: > davec$ spctl -a -t exec -vv /Users/davec

Re: Category errata in Objective-C

2019-04-03 Thread David Hoerl
I've had to do some funky things with categories in the past, in at least one case because some framework had added one but for complex reasons could not import. So, similar to what Jens said: The interface description of the category is for the sole purpose of helping the compiler generate a

Re: UiView as slider with inertia

2018-10-01 Thread David Duncan
Yea, Jonathan’s recommendation is probably best. You would configure the collection view to scroll horizontally and just vend cells that are the numbers. You can probably configure UICollectionViewFlowLayout to do most of the heavy lifting for you, and perhaps just do a subclass to override tar

Re: Bothersome "NSView-Encapsulated-Layout-Height" constraint?

2018-08-31 Thread David Duncan
> On Aug 30, 2018, at 6:38 PM, Demitri Muna wrote: > > > On Aug 30, 2018, at 9:23 PM, Quincey Morris > wrote: > >> “Encapsulated layout height” sounds like one of the constraints that IB adds >> to your layout when it’s under-constrained at design time. Are you adding >> the other constra

Re: Deleting files extremely slow since OSX High sierra

2018-04-25 Thread David Young
, not to > mention typing period period period instead of option-;. This hateful stuff doesn't really belong on this list, does it? Maybe this conversation has run its course? Dave -- David Young dyo...@pobox.comUrbana, IL(217) 721-9981 ___

Re: problem getting CALayer to draw an image

2018-04-05 Thread David Duncan
se 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/david.duncan%40apple.com > > This email s

Re: UITabBarItem selection Voice over speaks number apart from accessibility label,value

2018-04-05 Thread David Duncan
> -- > 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

Re: NSLayoutConstraint crash

2018-03-16 Thread David Catmull
want to use to see what is actually > going on. > > Constraints is a very big topic with many things to learn and control. > They are > very powerful, and thus very maddening when they don’t work they way you > understand. Take the time to learn how to use them, and you will be muc

Re: NSLayoutConstraint crash

2018-03-16 Thread David Catmull
I might try it, but it's difficult to do accurately because the views are assembled programmatically - it's dynamically generated based on the data read in. On Fri, Mar 16, 2018 at 10:37 AM, Richard Charles wrote: > > > On Mar 16, 2018, at 9:03 AM, David Catmull > wrote:

Re: NSLayoutConstraint crash

2018-03-16 Thread David Catmull
I found that in my googling, but since I'm not changing priorities, it wasn't helpful. On Fri, Mar 16, 2018 at 10:06 AM, Richard Charles wrote: > > > On Mar 16, 2018, at 9:03 AM, David Catmull > wrote: > > > > After I set up a somewhat complex view hie

NSLayoutConstraint crash

2018-03-16 Thread David Catmull
After I set up a somewhat complex view hierarchy, I'm getting a crash with this exception: 2018-03-16 08:59:21.814873-0600 App[31201:13046721] *** Assertion failure in -[NSLayoutConstraint setPriority:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/Foundation/Foundation-1451/Foundation/Layout.s

Re: dequeueReusableCellWithIdentifier bad performance in case of less number of cells?

2018-01-10 Thread David Duncan
t the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/cocoa-dev/david.duncan%40apple.com > > This email sent to david.dun...@apple.com -- David Duncan __

NSTableView drag image - using the first column image

2017-12-15 Thread David Catmull
In my table view, when you drag an item, the drag image it uses comes from the column cell where the drag started, rather than using the cell from the first column where I have the icon and name. How do I make it use the first column? I'm looking at Apple's TableViewPlayground as an example, and t

Re: unable to update UI on main thread in 10.13

2017-10-27 Thread David Duncan
> On Oct 27, 2017, at 7:17 AM, sqwarqDev wrote: > > >> On 27 Oct 2017, at 21:11, David Duncan wrote: >> >> In your background task which attributed string are you modifying? From the >> looks of your ‘updateUI’ function it seems like you are modifying the

Re: unable to update UI on main thread in 10.13

2017-10-27 Thread David Duncan
NSTiledLayerContents drawLayer:inContext:] + 181 > 35 QuartzCore 0x7fff5aa50b76 -[CALayer > drawInContext:] + 281 > 36 AppKit 0x7fff4d1ef0b9 > -[NSTileLayer drawInContext:] + 166 > > > > TIA >

Re: Customizing NSPrintPanel by removing features, not adding

2017-10-17 Thread St John, David R
Hi Flavio, Presenting your custom print dialog (Adobe/Quark do this today) is the only way to accomplish all of the goals stated below. The standard print dialog isn’t designed to be customized in the way you want. Printing has never had much in the way of documentation, reading the header fi

Re: Are Core Data to-many relationships nullable?

2017-10-05 Thread David Catmull
Apparently the answer is that they should be declared nullable. Even though I've seen claims that the property will always return a set, apparently it's also allowable to assign it to nil to clear it out. On Thu, Oct 5, 2017 at 1:00 PM, David Catmull wrote: > I'm adding nullab

Are Core Data to-many relationships nullable?

2017-10-05 Thread David Catmull
I'm adding nullability notations to my Core Data classes for Swift interoperability, and I need to know whether the properties for to-many relationships should be considered nullable, or if they will always read as empty sets. Is there an authoritative answer for this? _

Window animates width but not height

2017-10-02 Thread David Catmull
I have a preferences window with a NSTabViewController hooked up to the toolbar for selecting tabs. I want the window to be resizable, and to resize iself if necessary when switching tabs to fit the new tab's size. I'm subclassing NSTabViewController with the following overload: override var sele

Dealing with validModesForFontPanel signature change

2017-09-14 Thread David Catmull
In the 10.13 SDK, the return type for NSObject.validModesForFontPanel() changed from Int to NSFontPanel.ModeMask. This is problematic for backwards compatibility because the different signature means it's considered to be a new function, different from the one that's been around since 10.3. If I s

Is "-init" really needed?

2017-08-07 Thread David Hoerl
I recently saw some code where an object was alloced but there was no init: Foo *foo = [Foo alloc]; foo.bar = ... My blood pressure soared! My pulse quickened! I started breathing rapidly! But then I though - heck, if Foo has NSObject as its super class, gee, maybe -init isn't really need.

Re: Converting a Storyboard into separate NIBs.

2017-06-19 Thread 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.

Re: Unable to extract JPEG from PHAsset

2017-06-17 Thread David Duncan
t 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/david.duncan%40apple.com > > This email sent to david.dun..

Re: iOS Drag and Drop

2017-06-14 Thread David Brittain
Subscription: > https://lists.apple.com/mailman/options/cocoa-dev/websites%40paperetto.com > > This email sent to websi...@paperetto.com -- David Brittain da...@paperetto.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do n

Process.launch() in Swift

2017-05-31 Thread David Catmull
The documentation for Process.launch() (the equivalent of -[NSTask launch]) says it "raises an NSInvalidArgumentException if the launch path has not been set or is invalid or if it fails to create a process", and yet the function is not marked as "throws". So what happens if I call it from Swift an

Re: Does file-mapping a memory allocation work around RAM limits?

2017-05-04 Thread David Duncan
erformance considerations, the virtual address space is more akin to a 32-bit OS. This is of course an implementation detail that can be expanded in the future, but something to keep in mind if you plan to use mmap() a lot. From the sounds of what our app does, keeping around a single mmap()’s

Repository of older (outdated) PDF Guides?

2017-04-25 Thread David Hoerl
does anyone know of a place that stashed copies away? I'm fine with reading 5 year old documentation to get the big picture, then make annotations on paper copies, finally go online to see if anything of interest changed. Thanks for any pointers! David PS: https://forums.developer.apple.c

Re: Question about the Main Thread

2017-04-25 Thread David Duncan
st bet is to consider the request simple queued, with no specific timing in relation to other requests to do the same. -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list

Re: Unicode filenames with Apple File System and UIManagedDocument

2017-03-29 Thread David Duncan
> On Mar 22, 2017, at 2:25 PM, davel...@mac.com wrote: > >> >> On Mar 22, 2017, at 2:00 PM, David Duncan wrote: >> >>> >>> On Mar 22, 2017, at 4:15 AM, davel...@mac.com wrote: >>> >>>> >>>> On Mar 22, 2017, at 5

Re: Unicode filenames with Apple File System and UIManagedDocument

2017-03-29 Thread David Duncan
name to NFD. You store it as NFC. 10.3: File system is converted to APFS, and the file name is NFD. You try to look up the file as NFC, and it fails. This would also mean that newly created files on APFS are always accessible, even via the “same” name, because the file system stored the filenam

Re: Unicode filenames with Apple File System and UIManagedDocument

2017-03-23 Thread David Duncan
I just want to remind everyone I’m *not* a file system’s engineer – I’m just trying to help Dave (and anyone else caught in this) make sure their app can find their files. > On Mar 23, 2017, at 1:53 AM, Alastair Houghton > wrote: > > On 22 Mar 2017, at 18:00, David Duncan wrot

Printing in Swift

2017-03-21 Thread David Delmonte
Hello Group. I have an NSView-based app (i.e. not document-based), and I’d like to bolt on a printing subsystem. I can get NSViews in my main controller to print ok. However, I want to have a special view constructed just for printing. The view should not show in the app’s window. I cannot se

Re: Unicode filenames with Apple File System and UIManagedDocument

2017-03-06 Thread David Duncan
is your issue. > > Thanks, > Dave Reed > > > ___ > > 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-

Re: Is it possible to set an NSTableView cell background color?

2017-02-23 Thread David Delmonte
On Feb 23, 2017, at 5:11 PM, corbin dunn wrote: > > >> On Feb 22, 2017, at 6:27 PM, David Delmonte wrote: >> >> I tried you solution but it doesn’t color the cell. Scratching my head some >> more.. I’ll probably ask on Stack Overflow. > > How did you get i

Re: Is it possible to set an NSTableView cell background color?

2017-02-22 Thread David Delmonte
For example: > > cell.layer.backgroundColor = NSColor.black.cgColor > > Saagar Jha > >> On Feb 22, 2017, at 16:14, David Delmonte > <mailto:ddelmo...@mac.com>> wrote: >> >> Hi all, I have a table that has records by date. I want to color those >> entrie

Re: Is it possible to set an NSTableView cell background color?

2017-02-22 Thread David Delmonte
It's cell based! > On Feb 22, 2017, at 20:38, Quincey Morris > wrote: > >> On Feb 22, 2017, at 16:14 , David Delmonte wrote: >> >> I have a table that has records by date. I want to color those entries based >> on the dec

Is it possible to set an NSTableView cell background color?

2017-02-22 Thread David Delmonte
Hi all, I have a table that has records by date. I want to color those entries based on the decade. I cannot seem to find a way to do this. Any help would be appreciated. David ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not

Re: NSGradient & NSTextField’s focus ring

2017-02-20 Thread David Duncan
ing the equivalent of drawing the entire view into whatever dirtyRect you happen to get. > > let path = NSBezierPath() > path.move(to: NSPoint(x: 0, y: 0)) > path.line(to: NSPoint(x: dirtyRect.maxX, y: 0)) > NSColor.darkGray.setStroke() > path.stroke() > } > > } > > C

Re: NSGradient & NSTextField’s focus ring

2017-02-20 Thread David Duncan
; Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/cocoa-dev/david.duncan%40apple.com > > This email sent to david.dun...@apple.com -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: Can't restore first responder when restoring window state

2017-02-16 Thread David Catmull
oblem, since they'll just be restored to the same values both times. On Thu, Feb 16, 2017 at 1:22 PM, Quincey Morris < quinceymor...@rivergatesoftware.com> wrote: > On Feb 16, 2017, at 11:32 , David Catmull wrote: > > > I am explicitly calling encodeRestorableState (in wi

Re: Can't restore first responder when restoring window state

2017-02-16 Thread David Catmull
Morris < quinceymor...@rivergatesoftware.com> wrote: > On Feb 16, 2017, at 10:09 , David Catmull wrote: > > > I'm working on using encodeRestorableState/restoreStateWithCoder to save > and restore the state of a window. (I'm doing this manually because I want > t

Can't restore first responder when restoring window state

2017-02-16 Thread David Catmull
I'm working on using encodeRestorableState/restoreStateWithCoder to save and restore the state of a window. (I'm doing this manually because I want to explicitly save my window state in the document and not just rely on the OS restoring its state as part of restoring the application state.) The pr

curious: if not file references, what?

2017-01-20 Thread David Young
in correspondence with an inode number?) are on their way out. Should one use some metadata that's indexed by Spotlight? I ask because in the app that I'm building in my spare time, I would like someday to create hyperlinks between documents. Dave -- David Young dyo...@pobox.

Re: UINavigationBar content margins in UIPresentationController subclass

2017-01-03 Thread David Duncan
t 10:42 AM, Daniel Stenmark wrote: > > Thanks, David. Unfortunately, UINavigationController isn’t currently an > option as it doesn’t reliably bubble up preferredContentSize changes, which > we have a strong dependency on and is fairly dynamic in our use case. As of > 10.0,

Re: Animating autolayout constraint changes for subviews

2016-12-30 Thread David Duncan
> On Dec 30, 2016, at 11:50 AM, Doug Hill wrote: > > >> On Dec 30, 2016, at 11:38 AM, David Duncan wrote: >> >> >>> On Dec 28, 2016, at 4:14 PM, Doug Hill wrote: >>> >>> Hi Ken, >>> >>> The exact behavior is that th

Re: Animating autolayout constraint changes for subviews

2016-12-30 Thread David Duncan
t; within an animation context? Even if the former, are you calling any >> methods that force layout (layoutIfNeeded or similar)? If so, where/when? >> >> Regards, >> Ken >> > > > ___ &

Re: My app only shows a black screen in the recent apps list

2016-12-30 Thread David Duncan
> On Dec 27, 2016, at 3:52 AM, Andreas Falkenhahn > wrote: > > On 25.12.2016 at 16:57 David Duncan wrote: > >>> On Dec 23, 2016, at 9:05 AM, Andreas Falkenhahn >>> wrote: > >>> Further examinations have shown that the issue might b

Re: My app only shows a black screen in the recent apps list

2016-12-25 Thread David Duncan
use it goes against the design of the OS (that apps are always “there” and their lifetime is managed by the system) and because it goes against user expectation (that you can task switch quickly and come back to the app exactly as it was). > > On 23.12.2016 at 14:35 Andreas Falkenhahn w

Re: My app only shows a black screen in the recent apps list

2016-12-22 Thread David Duncan
Inline -- David Duncan @ My iPhone > On Dec 22, 2016, at 4:49 PM, Alex Zavatone wrote: > > In that case, would it make sense when the app will enter background, to take > a snapshot of the main window, then put that image layer over your main > window so that you can gua

Re: My app only shows a black screen in the recent apps list

2016-12-22 Thread 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/

Re: Is it safe to assume that viewDidLoad() is only ever called once on iOS 8.0+?

2016-12-19 Thread David Duncan
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/david.duncan%40apple.com > > This email sent to david.dun...@apple.com

Re: Releasing modal view controller properly

2016-12-17 Thread 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/Unsubsc

Re: Accessing pointer structure members inside block function

2016-12-13 Thread David Duncan
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/david.duncan%40apple.com > > This email sent to david.dun...@apple.

Re: NSTouchBar in Carbon

2016-12-12 Thread David M. Cotter
ticle/mixing-objective-c-c++-and-objective-c++> > > Hope it helps. > > - Alex Zavatone > > On Dec 12, 2016, at 10:45 AM, David M. Cotter wrote: > >> yes, it IS a carbon app but i can use objectiveC in it, so no problem there, >> i just need to know how to cr

Re: NSTouchBar in Carbon

2016-12-12 Thread David M. Cotter
rewarded with a free karaoke jukebox app! :D :D -dave > On Dec 12, 2016, at 5:08 AM, Richard Charles wrote: > > >> On Dec 11, 2016, at 11:22 PM, David M. Cotter wrote: >> >> So I need to programmatically instantiate an NSTouchBar, somehow > > This may be somewha

NSTouchBar in Carbon

2016-12-11 Thread David M. Cotter
My app is mostly C++ (because it’s cross platform) with Carbon on the UI edges, and the absolute minimum required ObjectiveC++ to make it work. (please no discussion about why this is stupid / i should write a modern app etc) So I need to programmatically instantiate an NSTouchBar, somehow i d

Re: UINavigationBar content margins in UIPresentationController subclass

2016-12-07 Thread David Duncan
might otherwise do if you were using a UINavigationController – wrap your view controller in your container and go from there. If the only reason you needed presentation is for the navigation bar, then you wouldn’t need presentation controllers at all at that point. > > Dan -- David Dunca

Re: UINavigationBar content margins in UIPresentationController subclass

2016-12-07 Thread David Duncan
view controller in a UINavigationController rather than making the navigation bar part of the presentation itself. > > Dan > >> On Dec 7, 2016, at 10:01 AM, David Duncan > <mailto:david.dun...@apple.com>> wrote: >> >> Its unclear to me at least, but w

Re: UINavigationBar content margins in UIPresentationController subclass

2016-12-07 Thread David Duncan
tingViewController.topLayoutGuide.length) >self.navigationBar.frame = CGRect(x: 0, y: self.topView.frame.origin.y > + self.topView.bounds.height, width: self.containerView?.bounds.width ?? 0, > height: self.navigationBar.intrinsicContentSize.height) > > >

Re: iOS 9: Adding CALayer to self.view.layer causes EXC_BAD_ACCESS

2016-12-06 Thread David Duncan
gt; <mailto: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 > <http://lists.apple.com/> > > Help/Unsubscribe/Update your Subscription: > https://li

Re: iOS 9: Adding CALayer to self.view.layer causes EXC_BAD_ACCESS

2016-12-06 Thread David Duncan
ts 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/david.duncan%40apple.com > > This email sent to david.dun...@apple.com -- D

Re: How to detect rotation in progress in viewDidLayoutSubview

2016-11-30 Thread David Duncan
Create and use a subview. There is no significant cost to an additional content-less view. -- David Duncan @ My iPhone > On Nov 30, 2016, at 9:46 AM, Andreas Falkenhahn > wrote: > >> On 29.11.2016 at 22:28 David Duncan wrote: >> >> Correct, because the owning UIW

Re: How to detect rotation in progress in viewDidLayoutSubview

2016-11-29 Thread David Duncan
> On Nov 29, 2016, at 2:50 PM, Andreas Falkenhahn > wrote: > > On 29.11.2016 at 17:35 David Duncan wrote: > > >>> On Nov 29, 2016, at 11:30 AM, Andreas Falkenhahn >>> wrote: > >>> On 28.11.2016 at 16:50 David Duncan wrote: > &

Re: How to detect rotation in progress in viewDidLayoutSubview

2016-11-29 Thread David Duncan
> On Nov 29, 2016, at 11:30 AM, Andreas Falkenhahn > wrote: > > On 28.11.2016 at 16:50 David Duncan wrote: > >> I think you can do everything you need to do in layoutSubviews >> (fundamentally it doesn’t matter if the device rotates or not, you >> just want

Re: How to convert from decomposed to precomposed UTF-8 on iOS

2016-11-28 Thread David Duncan
> Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/cocoa-dev/david.duncan%40apple.com > > This email sent to david.dun...@apple.com -- David Duncan ___ Cocoa-dev mailing list (Cocoa-dev@lists.app

Re: How to detect rotation in progress in viewDidLayoutSubview

2016-11-28 Thread David Duncan
> On Nov 27, 2016, at 7:25 AM, Andreas Falkenhahn > wrote: > > On 27.11.2016 at 00:04 David Duncan wrote: > >> What are you trying to accomplish? > > I want to keep my UIView centered on the screen so I need to > change its position when the device rotates. I&#

  1   2   3   4   5   6   7   8   9   10   >