How to prevent NSControl from graying out when sent to background?

2008-06-24 Thread Greg
ing hosted by a background application. As such, the progress indicator in one of them is grayed out, how do I prevent it from doing that? Thanks, Greg ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or modera

Re: How to prevent NSControl from graying out when sent to background?

2008-06-24 Thread Greg
Thanks a bunch!! :-) - Greg On Jun 24, 2008, at 12:32 PM, j o a r wrote: On Jun 24, 2008, at 9:28 AM, Greg wrote: Hi, I'm making little notification windows that contain some NSControls in them, one particular one is the NSProgressIndicator (as a bar). These windows are similar t

How to keep a window always in foreground?

2008-07-04 Thread Greg
g in front regardless of what application is active? Thanks! - Greg ___ 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

Re: How to keep a window always in foreground?

2008-07-04 Thread Greg
switch to the window, and then away from it, it becomes occluded by whatever I switched to. - Greg ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderato

Re: How to keep a window always in foreground?

2008-07-04 Thread Greg
that you don't have any other code "trying to make it work". I feel silly. :-p - Greg On Jul 4, 2008, at 2:27 PM, Greg wrote: On Jul 4, 2008, at 2:17 PM, Markus Spoettl wrote: I think what you are looking for is the window level: http://developer.apple.com/docu

Re: How to keep a window always in foreground?

2008-07-04 Thread Greg
Oh! Actually, it was because the window was being run as modal. Make sure the window is not being run in a modal loop and it should work. - Greg On Jul 4, 2008, at 5:19 PM, Greg wrote: Sorry, suddenly it works, I think that during my attempts at "fixing" it I had some code ru

Using key-value observing on NSUserDefaults

2008-07-06 Thread Greg
7;ve tried observing its 'values' but that doesn't seem to work. Thanks, - Greg ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderato

Re: [Solved] Using key-value observing on NSUserDefaults

2008-07-06 Thread Greg
ntext:NULL]; - Greg On Jul 6, 2008, at 4:18 PM, Greg wrote: I have a preferences controller (PreferencesController) that controls a preferences window. It would be quite nice if I could observe changes to all of the preferences via key-value observing. In IB I also have an NSUserDefaults

Objective-C default initialization

2008-07-11 Thread Greg
id obj; } @end Then when -init is called is 'obj' *guaranteed*, always, in all versions of OS X, to be nil? Thanks, - Greg ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comm

Re: Objective-C default initialization

2008-07-11 Thread Greg
Thank you kindly. :-) On Jul 11, 2008, at 8:18 PM, Ryan Brown wrote: Yes: http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Tasks/AllocInitObjects.html#/ /apple_ref/doc/uid/2048-1003201 Although it happens on alloc/allocWithZone/etc, not init. Ryan _

Can't get NSScrollView to resize properly

2008-07-25 Thread Greg
e top-left corner when the window is resized, or it does not resize when the scroller appears. Help! - Greg ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the mod

Re: NSView colors

2008-07-25 Thread Greg
Are you retaining that NSColor object to make sure it sticks around? - Greg On Jul 25, 2008, at 5:40 PM, Ashley Perrien wrote: I have a custom NSView that contains as an instance variable a color. If I set the color in init as lineColor = [NSColor blueColor]; all is well. If instead I use

Re: Can't get NSScrollView to resize properly

2008-07-25 Thread Greg
Thanks to Ryan Brown and Rainer Brockerhoff for assisting with the solution to this problem. Two solutions were invented, one that used a NSTextView, and one that simply flips the NSClipView. You can get both of them here: http://www.kinostudios.com/ScrollView_madness.zip - Greg On Jul

Re: CFSTR and double-double quotes

2008-07-26 Thread Greg
;, but you can't do this: "asdf" somevar "poo" Because the compiler doesn't know the value of somevar at compile time. - Greg On Jul 26, 2008, at 2:40 PM, Ivan Galic wrote: Hi, I've been writing a utility function for getting a path within the

Re: String.join()?

2015-09-04 Thread Greg Parker
you it doesn’t exist any more), so you can’t call it or > command-click to it. You should file a bug report. It might be possible to make unavailable identifiers command-clickable, which would reveal their OS availability range or their suggeste

Re: Swift: combining Obj-C enums

2015-09-09 Thread Greg Parker
gPropertiesForKeys: nil, > options: > .SkipsSubdirectoryDescendants | .SkipsPackageDescendants | .SkipsHiddenFiles) In Swift 2 this is an OptionSetType. An option set literal looks like this: [.SkipsSubdirectoryDescendants, .SkipsPackageDescendants, .SkipsHiddenFiles] -- Greg

Re: Is it possible to transfer data by using light

2015-09-17 Thread Greg Weston
> This toy can connect to the iphone's network by detecting the blinking > screen of an iPhone. I wonder if it is possible that using this technique > to transfer data. Absolutely. Such techniques have been used for 150 years, using lamps or reflected sunlight to send Morse-like codes to human o

Re: Tracking down source of [_NSControllerObjectProxy copyWithZone:]… error

2015-09-21 Thread Greg Parker
at the bottom > Add Exception Breakpoint) Another dumb alternative: implement -[_NSControllerObjectProxy copyWithZone:] to call abort() or otherwise halt the process. Then it will stop in the debugger or generate a crash log with a stack trace pointing to the call site. -- Greg Parker gp

Re: Error unwrapping an optional which isn't an optional

2015-09-21 Thread Greg Parker
ause it's not optional so Swift won't let it in an 'if > let'. selectedRow's "row index or -1" behavior is an obvious candidate for a Swift optional, but we don't currently have a good way to bridge such API with Objective-C. -- Greg Parker gpar..

Re: OpenGL Vertical Syncing effect on run loops

2015-09-22 Thread Greg Parker
g factor, not anything in the runloop or NSTimer itself. -- Greg Parker gpar...@apple.com Runtime Wrangler ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the

Re: -[NSThread start] blocks ?!?

2015-09-28 Thread Greg Parker
d by the debugging tools. (Specifically, it's the machinery that records stack traces of queue operations.) If you see this again, please capture a spindump and file a bug report. After you file the bug report, you might be able to work around it like this: defaults write com.apple.dt.

Re: Mac OSX 10.11 and XCode

2015-10-01 Thread Greg Parker
gs? If I recall correctly, you can choose whether or not to relaunch apps when you deliberately log out or restart, but relaunch is automatic for involuntary crashes. -- Greg Parker gpar...@apple.com Runtime Wrangler ___ Cocoa-dev maili

Re: More Swift issues, NSURLComponents

2015-10-06 Thread Greg Parker
> On Oct 5, 2015, at 7:57 PM, Rick Mann wrote: > > Especially when a struct can be an AnyObject. `AnyObject` is an instance of any class type. It is never a struct. `Any` encompasses both classes and structs. -- Greg Parker gpar...@apple.com Runtime

Re: New warning in Xcode 7

2015-10-13 Thread Greg Parker
orm was allowed, but I'm not enough of a language lawyer to know for sure. You might get better answers from a compiler mailing list. You can avoid confusion (human and compiler) by writing the statement without the preincrement's side effect: ix

Re: Handling http:// URLs

2015-10-14 Thread Greg Weston
ny behavior you could imagine. Lacking the aforementioned concrete example, I can't come up with any of my own that aren't handled at least as well by a more "normal" mechanism and it strikes me that this has much more potential for abuse, or at lea

Re: NSFileWrapper - is this really so bad?

2015-10-27 Thread Greg Parker
27;t match. It is unlikely that all of the new annotations and all of the documentation are correct. -- Greg Parker gpar...@apple.com Runtime Wrangler ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post adm

Re: The joys of people using valueForKey to get objects out of a dictionary.

2015-11-10 Thread Greg Weston
> It's been about 4 or 5 years since I made this mistake but I've just seen a > massive swath of code where every access of a dictionary object is using > valueForKey instead of objectForKey. > > I've got a few examples of why this is a "really bad idea"™, I would like to see these examp

Re: The joys of people using valueForKey to get objects out of a dictionary.

2015-11-10 Thread Greg Parker
11-10 10:00:55.296 a.out[38293:4747164] ordinary value 2015-11-10 10:00:55.297 a.out[38293:4747164] ( something, ordinary, "@allKeys", "@something" ) 2015-11-10 10:00:55.298 a.out[38293:4747164] *** Terminating app due to uncaught exception 'NSUnknownKeyEx

Re: The joys of people using valueForKey to get objects out of a dictionary.

2015-11-10 Thread Greg Weston
> On Nov 10, 2015, at 15:21, Alex Zavatone wrote: > > >> Yeah. Honestly, I'm looking for cases that would justify why all the >> dictionary object access blocks in this code that use valueForKey are >> wrapped with @try/@catch clauses. I've never seen cases with objectForKey >> that would

Re: Swift screensavers in Ubuntu?

2015-12-04 Thread Greg Parker
the Swift-ObjC importer. -- Greg Parker gpar...@apple.com Runtime Wrangler ___ 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)

Re: Adding minutes to display time

2015-12-08 Thread Greg Parker
way off. How to fix this?* What is the value of print(startDate) ? What do you get if you display `date` and `startDate` using an NSDateFormatter instead of print() ? I bet `date` and `startDate` are in fact five minutes apart, but either your date co

Re: LSSharedFIleList API deprecated

2015-12-09 Thread Greg Weston
ith the need to remove > recent items. No word yet. > —kevin While not optimal, I would imagine this could be accomplished with a combination of recentDocumentURLs, clearRecentDocuments: and noteNewRecentDocumentURL:. Greg ___ Cocoa-dev mai

Re: Panes vs. Separate Windows

2016-01-11 Thread Greg Weston
> (I also don’t want to restart Xcode wars, but I do actually believe that the > unified window style that arrived in Xcode 4 was an actual decision about > which worked best, made by clever people who actually thought about it. It > wasn’t — I believe — merely clueless. I also want to point out

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

2016-01-25 Thread Greg Parker
rimary @interface are @protected by default. Therefore you should either move your ivars out of the primary @interface, or leave them in @interface but explicitly declare them @private or @package. -- Greg Parker gpar...@apple.com Runtime Wrangler ___

Re: calendar & repeating events api

2016-02-16 Thread Greg Parker
k: to find "fifth Saturdays" after some starting date. -- Greg Parker gpar...@apple.com Runtime Wrangler ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the l

Re: ARC code in a non ARC app. iOS

2016-02-23 Thread Greg Parker
hin an app that doesn't? Yes, -fno-objc-arc works on iOS too. Was that your question? -- Greg Parker gpar...@apple.com Runtime Wrangler ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mod

Re: ARC code in a non ARC app. iOS

2016-02-23 Thread Greg Parker
eature(objc_arc) # error This file must be compiled with ARC enabled. #endif -- Greg Parker gpar...@apple.com Runtime Wrangler ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comme

Re: ARC code in a non ARC app. iOS

2016-02-23 Thread Greg Parker
Objective-C++ compilers. Plain C code is unaffected. Note that you may need code changes if your C code uses CoreFoundation types and you want to call it from ARC code. -- Greg Parker gpar...@apple.com Runtime Wrangler ___ Cocoa-dev

Re: ARC code in a non ARC app. iOS

2016-02-24 Thread Greg Parker
> On Feb 24, 2016, at 2:31 AM, Dave wrote: > > Also, beware subclassing a Non-ARC Class in an ARC Project - you have to have > the subclass Non-ARC too. This is not true. For example, NSView is not ARC but you can write ARC subclasses of it. -- Greg Parker gpar.

Re: Returning a string value from a c function to a Objective-C class method. Is there an approved approach?

2016-03-04 Thread Greg Parker
ect that performs the callback and pass it to the C code to store and call. The block object would capture the target NSObject so you don't need the dictionary of callback targets. -- Greg Parker gpar...@apple.com Runtime Wrangler _

Re: BOOL parameter passed as nil object

2016-04-19 Thread Greg Parker
ent a_bool end up with a 1 value assigned to it? Don't do that. The behavior is undefined. It will certainly fail on some current architectures at least some of the time. You should not use -performSelector:withObject: to call methods that use non-object parameters. -- Greg Par

Re: BOOL parameter passed as nil object

2016-04-19 Thread Greg Parker
ven there. On some platforms BOOL is defined as signed char. It may have any of 254 values other than YES or NO. -- Greg Parker gpar...@apple.com Runtime Wrangler ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post adm

Re: Where are my bytes hiding?

2016-05-05 Thread Greg Weston
> Second question: > Finder says about the containing folder: 11,239 bytes (33 KB on disk) for 9 > items > 11,239 = sum of TotalFileSizes of the 8 files in this folder. > But where do the “33 KB on disk” come from? 8 times “Zero bytes on disk” > should be zero, shouldn’t it? Surely "xxx on disk

Re: discontiguous bounds ?

2016-05-09 Thread Greg Weston
> I wish to provide a facility with a NSTableView wherein the leftmost > (specifiable) columns remain statically on the left of the display > (subject to vertical scrolling) while the remaining columns scroll > normally constrained to the right of the static columns. I've done > this succes

Re: debugging AirDrop (update)

2016-06-01 Thread Greg Parker
. > > Can anybody explain why 3 reboots ≠ 1 reboot? One possibility: some systems will reset caches or other state if the previous uptime was too short. This gets you out of reboot loops when a cache gets corrupted, for example. -- Greg Parker gpar...@apple.com <mailto:gpa

Re: Property synthesis trouble - 32 vs 64 bit builds

2016-07-05 Thread Greg Parker
too easy to accidentally bind to an unrelated superclass ivar when you really wanted to create a new ivar. -- Greg Parker gpar...@apple.com <mailto:gpar...@apple.com> Runtime Wrangler ___ Cocoa-dev mailing list (Cocoa-dev@lists.app

Re: Codesign assumes folder structure, fails.

2016-07-26 Thread Greg Parker
ion? My understanding is that this is a limitation of the Xcode build system. codesign doesn't care about the framework's structure, but Xcode does and it is telling codesign to look at the wrong path. You should mention rdar://17814234 when you file your bug report. -- Greg Parke

Re: Objective-C basics - (Why NSNumber conforms to NSCopying protocol)

2016-08-11 Thread Greg Weston
>> 2. The fact than an object is immutable does not (in general) mean that a >> copy can be represented by the same object reference. For example, an object >> that contained its own date of creation might be immutable, but a copy might >> have a different date, and therefore be a different obje

Re: Mysterious crash with NSTableView

2016-08-27 Thread Greg Parker
environment variables then you may be able to use the scan-build tool to run the clang static analyzer. http://clang-analyzer.llvm.org/scan-build.html -- Greg Parker gpar...@apple.com Runtime Wrangler ___ Cocoa-dev mailing list (C

Re: Limiting app installation

2016-09-05 Thread Greg Weston
> Does Apple allow a developer to limit the number of devices on which an app > can run? I have an app that requires you to pay more to install it on more > than one iPhone and two iPads. It should go without saying these are all on > the same Apple ID. > > I thought Apple didn't allow this. Bu

Re: Init in Swift

2016-09-06 Thread Greg Parker
protocol extensions can solve some of those problems. The protocol extension provides a default implementation to every class that conforms to the protocol. Each class may provide its own implementation that overrides the protocol extension's default implementation. --

Re: Linking against AVKit breaks app on 10.6

2016-09-12 Thread Greg Parker
ted, while the other frameworks do. You can force weak linking > for that particular framework using > > -weak_framework AVKit > > instead of just using the normal “-framework”. Please file a bug report. A missing availability at

Re: How to do isKindOfClass in Swift

2016-09-12 Thread Greg Parker
is generating incorrect code or incorrect debug > information or corrupting its own indexes. I’ve seen it in my own projects, > and problems have been reported in the developer forums that sound similar. > Typically, it appears, cleaning the build folder fixes the problem. Did

Re: Why doesn't this crash?

2016-09-12 Thread Greg Parker
yMessage]. You must use the result of objc_getClass() instead. Some "unavailable" classes were in fact present as SPI on older OS versions. That will confuse tests like `if ([SomeClass class]) { … }`. Test your code on your old deployment targets. -- Greg Parker gpar...@apple.com

Re: Success with NSTableView weak delegates?

2016-09-20 Thread Greg Parker
un on 10.11.6 and yet I see these > message-to-zombie crashes after removing the setDelegate:nil code. Those crashes are expected. NSTableView's delegate is zeroing-weak when both of the following are true: * Your app was built with the 10.11 SDK or newer. * Your app is running

Re: How to count Atoms

2016-10-10 Thread Greg Parker
g. The deprecation warning told you to use memory_order_relaxed because that is the memory ordering used by OSAtomicIncrement64. -- Greg Parker gpar...@apple.com <mailto:gpar...@apple.com> Runtime Wrangler ___ Cocoa-dev mailing list (Coco

Re: iOS: Preventing a singleton from being deallocated when the app is in the background.

2016-10-19 Thread Greg Parker
ation." No difference. C static storage with no initializer is always initialized to zero. -- Greg Parker gpar...@apple.com <mailto:gpar...@apple.com> Runtime Wrangler ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Pl

Re: iOS: Preventing a singleton from being deallocated when the app is in the background.

2016-10-20 Thread Greg Parker
. Log or crash in dealloc, if your singleton enforcement might allow the object to be deallocated and then a new one to be created. -- Greg Parker gpar...@apple.com <mailto:gpar...@apple.com> Runtime Wrangler ___ Cocoa-dev mailing list (

Re: Using floating point instructions

2016-12-06 Thread Greg Parker
t operand 0 must use '&' constraint > > Is there a way to fix this problem? You'll get better answers from a clang list such as cfe-us...@lists.llvm.org. Most of the audience here probably does not have a copy of clang that can compile PowerPC code. Why are you using

Re: Overriding the release mehod

2017-01-25 Thread Greg Weston
Dave wrote: > I hate it when people ask [why are you doing X]! Decades of experience seeing such questions make us think that when someone is asking how to do something extraordinary there's about 99% chance they don't actually need to do it and are making things harder for themselves. Sometime

Re: Overriding the release mehod

2017-01-25 Thread Greg Parker
an override ought to call [super release] if the object is expected to be retained and released and deallocated normally. -- Greg Parker gpar...@apple.com <mailto:gpar...@apple.com> Runtime Wrangler > On Jan 25, 2017, at 8:23 AM, Dave wrote: > > I hate it when

Re: What generates NSURLErrorUnsupportedURL?

2017-02-08 Thread Greg Parker
RL is also recorded in the NSError's userInfo dictionary as NSURLErrorFailingURLStringErrorKey. -- Greg Parker gpar...@apple.com Runtime Wrangler ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or mod

Re: Bad EXC_BAD_INSTRUCTION on drawRect call in Swift

2014-08-25 Thread Greg Parker
ternatively, it's possible that the failure is not actually at that line. The backtrace for check failures sometimes blames the first line of the function no matter where the failure actually was. (Yes, we have a bug report that these check failures are too hard to debug.) -- Greg Parker

Re: Crash presenting modal built with Xcode 6 GM

2014-09-09 Thread Greg Parker
ue:forUndefinedKey: is probably NSUndefinedKeyException, "[YourClassNameHere setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key YourKeyNameHere". That in turn is probably because your nib is trying to connect an outlet that your class does not de

Re: Heavy flickering on Retina Macs with Yosemite & NSVisualEffectView & overlay windows

2014-09-18 Thread Greg Parker
/or storage process sometimes fails somewhere between you and the engineers. Please upload your demonstration app again and send the bug back. -- Greg Parker gpar...@apple.com Runtime Wrangler ___ Cocoa-dev mailing list (Cocoa-dev@li

Re: Raw Swift

2014-09-18 Thread Greg Parker
e toRaw() method has been replaced with a rawValue property. Enums with raw types can now be used like this: enum Foo: Int { case A = 0, B = 1, C = 2 } let foo = Foo(rawValue: 2)! // formerly 'Foo.fromRaw(2)!’ println(foo.rawValue) // formerly 'foo.toRaw()' " -- Gr

Re: -[UIApplication statusBarFrame] changes in iOS 8

2014-09-23 Thread Greg Parker
re to convert from anything to >> anything else, one of which probably does what you need to convert what >> you’re getting back to what you were getting before, or at least alert you >> to having to handle it differently. > > Sigh. Thanks. Again, Apple not documenting s

Re: Concurrent tasks are getting hung up

2014-10-09 Thread Greg Parker
actually executing the once operation then you might try running with an All Exceptions breakpoint and see if anything fails there. -- Greg Parker gpar...@apple.com Runtime Wrangler ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Plea

Re: Concurrent tasks are getting hung up

2014-10-09 Thread Greg Parker
On Oct 9, 2014, at 8:58 PM, Steve Mills wrote: > > On Oct 9, 2014, at 17:25:05, Greg Parker wrote: >> >> This thread is stopped inside dispatch_once(), presumably waiting for some >> other thread to perform the once operation. >> >> Assuming dispatch_on

Re: How to pretty print (big)numbers?

2014-10-10 Thread Greg Parker
it should print unsigned integers? You can't. Sorry. NSNumberFormatter is built atop ICU. ICU's API can handle signed 64-bit integers but not unsigned 64-bit integers. -- Greg Parker gpar...@apple.com Runtime Wrangler ___ Cocoa-

Re: Trouble with imported enums in Swift

2014-10-21 Thread Greg Parker
_OPTIONS is required for Swift to import it. The name prefix is not required. If I recall correctly, the Swift importer has some heuristics to omit any shared prefix from the Swift names, but if there is no prefix then the enumerators are imported unchanged. -- Greg Parker gpar

Re: NSInvocation crashes in AutoreleasePool

2014-10-21 Thread Greg Parker
ns instrument should show that the returned object is the one that is used after deallocation.) -- Greg Parker gpar...@apple.com Runtime Wrangler ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or

Re: Trouble with imported enums in Swift

2014-10-21 Thread Greg Parker
efix on enumerators typedef NS_ENUM(NSInteger, Foo) { Aalpha, Bbeta, Oomega }; // Swift code: compiles successfully var f = Foo.Aalpha if f == Foo.Bbeta { println("same") } -- Greg Parker gpar...@apple.com Runtime Wrangler _

Re: Trouble with imported enums in Swift

2014-10-21 Thread Greg Parker
in Swift. typedef NS_ENUM(int, McpResponseStatus) { MCP_RESPONSE_SUCCESS = 0, MCP_RESPONSE_BAD_TOKEN = 1, SwiftHackForMcpResponseStatus }; // Swift names are McpResponseStatus.MCP_RESPONSE_SUCCESS etc. -- Greg Parker gpar..

Re: NSInvocation crashes in AutoreleasePool

2014-10-22 Thread Greg Parker
etReturnValue: does not autorelease the value it stores, so the annotation does not match the behavior. The annotation that matches the behavior is __unsafe_unretained. Use that instead. -- Greg Parker gpar...@apple.com Runtime Wrangler __

Re: Crash with ARC enabled on Xcode 6.1

2014-10-23 Thread Greg Parker
ble or even in the same source file. -- Greg Parker gpar...@apple.com Runtime Wrangler ___ 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: Crash with ARC enabled on Xcode 6.1

2014-10-23 Thread Greg Parker
> On Oct 23, 2014, at 3:26 PM, Kyle Sluder wrote: > >> On Thu, Oct 23, 2014, at 05:06 PM, Greg Parker wrote: >> >> The initialization order is generally like this: >> 1. Everything in libraries you link to is initialized. >> 2. Your classes' +load meth

Re: Any way to avoid external parameter names?

2014-10-27 Thread Greg Parker
ese names with "_" in the current compiler. Did you file a bug report? Allowing `_` to suppress the names here sounds like a good idea to me. -- Greg Parker gpar...@apple.com Runtime Wrangler ___ Cocoa-dev mailing list (Co

Re: Initializing Structures

2014-11-05 Thread Greg Parker
a struct variable to be initialized in its declaration using the brace syntax, but does not allow that form to be used anywhere else. C99 adds this syntax ("compound literal") that works anywhere: NSView *view = [[NSView alloc] initWithFrame:(NSRect){{0,0},{80,20}}]; -- Gr

Re: Weak linking

2014-11-07 Thread Greg Parker
if you need to subclass a class. It is possible to create a subclass dynamically at runtime, after performing an OS version check. This is typically feasible only in simple cases. -- Greg Parker gpar...@apple.com Runtime Wrangler ___ Coco

Re: Weird crash in -[NSSearchField setRecentSearches:]

2014-11-07 Thread Greg Parker
zombies, guard malloc, etc. The contents of the diagnostics will occasionally offer clues that the object was valid but the class was hit by a memory smasher. In this case objc_msgSend_corrupt_cache_error is itself crashing while trying to decode the data, which doesn't help distinguish

Re: Weird crash in -[NSSearchField setRecentSearches:]

2014-11-07 Thread Greg Parker
> On Nov 7, 2014, at 12:35 PM, Jerry Krinock wrote: > >> On 2014 Nov 07, at 14:14, Greg Parker wrote: >> >> Which frame are you in when you try to read the register (the top frame, or >> some other frame)? > > Some other. #11 in this call stack: >

Re: Weak linking

2014-11-11 Thread Greg Parker
ss of NSTableCellView has a +load method then it will probably crash. If you call [MyNSTableCellView class] then it might crash. Et cetera. > On Nov 8, 2014, at 10:09 AM, Satyanarayana Chebrolu > wrote: > > Thanks Greg for your suggestions. > > But I found something from > h

Re: Crash on SIGILL

2014-11-21 Thread Greg Parker
> > Any info, pointer or help appreciated! Like the log says: either a message to an invalid object, or a memory error somewhere else that trampled on your valid object or its class's data structures. You should debug it as if it were a crash in objc_msgSend(). -- Greg Parker gp

Re: WTF is happening?

2014-12-15 Thread Greg Parker
shouldn't try. Feel free to use MH_DYLIB for all of your plugin needs. (libobjc prevents unloading of any MH_DYLIB containing Objective-C metadata. It does not summarily disallow unloading of MH_BUNDLE, but there's a long list of caveats that make bundle unloading unusable except

Re: WTF is happening?

2014-12-15 Thread Greg Parker
the NSObject method) to a protocol you defined and then only sending messages from that protocol is the safest way to go. Filtering out classes with base classes that are not NSObject sometimes works. Filtering out classes whose names start with "_" sometimes works. -- Greg Parker

Re: Am I Reinventing the Wheel? (Part I)

2015-01-08 Thread Greg Weston
Aandi Inston wrote: > (This is in addition to the five characters prohibited in strings because > they are XML markup). Minor nit. There are only 2 prohibited characters in XML, whether in a string or out. ___ Cocoa-dev mailing list (Cocoa-dev@lists.ap

Re: Blurry is the New Sharp

2015-01-08 Thread Greg Parker
a long series of failures of vendors > to fix bugs reported not just by myself but by others. To report security or privacy issues that affect Apple products or web servers, please contact product-secur...@apple.com. Security bugs reported via Radar sometimes don't get the attention they des

Re: Machine sleep & wake notifications in a daemon

2015-01-08 Thread Greg Parker
ication port. CFRunLoopAddSource() adds that run loop source to the run loop. Notifications sent by the OS are routed to that run loop, and when you run that run loop it calls your callback function with those notifications. You should double-check that your code is

Re: recycleURLs doesn't enable Put Back or Undo in Finder

2015-01-19 Thread Greg Parker
Not even NSFileManager's > trashItemAtURL:resultingItemURL:error: does that. I'm trying it in 10.10. Are you sure you want the Finder's Undo command to undo an action taken inside your app? That sounds like a very strange user experience. -- Greg Parker

Re: Subclassing NSControl and inheritance of target, action properties

2015-01-29 Thread Greg Parker
that the 32-bit ARM ABI only aligns storage for those types at 4-byte boundaries, and the CPU does not guarantee atomicity for ordinary unaligned 8-byte memory access. Atomic accessors for those types need to do extra work. -- Greg Parker gpar...@apple.com Runtime Wrangler __

Re: NSCalendar and NSDates prior to October 15, 1582

2015-02-05 Thread Greg Parker
. Nevertheless, for consistency the change is modeled at the same time regardless of locale. If you need absolute historical accuracy for a particular locale…" -- Greg Parker gpar...@apple.com Runtime Wrangler ___ Cocoa-dev mailing list

Re: Networking framework crash

2015-02-05 Thread Greg Parker
unless your system administrator is mean. If you hit that limit you should see errors from various network API. File a bug report if you find some API that causing weird crashes instead of failing gracefully or halting with an appropriate error message when you run out of file descrip

Re: Networking framework crash

2015-02-05 Thread Greg Parker
API, preferably one that says "too many open files", or a crash log that says "too many open files". Anything that doesn't say "too many open files" somewhere is hard to diagnose. -- Greg Parker gpar...@apple.com Runtime Wrangler

Re: ARC dealloc best pratice

2015-02-06 Thread Greg Parker
nal code to work with weak references. That means AppKit needs to be careful about binary compatibility when it changes an unretained delegate to a weak delegate. -- Greg Parker gpar...@apple.com Runtime Wrangler ___ Cocoa-dev mailing list (

Re: ARC dealloc best pratice

2015-02-06 Thread Greg Parker
though, so we don't generally recommend it. > Why isn AppKit compiled using ARC? Probably because it has a track record as > it is and would likely gain nothing in a functional sense. The primary reason is that there is no way to compile a single library that uses ARC and also suppo

Re: ARC dealloc best pratice

2015-02-06 Thread Greg Parker
> On Feb 6, 2015, at 1:48 PM, Jonathan Mitchell wrote: > >> On 6 Feb 2015, at 21:31, Greg Parker wrote: >> >>> Come to think of it, I'm surprised that AppKit delegates are still >>> unsafe-unretained. Why haven't these been converted to safe wea

Re: ARC dealloc best pratice

2015-02-06 Thread Greg Parker
> On Feb 6, 2015, at 3:27 PM, Jens Alfke wrote: > >> On Feb 6, 2015, at 2:00 PM, Greg Parker > <mailto:gpar...@apple.com>> wrote: >> >> Swift adds "unowned" references. These references are non-retaining. They >> differ from weak

Re: Right-mouse click in tables not working correctly since 10.10.2?

2015-02-10 Thread Greg Parker
e other drivers like USB Overdrive, or OS X's built-in drivers? If you are using something other than OS X's drivers, try updating them and/or uninstalling them and see if it behaves the same way. (I use Logitech G300 with no additional drivers and haven't seen anything, although

Re: Idea for Improving Vibrancy

2015-02-16 Thread Greg Weston
>> I have an idea for improving vibrancy > > Me too. Kill it. Ditto. I look at vibrancy as Apple showing Microsoft how to do Glass right without questioning whether it should be done at all. To me, "consume extra resources in order to reduce the usability of the system" is a fundamentally flaw

  1   2   3   4   5   6   7   8   9   10   >