Re: Need for Swift

2019-10-15 Thread Paul Scott via Cocoa-dev
> On Oct 15, 2019, at 9:40 AM, Richard Charles via Cocoa-dev > wrote: > > I have found your comments enlightening. So if I understand correctly you > have three choices for a native UI on the Mac. > > 1. Objective-C which would integrate nicely with your C++ business logic > using Objective-

Re: unicode fraction symbol in a NSTextView

2016-06-22 Thread Paul Scott
Since the symbol is outside the ASCII range and your output encoding is UTF-8, that character requires 2 octets. Clearly, whatever application is reading the file isn't using UTF-8 encoding. Switch that application to UTF-8 and the character will display correctly. Sent from my iPhone > On Jun

Re: Protecting against "app nap"

2016-05-10 Thread Paul Scott
Did you try clicking “Prevent app nap” in the “Info” inspector for the app? Paul > On May 10, 2016, at 10:26 AM, Jonathan Taylor > wrote: > > Hi all, > > I’m hoping somebody can help me work out how to protect my code against the > effects of “app nap”. This code is driving a scientific exp

Re: Environment woes executing scripts from my OS X app

2015-12-16 Thread Paul Scott
Sorry, I messed up the script. It should have been this: set vars to { ¬ {name:"ANT_HOME", value:"/usr/local/apache-ant-1.9.6"}, ¬ {name:"CATALINA_HOME", value:"/Users/pscott/Projects/apache-tomcat-8.0.24"}, ¬ {name:"LAUNCHD_SCRIPT", value:"/Users/pscott/bin/logon_as"}, ¬ {done:true} ¬ } r

Re: Environment woes executing scripts from my OS X app

2015-12-16 Thread Paul Scott
By the way, you could also use this AppleScript, saved as an application, and run automatically via the System Preferences -> Users & Groups -> Current User -> Login Items configuration. set vars to { ¬ { name:"ANT_HOME", value:"/usr/local/apache-ant-1.9.6" }, ¬ { name:"CATALINA_HOME", v

Re: Environment woes executing scripts from my OS X app

2015-12-16 Thread Paul Scott
On Dec 16, 2015, at 15:47, Rick Mann wrote: > I'm working on an OS X app that unfortunately has to call a series of bash > and python scripts for part of the processing it does. I was able to include > the scripts in my app's bundle, and invoke them there, but the environment is > different w

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

2015-06-13 Thread Paul Scott
> On Jun 13, 2015, at 3:59 PM, Quincey Morris > wrote: > > I don’t want to take issue with the opinions being expressed in this thread, > but I was struck by the argument you used in coming to your opinion: > > On Jun 13, 2015, at 15:27 , Paul Scott <mailto:ps

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

2015-06-13 Thread Paul Scott
Having perused the Swift documentation, viewed the pertinent Apple sessions, and listened to the arguments (mostly pro) surrounding Swift since its initial release, I’ve decided that the language provides (me) no additional benefits over Objective-C and C++, and indeed, Swift adds additional com

Re: Where is my bicycle?

2015-04-06 Thread Paul Scott
On Apr 6, 2015, at 9:57 AM, Charles Srstka wrote: > > The problem, then, is likely the fact that NSCharacterSet considers a > “character” simply as a UTF-16 code point, rather than a true Unicode > character as Swift does. That should not matter. UTF-16 is a variable length encoding. It is gua

Re: Blurry is the New Sharp

2015-01-05 Thread Paul Scott
On Jan 5, 2015, at 5:01 AM, Alex Zavatone wrote: > > On Jan 5, 2015, at 7:58 AM, Charles Jenkins wrote: > >> Leaving aside any discussion of whether it was a good idea to add "vibrancy" >> to the OS, I do have a question about how to use it. > > Um, it was a terrible amateurish idea. And a

Re: Beep ( frequency, duration)

2014-12-29 Thread Paul Scott
> On Dec 29, 2014, at 2:12 AM, Michael Crawford wrote: > > OpenAComponent( comp, &output ) > CloseComponent( output ) These are deprecated since — I believe — OS X 10.8. You should probably use the iOS compatible functions: AudioComponentInstanceNew(comp, &output) AudioComponentInsta

Re: Beep ( frequency, duration)

2014-12-28 Thread Paul Scott
On Dec 28, 2014, at 12:05 PM, Raglan T. Tiger wrote: > > Is it possible with Cocoa to generate a tone of a specified frequency and > duration to play synchronously? > > > -rags > You can use Audio Unit Framework from Objective-C or Swift to generate sound on the fly. For example, a sine wav

Re: Common Date between Swift and ObjC

2014-08-12 Thread Paul Scott
Except the compiler cannot treat them as constants for optimization. Paul > On Aug 12, 2014, at 10:57 AM, Gerriet M. Denkmann > wrote: > > > On 13 Aug 2014, at 00:52, Jeff Kelley wrote: > >> Gerriet, >> >> You should be able to make a constant variable, not a preprocessor >> definiti

Re: Resolve alternative TLD

2014-07-03 Thread Paul Scott
to access the DNS > server that knows about your custom domain? It’s probably getting the name > server IP addresses via DHCP. > > —Jens > > PS: This question really belongs on the macnetworkprog mailing list. There > are Apple networking gurus hanging out there who

Re: NSReleasePool issue

2014-06-21 Thread Paul Scott
> On Jun 21, 2014, at 10:25 AM, Jens Alfke wrote: > > On Jun 21, 2014, at 7:39 AM, Kyle Sluder wrote: > >> You should add the @autoreleasepool around NSApplicationMain. I don't know >> why it's missing from the Mac template. > > I disagree. It’s pointless to have an autorelease pool that won

Re: UITableViewCell.accessoryType UITableViewCellAccessoryDetailDisclosureButton on iOS7

2013-10-06 Thread Paul Scott
On Oct 6, 2013, at 6:34 PM, Kyle Sluder wrote: > On Sun, Oct 6, 2013, at 06:03 PM, Paul Scott wrote: >> I’m leaning toward a bug, since there are two separate “disclosure” >> constants for accessoryType; seems you should see one or the oth

Re: UITableViewCell.accessoryType UITableViewCellAccessoryDetailDisclosureButton on iOS7

2013-10-06 Thread Paul Scott
distinguish between selection and disclosure. On the other hand, the Calendar app might be using an accessory view to work around the bug; if it *is* a bug. I’d appreciate any insight on this issue. I’ll file a radar if it turns out to be a bug. Paul On Oct 6, 2013, at 6:03 PM, Paul Scott wrote

Re: UITableViewCell.accessoryType UITableViewCellAccessoryDetailDisclosureButton on iOS7

2013-10-06 Thread Paul Scott
I’m leaning toward a bug, since there are two separate “disclosure” constants for accessoryType; seems you should see one or the other, not both. UITableViewCellAccessoryDisclosureIndicator, UITableViewCellAccessoryDetailDisclosureButton, Paul On Oct 6, 2013, at 5:46 PM, Paul Scott wrote

UITableViewCell.accessoryType UITableViewCellAccessoryDetailDisclosureButton on iOS7

2013-10-06 Thread Paul Scott
rmat:@"Row %d", indexPath.row + 1]; cell.detailTextLabel.text = [NSString stringWithFormat:@"Detail for row %d", indexPath.row + 1]; return cell; } -- Paul Scott psc...@skycoast.us ___ Cocoa-dev mailing list (Cocoa-dev@lists.app

Re: Transparent Image with Tint Color

2013-09-29 Thread Paul Scott
On Sep 29, 2013, at 6:54 PM, Kyle Sluder wrote: > >> How do I get an image rendered in the tint color? > > Start a bitmap context, set your template image as the image mask, set the > full color to the appropriate tintColor, and fill the bounds of the context. > > Construct a data URI out of

Re: Transparent Image with Tint Color

2013-09-29 Thread Paul Scott
@"( function() {" @"var x = document.getElementById('infoIcon');" @"if ( !! x ) { " @"x.src = 'data:image/png;base64,", data, @"';" @"}" @&quo

Re: Transparent Image with Tint Color

2013-09-29 Thread Paul Scott
3, at 2:55 PM, Paul Scott wrote: > Now, I'm wondering if there's a way to get UIWebView to apply tint color to > an image URL, via some extension? > > I would like my UIWebView-based app help — which references the app's images > — to dynamically adopt the same ti

Re: Transparent Image with Tint Color

2013-09-29 Thread Paul Scott
ng the template-rendered image to disk. Paul On Sep 29, 2013, at 1:38 PM, Paul Scott wrote: > Thanks, guys! That did the trick; exactly what I needed for iOS 7 app update, > and so simple! > > I will watch session 214 to garner what other gems might have been > presen

Re: Transparent Image with Tint Color

2013-09-29 Thread Paul Scott
Indeed, it is. On Sep 29, 2013, at 2:51 PM, Eric E Dolecki wrote: > Must be a PNG no? > >> On Sep 29, 2013, at 5:16 PM, Alex Zavatone wrote: >> >> There are many kinds of image files. Which kind is it? >> >>> On Sep 29, 2013, at 4:15 PM, Paul Sco

Re: Transparent Image with Tint Color

2013-09-29 Thread Paul Scott
Thanks, guys! That did the trick; exactly what I needed for iOS 7 app update, and so simple! I will watch session 214 to garner what other gems might have been presented. I *did* read the iOS 7 UI Transition Guide—which I just now verified discusses UIImageRenderingModeAlwaysTemplate—but someh

Transparent Image with Tint Color

2013-09-29 Thread Paul Scott
I have an image file—created in Photoshop, anti-aliasd against a transparent background—that I would like colorized using the same tint color used in the navigation bar. Is there a way to colorize this pre-drawn image programmatically? -- Paul Scott psc...@skycoast.us smime.p7s Description

Re: Casting objects in NSCountedSet

2013-09-24 Thread Paul Scott
On Sep 24, 2013, at 9:29 AM, Paul Scott wrote: >> No, you should be able to cast, as the method is found dynamically at >> run-time. Simple test program shows this. > > Your app does not demonstrate Koen's situation, in which he receives a set of > ObjectA instance

Re: Casting objects in NSCountedSet

2013-09-24 Thread Paul Scott
@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/pscott%40skycoast.us > &

Re: Strange behaviour of iPhone

2013-09-21 Thread Paul Scott
losed. Basically, at that point, how the storage gets reused is up to the whim of the compiler — or, perhaps more accurately, the compiler writers. Paul On Sep 21, 2013, at 10:22 AM, "Gerriet M. Denkmann" wrote: > > On 21 Sep 2013, at 23:48, Paul Scott wrote: > >> Th

Re: Scroll a collection

2013-09-21 Thread Paul Scott
Off the top of my head, you could put a custom UIButton with background arrow image on top of your other views and have it handle touch events to initiate scrolling. Sent from my iPad > On Sep 21, 2013, at 9:46 AM, Livio Isaia wrote: > > Hi everybody. > > I need to display an horizontal lis

Re: Strange behaviour of iPhone

2013-09-21 Thread Paul Scott
The "important" brace means that the tupels array is block local. You then print the block local variable from outside the block, which is no longer valid. Sent from my iPad > On Sep 21, 2013, at 9:00 AM, "Gerriet M. Denkmann" > wrote: > > I just created a new iOS app - universal, Master-Deta

Re: [OT] iTunes 11.1 Beta

2013-09-18 Thread Paul Scott
beta 2. Whew! No lesson learned here. -- Paul Scott psc...@skycoast.us smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list

Re: ARC vs Manual Reference Counting

2013-09-13 Thread Paul Scott
The joys of a nice skewed profile. Ahhh…. :-) Of course, the ones you don’t notice, the flat profiles, are in some ways more insidious, as they drag everything down just a bit. Along with all the other things that drag everything down a bit, and soon enough you have something that’s 10%

Re: ARC vs Manual Reference Counting

2013-09-08 Thread Paul Scott
Yes. I do. Absolutely. Sent from my iPad On Sep 8, 2013, at 9:41 PM, livinginlosange...@mac.com wrote: > Would anyone agree me that ARC introduces more rules and considerations than > previously existed with manual reference counting? ___ Cocoa-dev

Re: NSURL relativePath problem

2013-08-29 Thread Paul Scott
blematic (potentially legally so). Sorry for the side-chatter, but best to develop good habits than have regrets. -- Paul Scott psc...@skycoast.us smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple

Re: Non-sandboxed Cocoa app accessing current user preferences using NSTask fails when launched outside Xcode.

2013-07-25 Thread Paul Scott
Why launch sqlite command? Why not link directly to the sqlite library and access the data base directly? Further, preference files in ~/Library/Preferences are typically XML key-value plist files. Why not use [NSUserDefaults standardUserDefaults]? Paul On Jul 23, 2013, at 10:04 AM, Public w

Re: Non-sandboxed Cocoa app accessing current user preferences using NSTask fails when launched outside Xcode.

2013-07-25 Thread Paul Scott
Why launch sqlite command? Why not link directly to the sqlite library and access the data base directly? Further, preference files in ~/Library/Preferences are typically XML key-value plist files. Why not use [NSUserDefaults standardUserDefaults]? Paul On Jul 23, 2013, at 10:04 AM, Public wr

Re: how to make a task less cpu intensive

2012-12-28 Thread Paul Scott
()'s. Paul On Dec 28, 2012, at 10:56 AM, Paul Scott wrote: > Try using a memory zone, see malloc_zone_malloc (3) and http://jeny.us/vXc3 > (short link to Apple developer page describing malloc_zone_malloc, etc). > > Paul > > On Dec 28, 2012, at 9:40 AM, Nick Rogers wr

Re: how to make a task less cpu intensive

2012-12-28 Thread Paul Scott
Try using a memory zone, see malloc_zone_malloc (3) and http://jeny.us/vXc3 (short link to Apple developer page describing malloc_zone_malloc, etc). Paul On Dec 28, 2012, at 9:40 AM, Nick Rogers wrote: > Hi, > > I have a tree in memory (all nodes malloc'ed blocks) and when I start freeing >

[SOLVED] NSUbiquitousKeyValueStoreDidChangeExternallyNotification

2012-10-19 Thread Paul Scott
I spent days checking out everything to no avail. Both devices using the same iCloud account, entitlements and provisioning profile in order, code correct, waiting patiently for a notification: nada. In total frustration I powered off both devices and restarted them. Voilà! Now I'm getting not

NSUbiquitousKeyValueStoreDidChangeExternallyNotification

2012-10-17 Thread Paul Scott
I must be missing something very basic, but I cannot get iCloud KV storage to work. I've really perused the documentation on many fronts, but I'm still stumped. My app's provisioning profile is configured for iCloud, all the correct entitlements are set, and I can even see the the Ubiquity "Doc

Re: autorelease pool comprehension

2011-03-30 Thread Paul Scott
Oh, man! That was some wicked beer I drank. I see now that I've retained those objects by adding them to the array. Please ignore my questions. Paul On Mar 30, 2011, at 9:53 AM, Apple Developer wrote: > Reading about autorelease pools gave me the idea that I could reduce the > memory footprin