Re: WatchKit Baby Apps

2018-03-02 Thread Charles Jenkins
, Mar 2, 2018 at 7:50 AM, Charles Jenkins <cejw...@gmail.com> wrote: > The things you are describing are paths I already followed to dead ends. > WKInterfaceTimer is truly and completely bogus. It just shows a > countdown/count-up UI label while the app is onscreen. Y

Re: WatchKit Baby Apps

2018-03-02 Thread Charles Jenkins
The things you are describing are paths I already followed to dead ends. WKInterfaceTimer is truly and completely bogus. It just shows a countdown/count-up UI label while the app is onscreen. You have to pair it with an NSTimer set to count down to the same time in to make your program react in

WatchKit Baby Apps

2018-02-28 Thread Charles Jenkins
Marco Arment’s article at https://marco.org/2018/02/26/watchkit-baby-apps describes how frustrating it is to develop for Apple Watch. I hope Apple takes notice and improves this situation. Last year I wanted to develop my own timer and repetition counter for my workouts at the gym, but in the

Re: [ANN] Nursery Framework 1.0.1 (build with Xcode 9) released

2017-10-26 Thread Charles Jenkins
No, using foreign language words incorrectly is not a surprise. We should not accuse Mr. Takata of doing anything wrong simply on the basis of choosing the wrong words. Translating between English and Japanese is extremely difficult. If you visit Japan, it will not take very long before you see

Re: Video Player Controls?

2017-05-17 Thread Charles Jenkins
would be great if I could > just get the same graphics for the controls as the Main Player, I could > easily wire up my own action handlers….. > > Cheers > Dave > > > On 17 May 2017, at 13:14, Charles Jenkins <cejw...@gmail.com> wrote: > > > > If you’re do

Re: Video Player Controls?

2017-05-17 Thread Charles Jenkins
If you’re doing your work on the Mac, there’s an available Apple demo, AVSimplePlayer, which demonstrates how to wire up KVO (in Obj-C) in order to provide playback controls. I was never able to get it working after porting to Swift, but it works fine in Obj-C. On Wed, May 17, 2017 at 7:05 AM,

Re: AVSimplePlayer in Swift?

2017-02-09 Thread Charles Jenkins
entTime = 0.0 } player.play() } else { player.pause() } } @IBAction func fastForward( _ sender: Any ) { adjustSpeed( step: 2.0 ) } } On Sun, Jan 8, 2017 at 5:13 PM, Charles Srstka <cocoa...@charlessoft.com> wrote: > On Jan 8, 2017, at 1:12 PM, Quin

Re: PDF to Word ( docx) Conversion

2017-01-25 Thread Charles Jenkins
Just my two cents, but I find .RTF way more arcane than .DOCX, and I don’t think Apple’s exporters for .RTF and .DOC produce high-quality documents. If users are only going to read the documents you produce—they will not be edited or reformatted in any way—then Apple-generated .RTFD (which can

Re: PDF to Word ( docx) Conversion

2017-01-24 Thread Charles Jenkins
There is an open specification for the file format, which will allow you to easily (if tediously) write your own exporter. The spec is at: http://www.ecma-international.org/publications/standards/Ecma-376.htm (These are huge downloads) If you have access to a Windows PC, there is a

Re: AVSimplePlayer in Swift?

2017-01-09 Thread Charles Jenkins
, I’m toast. On Sun, Jan 8, 2017 at 5:13 PM, Charles Srstka <cocoa...@charlessoft.com> wrote: > On Jan 8, 2017, at 1:12 PM, Quincey Morris <quinceymorris@ > rivergatesoftware.com> wrote: > > > On Jan 8, 2017, at 05:49 , Charles Jenkins <cejw...@gmail.com> wrote: >

Re: Code Review Requested - In-App Purchases

2017-01-08 Thread Charles Jenkins
And of course the second after I posted that, I decided userInterface should be a weak var. On Sun, Jan 8, 2017 at 8:29 AM, Charles Jenkins <cejw...@gmail.com> wrote: > As a programmer, aren’t you suspicious when you write something that works > flawlessly the first time? I worry i

Code Review Requested - In-App Purchases

2017-01-08 Thread Charles Jenkins
, and restored purchases, the payment queue replayed instantly, without asking me to sign in. It went so smoothly that I’m suspicious. So I’m going to share the clerk code with you here and ask for critiques, if you have time. Thanks! // // InAppStore.swift // // Created by Charles Jenkins on 12/25/16

Re: AVSimplePlayer in Swift?

2017-01-07 Thread Charles Jenkins
Jan 7, 2017 at 3:32 PM, Charles Srstka <cocoa...@charlessoft.com> wrote: > On Jan 7, 2017, at 2:27 PM, Charles Jenkins <cejw...@gmail.com> wrote: > > > Charles, > > Thank you for the reply. “Won’t compile” was incorrect shorthand for a > long-winded explanation. Wha

[OT] Testing In-App Purchases

2017-01-07 Thread Charles Jenkins
Could someone with good experience testing in-app purchases contact me? I have created a test Sandbox user in iTunes connect, but no matter what I do, I can’t log in as that user on my device in order to test an in-app purchase. I have verified the email, logged in to the Apple ID management site,

AVSimplePlayer in Swift?

2017-01-06 Thread Charles Jenkins
Has anyone recoded Apple's AVSimplePlayer example in Swift? I’m trying to do that in order to get some AVFoundation experience in Swift, and I’m having a bit of trouble. I can’t figure out how to do the bindings to currentTime and duration. - If I do them the easy way, using didSet clause,

Re: Elementary NSUserDefaults Question

2016-12-07 Thread Charles Jenkins
. If anyone knows how to play music from the library at a low volume, without screwing up the system volume for other apps, e.g. Music.app, I’d love to learn it. On Wed, Dec 7, 2016 at 11:16 AM, Sean McBride <s...@rogue-research.com> wrote: > On Wed, 7 Dec 2016 10:25:46 -0500, Charles Jen

Re: Elementary NSUserDefaults Question

2016-12-07 Thread Charles Jenkins
That makes sense. Thanks, Ken! On Wed, Dec 7, 2016 at 11:00 AM, Ken Thomases <k...@codeweavers.com> wrote: > On Dec 7, 2016, at 9:25 AM, Charles Jenkins <cejw...@gmail.com> wrote: > > > > I may be misusing NSUserDefaults. I want to store the name of a > backgr

Elementary NSUserDefaults Question

2016-12-07 Thread Charles Jenkins
I may be misusing NSUserDefaults. I want to store the name of a background music file, which may be nil if the user doesn’t want to hear anything. For the time being, I have only two settings for my variable “currentBackgroundMusicFileName”: either a file that I distribute with the app, or nil.

Custom Timer on Apple Watch

2016-11-23 Thread Charles Jenkins
I asked this question recently, but maybe not in a clear enough way. If I use Apple’s Timer program on the watch, I can tell it to alert me in 15 minutes, and it works without fail. I want to make a smarter timer program for the watch, but I want my timer to “go off” in a way that’s prominent

Re: Swift 3: How to Create CFArray of CGColors?

2016-11-23 Thread Charles Jenkins
com> wrote: > On Nov 22, 2016, at 16:17 , Charles Jenkins <cejw...@gmail.com> wrote: > > > I have this line of code: > > let gradient = CGGradient( colorsSpace: CGColorSpaceCreateDeviceRGB(), > colors: [ clearWhite.cgColor, clearWhite.cgColor, > clearWhite.blendedC

Swift 3: How to Create CFArray of CGColors?

2016-11-22 Thread Charles Jenkins
I’m sure this will turn out to be elementary, but the Apple documentation of CFArray is so EMPTY that I can’t seem to figure it out. I have this line of code: let gradient = CGGradient( colorsSpace: CGColorSpaceCreateDeviceRGB(), colors: [ clearWhite.cgColor, clearWhite.cgColor,

Re: Make WatchKit app show local notification

2016-11-12 Thread Charles Jenkins
uncha...@gmail.com | @SlaunchaMan <https://twitter.com/SlaunchaMan> | > jeffkelley.org > > On Nov 11, 2016, at 7:13 AM, Charles Jenkins <cejw...@gmail.com> wrote: > > Thanks, Jeff! Lordy be, the only thing I want is a sound and prominent > haptic when the

Re: Make WatchKit app show local notification

2016-11-11 Thread Charles Jenkins
Thanks, Jeff! Lordy be, the only thing I want is a sound and prominent haptic when the countdown reaches zero. Is there no foolproof way to achieve that? Everything I’ve tried seems to only work in certain cases. ___ Cocoa-dev mailing list

Make WatchKit app show local notification

2016-11-10 Thread Charles Jenkins
I’m trying to write an app that basically serves as a countdown timer. I’ve learned that the WKInterfaceTimer object doesn’t really do anything but draw the countdown on the screen. The documentation suggests pairing it with an NSTimer in order to be able to do something when the timer expires. I

Re: WatchKit Noob Question

2016-11-08 Thread Charles Jenkins
v 7, 2016, at 17:00 , Charles Jenkins <cejw...@gmail.com> wrote: > > > What am I doing wrong? > > > What is the error message? > > And you did import UserNotifications, right? > > -- Charles ___ Cocoa-dev mailin

WatchKit Noob Question

2016-11-07 Thread Charles Jenkins
I’m writing my first WatchKit app. My deployment target is watchOS 3.1. I have searched the documentation and tutorials for scheduling local notifications on the watch, and I’m stuck at step 1. This line of my WatchKit Extension app’s InterfaceController.swift app file will not compile: let

Re: HandOff Problems

2016-10-13 Thread Charles Jenkins
I don’t have any answers, but please keep us posted. Sierra is the first macOS upgrade that proved to be a complete disappointment to me, because the interesting new features are based on Handoff, which worked for me in Yosemite and El Cap, but now doesn’t work at all. Looks like Handoff is

Re: How to avoid swift.retain/release

2016-09-09 Thread Charles Jenkins
Gerriet, Take this with a huge grain of salt because I don’t know what’s really going on here and whether the API will permit it, but the first thing I would do is try to get the expensive operation outside any loop if possible: override function doSomething() { let ty =

Re: Odd File Truncation

2016-09-07 Thread Charles Jenkins
I have a Time Capsule and find it very unreliable. It simply won’t stay mounted as a Time Machine volume. I would never save a file directly to it. Can you not save the original locally and then sync with the Time Capsule? On Wed, Sep 7, 2016 at 3:56 AM, Peter Hudson wrote:

Re: Limiting app installation

2016-09-06 Thread Charles Jenkins
They don’t allow it. It’s a specific promise of the app store that you pay once and then you can load the app on all your compatible devices. On Mon, Sep 5, 2016 at 2:44 PM, Rick Mann wrote: > Does Apple allow a developer to limit the number of devices on which an > app

Re: Sprite Kit app won’t operate in foreground

2016-08-22 Thread Charles Jenkins
Kirk and Everyone: I learned that developers can call Apple with questions, so I called in about my theory that it is iOS that’s killing my app and the disastrous bug I’m hunting for doesn’t actually exist. The tech who took my call agreed: when you build an app using a free developer account,

Sprite Kit app won’t operate in foreground

2016-08-02 Thread Charles Jenkins
A few weeks ago I wrote about a demo app that seemed to expire—it would work perfectly for a few weeks and then crash whenever opened. Carl Hoefs advised me how to look for crash logs on the device. I did, and was surprised to find there is no crash log for my app. It’s not actually crashing! If

Re: Do Debug Apps Expire on iOS?

2016-07-22 Thread Charles Jenkins
Thank you all. I’ll start my research on how to find crash logs. On Thu, Jul 21, 2016 at 10:30 AM, Roland King wrote: > > > On 21 Jul 2016, at 22:15, Steve Bird wrote: > > > > > >> On Jul 21, 2016, at 10:05 AM, Eric E. Dolecki > wrote: >

Do Debug Apps Expire on iOS?

2016-07-21 Thread Charles Jenkins
I have an app (written in Swift) that’s nearly ready to submit to the app store. I just need to get better background music. But it seems that every few weeks, it stops launching on my iPhone. It seems whenever I want to show it off, it won’t start. It dies after the launch screen appears. Then

[OT] Recent News Story Related to App Store Refunds

2016-06-11 Thread Charles Jenkins
This is off topic, but I don’t know where else to ask this question of iOS Developers. There was a recent news story about a developer being charged back because Apple refunded a large number of sales dating back several years. Three years, I think. I was hoping to hear a followup that the story

Re: debugging AirDrop (update)

2016-05-27 Thread Charles Jenkins
My family and I all have iPhones. We often try to use AirDrop to share photos and videos of my grandbabies. It almost never works. We’re on the same AirPort-based wireless network and all have Bluetooth on, in case that matters. When sitting right next to one another, Airdrop will often just sit

Re: Proper way to set up constants when building an iOS framework

2016-04-13 Thread Charles Jenkins
Alex, I suddenly had big fires to put out yesterday and couldn’t respond, but Jens is right. In the .m file but outside of any implementation, define the constant string and assign its value. In the header file just declare the same thing, but with the extern keyword and no value assignment.

Re: Proper way to set up constants when building an iOS framework

2016-04-12 Thread Charles Jenkins
I imagine you’re already doing this, but your message wasn’t clear, so forgive me if I sound patronizing. The constants should be declared extern in the header file, but not assigned any values. The value assignments should appear inside a single .m file in your framework. --  Charles On

Re: Volume of background music

2016-03-28 Thread Charles Jenkins
because it deals in C structs a lot and you often have to worry about bytes and audio formats. You don't have to master it to do good things with it. AVAudioEngine makes spatial audio so much easier but still not a cakewalk. Sent from my iPhone > On Mar 27, 2016, at 10:26 PM, Char

Re: Volume of background music

2016-03-28 Thread Charles Jenkins
to and the next app you run, I think making use of these tricks would upset users. --  Charles On March 27, 2016 at 17:56:22, Graham Cox (graham@bigpond.com) wrote: > On 28 Mar 2016, at 12:26 AM, Charles Jenkins <cejw...@gmail.com> wrote: > > I would like to let users select their

Volume of background music

2016-03-27 Thread Charles Jenkins
I would like to let users select their own background music from their music libraries. From my researches, I can only find the MPMusicPlayer and its associated media picker as the way to let the user make his or her own play list; but if I use those interfaces, I cannot control the volume, so

Seeking image manipulation book/site/course recommendations

2016-03-23 Thread Charles Jenkins
I’m developing my first iOS game. I let the player pick photos as images for the sprites, and currently use SKCropNodes to combine layers. So each sprite on the screen is a crop node. This works great on my iPhone 6, but performance is just awful on my iPad 2. I think I should (a) make sure

Re: Is a portrait-only launch image possible?

2016-03-14 Thread Charles Jenkins
. --  Charles On March 14, 2016 at 01:40:09, David Duncan (david.dun...@apple.com) wrote: > On Mar 13, 2016, at 12:32 PM, Charles Jenkins <cejw...@gmail.com> wrote: > > I’m developing my first iOS app. On the General tab of my app’s build > settings, I have checked only Portrai

Is a portrait-only launch image possible?

2016-03-13 Thread Charles Jenkins
I’m developing my first iOS app. On the General tab of my app’s build settings, I have checked only Portrait as the supported orientation. When testing on an iPad today, I noticed that if I start the app with the iPad held in landscape mode, the launch image appears in landscape and of course

Re: Starting out with storyboards (on Mac)

2016-03-01 Thread Charles Jenkins
Thank you for that, Jerry. I started to reply in a similar way this morning, but deleted my draft because I thought I might just be making unhelpful noise. I am in Storyboards 101 right along with Daryle, and as I typed in example code from a tutorial project, my fumbling around with autolayout

Re: UI to allow user to scale and crop image within a circle

2016-02-24 Thread Charles Jenkins
for a bounds change in order to recreate the mask? --  Charles On February 24, 2016 at 03:16:00, David Duncan (david.dun...@apple.com) wrote: > On Feb 23, 2016, at 7:17 PM, Quincey Morris > <quinceymor...@rivergatesoftware.com> wrote: > > On Feb 23, 2016, at 18:50 , Cha

Re: UI to allow user to scale and crop image within a circle

2016-02-23 Thread Charles Jenkins
at 3:49:28 PM, Quincey Morris (quinceymor...@rivergatesoftware.com) wrote: On Feb 23, 2016, at 12:32 , Charles Jenkins <cejw...@gmail.com> wrote: This is the first time I’ve tried to inject an overlay view into the view hierarchy, so I’m probably doing it completely wrong or missing somethin

Re: UI to allow user to scale and crop image within a circle

2016-02-23 Thread Charles Jenkins
:51:59, Quincey Morris (quinceymor...@rivergatesoftware.com) wrote: On Feb 23, 2016, at 04:28 , Charles Jenkins <cejw...@gmail.com> wrote: My scrollview containing an imageview seems to work just fine: I can scale and crop an image with no problem. But I’m having difficulty getting the d

Re: UI to allow user to scale and crop image within a circle

2016-02-23 Thread Charles Jenkins
the content of a scrollView? --  Charles On February 21, 2016 at 20:48:18, Charles Jenkins (cejw...@gmail.com) wrote: I’m trying to do something that’s so simple, conceptually, that I’m sure there’s a demo program for it, if only I could find the right Google search to locate it. I want

UI to allow user to scale and crop image within a circle

2016-02-21 Thread Charles Jenkins
I’m trying to do something that’s so simple, conceptually, that I’m sure there’s a demo program for it, if only I could find the right Google search to locate it. I want to allow iOS users to select an image (either from the camera roll or by taking a photo) and display it in a CIRCLE for

Two Problems

2016-02-12 Thread Charles Jenkins
PROBLEM 1: Is there anything new/tricky about the UISearchBar? I have placed one in my view, and dragged an IBOutlet to the companion source file. The result is an @IBOutlet weak var searchBar: UISearchBar! I added UISearchBarDelegate to my ViewController and implemented one method:  func 

Re: Two Problems

2016-02-12 Thread Charles Jenkins
e the same as the new name? Change the name of the graphic and see if it's even in the new build. GL Charles. Alex Zavatone. On Feb 12, 2016, at 8:59 AM, Charles Jenkins wrote: > PROBLEM 1: > > Is there anything new/tricky about the UISearchBar? I have placed one in my > view, a

OT? Xcode Question

2016-02-11 Thread Charles Jenkins
I find that when working with an Assistant Editor, I’m typically doing things like creating outlets and actions, where I’m dragging from IB on the left into companion code on the right. Then I’m done with the left side and need to start working on the right side. So what I almost always want

Re: OT? Xcode Question

2016-02-11 Thread Charles Jenkins
. That leaves me with the right file in the main editor, even though the wrong item is highlighted in the source list. --  Charles On February 11, 2016 at 2:17:01 PM, Quincey Morris (quinceymor...@rivergatesoftware.com) wrote: On Feb 11, 2016, at 07:49 , Charles Jenkins <cejw...@gmail.

Protocol extensions returning self

2016-02-04 Thread Charles Jenkins
I’m trying to learn how to use protocols and extensions to factor out redundant function bodies. Supposedly in a protocol, “Self” is the class implementing the protocol. So it seems to me that extension methods should be able to have a return type of Self so they can return self, and thus have

Re: UIViews in SpriteKit Apps

2016-02-03 Thread Charles Jenkins
researching that right away. --  Charles On February 3, 2016 at 01:31:54, Quincey Morris (quinceymor...@rivergatesoftware.com) wrote: On Feb 2, 2016, at 19:00 , Charles Jenkins <cejw...@gmail.com> wrote: I’m thinking of presenting a “menu” SpriteKit SKScene with an SKSpriteNode

UIViews in SpriteKit Apps

2016-02-02 Thread Charles Jenkins
When I’ve previously dabbled a bit with iOS programming, it was with normal UIView forms and controls. Now I’m writing my first SpriteKit game, and I want to give users the ability to select their own background music. Can I use “normal” UIViews to do that, and have the standard media pickers?

Re: delete stock apps

2016-01-25 Thread Charles Jenkins
System Integrity Protection, OS X’s new feature to (IIRC) keep malware from altering trusted default programs. --  Charles On January 25, 2016 at 12:07:59, Alex Zavatone (z...@mac.com) wrote: On Jan 25, 2016, at 1:16 AM, Rick C. wrote: > Does anyone know if there’s a way to delete stock

Re: OT: Swift Code Autoformatter?

2016-01-15 Thread Charles Jenkins
, then I get what I deserve, right?) --  Charles On January 15, 2016 at 05:40:11, sqwarqDev (sqwarq...@icloud.com) wrote: > On 15 Jan 2016, at 03:36, Charles Jenkins <cejw...@gmail.com> wrote: > > there’s no way for the end user to create them. A combination of AppleScri

Re: OT: Swift Code Autoformatter?

2016-01-15 Thread Charles Jenkins
Quincey, That’s a fantastic suggestion! I work in VS all day, and I’m quite happy with how I can set up formatting rules in it. If VS Code is as rich for Swift, I’ll be able to do most of what I want automatically within it. --  Charles On January 15, 2016 at 13:47:47, Quincey Morris

OT: Swift Code Autoformatter?

2016-01-14 Thread Charles Jenkins
I keep eyeing a program that you can install to work with Xcode and autoformat source code. You know, things like automatically fixing spacing around arithmetic operators and other important types of punctuation. This is oddly important in Swift, where the compiler can’t interpret things like

Re: Panes vs. Separate Windows

2016-01-11 Thread Charles Jenkins
Interesting that so many others like the multiwindow approach. I’ve always thought that a horrible design, because you constantly have to fool with them to get them out of the way as you work on a document. I like the approach taken by Photoshop, where you can dock them them together in the

Kernel Panics Developing for SpriteKit

2015-12-28 Thread Charles Jenkins
I’m testing the iOS game-development waters by working through Ray Wenderlich’s iOS and tvOS 2D game-development tutorial book. I’ve never used SpriteKit before. I have the latest released (non-beta) versions of El Capitain and Xcode. I’m experiencing regular kernel panics when working with

Re: Kernel Panics Developing for SpriteKit

2015-12-28 Thread Charles Jenkins
this year. --  Charles On December 28, 2015 at 12:25:06, Jens Alfke (j...@mooseyard.com) wrote: On Dec 28, 2015, at 6:23 AM, Charles Jenkins <cejw...@gmail.com> wrote: While less than ideal, I expect kernel panics when developing for SpriteKit on the Mac are just the way things are thes

Re: [OT] Good XML Viewer App for Mac

2015-11-20 Thread Charles Jenkins
I don’t remember where I got the script, but I use TextWrangler in conjunction with an XML formatter script to view XML documents. --  Charles On November 20, 2015 at 08:22:46, Dave (d...@looktowindward.com) wrote: Hi All, Could anyone recommend an XML Viewer for Mac? I just need to open XML

Re: Language options: Objective-C, Swift, C or C++?

2015-06-15 Thread Charles Jenkins
I may have misinterpreted the WWDC ’14 announcement of Swift. Somehow I got the impression Swift was supposed to make Mac programming easier and more fun. What I found was that with Cocoa, it makes easy stuff harder without making the hard stuff the slightest bit easier. (In the case of string

Re: Language options: Objective-C, Swift, C or C++?

2015-06-15 Thread Charles Jenkins
: On Jun 15, 2015, at 5:30 AM, Charles Jenkins cejw...@gmail.com (mailto:cejw...@gmail.com) wrote: I may have misinterpreted the WWDC ’14 announcement of Swift. Somehow I got the impression Swift was supposed to make Mac programming easier and more fun. Can we pleease stay away

Re: NSUndoManager.prepareWithInvocationTarget:

2015-05-10 Thread Charles Jenkins
@bigpond.com) wrote: On 11 May 2015, at 11:05 am, Charles Jenkins cejw...@gmail.com wrote: Here’s my registerUndo function that now works great: // Document_Undo.swift It would have been useful to have mentioned that you’re using Swift, saves us Obj-C guys giving you useless advice

Re: NSUndoManager.prepareWithInvocationTarget:

2015-05-10 Thread Charles Jenkins
Solved, thanks to Charles Srstka for the example!!! I wondered why the invocation would work for him but not me. In the example, Charles marks the method to be invoked “dynamic.” That was the difference. Like most examples in the docs, NSUndoManager’s invocation example is shown in obj-c,

NSUndoManager.prepareWithInvocationTarget:

2015-05-10 Thread Charles Jenkins
Am I correct to believe there is NO way to use NSUndoManager.prepareWithInvocationTarget: if your undo method requires a parameter? I can use any method I want which has no parameter, but any method with parameters gets me the error “AnyObject does not have member named…” I thought about

Re: Where and how do I know a save completed successfully?

2015-05-08 Thread Charles Jenkins
view contained within it? If so, how do I configure that? —  Charles On April 29, 2015 at 10:19:22 AM, Uli Kusterer (witness.of.teacht...@gmx.net) wrote: On ٢٩‏/٠٤‏/٢٠١٥, at ١١:٠٨, Charles Jenkins cejw...@gmail.com wrote: I think it most likely I’m doing this in the wrong place. But what’s

Re: Where and how do I know a save completed successfully?

2015-05-08 Thread Charles Jenkins
On May 8, 2015 at 1:09:01 PM, Quincey Morris (quinceymor...@rivergatesoftware.com) wrote: In this case, the text view should probably use the document undo manager, though you may have to do extra work to coordinate its use with your document’s needs. To configure it, you should tell the text

Where and how do I know a save completed successfully?

2015-04-29 Thread Charles Jenkins
I realized yesterday that my app doesn’t mark its data structures as clean (saved) after a save operation, and I’m trying to find the right place to do that. My NSDocument subclass implements saveToURL and fileWrapperOfType. Intuitively I thought I could probably mark things as saved at the

Re: Where and how do I know a save completed successfully?

2015-04-29 Thread Charles Jenkins
Thank you, Uli and everyone. I’ll check out updateChangeCount: I did file a bug report about the compiler crash caused by my syntax. —  Charles On April 29, 2015 at 10:19:22 AM, Uli Kusterer (witness.of.teacht...@gmx.net) wrote: On ٢٩‏/٠٤‏/٢٠١٥, at ١١:٠٨, Charles Jenkins cejw...@gmail.com

Re: To Swiftly Crash

2015-04-27 Thread Charles Jenkins
at 16:05:00, Quincey Morris (quinceymor...@rivergatesoftware.com) wrote: On Apr 26, 2015, at 12:40 , Charles Jenkins cejw...@gmail.com wrote: Is this a disaster in Swift-to-ObjC bridging, or have I done something wrong to cause it?   func textView( tv:NSTextView, shouldChangeTextInRange

To Swiftly Crash

2015-04-26 Thread Charles Jenkins
I’m experiencing a crash in what looks like Swift-library code in preparation for a call from NSTextView to my delegate method. I put a breakpoint on my method, but the crash seems to happen before actually getting into my code. To see if the problem could be reproduced succinctly, I took an

Re: Swift: How to determine if a Character represents whitespace?

2015-04-03 Thread Charles Jenkins
resultString = attrStr.attributedSubstringFromRange( result ) —  Charles On April 2, 2015 at 11:16:52 PM, Quincey Morris (quinceymor...@rivergatesoftware.com) wrote: On Apr 2, 2015, at 19:28 , Charles Jenkins cejw...@gmail.com wrote: I can indeed call attrStr.string.rangeOfCharacterFromSet

Re: Swift: How to determine if a Character represents whitespace?

2015-04-03 Thread Charles Jenkins
) wrote: On Apr 3, 2015, at 04:00 , Charles Jenkins cejw...@gmail.com wrote:     for char in String( self ).utf16 {       if set.characterIsMember( char ) {         return true       } Now we’re back to the place we started. This code is wrong. It fails for any code point that isn’t representable

Re: Swift: How to determine if a Character represents whitespace?

2015-04-02 Thread Charles Jenkins
compatibility is give up on Swift purity and put my range-trimming function in an Objective-C file. —  Charles On April 2, 2015 at 2:15:07 PM, Quincey Morris (quinceymor...@rivergatesoftware.com) wrote: On Apr 2, 2015, at 04:54 , Charles Jenkins cejw...@gmail.com wrote: Swift has a built-in func

Re: Swift: How to determine if a Character represents whitespace?

2015-04-02 Thread Charles Jenkins
be more confident that the shrunken range I calculate would be apples to apples. --  Charles On April 2, 2015 at 01:25:40, Quincey Morris (quinceymor...@rivergatesoftware.com) wrote: On Apr 1, 2015, at 21:17 , Charles Jenkins cejw...@gmail.com wrote: for ch in String(char).utf16

Re: Swift: How to determine if a Character represents whitespace?

2015-04-02 Thread Charles Jenkins
to String and examining characters via one of the UTF views might possibly not involve a copy. But then how do I decide which view I should be using... --  Charles On April 2, 2015 at 08:44:52, Ken Thomases (k...@codeweavers.com) wrote: On Apr 2, 2015, at 6:54 AM, Charles Jenkins cejw...@gmail.com

Re: Swift: How to determine if a Character represents whitespace?

2015-04-02 Thread Charles Jenkins
Oops. My documentation viewer was set up wrong. characterAtIndex() is indeed supposed to be available in Swift. Don’t know what I’ve done wrong that I can’t use it in a playground. --  Charles On April 2, 2015 at 10:18:00, Charles Jenkins (cejw...@gmail.com) wrote: The documentation

Swift: How to determine if a Character represents whitespace?

2015-04-01 Thread Charles Jenkins
Given this code: let someCharacter = str[str.endIndex.predecessor()] How can I determine if someCharacter is whitespace? —  Charles ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to

Re: Swift: How to determine if a Character represents whitespace?

2015-04-01 Thread Charles Jenkins
Thank you very much. :-) I had been trying to figure out how to use NSCharacterSet, but I didn’t know the bit about converting to UTF-16 string first.     —  Charles On April 1, 2015 at 9:52:47 PM, Charles Srstka (cocoa...@charlessoft.com) wrote: On Apr 1, 2015, at 8:14 PM, Charles Jenkins

Re: Drawing in a view with alpha 1.0 shows windows behind

2015-03-31 Thread Charles Jenkins
with low alpha is above other content in your app, but instead of the information which *should* show through, Yosemite is blending with other content—content from windows or the desktop behind your app? --  Charles On March 31, 2015 at 08:59:48, Charles Jenkins (cejw...@gmail.com) wrote: Eyal

Re: Drawing in a view with alpha 1.0 shows windows behind

2015-03-31 Thread Charles Jenkins
Whoops. Sorry to everyone about the doubled-up email. I had a problem with my email program and thought the first reply didn’t send, so I tried again, and apparently it went out as a reply to my own reply :-( --  Charles ___ Cocoa-dev mailing list

Re: Drawing in a view with alpha 1.0 shows windows behind

2015-03-31 Thread Charles Jenkins
that view so it's not a case where we have transparency all the way down to the window. Eyal On Mar 31, 2015, at 4:01 PM, Charles Jenkins cejw...@gmail.com wrote: Eyal, I don’t have an answer for you, just a request for clarification. If a view has a low alpha setting, you

How to Extend Swift Dictionary?

2015-03-27 Thread Charles Jenkins
Does anyone know of a good tutorial on how to extend the generic dictionary class in Swift? I can add whatever I want to a typed dictionary, but I haven’t figured out the right syntax to add extensions generically. --  Charles ___ Cocoa-dev mailing

Re: Memory optimization of NSAttributedString

2015-03-25 Thread Charles Jenkins
AM, Charles Jenkins cejw...@gmail.com wrote: My app uses lots of attributed strings in “subdocuments” which get moved into and out of a text edit window. I began to wonder if I needed to add a cache for paragraph styles and string attributes, because when each subdocument gets loaded

Memory optimization of NSAttributedString

2015-03-22 Thread Charles Jenkins
My app uses lots of attributed strings in “subdocuments” which get moved into and out of a text edit window. I began to wonder if I needed to add a cache for paragraph styles and string attributes, because when each subdocument gets loaded, I’m repetitively deserializing identical attributes

Re: Programmatically putting attributed string RTF on the pasteboard

2015-03-11 Thread Charles Jenkins
to skip my conversion process entirely in cases where the data gets cut but never pasted or pasted as RTF into another app.  --  Charles On March 11, 2015 at 04:44:58, Ken Thomases (k...@codeweavers.com) wrote: On Mar 11, 2015, at 3:36 AM, Charles Jenkins cejw...@gmail.com wrote: I’m having

Programmatically putting attributed string RTF on the pasteboard

2015-03-11 Thread Charles Jenkins
I’m having a bit of difficulty learning how to use the pasteboard. I have a text view which holds the text in a rich attributed string. I determined that the built-in methods for cutting and pasting were screwing up my data because not all attributes survive the cut-and-paste process’s

Re: NSTextView Copy-and-Paste Problem

2015-03-02 Thread Charles Jenkins
Thanks, Martin. The docs say you can put anything you want into the attributes dictionary—without mentioning that cutting and pasting will screw it all up. But it makes sense why, if cutting and pasting involves a translation into some non-native format. I’ll try to learn how to override

Re: NSTextView Copy-and-Paste Problem

2015-03-02 Thread Charles Jenkins
On February 28, 2015 at 06:25:39, Charles Jenkins (cejw...@gmail.com) wrote: I’m having problems with text attributes getting mangled by copy-and-paste operations within the selfsame text view. Obviously text pasted in from outside the app would have an unpredictable set of attributes, but you’d think

NSTextView Copy-and-Paste Problem

2015-02-28 Thread Charles Jenkins
I’m having problems with text attributes getting mangled by copy-and-paste operations within the selfsame text view. Obviously text pasted in from outside the app would have an unpredictable set of attributes, but you’d think copying and pasting in the same text view would leave you with a

Convert CGFloat to NSNumber

2015-02-24 Thread Charles Jenkins
I’m surprised how painful it is to do trivial things in Swift. All I want to do is convert NSFont.pointSize to an NSNumber, but I can’t figure out any syntax the Swift compiler will accept. My latest fruitless attempt has involved trying to simply cast the value into something for which

Re: Convert CGFloat to NSNumber

2015-02-24 Thread Charles Jenkins
without making the hard stuff any easier.  —  Charles On February 24, 2015 at 7:45:22 AM, Roland King (r...@rols.org) wrote: On 24 Feb 2015, at 18:57, Charles Jenkins cejw...@gmail.com wrote: I’m surprised how painful it is to do trivial things in Swift. I’ve stopped being surprised

Re: Package/folder confusion

2015-02-17 Thread Charles Jenkins
(quinceymor...@rivergatesoftware.com) wrote: On Feb 17, 2015, at 06:31 , Charles Jenkins cejw...@gmail.com wrote: In my target’s Info tab, I have one Document Type: I filled in its Name, Class (the class of my Document window controller), and Extension. I selected Editor as the Role and made sure

Package/folder confusion

2015-02-17 Thread Charles Jenkins
I’ve got a goofy issue that’s been with me for a while, but I had more important things to work on. Months ago, members of this list told me how to set up my project so the document would be stored as a package. I tried it, it worked, and all was great. But at that time I was developing

Idea for Improving Vibrancy

2015-02-15 Thread Charles Jenkins
I have an idea for improving vibrancy, but right now it’s just a thought experiment. I don’t know how to accomplish it, so I wonder if you guys could provide any advice. I just posted this suggestion to Apple’s OS X feedback site: Please consider adding NSVisualEffectBlendingModeDesktop and

  1   2   3   >