Re: Getting notification when Facetime call comes in

2021-08-24 Thread Jean-Daniel via Cocoa-dev
Not sure if that work, but at least, you should try to use the right Notification Center. NSWorkspace Notification Center is only used to broadcast NSWorkspace notifications. https://developer.apple.com/documentation/avfaudio/avaudiosession/responding_to_audio_session_interruptions

Re: NSStream vs NSFileHandle

2021-03-09 Thread Jean-Daniel via Cocoa-dev
> Le 9 mars 2021 à 09:07, Allan Odgaard via Cocoa-dev > a écrit : > > We currently have two different systems that can’t easily be bridged, > effectively doing the same thing, but supporting different sources: > > NSStream can work with files, data, and network streams (created by > NSURLSe

Re: How to reposition subviews without Auto Layout

2020-10-17 Thread Jean-Daniel via Cocoa-dev
If you want to be pedantic, I would rather say "without using Auto Layout constraints ». Even the -layout method is part of the AutoLayout API. > Le 17 oct. 2020 à 18:52, Rob Petrovec via Cocoa-dev > a écrit : > > As was pointed out by an earlier reply, even if you use -layout or > setAutore

Re: UndoManager setActionNames

2020-07-05 Thread Jean-Daniel via Cocoa-dev
> Le 5 juil. 2020 à 09:07, Arved von Brasch via Cocoa-dev > a écrit : > > Hi list, > > Where’s the best place to intercept undo/redo actions to edit the action name > (’setActionName()’) for the UndoManager in a CoreData application? In > particular, when a particular entity’s attribute's c

Re: Adding helper target to macOS app?

2020-04-04 Thread Jean-Daniel via Cocoa-dev
> Le 3 avr. 2020 à 15:44, João Varela via Cocoa-dev > a écrit : > > Hello, Laurent > > As far as I know, the documentation is still valid. > > I would start reading this: > > https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/DesigningDaemo

Re: Thunderbolt port audio programmability

2020-03-17 Thread Daniel Waylonis via Cocoa-dev
I think AVFoundation is probably the easiest way to get started. There’s a pretty good sample on how to do it: https://developer.apple.com/documentation/avfoundation/audio_track_engineering/building_a_signal_generator

Re: Detecting which NSMenuItem is under the mouse (cocoa objective C)

2020-01-07 Thread Jean-Daniel via Cocoa-dev
> Le 7 janv. 2020 à 18:53, JP HARMAND via Cocoa-dev > a écrit : > > While a NSMenu item is opened, some items are disabled and some are enabled, > exactly as wanted . > Moving the mouse over this menu , I now want to know which item is under the > mouse what ever it’s sate is. > I am notifi

Re: NSWorkspace notifications related to time change

2019-12-18 Thread Jean-Daniel via Cocoa-dev
> Le 18 déc. 2019 à 20:10, Carl Hoefs via Cocoa-dev > a écrit : > > > >> On Dec 18, 2019, at 11:35 AM, James Walker via Cocoa-dev >> wrote: >> >> On 12/18/19 9:55 AM, Carl Hoefs via Cocoa-dev wrote: >> >>> However, I cannot get this notification to fire on system time changes. My >>> ot

Re: NSWorkspace notifications related to time change

2019-12-18 Thread Jean-Daniel via Cocoa-dev
> Le 18 déc. 2019 à 18:25, Steve Mills via Cocoa-dev > a écrit : > >> On Dec 18, 2019, at 11:19, Carl Hoefs via Cocoa-dev >> wrote: >> >> I have a macOS daemon that uses NSTimers for scheduling user event >> reminders. >> >> This works well except for abrupt time changes: >> (1) the use

Re: Future of Cocoa

2019-12-16 Thread Jean-Daniel via Cocoa-dev
. Unless I’m misunderstanding what > you mean by the selector changing? > > Saagar Jha > >> On Dec 16, 2019, at 00:16, Jean-Daniel > <mailto:mail...@xenonium.com>> wrote: >> >> >>> Le 16 déc. 2019 à 06:05, Saagar Jha >> <mailto:saa...@saag

Re: Future of Cocoa

2019-12-16 Thread Jean-Daniel via Cocoa-dev
> Le 16 déc. 2019 à 06:05, Saagar Jha a écrit : > > It’s been a while, but I just thought you both might be interested in some > follow-up I did for this idea. I implemented it for fun in clang > and it turns out that it’s a > pretty decent performan

Re: Future of Cocoa

2019-11-21 Thread Jean-Daniel via Cocoa-dev
> Le 21 nov. 2019 à 21:20, Pier Bover via Cocoa-dev > a écrit : > > I won't respond each of you one by one but here are a couple of > observations. > > Metal is not a cross platform technology hence why so many projects still > rely on OpenGL in macOS (eg: Firefox). No, that because they do

Re: Future of Cocoa

2019-11-20 Thread Jean-Daniel via Cocoa-dev
wrote: >> >> >> >>> On Nov 20, 2019, at 2:16 PM, Jean-Daniel via Cocoa-dev >>> wrote: >>> >>> If Obj-C is dead, why is Apple still adding new language extensions (and >>> not minor one) ? >>> >>> https://github.c

Re: Future of Cocoa

2019-11-20 Thread Jean-Daniel via Cocoa-dev
> Le 20 nov. 2019 à 01:26, Gerald Henriksen via Cocoa-dev > a écrit : > > On Tue, 19 Nov 2019 13:51:14 -0700, you wrote: > >> When committing to 64 bit Apple said NO to Carbon but YES to Cocoa and YES >> to Core Foundation and YES to a lot of other stuff. The OS still has the XNU >> (Mach)

Re: Thoughts on Objective-C++

2019-11-12 Thread Jean-Daniel via Cocoa-dev
> Le 12 nov. 2019 à 21:30, Richard Charles via Cocoa-dev > a écrit : > > >> On Nov 12, 2019, at 1:16 PM, GNDGN wrote: >> >> ‘It’s like giving a glass of ice water to somebody in hell’ - Jobs >> > > Apple released iTunes for Windows in October 2003. Apparently Cocoa and any > supporting f

Re: Need for Swift

2019-10-16 Thread Jean-Daniel via Cocoa-dev
> Le 16 oct. 2019 à 11:49, Stephane Sudre via Cocoa-dev > a écrit : > > On Tue, Oct 15, 2019 at 2:26 PM Sandor Szatmari via Cocoa-dev > wrote: > >> But honestly, I don’t have enough Swift experience to know if you can write >> bad Swift code. > > I'm just reading Swift code here and there

Re: Need for Swift

2019-10-15 Thread Jean-Daniel via Cocoa-dev
> Le 15 oct. 2019 à 04:43, Alex Zavatone via Cocoa-dev > a écrit : > > > >> On Oct 14, 2019, at 1:25 PM, Carl Hoefs via Cocoa-dev >> wrote: >> >> The group that likes Obj-C sees Swift as being "arbitrarily syntactical" >> with the syntax of the language getting in the way of programming.

Re: Thoughts on Cocoa source code

2019-10-12 Thread Jean-Daniel via Cocoa-dev
> Le 12 oct. 2019 à 03:07, 조성빈 via Cocoa-dev a > écrit : > >> >> 2019. 10. 12. 오전 9:55, Richard Charles via Cocoa-dev >> 작성: >> >>  >>> On Oct 11, 2019, at 1:14 PM, Turtle Creek Software via Cocoa-dev >>> wrote: >>> > I know this is the Cocoa devs list... but why not make a website

Re: Thoughts on Cocoa source code

2019-10-11 Thread Jean-Daniel via Cocoa-dev
> Le 11 oct. 2019 à 16:59, Turtle Creek Software via Cocoa-dev > a écrit : > > I checked the GNUstep project, and it does seem decently clear and > well-commented. If Apple made it possible to see and step through some of > the basic Cocoa classes, that would be a good starting point. The har

Re: Thoughts on Cocoa source code

2019-10-09 Thread Jean-Daniel via Cocoa-dev
> Le 10 oct. 2019 à 00:14, Jens Alfke via Cocoa-dev > a écrit : > > > >> On Oct 9, 2019, at 11:39 AM, Aandi Inston wrote: >> >> * But for whatever reason, I'm using the Mac OS 10.14 SDK. So that will get >> a compile-time warning. > > Only if you don't turn on -Werror, which I really, re

Re: Thoughts on Cocoa

2019-10-05 Thread Jean-Daniel via Cocoa-dev
> Le 5 oct. 2019 à 07:14, Pier Bover via Cocoa-dev > a écrit : > >> But once you get experienced with Cocoa and Objective-C, you can build > applications or rewrite them fairly quickly, IMHO. > Yeah but Objective-C is slowly being phased out. Someone from Apple already > said in a previous e-m

Re: Thoughts on ARC

2019-09-30 Thread Jean-Daniel via Cocoa-dev
> Le 30 sept. 2019 à 17:16, Robert Walsh via Cocoa-dev > a écrit : > > > Swift may be the solution, but it's built on a weak foundation. It makes > cross-platform development almost impossible. The TIOBE index shows Swift > declining (and Objective-C increasing). So, maybe it isn't. > > I do

Re: ARC problems

2019-09-03 Thread Jean-Daniel via Cocoa-dev
> Le 4 sept. 2019 à 00:18, Turtle Creek Software a > écrit : > > The app delegate is NOT being deallocated prematurely- we have a breakpoint > there to check. > > We don't allocate the app delegate explicitly, so I had to set a breakpoint > in init() to see when it happens. > It's created i

Re: ARC problems

2019-09-03 Thread Jean-Daniel via Cocoa-dev
> Le 3 sept. 2019 à 02:33, Turtle Creek Software via Cocoa-dev > a écrit : > > Thanks for all the suggestions for the problems we had with a controller > being > deallocated unexpectedly under ARC. Unfortunately, none of them fixed it. > > We do need to get back to regular app programming, so

Re: NSLog displays inconsistent format for NSDate

2019-09-02 Thread Jean-Daniel via Cocoa-dev
> Le 1 sept. 2019 à 01:10, Carl Hoefs via Cocoa-dev > a écrit : > > >> On Aug 31, 2019, at 2:51 AM, Allan Odgaard via Cocoa-dev >> wrote: >> >> On 31 Aug 2019, at 2:49, Carl Hoefs via Cocoa-dev wrote: >> >>> Same result if I run it as a system daemon. So as you suggest it seems >>> there

Re: ARC

2019-08-26 Thread Jean-Daniel via Cocoa-dev
A better way to investigate such issue is using the memory debugging tools in Instrument IMHO. That would let you see all stack traces of retain/release calls. > Le 26 août 2019 à 04:14, Turtle Creek Software via Cocoa-dev > a écrit : > > In GSAppDelegate.h > GSOutlineWindowController *mainWi

Re: Crashing in NSTabView

2019-05-22 Thread Daniel DeCovnick
In the Build Phases tab of the target, open compile sources and set the compiler flags for your subclass’s .m to -fno-objc-arc. Don’t forget that the signature for -release is -(oneway void)release, not just -(void)release :) Daniel > On May 22, 2019, at 12:13 PM, Carl Hoefs >

Re: Crashing in NSTabView

2019-05-22 Thread Daniel DeCovnick
You can always subclass, turn off ARC for that file, and override -release or -autorelease to breakpoint in. I’ve done that on occasion with particularly tricky overrelease bugs (which actually turned out to be an under-autorelease bug in some non-ARC code). Daniel > On May 22, 2019, at 11

Re: C++ pointer to Cocoa object

2018-09-08 Thread Jean-Daniel
> Le 7 sept. 2018 à 19:46, Casey McDermott a écrit : > > We need to link some of our C++ classes to a matching Cocoa class. > It's easy for Cocoa to reference C++ objects. Going the other way is harder. > > We have been using a linker class that has a void pointer to the Obj-C object > in the

Re: How to clear macOS app bundle cache

2018-09-04 Thread Jean-Daniel
> Le 4 sept. 2018 à 17:01, Andreas Falkenhahn a écrit : > > On 04.09.2018 at 15:54 Alastair Houghton wrote: > >> OK. Have you tried logging the path of a file in the bundle, so you >> can see where it’s being read from? > > CFBundleCopyBundleURL(CFBundleGetMainBundle()) always returns the pat

Re: Detecting if /Network/Library is available

2018-09-03 Thread Jean-Daniel
> Le 3 sept. 2018 à 19:07, Sandor Szatmari a > écrit : > > I have a problem to solve where it appears I need to detect if > /Network/Library is available or not. > > Basically, I’d like to handle situation where I need to copy items from > /Network/Library at times when it’s it’s not yet

Re: Carbon -> Cocoa

2018-08-21 Thread Jean-Daniel
> Le 20 août 2018 à 18:51, Jens Alfke a écrit : > > > >> On Aug 18, 2018, at 11:19 AM, Stephane Sudre wrote: >> >> It might be the new Carbon once: >> >> - there is ABI stability in Swift. This could be not before late 2019. >> >> - the new APIs are only available in Swift. Is Swift NIO a

Archiving a project

2018-08-05 Thread Daniel Santos
Hello, Since I couldn’t find a xcode mailing list I am posting this here. I have a swift/cocoa app that I developed. I archived it and placed it on the applications folder. I am writing an applescript script to drive it using system events. There is a button I am activating that causes the applic

Re: Pasteboard and NSImage and Finder

2018-04-10 Thread Daniel Santos
That thought crossed my mind. I don’t want to write the file to disk, just have a NSFile object in memory, is that possible ? Daniel > On 9 Apr 2018, at 23:25, Rob Petrovec wrote: > > You need to put files on the pasteboard. Finder only plays with files, not > raw image dat

Pasteboard and NSImage and Finder

2018-04-09 Thread Daniel Santos
Hello all, I am pasting an array of NSImage to the general pasteboard. (using pasteboard .writeObjects()) I would like to be able to paste the images onto Finder. What do I need to do ? Thanks in advance ___ Cocoa-dev mailing list (Cocoa-dev@lists.app

tooltip on nscollection view item

2018-02-07 Thread Daniel Santos
Hello all, I have a resizable collection view where each element is an NSImageView. I want to show a tooltip with some information on each item. How do I accomplish this ? Thanks in advance ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: Problem with NSWorkspace.shared and uid 0

2017-12-15 Thread Jean-Daniel
AFAIK, this is not an issue with uid 0 specifically, but more an issue with how LaunchService works (the framework underlying this part of NSWorkspace). The system maintains a per user databases of the installed bundles. This databases is updated each time an user interact with a new application

Re: Loading very large image files (>10GB)

2017-12-05 Thread Jean-Daniel
UIImage is optimized to read pixel from disk at draw time and can be used to downsample a large image progressively ( https://developer.apple.com/library/content/samplecode/LargeImageDownsizing/Introduction/Intro.html ) I guess NSImage can do something similar. If not, this can probably be done

Re: Register media source to system

2017-10-23 Thread Jean-Daniel
> Le 23 oct. 2017 à 22:47, Jens Alfke a écrit : > > > >> On Oct 22, 2017, at 11:39 AM, Totte Alm wrote: >> >> Om Mac OS X (not iOS), I need to take video and/or audio from input >> devices(like built in iSight ot FaceTime cameras), found using the standard >> AVCaptureDevice.devices(); an

Re: Problem using NSTimer in privileged helper tool

2017-10-21 Thread Jean-Daniel
> Le 20 oct. 2017 à 18:56, Quincey Morris > a écrit : > > On Oct 20, 2017, at 03:23 , Mark Allan wrote: >> >> That worked with the block-based NSTimer API but not the selector-based API. >> I tried changing it to 'currentRunLoop' which got rid of the crash, but the >> timer never fired. >

Re: Question about NSObject based Class & delegates

2017-08-18 Thread Jean-Daniel
Why are you using Implicitly Unwrapped Optional (IUO) for your instance variables ? This is the best way to get crashes like you do. IUO should only be used for very specific cases (IBOutlet) > Le 14 août 2017 à 20:59, Eric E. Dolecki a écrit : > > I have a custom class. I want to use some del

Re: Is "-init" really needed?

2017-08-10 Thread Jean-Daniel
> Le 10 août 2017 à 16:09, Charles Srstka a écrit : > >> On Aug 10, 2017, at 8:59 AM, Alastair Houghton >> wrote: >> >> On 10 Aug 2017, at 14:57, gerti-cocoa...@bitart.com >> wrote: >>> >>> On Aug 10, 2017, at 02:18, Alastair Houghton >>> wrote: >>

Re: adding arc to a fundamentally non-arc project

2017-07-17 Thread Jean-Daniel
Did you switch from 32bit to 64bit ? Or enable the ‘symbol hidden by default’ build setting. The symbol visibility model is completely different on 64 bit and classes must be exported to be visible by other modules. > Le 15 juil. 2017 à 23:00, Matthew Weinstein a écrit : > > Trying to move fro

Re: file encription/decriptoin iOS

2017-06-28 Thread Jean-Daniel
> Le 27 juin 2017 à 04:25, Sandor Szatmari a > écrit : > > This is an interesting thread. The OP's original question made me think of > the functionality Apple recently (how recently I'm not sure) added to the iOS > Notes app. It allows you to selectively 'encrypt' (password protect) a note

Re: Translating KVO-ed property to Swift

2017-04-20 Thread Jean-Daniel
Just a tough that go in the ‘always use dynamic’ side. I think setter interposition is not the only issue with KVO. KVO also need to be able to fetch the old property value when -willChange: is called. I’m not sure about how it does that, but I’m pretty confident it will break if the getter is n

Re: Translating KVO-ed property to Swift

2017-04-17 Thread Jean-Daniel
> Le 17 avr. 2017 à 10:52, Quincey Morris > a écrit : > > On Apr 17, 2017, at 01:43 , Jean-Daniel <mailto:mail...@xenonium.com>> wrote: >> >> var version: String? { > > A slight correction: this declaration actually must be: > >> dynamic va

Re: Translating KVO-ed property to Swift

2017-04-17 Thread Jean-Daniel
One way to solve that is to declare an explicit private stored property for the ivar, and a public computed property for the logic. private var _version: String? = nil var version: String? { get { return _version } set { your set version code } } > Le 17 avr. 2017 à 10:24, Rick

Re: Reference to embedded view controller in IB?

2017-04-06 Thread Jean-Daniel
> Le 6 avr. 2017 à 22:35, Kyle Sluder a écrit : > > On Wed, Apr 5, 2017, at 03:42 PM, Doug Hill wrote: >> I have a view controller that I instantiate in my Storyboard. This view >> controller has an embedding view inside it's view, and this embedding >> view has another view controller in it. >>

Re: Normalisation of filenames

2017-04-05 Thread Jean-Daniel
> Le 5 avr. 2017 à 07:49, Gerriet M. Denkmann a écrit : > > >> On 3 Apr 2017, at 05:58, Aki Inoue wrote: >> This is the standard Unicode Normalization behavior. Each Unicode character is assigned the Unicode Combining Property, an integer value defining the canonical ordering

Re: Official sidebar?

2017-03-26 Thread Jean-Daniel
The OP ask about « Side Bar » not « Tab Bar ». > Le 26 mars 2017 à 00:40, Saagar Jha a écrit : > > Nothing, if I remember correctly. Cocoa should handle window tabs for you. > > Saagar Jha > >> On Mar 25, 2017, at 07:49, Daryle Walker wrote: >> >> Testing out my app. Finally noticed the ne

Re: Unicode filenames with Apple File System and UIManagedDocument

2017-03-21 Thread Jean-Daniel
> Le 21 mars 2017 à 12:03, davel...@mac.com a écrit : > >> >> On Mar 21, 2017, at 1:06 AM, Jens Alfke wrote: >> >> >>> On Mar 20, 2017, at 2:23 PM, davel...@mac.com wrote: >>> >>> NSURL *url = [[self courseDirectory] URLByAppendingPathComponent:name]; >> >> There’s nothing wrong with that c

Re: Unicode filenames with Apple File System and UIManagedDocument

2017-03-20 Thread Jean-Daniel
> Le 7 mars 2017 à 21:03, davel...@mac.com a écrit : > >> >> On Mar 7, 2017, at 1:19 PM, Alastair Houghton >> wrote: >> >> On 7 Mar 2017, at 12:47, Jean-Daniel wrote: >>> >>> Did you try to use NSString -fileSystemRepresentation inste

Re: Unicode filenames with Apple File System and UIManagedDocument

2017-03-07 Thread Jean-Daniel
> Le 6 mars 2017 à 14:28, davel...@mac.com a écrit : > > I have an iOS app (Attendance2) written in Objective-C. One of my users > upgraded to the public 10.3 iOS beta and reported he could no longer open his > documents (I have a subclass of UIManagedDocument so they are Core Data files > sto

Re: On NSIncrementalStore UUID Uniqueness

2017-01-19 Thread Jean-Daniel
> Le 19 janv. 2017 à 22:18, Daryle Walker a écrit : > > >> On Jan 16, 2017, at 12:08 PM, Charles Srstka >> wrote: >> >>> On Jan 14, 2017, at 4:41 AM, Daryle Walker >> > wrote: >>> >>> Could I base the UUID off a hash of the URL? Maybe, but it wouldn’t survive >>> fi

Re: On NSIncrementalStore UUID Uniqueness

2017-01-14 Thread Jean-Daniel
> Le 14 janv. 2017 à 11:41, Daryle Walker a écrit : > > >> On Jan 11, 2017, at 3:58 PM, Keary Suska wrote: >> >> >>> On Jan 11, 2017, at 11:16 AM, Jens Alfke wrote: >>> >>> >>>> On Jan 10, 2017, at 2:00 PM, Jean-Daniel

Re: On NSIncrementalStore UUID Uniqueness

2017-01-10 Thread Jean-Daniel
UUID means Universally unique identifier and it must be unique: https://en.wikipedia.org/wiki/UUID To generate an UUID, use a standard system function (CFUUID, NSUUID, libuuid, …) > Le 10 janv. 2017 à 11:36, Daryle Walker a écrit : > > Been reading up on N

Re: Retaining non-document windows

2017-01-04 Thread Jean-Daniel
> Le 4 janv. 2017 à 20:37, Quincey Morris > a écrit : > > On Jan 4, 2017, at 02:30 , Daryle Walker wrote: >> >> I always had to guess how to retain a non-document window. I usually get it >> after a bunch of hacking, but I want more official advice. Like I can get >> from here. >> >> I thi

Re: Linking one framework to two places in a project and static libs

2016-12-13 Thread Jean-Daniel
> Le 13 déc. 2016 à 21:59, Alex Zavatone a écrit : > > I've got a lovely (cough) non ARC iOS project that consists of 1 project file > that the target app is made from that links to 5 other projects that are > compiled to static libs through the odd method of specifying their path in > Other

Re: UINavigationBar content margins in UIPresentationController subclass

2016-12-07 Thread Daniel Stenmark
The most relevant looking bug I can find seems to involve pushing & popping view controllers. That said, setting the preferredContentSize on the navigation controller directly should always work. Setting preferredContentSize directly on the navigation controller works as expected. I’m more ref

Re: UINavigationBar content margins in UIPresentationController subclass

2016-12-07 Thread Daniel Stenmark
Thanks, David. Unfortunately, UINavigationController isn’t currently an option as it doesn’t reliably bubble up preferredContentSize changes, which we have a strong dependency on and is fairly dynamic in our use case. As of 10.0, it only seems to adapt and forward the very first preferredConte

Re: UINavigationBar content margins in UIPresentationController subclass

2016-12-07 Thread Daniel Stenmark
, then it won’t have the correct information to do its layout. On Nov 7, 2016, at 12:42 PM, Daniel Stenmark mailto:dstenm...@opentable.com>> wrote: I have a UIPresentationController subclass with a UINavigationBar embedded in the container view. However, when setting the rightBarBut

UINavigationBar content margins in UIPresentationController subclass

2016-12-06 Thread Daniel Stenmark
I have a UIPresentationController subclass with a UINavigationBar embedded in the container view. However, when setting the rightBarButtonItem, the spacing I usually expect from the item to the screen isn't there. http://imgur.com/LHcqhyd Anyone have an idea where I m

Re: Migrating shared library plugins to Cocoa Touch Frameworks

2016-12-04 Thread Jean-Daniel
> Le 4 déc. 2016 à 21:41, Andreas Falkenhahn a écrit : > > I've now implemented plugin support using dlopen() in my app and > it works fine so far. > > However, it seems like *all* symbols are exported to the dylib > inside the Cocoa Touch Framework. How can I configure Xcode to > export only c

Date Formatter relative date formatting

2016-10-28 Thread Daniel Phillips
put welcome, Thanks, Daniel ___ 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.com Help/Unsubscribe/Update your

Re: Mystery Threads

2016-09-29 Thread Daniel Vollmer
ar accesses latency). Maybe one of your blocks is bandwidth bound, while the other is compute bound? Your second function might be memory bound (with lots of read-modify-write traffic). There are many other factors (and the dispatch_apply man-page tells you that number of invoc

Re: Stupid objective-c question

2016-09-21 Thread Daniel Stenmark
It’s doing a pointer comparison while making poor assumptions about how the compiler will optimize the storage of string constants. This is bad; DO NOT DO THIS. Dan > On Sep 21, 2016, at 4:44 PM, Gabriel Zachmann wrote: > > I've got a stupid, curious question regarding a code snippet that I

Re: Get file argument

2016-09-04 Thread Jean-Daniel Dupas
> Le 4 sept. 2016 à 20:48, Jens Alfke a écrit : > > >> On Sep 4, 2016, at 4:56 AM, Andreas Falkenhahn >> wrote: >> >> Is there also a way to get the file argument without having an NSApp, >> i.e. can my program somehow obtain the file argument *before* creating >> the NSApp object or is that

Re: Core Graphics: Is it better to up-sample or down-sample images when drawing into a rect?

2016-08-24 Thread Jean-Daniel Dupas
> Le 24 août 2016 à 19:33, Jean-Daniel Dupas a écrit : > >> >> Le 24 août 2016 à 18:50, David Duncan a écrit : >> >> >>> On Aug 24, 2016, at 1:23 AM, Jeff Szuhay wrote: >>> >>> I’m using a bunch of layers to draw images to,

Re: Core Graphics: Is it better to up-sample or down-sample images when drawing into a rect?

2016-08-24 Thread Jean-Daniel Dupas
> Le 24 août 2016 à 18:50, David Duncan a écrit : > > >> On Aug 24, 2016, at 1:23 AM, Jeff Szuhay wrote: >> >> I’m using a bunch of layers to draw images to, compose them, and then draw >> into a viewRect >> with >> >> CGContextDrawLayerInRect( viewContext, viewRect, myLayer); >> >>

Re: Class is implemented in both

2016-08-15 Thread Jean-Daniel Dupas
> Le 15 août 2016 à 18:02, Jens Alfke a écrit : > > >> On Aug 15, 2016, at 11:34 AM, Jean-Daniel Dupas > <mailto:mail...@xenonium.com>> wrote: >> >> No, You can have only one PCH per project. That said, you can define a >> second one that include

Re: Class is implemented in both

2016-08-15 Thread Jean-Daniel Dupas
> Le 15 août 2016 à 15:27, Trygve Inda a écrit : > >> >>> On Aug 15, 2016, at 3:41 AM, Stephane Sudre wrote: >>> >>> . you could redefine the class name in the .pch of one project. >> >> +1 — I’ve had to do this before, and it works fine. Just add >> #define MyDisplayManager MyDisplayManager

Re: NSFileHandle and thread safety

2016-07-25 Thread Daniel Stenmark
> As long as each thread has a separate file handle, they’re independent of > each other, since each file handle remembers its own offset in the file. Ah, durr, you’re right. Apologies, I once had the displeasure of debugging an ancient codebase that used the same Unix file descriptor with unlo

Re: NSFileHandle and thread safety

2016-07-25 Thread Daniel Stenmark
1. Can I write to two different files using two NSFIleHandles from two threads at the same time? Yes. 2. Can I read from a single file using two NSFileHandles on two threads at the same time? Why would you need to do that in the first place? Unless you’re reading a single byte at a time, it

Re: Ending NSTask doesn't release file handle opened by the task it wraps.

2016-07-21 Thread Daniel Stenmark
Do you have any NSPipes or NSFileHandles set on the NSTask’s I/O channels? (standardOutput, standardError, and standardInput) Dan > On Jul 21, 2016, at 8:20 AM, Graham Cox wrote: > > One of my apps uses NSTask to wrap a command line utility that is embedded in > the same app’s resources. This

Re: UIStackView: Variable Spacing

2016-07-06 Thread Daniel Stenmark
that’s just another refactoring branch I’ll have to shelve for now. Dan > On Jul 6, 2016, at 4:45 PM, Roland King wrote: > > >> On 7 Jul 2016, at 04:37, Daniel Stenmark wrote: >> >> What’s the best way to achieve variable spacing between children of a >> UI

Re: UIStackView: Variable Spacing

2016-07-06 Thread Daniel Stenmark
6, at 15:41 , Daniel Stenmark mailto:dstenm...@opentable.com>> wrote: This would require my UIStackView’s children to have children of their own, which just means even more layout constraints to resolve at scroll-time. Can’t you set constraints between the stack view children and/or the par

Re: UIStackView: Variable Spacing

2016-07-06 Thread Daniel Stenmark
This would require my UIStackView’s children to have children of their own, which just means even more layout constraints to resolve at scroll-time. Dan On Jul 6, 2016, at 3:34 PM, Quincey Morris mailto:quinceymor...@rivergatesoftware.com>> wrote: On Jul 6, 2016, at 13:37 , Daniel St

UIStackView: Variable Spacing

2016-07-06 Thread Daniel Stenmark
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 performance is critical and the implicit constraints created by adding a

Re: How can I get a single threaded network call in ObjC on iOS?

2016-06-28 Thread Daniel Stenmark
I agree with Gary, but if something about your structure makes that difficult, there’s also a queue suspend/resume approach: let queue = dispatch_queue_create("", DISPATCH_QUEUE_SERIAL) dispatch_async(queue) { dispatch_suspend(queue) myFirstNetworkCall({ (let result) in dispatch_

Re: Getting the Version Number from an NSRunningApplication?

2016-05-25 Thread Daniel Höpfl
s that are already loaded. ("Return Value: The previously created NSBundle instance that has the bundle identifier identifier. Returns nil if the requested bundle is not found.") I think that the following should work: myAppBundle = [NSBundle bundleWithURL:[theRunningApp bundleUR

Re: undomanger performance

2016-05-01 Thread Jean-Daniel Dupas
> Le 1 mai 2016 à 01:42, Quincey Morris a > écrit : > > On Apr 30, 2016, at 12:49 , Jean-Daniel Dupas <mailto:mail...@xenonium.com>> wrote: >> >> Maybe registering the changes is not executed immediately but deferred until >> the end of the current

Re: undomanger performance

2016-04-30 Thread Jean-Daniel Dupas
Just my 2 cents. Maybe registering the changes is not executed immediately but deferred until the end of the current event loop cycle, so the undo manager can group them into a single operation. In such case, it would mean that what you think is the undo registration is just a call to schedul

Re: Storyboard weakness

2016-03-09 Thread Daniel Stenmark
If you’re still having issues, feel free to post up and send us a GitHub link to a sample project exhibiting this behavior. Setting up a UICollectionView fairly straight-forward; something’s being overlooked here. Dan > On Mar 9, 2016, at 5:55 PM, Daniel Stenmark wrote: > > Did yo

Re: Storyboard weakness

2016-03-09 Thread Daniel Stenmark
Did you set the prototype cell’s Reusability Identifier? http://i.imgur.com/1uLxYPo.png Dan On Mar 9, 2016, at 5:29 PM, Rick Mann mailto:rm...@latencyzero.com>> wrote: On Mar 9, 2016, at 16:05 , Daniel Stenmark mailto:dstenm...@opentable.com>> wrote: Because I want all the

Re: Storyboard weakness

2016-03-09 Thread Daniel Stenmark
> Because I want all the benefits the specific view controller gives me, namely > the ability to build the cells right in the view. What’re you talking about? You can still build custom UICollectionView cells right into the view when using a plain old UIViewController. Dan ___

Re: Storyboard weakness

2016-03-09 Thread Daniel Stenmark
Why are you locking yourself into a heavily customized UICollectionViewController? Why not just use a generic UIViewController and hook up your view elements the old fashioned way? Dan > On Mar 9, 2016, at 3:04 PM, Rick Mann wrote: > > There's a severe weakness in Storyboards for which I'm h

UINavigationController: Clean interactive transition to view controller without navigation bar?

2016-02-20 Thread Daniel Stenmark
(Already asked on StackOverflow, but might as well cover my bases here as well.) I have a view controller navigation hierarchy where only the top view controller has its navigation bar hidden. Normal pushing/popping is fine and works as expected. However, when the pop is interactive (drag-to-pop

Re: Value of the MAC_OS_X_VERSION_MIN_REQUIRED macro

2016-02-20 Thread Jean-Daniel Dupas
It is unsafe to use availability conditional in headers. You can’t guarantee that the framework client will has the same settings that what was used to compile the framework. That said, if you want to use weak when compiling for ARC and assign otherwise, you can just use #if __has_feature(objc_a

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

2016-02-20 Thread Jean-Daniel Dupas
> Le 20 févr. 2016 à 07:28, Quincey Morris > a écrit : > > On Feb 19, 2016, at 22:14 , Gerriet M. Denkmann wrote: >> >> Is there (yet) a Swift version of ‘[NSString stringWithFormat: “%08lx”, >> (someCast) someValue]’ ? > > No, and yes, and no, and yes. > > There is currently AFAIK no such

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

2016-02-19 Thread Jean-Daniel Dupas
> Le 19 févr. 2016 à 22:29, Jens Alfke a écrit : > > >> On Feb 19, 2016, at 1:17 PM, Jim Adams wrote: >> >> SLogInfo(@"Starting csi %ld count %d", csi, sortedEvents.count); >> >> In the console I see: >> INFO: Starting csi -1 count -1 >> The very next line crashes when the sortedEv

Re: How to write an RSS client for iOS

2016-02-13 Thread Daniel Pasco
This. > It’s a total pain in the butt, to be honest. I’m not sure if there are any > existing open source iOS frameworks for reading feeds, but if there is one, > you’ll be much better off using it than writing your own. > > —Jens -Daniel smime.p7s Description: S/MIME cryptogr

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

2016-02-11 Thread Jean-Daniel Dupas
uot;213.186.33.24". > > Conduct the same exercise for any A record returned for www.apple.com, and > you'll also get this result. Completely expected. > > Now, if Jean-Daniel has stated definitively that https://xenonium.com is > expected to serve up a matching certif

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

2016-02-10 Thread Jean-Daniel Dupas
> Le 10 févr. 2016 à 05:48, Trygve Inda a écrit : > >> If your hosting provider still charges an arm and a leg for SSL, switch. > > I need SSL for multiple subdomains. My host (Pair Networks) charges $449/yr > for such a certificate. That seems really expensive. What are others paying > for thi

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

2016-02-09 Thread Jean-Daniel Dupas
OK. I did watch the POC and it appears this is not in the update process, but in the check for update that the attack occurs. > Le 9 févr. 2016 à 23:27, Jean-Daniel Dupas a écrit : > > I agree. I can’t see how that can work with a properly configured Sparkle, > that is an App

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

2016-02-09 Thread Jean-Daniel Dupas
I agree. I can’t see how that can work with a properly configured Sparkle, that is an App that accepts only properly signed update. > Le 9 févr. 2016 à 23:22, Graham Cox a écrit : > > Thanks for the heads-up Jens. > > Is it enough to change the SUFeedURL to https (if your server supports it,

Re: Question about Archives and Serialisations Programming Guide

2016-02-05 Thread Jean-Daniel Dupas
Maybe an issue cause you use __weak reference which zeroed for some reason. Can you try to use __unsafe_unretained instead and see what happen ? > Le 5 févr. 2016 à 14:46, Dave a écrit : > > >> On 5 Feb 2016, at 13:34, Jean-Daniel Dupas wrote: >> >>

Re: Question about Archives and Serialisations Programming Guide

2016-02-05 Thread Jean-Daniel Dupas
And obviously, you also add - encodeWithCoder: and -initWithCoder: methods in your custom classes. > Le 5 févr. 2016 à 14:33, Jean-Daniel Dupas a écrit : > > That is your need, not your problem. > > To archive an object graph (cyclic or not), you just do [

Re: Question about Archives and Serialisations Programming Guide

2016-02-05 Thread Jean-Daniel Dupas
- > "Archive/Unarchive Problem/Question?”. > > Basically I need to save/restore a Network of Custom Objects….. > > All the Best > Dave > >> On 5 Feb 2016, at 13:18, Jean-Daniel Dupas wrote: >> >> You don’t tell use what is your problem. You can pe

Re: Question about Archives and Serialisations Programming Guide

2016-02-05 Thread Jean-Daniel Dupas
You don’t tell use what is your problem. You can perfectly encode any structure using Keyed archivers (whether there is cycles and backlinks). > Le 5 févr. 2016 à 14:13, Dave a écrit : > > Hi, > > I’m having problems with Back Links when Archiving/Unarchiving an Object. I > found the text bel

Re: View-based NSTableView and ending editing with "return"

2016-02-03 Thread Jean-Daniel Dupas
> Le 24 janv. 2016 à 09:51, Arved von Brasch a écrit : > > Hello list, > > After putting it off for too long, I’m migrating to view-based NSTableViews. > I’ve worked through most of the conversion problems I’ve had, and am > generally pretty happy. There is, however, one problem I haven’t b

  1   2   3   4   5   6   7   8   9   10   >