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: Handling http:// URLs

2015-10-14 Thread Greg Weston
>> > Admittedly, I'm currently struggling to find a concrete example of why this > is useful, but I just know it is: This, I think, is one of those phrases that should give one pause when posting. > Any app(s) should be able to register URL patterns they're able to handle. If > the user take

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 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: LSSharedFIleList API deprecated

2015-12-09 Thread Greg Weston
> I opened a radar a while back and got this answer: > > "Shared file lists are no longer supported. There is no exact replacement > API.” > “If you want to manage your recent documents list, you should use > NSDocumentController." > “If you want to run a background tool independent of your main

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: 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: 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: 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: 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: 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: 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

Re: Possible to defer initialization of let variable?

2015-07-07 Thread Greg Weston
>> If you ask the wrong question, you get a wrong answer. :) > > Whether or not it was the wrong question is debatable. Honestly I find that assertion suspect considering that you've moved the goalposts three times. ___ Cocoa-dev mailing list (Cocoa-d

New iTunes visual plugin SDK?

2017-03-27 Thread Greg Weston
So, apparently iTunes 12.6 doesn't support older plugins any more. Has anyone seen or heard news of a new SDK so those of us who have created plugins can update them? Greg ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admi

Re: NSCollectionView selection behavior is insanely bad

2017-04-26 Thread Greg Weston
> Instead of doing the right thing when shift-clicking (selecting a range from > the anchor), it simply adds/removes the clicked item to/from the selection. > That's unlike pretty much any Apple matrix-of-items selection behavior ever. You mean it selects like Finder icon views have since 1984?

Re: NSComboBox -comboBox:completedString: not called

2018-03-13 Thread Greg Weston
> So, to answer my own question, I can "get this to work" using a custom > NSComboBoxCell > subclass, implementing -completedString. > > Having seen this in action I must confess this is a Bad Idea™. You’re describing long-standing documented behavior and the correct approach to achieve the a

Re: NSDrawer

2018-07-14 Thread Greg Weston
Casey McDermott wrote: > NSPanel is still modal, but longer lasting. We use it a lot, and it > looks better than the modal dialogs in the current app. I read in digest mode so maybe this has already been pointed out, but NSPanel is not modal. ___ Coc

NSImage to JPEG file?

2019-01-16 Thread Greg Weston
>> That would be poor API design. If it had -writeToFile, then it would also >> need -writeToStream:, -writeToFileHandle:, -writeToFileDescriptor:, >> -writeToNSURLSessionDataDelegate:, etc. >> Providing the data itself means you can then use existing APIs on other >> classes to put the data an

Re: NSCoding vs NSSecureCoding

2014-06-17 Thread Greg Weston
Sean McBride wonders: > I was modernizing some of my code to support NSSecureCoding instead of just > NSCoding and stumbled upon that fact that NSColor and NSImage support only > NSCoding and not NSSecureCoding. Whereas NSURL, NSData, NSArray and > countless others now support NSSecureCoding.

Re: Need for Swift

2019-10-15 Thread Greg Weston via Cocoa-dev
> This discussion about Swift vs Objective-C is interesting, but I think it > omits something important. Both those languages only build apps for Apple > products. This was probably “omitted” because it’s not actually true. ___ Cocoa-dev mailing list (

Re: What is the preferred way to set NSTextView content from NSAttributedString?

2020-02-02 Thread Greg Weston via Cocoa-dev
> - I want to set the displayed contents of V to T2. > > What is/are the recommended way/s to do this? > > *I would hope that I could assign V.attributedString = T2, but alas the > world does not seem to be this simple.* The documentation suggests you should be working with the view’s textStorag

Re: Accessing a property of a view via its controller doesn't work

2021-09-04 Thread Greg Weston via Cocoa-dev
> I access the window of a view by two different ways, in the controller and in > the view, resp., and in the controller, I always get a nil pointer. Have you verified that the view you’re accessing in the controller is the same instance as the one that works? ___