Re: "Z" in setDateFormat ?

2023-07-22 Thread Roland King via Cocoa-dev
Yes > On 22 Jul 2023, at 08:42, Gabriel Zachmann wrote: > > Thanks! ... and what is the meaning of the Z at the end of a date/time ? > GMT+0:0 ? > > Best regards, Gabriel > > >> On 22. Jul 2023, at 12:25, Roland King wrote: >> >> It’s a literal.

Re: "Z" in setDateFormat ?

2023-07-22 Thread Roland King via Cocoa-dev
It’s a literal. It’s quoted. So it prints “Z” > On 22 Jul 2023, at 06:15, Gabriel Zachmann via Cocoa-dev > wrote: > > In the Apple docs in chapter "Date Formatters" I found sample code that > contains this line: > > [rfc3339DateFormatter setDateFormat:@"'-'MM'-'dd'T'HH':'mm':'ss'Z'"]; >

Re: dictionaryWithObjects:keys: looses elements

2023-01-03 Thread Roland King via Cocoa-dev
First guess would be that only 7 of the 17 keys are actually unique dates so the dictionary only has 7 entries, one for each of them. > On 4 Jan 2023, at 06:52, Gabriel Zachmann via Cocoa-dev > wrote: > > I have this line in my code: > >NSDictionary * temp = [NSDictionary dictionaryWithO

Re: ARC

2019-08-23 Thread Roland King via Cocoa-dev
> > BTW, one site we looked at describes ARC as "kind of like a Japanese B-horror > movie". That seems accurate. > I don’t know what site wrote that but it couldn’t be less accurate. ARC is one of the better pieces of technology Apple introduced into Objective-C and it cut down on a huge num

Re: Cannot include Carbon on Mojave

2019-05-14 Thread Roland King
ackage. > On 15 May 2019, at 05:23, Roland King wrote: > > CarbonSound has most definitely been removed from the current SDK, you can > use find or grep or the really useful utility ‘ack’ to prove that > > If you look at the header file for carbon you’ll find > > #if !__LP

Re: Cannot include Carbon on Mojave

2019-05-14 Thread Roland King
CarbonSound has most definitely been removed from the current SDK, you can use find or grep or the really useful utility ‘ack’ to prove that If you look at the header file for carbon you’ll find #if !__LP64__ #ifndef __CARBONSOUND__ #include #endif so the include is guarded by __LP64__ which

Re: Mac App Store paid upgrades and app settings

2018-08-13 Thread Roland King
> On 14 Aug 2018, at 04:08, Richard Charles wrote: > > > > It has been reported that Microsoft Office 365 and Adobe Lightroom are coming > to the new Mac App Store. Those apps surely are not single time payment apps. > So does this mean that the new Mac App Store will allow for upgrade paym

Re: ANN: New unofficial developer mailing lists

2017-07-08 Thread Roland King
similarly blessed. > On 9 Jul 2017, at 11:55, Quincey Morris > wrote: > > On Jul 8, 2017, at 20:45 , Roland King mailto:r...@rols.org>> > wrote: >> >> wondered if this list is still working today - we got the ‘goodnight to all’ >> message on

Re: ANN: New unofficial developer mailing lists

2017-07-08 Thread Roland King
wondered if this list is still working today - we got the ‘goodnight to all’ message on xcode yesterday, not that I’ve tried it. > On 7 Jun 2017, at 08:23, Jens Alfke wrote: > > You may have seen the announcement that the xcode-users mailing list is going > away. On the assumption that it’s o

Re: Very slow NSTableView

2017-07-03 Thread Roland King
isn't this what Instruments is supposed to be good at telling you? On 04/07/2017 11:07, Alex Zavatone wrote: Stab in the dark, but what is your cell identifier value? I have seen WAY TOO MUCH CODE where people have created a different cell identifier for each cell. Also, on iOS, there is a m

Re: Mystery Threads

2016-09-29 Thread Roland King
> On 29 Sep 2016, at 16:59, Gerriet M. Denkmann wrote: > > >> On 29 Sep 2016, at 15:34, Quincey Morris >> wrote: >> >> On Sep 29, 2016, at 01:05 , Gerriet M. Denkmann wrote: >>> >>> Well, nothing. Just let’s call it nbrOfBlocksToBeUsedByDispatchApply, or >>> whatever. But ultimately any o

Entitlements for non-appstore developer-id signed apps

2016-09-22 Thread Roland King
I was reading a review of MacOS Sierra and it was claiming that Developer ID signed, non mac-appstore apps now have access to more of iCloud than they did previously, however it wasn’t very clear about exactly what those available entitlements are. I’ve hunted around the documentation, in the

Re: Odd File Truncation

2016-09-07 Thread Roland King
> On 7 Sep 2016, at 19:19, Peter Hudson wrote: > > > ___ The file truncation seems to have spread to mail messages !!! ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requ

Re: Swift changes in Xcode 8

2016-08-30 Thread Roland King
> On 31 Aug 2016, at 09:02, Rick Mann wrote: > > The problem I'm having is not the changes in the language, but in the iOS > API. I can compile Swift 2.2 with a compiler flag. I can't make changes to > support iOS 10 (and still build with Xcode 7, which is necessary for > submitting to the Ap

Re: uitabbar translucency and hiding

2016-08-21 Thread Roland King
> > Maybe there’s a sanctioned way of moving a child view controller to a > different parent view controller (so, move the view controller, not the > view), but I’m in over my head at this point. > I haven’t read the whole thread, however to this particular comment, there is a sanctioned way

Re: NSImage from bitmap - then delete bitmap

2016-07-26 Thread Roland King
> > I would think that even with a retain it could get weird... > > The main thread wants to use the imageRef property so it calls: > > myRef = [window.imageRef]; > [myref retain]; > > If right between these calls, the worker thread calls setImageRef (on a > property with atomic, copy), then th

Re: NSImage from bitmap - then delete bitmap

2016-07-26 Thread Roland King
> On 27 Jul 2016, at 10:05, Trygve Inda wrote: > >> > > How is it retained by the main thread without an explicit retain call? are you not using ARC? If you are then all such references, both variable and during method calls are retained automatically. If you’re not, then do what ARC does a

Re: NSImage from bitmap - then delete bitmap

2016-07-26 Thread Roland King
> On 27 Jul 2016, at 09:33, Trygve Inda wrote: > > > > If the worker thread calls window.imageRep = myResult; it is possible that > the main thread is in the middle of a call like: > > [[window.imageRep] > drawInRect:fromRect:operation:fraction:respectFlipped:hints:] > > So when the setter

Re: NSImage from bitmap - then delete bitmap

2016-07-22 Thread Roland King
> On 22 Jul 2016, at 14:40, Trygve Inda wrote: > > >> With half an eye on performance, if you *do* strictly need a copy of the >> bitmap, note that NSBitmapImageRep conforms to NSCopying. You don’t have to >> turn it into a TIFF and back again. >> >> Also, you don’t even need an NSImage - the

Re: Do Debug Apps Expire on iOS?

2016-07-21 Thread Roland King
> On 21 Jul 2016, at 22:15, Steve Bird wrote: > > >> On Jul 21, 2016, at 10:05 AM, Eric E. Dolecki wrote: >> >> I believe that debug apps built directly to hardware have a shelf life of >> one year. At least they did. > > I don’t know, but I would hope that they would pop up some notice lik

Re: UIStackView: Variable Spacing

2016-07-06 Thread Roland King
> On 7 Jul 2016, at 04:37, Daniel Stenmark wrote: > > What’s the best way to achieve variable spacing between children of a > UIStackView? I know that a popular approach is to add an empty dummy view to > act as padding, but this is being used in a UITableView cell, so scrolling > performanc

Re: NSStream and Threads

2016-07-04 Thread Roland King
> On 4 Jul 2016, at 14:34, Gerriet M. Denkmann wrote: > > >> On 4 Jul 2016, at 12:00, Charles Srstka wrote: >> >>> On Jul 3, 2016, at 11:35 PM, Gerriet M. Denkmann >>> wrote: >>> >>> When I get an NSStream I do: >>> >>> aStream.delegate = myStreamDelegate; >>> [ aStream scheduleInRunLoop:

Re: WWDC 2016 direct download

2016-06-26 Thread Roland King
If you can’t run the WWDC app then go to developer.apple.com, find the videos section, find the WWDC videos section, find the one you want and on the Resources tab are links to the hi and sd def videos. > On 27 Jun 2016, at 14:47, tridiak wrote: > > Where do you download the 2016 WWDC video

Re: Swift 3 - Notification leaks

2016-06-18 Thread Roland King
> On 18 Jun 2016, at 19:21, Andreas Mayer wrote: > > > Block based observers do still leak though. > Not quite sure what you were asking in the mail as a whole but one question about block based observers, are you sure your block doesn’t have a retain cycle, possibly introduced by migration

Re: Need advice on a custom run-loop mode

2016-05-20 Thread Roland King
> > As you can see I’ve experimented with the end date, but seems that > -distantPast works well enough. I’ve also tried forcing a window redisplay on > each pass (as here) but it doesn’t appear to do anything; my understanding > was that the runloop should take care of this anyway. > > What a

Re: iOS - the joy of observers and NSInternalInconsistancyException for KVO

2016-05-19 Thread Roland King
> On 20 May 2016, at 07:04, Roland King wrote: > > > Reading the original post he already has the warning about an object being > deallocated whilst still having observers attached to it. > > This is simply a case of putting a breakpoint on dealloc and working out why

Re: iOS - the joy of observers and NSInternalInconsistancyException for KVO

2016-05-19 Thread Roland King
> On 20 May 2016, at 04:36, Jens Alfke wrote: > > >> On May 19, 2016, at 1:24 PM, Alex Zavatone wrote: >> >> In this case, I'm trying to see what is causing this deallocation. In my >> code, I explicitly remove the observer before I nil the object, so I don't >> know where this is happenin

Re: Codesigning pain, god it hurts!

2016-05-17 Thread Roland King
> > As for the App Store version, I’m not sure how I can distribute that > internally for testing - signing with the Developer ID doesn’t seem to be > right, but it’s unclear what other options I have. > > —Graham > That’s what the Mac Development ID is for. That’s embedded into the provisi

Re: Codesigning pain, god it hurts!

2016-05-17 Thread Roland King
.. all the stuff Quincey said plus https://developer.apple.com/support/certificates/expiration/ make sure you have the latest Apple Worldwide Certs, they expired a few months ago so you may not. If you right-click on the certifica

Re: unwind segue on navigation pop

2016-05-13 Thread Roland King
> On 13 May 2016, at 23:03, Kyle Sluder wrote: > > On Thu, May 12, 2016, at 09:48 PM, Roland King wrote: >> I’m making more use of unwind segues to try and get to the point I have >> ‘go forward’ and ‘go backward’ code in one place in the same class. So >> during

unwind segue on navigation pop

2016-05-12 Thread Roland King
I’m making more use of unwind segues to try and get to the point I have ‘go forward’ and ‘go backward’ code in one place in the same class. So during prepareForSegue I set some stuff up, during my unwind segue method I tear it down again. Don’t use it for everything, but for some complex present

Re: ARC [was Protecting against "app nap"]

2016-05-12 Thread Roland King
I can’t imagine going back to manual retain release. ARC lifted hours of work away from writing code because you just use objects and they stay when they need to stay go away when you’re done with them. I see hardly any questions about ARC at all, there were some at the very start, but they pete

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Roland King
> > 2016-05-10 16:58:36.066 iApp[2549:2131821] *** Terminating app due to > uncaught exception 'NSInternalInconsistencyException', reason: '( >" NO; view = ; target= <(action=oneFingerDoubleTap:, > target=)>; numberOfTapsRequired = 2>", >" ; target= <(action=tapAndAHalf:, > target=)>>",

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Roland King
> On 11 May 2016, at 07:39, Quincey Morris > wrote: > > On May 10, 2016, at 16:22 , Carl Hoefs wrote: >> >> I will set 'context' and use it in my check instead. > > Yup, use the context to decide whether to call super *and return* but nothing > else. Once you get past that check, don’t call

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Roland King
> On 11 May 2016, at 07:22, Carl Hoefs wrote: > >> >> > Okay... It appears that for some odd reason, once in a blue moon, 'object' > and 'keyPath' aren't what they're supposed to be, so I super it, and it blows. > …. > > I will set 'context' and use it in my check instead. > -Carl Well yo

Re: Receiver type for instance message is a forward declaration

2016-05-10 Thread Roland King
> On 11 May 2016, at 07:11, Jens Alfke wrote: > > >> On May 10, 2016, at 4:05 PM, Carl Hoefs >> wrote: >> >> Yes, yes, and yes! I'm using a nil context. I'm not sure how context is to >> be used here... Is this an arbitrary value that I check in >> -observeValueForKeyPath? > > Yes, but I’

Re: XCode snapshot function?

2016-05-09 Thread Roland King
> On 10 May 2016, at 09:48, Graham Cox wrote: > > > > oookaaayyy… > > So what’s the best way to mothball and archive my project in its current > state so I can then fork it for the next version, and so on? > > —Graham > > archive the project in xcode (Product .. Archive), add the archive

Re: XCode snapshot function?

2016-05-09 Thread Roland King
> On 10 May 2016, at 09:21, Graham Cox wrote: > > Hi, > > Where is the snapshot function in XCode these days (XCode 7.3)? > > I see in the “Projects” window there is a way to export snapshots, but I > can’t see anywhere to make a snapshot in the first place. > > —Graham > It isn’t - it was

Re: How to keep things alive in Arc?

2016-05-09 Thread Roland King
> On 9 May 2016, at 19:17, Dave wrote: > > Hi, > > Well if “thing” is used only within the method you don’t have to do anything > - ARC will keep it alive until the local you have assigned it to goes out of > scope. No that’s not true, which is the whole point of the original question. ARC

Re: How to keep things alive in Arc?

2016-05-08 Thread Roland King
> On 9 May 2016, at 10:11, Gerriet M. Denkmann wrote: > > Thing *aThing = [ Thing new ]; > > void *thingData = [ aThing data ];// pointer to a buffer owned by > aThing > > … never use aThing after this point → Arc might release aThing right now > … but do lots of things with thingDat

Re: Can't make an adaptive segue push

2016-05-06 Thread Roland King
> On 6 May 2016, at 20:49, Roland King wrote: > > I have a navigation controller as the detail pane of a UISplitView (pretty > much right from the standard splitview template). > > Now I want to push another view onto that stack. I have the view, I’ve > dragged out a s

Can't make an adaptive segue push

2016-05-06 Thread Roland King
I have a navigation controller as the detail pane of a UISplitView (pretty much right from the standard splitview template). Now I want to push another view onto that stack. I have the view, I’ve dragged out a segue to connect it up however none of the available ‘adaptive segues’ do a ‘push’.

Re: Thoughts on autolayout

2016-04-22 Thread Roland King
I’ve never had to do anything like step 4. I’ve certainly added or changed constraints and fetched up a load of red boxes but never does it take more than a little bit of consideration to work out which constraints to remove or change. Basically - it just isn’t that hard. > On 22 Apr 2016, a

Re: Thoughts on autolayout

2016-04-21 Thread Roland King
> On 22 Apr 2016, at 03:34, Hunter Hillegas wrote: > > Nope, I’m a huge fan, especially with newer tools like UIStackView and the > layout guide stuff. > >> On Apr 21, 2016, at 12:19 PM, Charles Srstka >> wrote: >> >> Am I the only one who likes autolayout? > > I also like autolayout. Al

Re: Text field alignment

2016-04-20 Thread Roland King
> On 21 Apr 2016, at 11:13, Quincey Morris > wrote: > > I’m laying out some views (using auto-layout, though I don’t think that’s the > cause of the problem) on OS X 10.11.4 with Xcode 7.3. In many cases, I’m > baseline-aligning a pair of text fields, one label and one editable. The font > i

Re: NSSplitview and NSTableview

2016-03-20 Thread Roland King
> On 21 Mar 2016, at 12:05, yu...@aim.com wrote: > > Hi, > I spent sometime on this strange issue but still could not figure out. I > hope i could get some help from the group. > > > I have a NSScrollView which contains an NSSplitView; the splitView contains > four panes; each pane is a NST

Re: UIStackView full of labels doesn't add up

2016-03-20 Thread Roland King
> On 20 Mar 2016, at 22:52, Ken Thomases wrote: > > On Mar 20, 2016, at 7:57 AM, Roland King wrote: >> >> I have a UIStackView, vertical, set to ‘fill equally’ with a number of >> UILabels in it. The stackview in this instance happens to be 300pts high. If &g

UIStackView full of labels doesn't add up

2016-03-20 Thread Roland King
I have a UIStackView, vertical, set to ‘fill equally’ with a number of UILabels in it. The stackview in this instance happens to be 300pts high. If I put 1 UILabel in it, the UILabel is 300pts high. This is what I would expect. If I put two in it, the stackview sets them both 160pts high (total

Re: Safe cross references between scenes in an OS X storyboard

2016-03-09 Thread Roland King
> On 9 Mar 2016, at 21:32, Bill Cheeseman wrote: > > I am using storyboards in an OS X application written in Swift 2. It is a > single window "shoebox" application that does not use NSDocument or Core > Data. It is built with the Xcode 7.2.1 storyboard template, where the > storyboard entry

Re: Can an NSArray ever have a count of -1?

2016-02-19 Thread Roland King
> On 20 Feb 2016, at 14:14, Gerriet M. Denkmann wrote: > > >> On 20 Feb 2016, at 13:02, Quincey Morris >> wrote: >> >> On Feb 19, 2016, at 21:30 , Gerriet M. Denkmann wrote: >> >> Now that I code almost exclusively in Swift, the problem has largely >> disappeared, because ‘“\(someValue)"'

Re: calendar & repeating events api

2016-02-16 Thread Roland King
> On 17 Feb 2016, at 10:34, Eric Gorr wrote: > > When setting up a repeating event in Apple’s Calendar application, there is a > lot of flexibility. For example, I can specify that an event repeats every > month on the 5th Saturday. Of course, not every month has a fifth saturday, > so for th

Re: PSA: Does your app use Sparkle? Update it, or use an HTTPS server

2016-02-12 Thread Roland King
> On 12 Feb 2016, at 17:14, sqwarqDev wrote: > > What I “think” (...read: “hope", cos I really need to be getting on with > other stuff, like updating the Sparkle version in my own apps…) is my final > version of the script to check for vulnerable Sparkle frameworks and > prefPanes (system wi

Re: PSA: Does your app use Sparkle? Update it, or use an HTTPS server

2016-02-09 Thread Roland King
> On 10 Feb 2016, at 13:45, sqwarqDev wrote: > > >> On 10 Feb 2016, at 09:08, Charles Srstka wrote: >> >> If your app is accessing your appcast via HTTP, that could be intercepted >> just the same as your relnotes, and then the attacker could set the relnotes >> URL to whatever s/he wants.

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

2016-01-27 Thread Roland King
> On 28 Jan 2016, at 13:36, Graham Cox wrote: > > >> On 28 Jan 2016, at 3:07 PM, Kyle Sluder wrote: >> >> Any app on OS X can open documents from iCloud Drive—the user just has >> to navigate to iCloud Drive in Finder. >> > > > Well anyway, it was a red herring - has nothing to do with my

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

2016-01-27 Thread Roland King
; > > > Sandboxing issues are bad enough to deal with, but when they bleed over into > ‘open’ apps that’s just nasty. > > > —Graham > > > > > > > >> On 28 Jan 2016, at 2:05 PM, Alex Zavatone wrote: >> >> Sorry man. It’s been

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

2016-01-27 Thread Roland King
From the original mail "Note this isn’t a sandboxed app, so that shouldn’t come into it.” > On 28 Jan 2016, at 10:51, Alex Zavatone wrote: > > According to the sandboxing docs, I recall that for sandboxing, there are a > certain set of locations where you can save files to without requiring u

Re: Array of Dictionaries as .userInfo

2016-01-26 Thread Roland King
> On 26 Jan 2016, at 23:12, Eric E. Dolecki wrote: > > I have a control which takes an array of dictionaries to construct it's UI > (as a distinct method). > > Now I'd like to add a notification to supply the data as well. I'd like to > pass the data as userInfo. > > When constructing the obse

Re: Screen <--> View Coordinate system conversion

2016-01-15 Thread Roland King
> On 16 Jan 2016, at 12:27, Graham Cox wrote: > > > summary: view -> window -> screen -> window -> view > > > Tried this and many variants of it, nothing works - the coordinates I end up > with are not in the visible part of my overlay so don’t appear. > > > A better solution (i.e. less wo

Re: Strange app crash

2016-01-01 Thread Roland King
> On 2 Jan 2016, at 10:54, SevenBits wrote: > > Okay, I reproduced the error. Setting an exception breakpoint didn’t help; > the app crashes anyway, leading me to believe that the problem either a) is > not an uncaught exception or b) it is an exception, but occurs before the > ObjC runtime i

Re: Strange app crash

2016-01-01 Thread Roland King
> On 2 Jan 2016, at 10:26, SevenBits wrote: > > OS X. > > Sorry, it’s been a frustrating process. > > I’m working on gathering the other info; in the meantime, here’s a screenshot > from Xcode at the moment that crash happens: http://i.imgur.com/i7qsNOQ.png?1 > Looks more like an uncaught e

Re: Strange app crash

2016-01-01 Thread Roland King
> On 2 Jan 2016, at 10:14, SevenBits wrote: > > Hi list, > > Xcode has decided not to cooperate with me. > > My latest app is crashing constantly when I launch it. It crashes > immediately, without showing any UI or starting the app delegate, so I know > that my code isn’t the cause. The app

Re: App refuses to launch after adding iCloud Drive support

2015-12-31 Thread Roland King
> On 1 Jan 2016, at 09:05, Graham Cox wrote: > > >> On 1 Jan 2016, at 11:54 AM, Roland King wrote: >> >> Developer ID’ doesn’t sound right. Developer ID is for signing apps for >> non-mac-store distribution, > > > That’s exactly what I want to do.

Re: App refuses to launch after adding iCloud Drive support

2015-12-31 Thread Roland King
‘Developer ID’ doesn’t sound right. Developer ID is for signing apps for non-mac-store distribution, and I never worked out why there’s one for apps and one for installers. If you want to distribute a test copy of the app you need to sign it with the Mac developer certificate using a provisionin

Re: Custom UIViewController transitions with segues

2015-12-30 Thread Roland King
> On 31 Dec 2015, at 09:12, Rick Mann wrote: > > I have a UICollectionView in a UINavigationController, and I'd like to > customize the transition from one to the next on push. So I set up the first > VC as UIViewControllerTransitioningDelegate, and in > prepareForSegue(_:sender:) set the des

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Roland King
>> >> Never drove a slider with the keyboard before, so I added a keyDown and >> keyUp method to the mouseDown: one I posted earlier, with a bit of code to >> try and be smart about when to send updates, so you don’t get them if you’re >> just tabbing though. Seems to work well enough for this

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Roland King
> On 30 Dec 2015, at 05:53, Lee Ann Rucker wrote: > > >> > > > Actually it's easy. For very similar reasons I needed the same behavior - > live update of the slider's temp value for UI elements, but only call the > final setter when the user is done. I subclassed NSSlider's keyUp: and > k

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Roland King
> > If you want to know when the last value is sent during mouse tracking, set > the ‘actionOn’ property to mouse-up. > > So, something like this: > > - (void)viewDidLoad > { >[super viewDidLoad]; > >self.slider.action = @selector(valueChangedFinally:); >self.slider.target = self;

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Roland King
> On 29 Dec 2015, at 17:54, Quincey Morris > wrote: > > On Dec 29, 2015, at 01:45 , Roland King <mailto:r...@rols.org>> wrote: >> >> the slider is hooked up via bindings in the UI to a label which shows the >> value *as you slide it*, so it needs

Re: Getting the final value from an NSSlider drag

2015-12-29 Thread Roland King
> On 29 Dec 2015, at 17:40, Quincey Morris > wrote: > > On Dec 29, 2015, at 00:44 , Roland King <mailto:r...@rols.org>> wrote: >> >> I want to capture, in the app, the value of the slider only at the end when >> the mouse goes up, once > > Isn’

Getting the final value from an NSSlider drag

2015-12-29 Thread Roland King
I have some NSSliders hooked up on my UI to text fields with formatters, all set up with bindings so that the label shows the slider value. The sliders are continuous, looks fine, nice feedback for whoever’s driving. However I want to capture, in the app, the value of the slider only at the end

Re: My alert is not firing at all

2015-12-26 Thread Roland King
two buttons on mine, but I can’t think that would count as enough of a difference . > On 26 Dec 2015, at 20:26, Scott Berry wrote: > > Hey there, > > It doesn’t actually show me the message. I see the Okay button but not the > message itself. > > >> On Dec 26,

Re: My alert is not firing at all

2015-12-26 Thread Roland King
What do you mean by it doesn’t fire? It doesn’t show the alert, or it doesn’t do anything after it shows the alert when you hit the dismiss button? I wrote code very similar to this today .. with an extra button or two, and it was fine. > On 26 Dec 2015, at 19:40, Scott Berry wrote: > >

Re: Hurdles in converting to Swift

2015-12-23 Thread Roland King
Is SearchViewController actually referenced in your code somewhere? You need something in the binary which would cause the class to get loaded in the first place or it will not be linked into the binary and not found by IB. This has been an issue with IB and objC forever, I don’t see why Swift w

Re: Frameworks in the Helper LoginItems app

2015-12-23 Thread Roland King
> On 24 Dec 2015, at 07:36, Alex Kac wrote: > > I’ve got an app with a helper in the Contents/Library/LoginItems path. Both > use AFNetworking.framework. I currently install AFNetworking.framework in the > main app’s Framework path. I would like the helper to use AFNetworking from > the main

Re: Return from a background queue

2015-12-22 Thread Roland King
You can’t do what you’re trying to do. First off, a block (which is what dispatch_async() takes) is defined to take no parameters and return nothing. That’s the source of your compilation error, you’re trying to return something from a block defined not to return anything. Secondly, what you’

Re: applicationSupportDirectory access for admin and standard users

2015-12-22 Thread Roland King
> On 22 Dec 2015, at 20:11, Jonathan Mitchell wrote: > > >> On 21 Dec 2015, at 22:24, Sean McBride wrote: >> >> On Mon, 21 Dec 2015 22:16:39 +, Jonathan Mitchell said: >> >>> My app seems to be having trouble reading and writing to the >>> applicationSupportDirectory. > > > 1. My prefe

Re: Bitmaps, colorspaces, etc.

2015-12-20 Thread Roland King
> On 21 Dec 2015, at 09:15, Graham Cox wrote: > > I’m trying to understand how properly to use colorspaces with bitmaps. > > The problem here is that I can find no documentation that goes anywhere near > explaining this. Maybe NSBitmapImageRep is too high level and I need to drop > down to CG

Re: Validating NSButton in Swift

2015-12-14 Thread Roland King
> On 15 Dec 2015, at 04:10, Luc Van Bogaert wrote: >> > > > I tried what you suggested and made a button subclass and just declared > conformance in objective-c, and then imported the class into Swift. > This seems to do the trick, my button subclass is now accepted as conforming > to the pr

Re: Validating NSButton in Swift

2015-12-14 Thread Roland King
> On 14 Dec 2015, at 17:12, dangerwillrobinsondan...@gmail.com wrote: > > The bug should be that it gives you a wrong message, because it already > conforms to the protocol because it inherits from a class that conforms to > the protocol. > > All you should have to do is implement an override

Re: Validating NSButton in Swift

2015-12-13 Thread Roland King
> On 14 Dec 2015, at 15:42, Luc Van Bogaert wrote: > > class ValidatedButton: NSButton, ValidatedControl { > > > I've defined ValidatedControl like this: > > protocol ValidatedControl: NSValidatedUserInterfaceItem { > > > This results in a compiler error: Type ValidatedButton does not confo

Re: Non-Resizable Window and Autolayout

2015-12-08 Thread Roland King
> On 8 Dec 2015, at 23:06, Jerry Krinock wrote: > > >> On 2015 Dec 08, at 06:31, Dave wrote: >> >> I then select the Window in IB and select “Reset to Suggested Constraints”. > > also known as the “Ruin My Day” selection. I love that button - I always try to figure out after I’ve pressed it

Re: UIView underlying rects for drawRect

2015-12-07 Thread Roland King
> On 8 Dec 2015, at 06:30, David Duncan wrote: > >> >> On Dec 6, 2015, at 4:51 AM, Roland King > <mailto:r...@rols.org>> wrote: >> >>> >>> On 6 Dec 2015, at 20:18, Roland King mailto:r...@rols.org>> >>> wrote: >>&g

Re: UIView underlying rects for drawRect

2015-12-06 Thread Roland King
> On 6 Dec 2015, at 20:18, Roland King wrote: > > >> >> CALayer has a mechanism built in for the sort of thing you want to do. Read >> up on -[CALayer display]. You should be able to override that, or implement >> the corresponding delegate method in your

Re: UIView underlying rects for drawRect

2015-12-06 Thread Roland King
> > CALayer has a mechanism built in for the sort of thing you want to do. Read > up on -[CALayer display]. You should be able to override that, or implement > the corresponding delegate method in your UIView and perform management of > your custom bitmap there. I myself do this in one app to

Re: UIView underlying rects for drawRect

2015-12-05 Thread Roland King
e portions of the screen being updated — does that suggest the > entire view is being redrawn, or just the ends? > > Mike. > >> On 5 Dec 2015, at 03:02, Roland King wrote: >> >> NSView has a method getRectsBeingDrawn:count: which gives you the actual >> rects be

UIView underlying rects for drawRect

2015-12-04 Thread Roland King
NSView has a method getRectsBeingDrawn:count: which gives you the actual rects being drawn in a drawRect: call. Is there something equivalent for a UIView? Does UIView even do as I believe NSView does and only invalidate just the areas passed to setNeedsDisplayInRect:, meaning those are the only

Re: Need Help with Swift

2015-12-04 Thread Roland King
> On 4 Dec 2015, at 16:07, Stevo Brock wrote: > > This seems to do the trick. > > I wasn’t able to just do ABC.class, as the “.class” wasn’t registered as > valid. > > What I ended up with was a static method on the class, and calling the static > method, and voilà! Everything is working. >

Re: Need Help with Swift

2015-12-03 Thread Roland King
> On 4 Dec 2015, at 15:42, Stevo Brock wrote: > > So strange… > > I added > > class IB_MediaItemViewController_PhotoMediaItemView : > MediaItemViewController > { > } > > and used IB_MediaItemViewController_PhotoMediaItemView in the Storyboard, and > I still see this error: > > 2015-12-03 2

Re: Need Help with Swift

2015-12-03 Thread Roland King
> On 4 Dec 2015, at 15:24, Stevo Brock wrote: > > Hi Roland, > > I think you’re right. The trick is - what do I put in the Storyboard such > that it sticks (and IB doesn’t just change it back) and resolves at runtime? Quincey had one idea - but I don’t know how you @objcname a specialisatio

Re: Need Help with Swift

2015-12-03 Thread Roland King
> On 4 Dec 2015, at 14:45, Stevo Brock wrote: > > I’m trying to set up a UIViewController than can host a number of different > UIViews as long as they adhere to a given protocol. I’ve worked through > getting things set up to make the compiler happy, but I’m getting a runtime > error loadin

Re: How to import a Framework

2015-12-01 Thread Roland King
> On 2 Dec 2015, at 10:39, Gerriet M. Denkmann wrote: > > I just made a Framework (Xcode 7.1), called ProcArgFramework. > I copied it into /Library/Frameworks. > > In some other Project I added: > > @import ProcArgFramework > > But Xcode says: “Module ProcArgFramework not found”. > > I

Re: iOS: Using AppDelegate as an app-wide singleton

2015-12-01 Thread Roland King
> On 2 Dec 2015, at 04:58, Carl Hoefs wrote: > > I was about to implement my own singleton class to act as an app-wide context > repository, but then I thought: wouldn't it be simpler just to use the > appDelegate for that purpose? It's a singleton already and available to all > classes via [

Re: Self and associated type requirements (yes again!)

2015-11-30 Thread Roland King
f you actually do want _both_ of those things together, that's where (and I > could be way off here; I have only casually read up on this stuff) techniques > of "type erasure" may be relevant? > > Peter > > [0] http://www.russbishop.net/swift-associated-types >

Re: Self and associated type requirements (yes again!)

2015-11-30 Thread Roland King
> On 1 Dec 2015, at 06:17, Quincey Morris > wrote: > > On Nov 30, 2015, at 04:12 , Roland King <mailto:r...@rols.org>> wrote: >> >> I want to say that timeSeries is any TimeSeries with an underlying type of >> Float, but you can’t. > > The prob

Self and associated type requirements (yes again!)

2015-11-30 Thread Roland King
I keep running myself into this issue when I try using some of my generic classes built on top of Protocols. I have a TimeSeries protocol which has an Underlying (Float, Double, .. whatever) and also a Self requirement because you can return a sub series. There’s more to the protocol but this

Re: swift - making array of subclass of class also conforming to protocol

2015-11-28 Thread Roland King
> On 29 Nov 2015, at 09:26, Quincey Morris > wrote: > > On Nov 28, 2015, at 10:32 , Quincey Morris > > wrote: >> >> It can’t be UIView+MasterControllable (in some syntax), because no such >> *single* type exists. > > One other dopey alternative

swift - making array of subclass of class also conforming to protocol

2015-11-28 Thread Roland King
I have a protocol I want some of my UIView subclasses to conform to so they can be controlled by a specific master object. So they are UIVIews (class) and they are also MasterControllable (protocol) easy to make those UIView subclasses public class MyVIew1 : UIView, MasterControllable {} public

Stopping the initial storyboard viewcontroller being created

2015-11-26 Thread Roland King
I would like to create the main viewcontroller in my applicationDidFinishLaunching:withOptions: method (iOS) instead of having the storyboard one created automatically. I’m doing this in order to change behaviour between simulator and device as the simulator doesn’t support BlueTooth, so I nee

Re: Swift - internal class conforming to public protocol

2015-11-25 Thread Roland King
> On 25 Nov 2015, at 16:30, Andreas Mayer wrote: > > >> Am 25.11.2015 um 08:56 schrieb Quincey Morris >> : >> >>> That's explained in "Using Swift with Cocoa and Objective-C": >>> >>> "The compiler does not automatically insert the @objc attribute for >>> declarations marked with the privat

Re: Swift - internal class conforming to public protocol

2015-11-25 Thread Roland King
> On 25 Nov 2015, at 16:37, Quincey Morris > wrote: > > On Nov 25, 2015, at 00:30 , Andreas Mayer wrote: >> >> I can't replicate that behavior. > > Since Roland hasn’t contributed to this thread for 24 hours, I vote we blame > *him*. ;) > > I just did - some of us occasionally sleep, I j

  1   2   3   4   5   6   7   8   9   10   >