Re: An API for Airplane mode on iOS?

2016-02-08 Thread Clark S. Cox III
> On Feb 8, 2016, at 13:55, Alex Zavatone wrote: > > On iOS, we're running into particular issues with one user who puts his > device in Airplane mode overnight. > > I'm using reachability classes to determine if we can reach our web services > IP and monitoring all

Re: How to know if an NSView has pending draws

2016-02-04 Thread Clark S. Cox III
> On Feb 4, 2016, at 15:07, Jeff Evans wrote: > > Suppose one wants to do a task in an NSView only once it has no drawRect > calls pending. Is there any way to tell, for a particular NSView, if there > are any drawing events coming up? Whether, that is, the view is up

Re: How to know if an NSView has pending draws

2016-02-04 Thread Clark S. Cox III
hierarchy and ask every visible view for the value of its needsDisplay property. (Though I would advise against it > > Jeff > > > On Feb 4, 2016, at 3:31 PM, Clark S. Cox III wrote: > > > > > > >> On Feb 4, 2016, at 15:07, Jeff Evans <jev...@ars-nova.c

Re: Obj-C - your thoughts on hiding data members?

2016-01-28 Thread Clark S. Cox III
> On Jan 28, 2016, at 03:14, Dave wrote: > > >> On 28 Jan 2016, at 00:34, Alex Zavatone wrote: >> >> Ahh, just a little testing shows that well, if it’s not ASCII, it’s not >> going to work, period. > > See? If it ain’t ASCII it ain’t Source Code!

Re: Trying to understand a permissions failure when writing to ~/Desktop

2016-01-28 Thread Clark S. Cox III
> On Jan 27, 2016, at 22:08, Graham Cox wrote: > > >> On 28 Jan 2016, at 4:36 PM, Graham Cox wrote: >> >> Why would the OS think an app was sandboxed > > > OK, I think I found the problem. In Build Settings->Code Signing, the “Code > Signing

Re: Obj-C - your thoughts on hiding data members?

2016-01-27 Thread Clark S. Cox III
> On Jan 27, 2016, at 03:38, Dave wrote: > > >>> I'm going to step out on a limb and since Xcode has supported editing in UTF-8 and 16, that we look into those character sets and pick some symbols that accurately represent public, protected and

Re: Obj-C - your thoughts on hiding data members?

2016-01-27 Thread Clark S. Cox III
> On Jan 27, 2016, at 11:49, Alex Zavatone wrote: > > > On Jan 27, 2016, at 6:38 AM, Dave wrote: > >> > I'm going to step out on a limb and since Xcode has supported editing in > UTF-8 and 16, that we look into those character sets and pick some > symbols

Re: delete stock apps

2016-01-25 Thread Clark S. Cox III
> On Jan 24, 2016, at 22:16, Rick C. wrote: > > Does anyone know if there’s a way to delete stock apps on 10.11 without > disabling SIP and rebooting the machine? No. > Or, is there a way to disable SIP without rebooting? Thanks! No. >

Re: Problem Archiving/Un-archiving Custom Objects

2016-01-22 Thread Clark S. Cox III
> On Jan 22, 2016, at 06:14, Dave wrote: > > >> On 21 Jan 2016, at 23:40, Quincey Morris >> wrote: >> >> On Jan 21, 2016, at 15:22 , Dave > > wrote: >>> >>> I’m relying

Re: Problem Archiving/Un-archiving Custom Objects

2016-01-22 Thread Clark S. Cox III
> On Jan 22, 2016, at 06:14, Dave wrote: > > >> On 21 Jan 2016, at 23:40, Quincey Morris >> wrote: >> >> On Jan 21, 2016, at 15:22 , Dave > > wrote: >>> >>> I’m relying

Re: How to record screen in iOS

2016-01-22 Thread Clark S. Cox III
Unfortunately, what you ask is not possible. There are ways for your app to record *itself* (e.g. through ReplayKit), and there are ways for a connected computer to record the screen of any running app (e.g. through QuickTime Player). But there is no way for your app to record *another* app

Re: Dead Reckoning

2015-10-13 Thread Clark S. Cox III
> On 2015/10/09, at 22:24, Michael de Haan  wrote: > > let secondsToHours = 2.778E-4 Only tangentially related, but that value (i.e. 1 / 3600) has a hex representation that is almost too beautiful not to use: 0x1.23456789ABCDEFp-12 :)

Fwd: Identifying a specific Mac model

2015-09-18 Thread Clark S. Cox III
> On 2015/09/16, at 1:38, Marek Hrušovský > wrote: > > Many thanks. > What I have discovered is that they track model version as well: > > Exported UTI > com.apple.macbook-retina-silver > com.apple.device-model-code >

Re: Thread-safe atomic property for array

2015-08-15 Thread Clark S. Cox III
On Aug 15, 2015, at 05:21, Sandy McGuffog mcguff...@gmail.com wrote: What guarantees that the current autorelease cycle doesn’t end in the middle of this code? Because that’s how autorelease pools work. Actually, as I think about it, technically, the [[hostObject myArray] retain]

Re: C Assert in BSD Static Library

2015-06-28 Thread Clark S. Cox III
and suspenders. What if the compiler did #ifdef NDEBUG if ( NDEBUG == 1 ) turn off stuff #endif If the compiler is doing that, then it is simply wrong. If NDEBUG is defined at all, then assert is disabled. This is guaranteed by the C standard. -- Clark S. Cox III clarkc...@gmail.com

Re: NSBezierPath + thin lines + antialias = :(

2015-02-10 Thread Clark S. Cox III
On Feb 10, 2015, at 12:20, Quincey Morris quinceymor...@rivergatesoftware.com wrote: On Feb 10, 2015, at 11:23 , Jerry Krinock je...@ieee.org wrote: I’ve always wondered why, when you’re dragging a window around a non-Retina screen, the anti-aliasing doesn’t show a “comb filter” kind

Re: NSBezierPath + thin lines + antialias = :(

2015-02-10 Thread Clark S. Cox III
On Feb 10, 2015, at 15:34, Clark S. Cox III clarkc...@gmail.com wrote: On Feb 10, 2015, at 12:20, Quincey Morris quinceymor...@rivergatesoftware.com wrote: On Feb 10, 2015, at 11:23 , Jerry Krinock je...@ieee.org wrote: I’ve always wondered why, when you’re dragging a window around

Re: ARC query

2015-01-07 Thread Clark S. Cox III
On Jan 7, 2015, at 12:55, Sean McBride s...@rogue-research.com wrote: On Wed, 7 Jan 2015 12:02:16 -0600, Ken Thomases said: Short answer: yes, the alert is retained. Meaning that one must use the weak/strong dance pattern like this? No. The weak/strong dance would only be needed if

Re: Debugging memory leak in NSURLSession with ARC

2015-01-01 Thread Clark S. Cox III
On Jan 1, 2015, at 18:26, Graham Cox graham@bigpond.com wrote: On 2 Jan 2015, at 12:48 pm, Quincey Morris quinceymor...@rivergatesoftware.com wrote: That usually means the block and the ‘self’ it captured mutually refer to each other. I’m betting this is what’s wrong in your

Re: WTF is happening?

2014-12-15 Thread Clark S. Cox III
that does not conform to NSObject protocol. On Dec 15, 2014, at 00:29, Clark S. Cox III clarkc...@gmail.com wrote: On Dec 13, 2014, at 11:57, Maxthon Chan m...@maxchan.info wrote: NSProxy checking actually work, but throwing those classes that derive from Object class (note I used

Re: WTF is happening?

2014-12-14 Thread Clark S. Cox III
On Dec 13, 2014, at 11:57, Maxthon Chan m...@maxchan.info wrote: NSProxy checking actually work, but throwing those classes that derive from Object class (note I used capitalised O here, the old Object class from early NeXT times, also used heavily in OS X kernel, GCD and Mach ports)

Re: Crash with ARC enabled on Xcode 6.1

2014-10-23 Thread Clark S. Cox III
On Oct 23, 2014, at 15:26, Kyle Sluder k...@ksluder.com wrote: On Thu, Oct 23, 2014, at 05:06 PM, Greg Parker wrote: On Oct 23, 2014, at 2:18 AM, Kevin Meaney k...@yvs.eu.com wrote: From what I understand any code that is executed before main is called is done so before the

Re: Can a 32bit only MacOS Application use 64bit-only Frameworks?

2014-10-01 Thread Clark S. Cox III
. On 30 בספט 2014, at 23:54, Clark S. Cox III clarkc...@gmail.com wrote: On Sep 30, 2014, at 12:49, Motti Shneor su...@bezeqint.net wrote: Hello everyone. This seems to be an upside-down question, but bare with me... Our Mac Client-side application can (sadly) only be built and run

Re: Can a 32bit only MacOS Application use 64bit-only Frameworks?

2014-09-30 Thread Clark S. Cox III
On Sep 30, 2014, at 12:49, Motti Shneor su...@bezeqint.net wrote: Hello everyone. This seems to be an upside-down question, but bare with me... Our Mac Client-side application can (sadly) only be built and run in 32bit-only. Reason is: bit parts of it are legacy 32bit-only C++ code

Re: Updating iPad to 8.0 final

2014-09-22 Thread Clark S. Cox III
On Sep 18, 2014, at 10:36, Rick Mann rm...@latencyzero.com wrote: I have an iPad, 3rd gen, Wi-Fi + Cellular (ATT). It's model A1430. I downloaded the appropriate .ipsw file (iPad3,2_8.0_12A365_Restore.ipsw), but iTunes refuses to update it, saying The iPad “XXX” could not be updated

Re: Updating iPad to 8.0 final

2014-09-22 Thread Clark S. Cox III
On Sep 22, 2014, at 16:28, Rick Mann rm...@latencyzero.com wrote: On Sep 22, 2014, at 16:23 , Clark S. Cox III clarkc...@gmail.com wrote: On Sep 18, 2014, at 10:36, Rick Mann rm...@latencyzero.com wrote: I have an iPad, 3rd gen, Wi-Fi + Cellular (ATT). It's model A1430. I

Re: Arc: Switch case is in protected scope

2013-10-22 Thread Clark S. Cox III
On Oct 22, 2013, at 08:50, Sean McBride s...@rogue-research.com wrote: On Tue, 22 Oct 2013 10:31:01 +0200, Daniel Höpfl said: Was the old (non-arc) code faulty (but the compiler did not notice this)? Why is the arc-version (with TRIGGER_ERROR defined) wrong? It is wrong in the non-arc

Re: Arc: Switch case is in protected scope

2013-10-22 Thread Clark S. Cox III
On Oct 22, 2013, at 09:16, Scott Ribe scott_r...@elevated-dev.com wrote: On Oct 22, 2013, at 9:50 AM, Sean McBride s...@rogue-research.com wrote: I don't think you can quote the Standard about 'goto' and just wave your hands and say it applies to 'switch' also. :) The Standard's

Re: 3rd party executable in iOS project

2013-10-21 Thread Clark S. Cox III
On Oct 21, 2013, at 20:02, Maxthon Chan xcvi...@me.com wrote: No, this pipe/fork/dup2/exec is used in App Store apps - No. I am sorry, but you are wrong. iSSH is an example as it used its separate PuTTY executable. iSSH does not use a separate executable. It is not possible to do so from a

Re: How to add device to Team Provisioning Profile?

2013-07-30 Thread Clark S. Cox III
downtime, that it would still be useful to allow manually editing the team profile in spite of the risk of losing your changes. Sent from my iPhone On Jul 29, 2013, at 23:04, Rick Mann rm...@latencyzero.com wrote: On Jul 29, 2013, at 22:33 , Clark S. Cox III clark@apple.com wrote

Re: How to add device to Team Provisioning Profile?

2013-07-29 Thread Clark S. Cox III
No, but you can create a new profile in the meantime with the same appid, all of your team's devices and all of your team's development certificates. Once the Xcode integration is back up and running, you can just delete that profile and go back to using the automatically generated one. Sent

Re: byte orders question

2011-12-13 Thread Clark S. Cox III
of the object representation of the value is reinterpreted as an object representation in the new type as described in 6.2.6 (a process sometimes called type punning). This might be a trap representation. -- Clark S. Cox III clarkc...@gmail.com smime.p7s Description: S/MIME cryptographic signature

Re: STAssertEquals and type-checking

2011-08-16 Thread Clark S. Cox III
the NS_BUILD_32_LIKE_64 preprocessor macro. If you do that, then 32ul will be correct on all Mac/iOS platforms. -- Clark S. Cox III clarkc...@gmail.com smime.p7s Description: S/MIME cryptographic signature ___ Cocoa-dev mailing list (Cocoa-dev

Re: GC, plain C structs, and when to use __strong

2010-09-22 Thread Clark S. Cox III
.) Correct. As roots, the stack and registers (i.e. all ways that a parameter could be passed) are *always* effectively strong. -- Clark S. Cox III clarkc...@gmail.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: NSTreeController and insertObject:atArrangedObjectIndexPath:

2010-06-19 Thread Clark S. Cox III
You should only need add your object to your model (which needs to me KVO compliant). The tree controller will then notice, in response to the KVO notification that a new item was added. You should rarely, if ever, be direcly adding objects to the controller layer like this. Sent from my

Re: autorelease: how does this work!? (if at all)

2010-06-18 Thread Clark S. Cox III
That depends on how you define subsystem. I see nothing wrong with the way the op is structuring this (i.e. doing the transformation on one serial queue, and doing the writing on another queue. This allows many if the transformations to complete without ever waiting on the disk, yet still

Re: Calling allObjects memory allocation problem

2010-05-22 Thread Clark S. Cox III
On May 21, 2010, at 8:54 AM, Keary Suska wrote: On May 21, 2010, at 9:18 AM, Paul Sanders wrote: Also be aware that just because memory is released, doesn't mean it is returned to the system (e.g. you will not see your apps memory usage go down in Activity Monitor). In fact, AFAIK, it

Re: NSKeyedArchiver and NSPoints

2010-04-28 Thread Clark S. Cox III
On Apr 28, 2010, at 12:31 PM, Quincey Morris wrote: On Apr 28, 2010, at 11:42, Kyle Sluder wrote: Er? Unless there's some documentation about the precision of NSStringFromPoint being less than that of the members, NSStringFromPoint could certainly include just as much precision as the

Re: Localizing of print dialogs

2010-04-24 Thread Clark S. Cox III
Even the system resources only use the localized variant if the application itself is localized. If you don't have a Russian localization for your app, you wont get the russian system dialogs either. This keeps apps internally consistent. Sent from my iPad On Apr 23, 2010, at 17:28, danchik

Re: ObjC question

2010-04-10 Thread Clark S. Cox III
You cannot. You will have a pointer of some kind in your Foo class that points to the current container. Sent from my iPad On Apr 10, 2010, at 14:38, Tony Romano tony...@hotmail.com wrote: Using the sample below, how do I get the instance of the class in which I am contained WITHOUT

Re: CGPoint and KVO

2010-04-03 Thread Clark S. Cox III
The main issue with the original code is that it assumes that the value is a CGPoint. If it were anything smaller, you'd get garbage values in your point, and if it were any larger, you'd be stomping on memory as you ran off the end of your CGPoint variable. Any time you use -[NSValue

Re: Allow only root/admin users to execute the cocoa app

2010-01-24 Thread Clark S. Cox III
Let me say: running Cocoa peograms as root is a *very* bad idea. There are many ways to get code loaded into applications, and if said program is running as root, that code will be running as root as well. Show me a GUI application running as root, and I'll shoe you a trivially compromised

Re: There must be a better way

2009-12-25 Thread Clark S. Cox III
Of course they can. In the view's xib, the File's Owner object represents the object that is doing the loading of the xib. In this case, that is your view controller. Sent from my iPhone On Dec 23, 2009, at 16:18, Charlie Dickman 3tothe...@comcast.net wrote: Except the view and the

Re: copyWithZone - if anyone could explain this to me ?

2009-11-30 Thread Clark S. Cox III
Sent from my iPhone On Nov 30, 2009, at 17:26, Jeff Laing jeff.la...@spatialinfo.com wrote: In most cases, yes. However, copyWithZone: is special, the superclass' implementation just blindly copies all of the raw bits in the source object to the newly created one. If you were to use the

Re: different width in fastenumeration

2009-11-25 Thread Clark S. Cox III
You have the -Wconversion flag on. Sent from my iPhone On Nov 24, 2009, at 6:47, Hans van der Meer h.vanderm...@uva.nl wrote: Doing NSDictionary *objects enumerate over its keys thus: for ( id key in [objects allKeys] ) {} According to the documentation allKeys returns a NSArray and

Re: GC Re: Questions about Nib Object Retention

2009-10-21 Thread Clark S. Cox III
No, there is no race. While the nib is being loaded, there are plenty of references to the objects therein on the stack and in registers. These references will keep these objects alive during loading. If you don't keep a strong reference to these objects during loading they will become

Re: Why does my font come out looking fuzzy?

2009-10-17 Thread Clark S. Cox III
There's also the possibility that the text isn't being drawn properly aligned to the pixel grid. Sent from my iPhone On Oct 17, 2009, at 19:52, Kyle Sluder kyle.slu...@gmail.com wrote: You need to post a screenshot of what you're seeing. I can think of two possibilities off the top of my

Re: Code Sign verification on Leopard

2009-10-15 Thread Clark S. Cox III
The malicious code could just move the entire original bundle wholesale. Code signature check still sees the original bundle. Sent from my iPhone On Oct 14, 2009, at 21:42, Charles Srstka cocoa...@charlessoft.com wrote: On Oct 14, 2009, at 11:40 PM, Jeff Laing wrote: Actually, heck,

Re: GC crash due to being naughty

2009-10-15 Thread Clark S. Cox III
That is simply not true. That code is perfectly well defined. Sent from my iPhone On Oct 15, 2009, at 17:10, Oftenwrong Soong oftenwrongso...@yahoo.com wrote: Hi Ben, You say the crash occurs in this line: individuals[individualCount++] = individualsForPop[i]; The problem may be in

Re: Manually updating a data bound value of a bound text field

2009-06-18 Thread Clark S. Cox III
Then change that and do the right thing. :) Just add an intermediate NSObjectController to your nib in between your bound field and the file's owner. Sent from my iPhone On Jun 18, 2009, at 9:17, Ramakrishna Vavilala vrk.li...@gmail.com wrote: Unfortunately, I used incorrect design by

Re: Surprising entanglement of UI lock during fetch request in background thread (NSViewHierarchyLock/MOC locking deadlock).

2009-02-20 Thread Clark S. Cox III
There aren't enough locks in the world to make it safe to update a table's bound model on a background thread. If you have a UI element bound to a another object, that object must never send KVO notifications on a bacgeohnd thread. Sent from my iPhone On Feb 20, 2009, at 11:57, Luke Evans

Re: Running out of memory on stack in C++ routine invoked within Cocoa NSOperation

2009-02-18 Thread Clark S. Cox III
I would strongly reccommend using std::vector instead of a raw array. That way you're immune from stack size issues. Sent from my iPhone On Feb 18, 2009, at 0:31, Leo Singer doc.aron...@gmail.com wrote: Actually, if the big array and the loop are moved from the C++ method into the Objective

Re: Question Regarding the Memory Address of Objects

2008-12-20 Thread Clark S. Cox III
The objective-c garbage collector does not move objects, so that is not an issue with using raw pointers. Sent from my iPhone On Dec 20, 2008, at 6:50, Dong Feng middle.fengd...@gmail.com wrote: I have a concern that the direct use of a pointer as a memory address may have a problem in the

Re: how to pass arguments by reference

2008-12-10 Thread Clark S. Cox III
C, and by extension Objective-C, do not have references in the C++ sense. You'll have to pass a pointer to the thing that you want your method to be able to modify. Sent from my iPhone On Dec 10, 2008, at 7:43, Nick Rogers [EMAIL PROTECTED] wrote: Hi, I have the following in my .m file:

Re: Leaking CGColor objects

2008-10-26 Thread Clark S. Cox III
You must do both, otherwise you will leak. Sent from my iPhone On Oct 26, 2008, at 10:58, DKJ [EMAIL PROTECTED] wrote: Thanks to everyone for the replies. I have one (hopefully last) question (on this topic): On 26 Oct, 2008, at 09:23, Clark Cox wrote: As long as MyCALayer's dealloc is

Re: How to count composed characters in NSString?

2008-09-28 Thread Clark S. Cox III
Sent from my iPhone On Sep 28, 2008, at 21:52, Michael Gardner [EMAIL PROTECTED] wrote: On Sep 28, 2008, at 1:17 PM, David Niemeijer wrote: Michael, On 28 sep 2008, at 14:41, Michael Gardner wrote: Upon further investigation, I may be wrong. I based my assertion upon Apple's NSString

Re: pointers in objective-c?

2008-08-01 Thread Clark S. Cox III
Correct, all objective-C objects are allocated on the heap (like using new in C++). The compiler will not allow you to allocate objects on the stack. There are ways to trick the runtime into treating an area of the stack as of it were an object, but the caviats are a list as long as my

Re: pointers in objective-c?

2008-08-01 Thread Clark S. Cox III
much with them:-) No, it won't compile: [EMAIL PROTECTED]:~]% cat test.m #import Cocoa/Cocoa.h int main() { NSString s; return 0; } [EMAIL PROTECTED]:~]% cc test.m test.m: In function ‘main’: test.m:5: error: statically allocated instance of Objective-C class ‘NSString’ -- Clark S. Cox

Re: pointers in objective-c?

2008-08-01 Thread Clark S. Cox III
The NS prefix is used for just about every external symbol in the frameworks (classes, structs, enums, typedefs, etc.). NS just tells you where the symbol came from, not whether or not the symbol is a classname. Sent from my iPhone On Aug 1, 2008, at 13:07, Giulio Cesare Solaroli [EMAIL