> On 29 Jun 2017, at 12:13, Quincey Morris
> wrote:
>
> On Jun 28, 2017, at 22:02 , Gerriet M. Denkmann wrote:
>>
>> I had to do two more steps:
>>
>> 1. give the segue an identifier, like: “EmbedSegueToTableViewController”
>>
>> 2. in the
> On 29 Jun 2017, at 00:48, Quincey Morris
> wrote:
>
> On Jun 28, 2017, at 01:38 , Gerriet M. Denkmann wrote:
>>
>> I did just that.
>
> Not quite …
>
>> I have a Master View Controller Scene with a MasterViewController ←
>> UIViewController
> On 28 Jun 2017, at 14:37, Quincey Morris
> wrote:
>
> On Jun 28, 2017, at 00:21 , Gerriet M. Denkmann wrote:
>>
>> Ok, so I removed my TableView from the scene and tried to drag a
>> UITableViewController into its place.
>> But Xcode wou
I have (iOS 10.3) a UIViewController which contains:
Other Stuff
UITableView
Now I want to add a UIRefreshControl to my TableView.
The documentation says: that UIRefreshControl “is specifically designed for use
in a table view that’s managed by a table view controller, using it in a
different c
> On 26 Jun 2017, at 08:03, Graham Cox wrote:
>
>> On 25 Jun 2017, at 7:39 pm, Gerriet M. Denkmann wrote:
>>
>> Which of these two lines is preferable:
>> NSString *colorSpaceName = useColour ? NSDeviceRGBColorSpace :
>> NSDeviceWhiteColorSpac
> On 25 Jun 2017, at 09:29, Graham Cox wrote:
>
> You could get the colorSpaceName from the source image and use that. If
> there’s no conversion needed between the images it’ll probably be faster
> (though seems you are giving yourself the option of creating a grayscale
> version here).
The
> On 23 Jun 2017, at 23:37, Jens Alfke wrote:
>
>
>> On Jun 23, 2017, at 8:45 AM, Gerriet M. Denkmann wrote:
>>
>> the image looks fine, but when I write subData to disk, it has 64 x 64
>> pixels.
>
> You’re probably running this on a computer with a
macOS 12.5
I try to make a sub image (subRect has size 32 x 32) like:
NSRect pubRect = NSZeroRect; pubRect.size = subRect.size;
NSImage *subImage = [ [NSImage alloc] initWithSize: subRect.size ];
[ subImage lockFocus ];
[ self.imagedrawAtPoint:NSMakePoint(0, 0)
> On 21 Jun 2017, at 23:56, Alastair Houghton
> wrote:
>
> On 21 Jun 2017, at 16:09, Jens Alfke wrote:
>>
>> On Jun 20, 2017, at 11:17 PM, Gerriet M. Denkmann
>> wrote:
>>>
>>> Assume that I have two NSImages, both with the same size, how ca
macOS 12.5
Assume that I have two NSImages, both with the same size, how can I create an
animated gif which alternates between these two images?
Gerriet.
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or mod
macOS 12.5
I create an image like:
NSImage *subImage = [ [NSImage alloc] initWithSize: subRect.size ];
[ subImage lockFocus ];
[ self.imagedrawAtPoint:NSMakePoint(0, 0)
fromRect: subRect
operation:
> On 20 Jun 2017, at 16:24, Alastair Houghton
> wrote:
>
> On 20 Jun 2017, at 04:04, Gerriet M. Denkmann wrote:
>>
>
>> 2. some other thing repeatedly about every 0.1 second.
>
> Personally, I’d choose an API that directly supports repeating ti
> On 20 Jun 2017, at 16:24, Alastair Houghton
> wrote:
>
> On 20 Jun 2017, at 04:04, Gerriet M. Denkmann wrote:
>>
>> macOS 11+
>>
>> Some Cocoa app which has to do:
>> 1. something a few seconds later
>
> The main issue here isn’t energy
macOS.
Some Cocoa app wants to know whether the cursor moved from any point to a point
outside of some rect.
Currently I use polling (which looks kind of inefficient).
I tried NSTrackingArea, but this does not work:
1. if the cursor is initially NOT in the rect, the app does not get notified:
macOS 11+
Some Cocoa app which has to do:
1. something a few seconds later
2. some other thing repeatedly about every 0.1 second.
What is the most efficient (energy-wise) way to do this:
NSTimer (with tolerance)
NSRunLoop performSelector:target:argument:order:modes:
NSObject
// strange behaviour for probably all combining marks (macOS 12.4):
NSString *pintu = @"-ฺ";// HYPHEN-MINUS + THAI CHARACTER PHINTHU
// ok
NSString *test1 = pintu;
[ self printTestString: test1 ];
// prints: length 2 0x2d 0xe3a “-ฺ” ok: has prefix “
> On 29 Apr 2017, at 11:56, Saagar Jha wrote:
>
>
> Saagar Jha
>
>> On Apr 28, 2017, at 20:22, Gerriet M. Denkmann wrote:
>>
>>>
>>> On 23 Apr 2017, at 14:45, Quincey Morris
>>> wrote:
>>>
>>> On Apr 22, 2017, at 2
> On 23 Apr 2017, at 14:45, Quincey Morris
> wrote:
>
> On Apr 22, 2017, at 23:55 , Gerriet M. Denkmann wrote:
>>
>> But now I want to move the table view down 1 cm (leaving 1 cm unused space
>> at the top of the screen above the table view).
>> Reason: t
I got an iOS app where one scene contains a TableView which fills the whole
screen.
Works fine.
But now I want to move the table view down 1 cm (leaving 1 cm unused space at
the top of the screen above the table view).
Reason: top of the table view (which contains a SearchField) is rather hard
> 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 of combining marks.
>>>
>>> The Unicode Combining Property for THA
> On 2 Apr 2017, at 10:59, Aki Inoue wrote:
>
>
>> On Apr 1, 2017, at 4:57 PM, Gerriet M. Denkmann wrote:
>>
>>
>>> On 2 Apr 2017, at 06:33, Jens Alfke wrote:
>>>
>>>
>>>> On Apr 1, 2017, at 11:58 AM, Gerriet M. Denkmann
> On 2 Apr 2017, at 06:33, Jens Alfke wrote:
>
>
>> On Apr 1, 2017, at 11:58 AM, Gerriet M. Denkmann wrote:
>>
>> I think that the examples above show, that NSURL does indeed do something
>> about normalising Unicode strings.
>
> That makes sense; I
> On 2 Apr 2017, at 01:09, Quincey Morris
> wrote:
>
> On Apr 1, 2017, at 04:41 , Gerriet M. Denkmann wrote:
>>
>> for different values of path I got:
>> path = @“/ก่ี”; // consonant + mark + vowel → same = YES
>> path = @“/กี่”; // c
I tried (with case-sensitive HFS+ in macOS 12.4):
NSString *path = …
NSURL *url = [ NSURL fileURLWithPath: path isDirectory: NO ];
NSString *urlPath = url.path;
BOOL same = [ urlPath isEqualToString: path ];
for different values of path I got:
path = @“/ก่ี”; // consonant + mark + vowel →
Sent from my iPhone
> On 28 Mar 2017, at 11:41, Quincey Morris
> wrote:
>
>> On Mar 26, 2017, at 22:04 , Gerriet M. Denkmann wrote:
>>
>> [ arrayOfStrings writeToFile: “directoryPath/SortedKeys.plist” atomically:
>> YES ]; ← pseudo code
>
> A c
Sent from my iPhone
> On 28 Mar 2017, at 10:32, Jens Alfke wrote:
>
>
>> On Mar 27, 2017, at 8:25 PM, Gerriet M. Denkmann wrote:
>>
>>
>>
>> Sent from my iPhone
>>
>>> On 27 Mar 2017, at 23:37, Jens Alfke wrote:
>>&g
Sent from my iPhone
> On 27 Mar 2017, at 23:37, Jens Alfke wrote:
>
>
>> On Mar 26, 2017, at 10:04 PM, Gerriet M. Denkmann
>> wrote:
>>
>> Yes, you are right. And I have to apologise for not spotting this:
>>
>> *** Terminating app due to u
> On 27 Mar 2017, at 15:49, Felix Franz wrote:
>
> On 27 Mar 2017, at 10:42, Gerriet M. Denkmann wrote:
>>
>> propertyListFromData:mutabilityOption:format:errorDescription: (which
>> converts an NSData into some property list object) is deprecated.
>>
>&
propertyListFromData:mutabilityOption:format:errorDescription: (which converts
an NSData into some property list object) is deprecated.
The documentation says: This method is deprecated. Use
dataWithPropertyList:format:options:error: instead.
But this seems to be the exact opposite: converting
> On 27 Mar 2017, at 10:39, Ken Thomases wrote:
>
> On Mar 26, 2017, at 10:06 PM, Gerriet M. Denkmann wrote:
>>
>> macOS 12.3
>>
>> This is a rather rare bug (never seen before):
>>
>> Thread 12 Crashed:: Dispatch queue: เสือ :: NSOpe
macOS 12.3
This is a rather rare bug (never seen before):
Thread 12 Crashed:: Dispatch queue: เสือ :: NSOperation 0x61800184fbd0 (QOS:
UTILITY)
0 libsystem_kernel.dylib 0x7fffb3d65dd6 __pthread_kill + 10
1 libsystem_pthread.dylib 0x7fffb3e51787 pthread_kill +
> On 8 Mar 2017, at 06:37, Ken Thomases wrote:
>
> On Mar 7, 2017, at 4:17 AM, Gerriet M. Denkmann wrote:
>>
>> On 6 Mar 2017, at 23:26, Ken Thomases wrote:
>>>
>>> Try using
>>> -enumerateEnclosingRectsForGlyphRange:withinSelectedGlyphRange:
> On 6 Mar 2017, at 23:26, Ken Thomases wrote:
>
> On Mar 6, 2017, at 3:41 AM, Gerriet M. Denkmann wrote:
>>
>> I am trying to get bounding rects in a TextView:
>>
>> NSRange glyphRange = [ layoutManager glyphRangeForCha
macOS 12.3, Xcode Version 8.2.1 (8C1002).
I am trying to get bounding rects in a TextView:
NSRange glyphRange =[ layoutManager glyphRangeForCharacterRange:
someCharRange
actualCharacterRange:
I use WKInterfaceDate / WKInterfaceTimer in a wach app (3.1.3).
I would like to set the Locale - but see no way to do so.
The only thing I did accomplish is to set the calendar of WKInterfaceDate
according to the locale.
In macOS I would use:
NSDateFormatter *dateFormatter = [ [ NSDateFormatte
iOS (10.2) app does:
SERVICE_TYPE = 1 to 63 ascii chars; no spaces; no ‘.’; no ‘[‘; can use ‘_' or
'-'; case insensitive
Note: I did not find these rules documented anywhere, they are just the result
of trial and error.
fullNameOfServiceType = “_SERVICE_TYPE._tcp."
[ NSNetServiceBrowser search
macOS 12.2; MacBook Pro (Retina, Mid 2012).
Activity Monitor → Energy tells me that my app requires a "High Performance
Graphic Card”.
The problem: it has absolutely no reason to do so.
The app does some WiFi stuff and displays the result in a window. There is
almost no graphics (except from so
watchOS 3
The watchApp has NotificationController ← WKUserNotificationInterfaceController
watchApp gets a Local Notification with one associated UNNotificationAction
with title = “Accept”
[NotificationController init]
[NotificationController didReceiveNotification:withCompletion:]
[Notification
hOS app and the iOS device is
locked and the watch is not locked then the Notification is sent also to the
watch (and the iOS does not get woken up).
Gerriet.
>
> Scott Tury
>
>> On Dec 5, 2016, at 12:17 AM, Gerriet M. Denkmann wrote:
>>
>>
>>> On 5 Dec
s with a UNNotificationCategory with the same category:
“my test category”.
This might indicate possibility “C”: local notifications are local to the
sending app.
Or it may just be a proof that I am doing it wrong.
>
> Communicate between watchOS, and iPhone:
To be investigated later.
between iOS app and watchOS app?
Gerriet.
>
>> Date: Sat, 03 Dec 2016 13:48:31 +0700
>> From: "Gerriet M. Denkmann"
>> To: cocoa-dev
>> Subject: Message from iOS to watchOS
>> Message-ID: <2001a5e8-10f8-4b30-86c4-9dfee6198...@icloud.com>
>> Content-T
I have a pair of apps: iOS + watchOS.
The iOS app would like (e.g. when the user taps a button) to send some (short)
info to the watchOS app.
The watchOS app probably should show something like a Notification Controller
Scene:
Message from iOS (title)
Something was done (bod
oster wanted.
> --
> Gary L. Wade
> http://www.garywade.com/
>
>> On Nov 30, 2016, at 9:55 AM, Richard Charles wrote:
>>
>>
>>> On Nov 30, 2016, at 1:29 AM, Gerriet M. Denkmann
>>> wrote:
>>>
>>> I want a UIBarButtonItem with a pi
> On 30 Nov 2016, at 15:33, Alex Zavatone wrote:
>
> I made my own since this has been removed.
>
> I'll send you a few. Is Illustrator or PDF or PNG OK?
Pdf or Png would be fine.
Thanks a lot!
Kind regards,
Gerriet.
___
Cocoa-dev mailing lis
I want a UIBarButtonItem with a picture of gears, being used to mean “Settings”.
This symbol is used by many apps for this function; but I cannot find this
image.
Where is it hiding?
Gerriet.
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
P
> On 30 Nov 2016, at 09:18, Doug Hill wrote:
>
>
>> On Nov 29, 2016, at 3:58 PM, Rick Mann wrote:
>>
>>
>>> On Nov 29, 2016, at 09:38 , Doug Hill wrote:
>>>
>>> Wow, it's awesome that this works! And now that I know how to set these
>>> attributes for a UILabel, I might try using some oth
> On 29 Nov 2016, at 00:40, Quincey Morris
> wrote:
>
> On Nov 28, 2016, at 07:01 , Gerriet M. Denkmann wrote:
>>
>> But in my case I have “21:37:44” where ““21:37” is bold and “:44” is thin.
>
>
> c. Given that you work so much with non-Latin scripts,
red colons on.
So now I have two working solutions:
1. getting the special glyph for the centered colon (as suggested by Alistair)
and:
2. using kStylisticAltThreeOnSelector (as suggested by you).
Thanks a lot. The hint of “kStylisticAlternativesType” was extremely helpful!
Kind regards,
Gerriet.
> On 28 Nov 2016, at 23:42, Alastair Houghton
> wrote:
>
> On 28 Nov 2016, at 16:18, Gerriet M. Denkmann wrote:
>>
>>
>>> On 28 Nov 2016, at 22:13, Eric E. Dolecki wrote:
>>>
>>> You could probably use an attributed
> On 29 Nov 2016, at 00:40, Quincey Morris
> wrote:
>
> On Nov 28, 2016, at 07:01 , Gerriet M. Denkmann wrote:
>>
>> But in my case I have “21:37:44” where ““21:37” is bold and “:44” is thin.
>
> a. Are you using an attributed string whose text is “21:37:44”,
thinking of UIFontDescriptorFeatureSettingsAttribute with some
Feature type from SFNTLayoutTypes.h (in CoreText).
I tried a few types, but no success so far.
>
> On Mon, Nov 28, 2016 at 10:02 AM Gerriet M. Denkmann
> wrote:
> iOS 10.1.1
>
> WWDC 2015,Session 804: Introducing the New System Fonts tells (at ab
iOS 10.1.1
WWDC 2015,Session 804: Introducing the New System Fonts tells (at about 23:23)
about Vertically Centered Colons.
But I do not understand, how to turn this on.
It works automatically (in SF) with colons surrounded by digits.
But in my case I have “21:37:44” where ““21:37” is bold and
> On 22 Nov 2016, at 23:07,Andreas Mayer wrote:
>
>> Am 22.11.2016 um 07:34 schrieb Gerriet M. Denkmann :
>>
>> But now some obnoxious NSPersistentUIRestorer takes over:
>
> The docs say window restoration uses the window's identifier. Is that one set
&g
macOS 12.1, Xcode Version 8.1 (8T61a).
App with two windows: FestEvent and Preferences, which have Autosave names of
FestEvent, resp. Preferences.
Start App → FestEvent window will show.
Make it to show Preferences window as well.
Move both windows around and observe Preferences.plist to have a
> On 7 Nov 2016, at 16:43, Alastair Houghton
> wrote:
>
> On 6 Nov 2016, at 06:18, Quincey Morris
> wrote:
>
>> There is probably no perfect strategy that works for every font. However,
>> for the kinds of design decisions that Apple made when it started doing
>> typography properly (in th
> On 6 Nov 2016, at 13:18, Quincey Morris
> wrote:
>
> On Nov 5, 2016, at 21:44 , Gerriet M. Denkmann wrote:
>>
>> NSRect boundingRect = tableFont.boundingRectForFont;
>> self.outlineView.rowHeight = ceil( boundingRect.size.height )
>
> This is
macOS 12.1 TableView and OutlineView (View Based) use:
- (void)awakeFromNib
NSRect boundingRect = tableFont.boundingRectForFont;
self.outlineView.rowHeight = ceil( boundingRect.size.height )
and sets attributedStringValue (using the tableFont).
This works mostly ok.
But for ta
> On 4 Nov 2016, at 10:39, Ken Thomases wrote:
>
> On Nov 3, 2016, at 10:08 PM, Gerriet M. Denkmann wrote:
>>
>> URLByResolvingAliasFileAtURL does almost the same, has no special behaviour
>> with “/private”, and even can resolve an alias.
>> But: only when
> On 3 Nov 2016, at 23:05, Jens Alfke wrote:
>
> The docs for -stringByResolvingSymlinksInPath say that “for absolute paths,
> all symbolic links are guaranteed to be removed.” If it doesn’t actually do
> that, then there’s either a bug in the implementation or a bug in the docs;
> either way
> On 2 Nov 2016, at 20:40, Stephane Sudre wrote:
>
> https://www.cocoawithlove.com/2010/02/resolving-path-containing-mixture-of.html
I finally came up with this (all error checking removed):
- (NSString *)resolvedPathFor: (NSString *)rawPath
{
NSURL *url = [ NSURL fileURLWithPath: rawP
I want to remove all symlinks from a path.
stringByResolvingSymlinksInPath does NOT do this (e.g. it does not change: /tmp
to: /private/tmp).
Currently I am using:
int fd = open( filename, O_EVTONLY );
fcntl( fd, F_GETPATH, buffer );
close(fd);
Is there something better or more suitable?
macOS
> On 1 Nov 2016, at 15:25, Ken Thomases wrote:
>
> On Nov 1, 2016, at 3:20 AM, Gerriet M. Denkmann wrote:
>>
>> What I really want to do: Create custom icons for folders programmatically.
>
> Use -[NSWorkspace setIcon:forFile:options:].
>
> Regards,
> Ke
> On 1 Nov 2016, at 14:44, Ken Thomases wrote:
>
> On Nov 1, 2016, at 2:08 AM, Gerriet M. Denkmann wrote:
>>
>> I am using ReadIconFromFSRef (not deprecated), which needs an FSRef.
>>
>> How to convert a path into an FSRef without deprecation warnings in m
I am using ReadIconFromFSRef (not deprecated), which needs an FSRef.
How to convert a path into an FSRef without deprecation warnings in macOS 12 ?
Gerriet.
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or
t; Phil
>
>
>> On 31 Oct 2016, at 17:00, Gerriet M. Denkmann wrote:
>
>
>>
>>
>> I want to show a file in Finder (not open it in some application).
>>
>> I tried:
>> NSString *path = @“/some/thing.plist”;
>> [ sharedW
I want to show a file in Finder (not open it in some application).
I tried:
NSString *path = @“/some/thing.plist”;
[ sharedWorkspace openFile: path withApplication: @“Finder.app" ]
but this opens Xcode and displays the content of path.
I just want a Finder window with my path se
> On 19 Oct 2016, at 15:08, Quincey Morris
> wrote:
>
> On Oct 19, 2016, at 00:49 , Gerriet M. Denkmann wrote:
>>
>> Before:
>>
>> TextField1 bound Value to:
>> Shared User Defaults Controller
>> Controller Key = values
>>
> On 19 Oct 2016, at 13:01, Quincey Morris
> wrote:
>
>
> One way around this is to use a NSObjectController bound between the text
> field and the data model (user defaults in this case). NSObjectController
> implements the editor protocols, so this covers the case where the window
> close
> On 19 Oct 2016, at 13:01, Quincey Morris
> wrote:
>
> On Oct 18, 2016, at 22:33 , Gerriet M. Denkmann wrote:
>>
>> I have just done this (can send it to you if you are interested).
>
> I’d be interested at looking at it, if you can email it to me.
> On 19 Oct 2016, at 11:43,Jerome Krinock wrote:
>
>
>> On 2016 Oct 18, at 19:32, Gerriet M. Denkmann wrote:
>>
>>
>>> On 19 Oct 2016, at 02:00,Jerome Krinock :
>>>
>>>> On 2016 Oct 14, at 23:08, Gerriet M. Denkman
ect.
Kind regards,
Gerriet.
> These are things I’ve seen that can cause uncharacteristically often updates.
> --
> Gary L. Wade
> http://www.garywade.com/
>
>> On Oct 18, 2016, at 7:32 PM, Gerriet M. Denkmann wrote:
>>
>>
>>> On 19 Oct 2016, at 02:00,
> On 19 Oct 2016, at 02:00,Jerome Krinock :
>
>> On 2016 Oct 14, at 23:08, Gerriet M. Denkmann wrote:
>>
>> My app (macOS 12) observes a value in NSUserDefaults. Starting with macOS
>> 12 observeValueForKeyPath:… is called at the start of the program, althou
My app (macOS 12) observes a value in NSUserDefaults.
Starting with macOS 12 observeValueForKeyPath:… is called at the start of the
program, although nothing has changed yet.
When the value actually changes, it is called twice.
Also: NSKeyValueObservingOptionNew or NSKeyValueObservingOptionOld j
> On 13 Oct 2016, at 23:59, Gerriet M. Denkmann wrote:
>
>> On 13 Oct 2016, at 20:02, Charles Jenkins wrote:
>>
>> I don’t have any answers, but please keep us posted. Sierra is the first
>> macOS upgrade that proved to be a complete disappointment to me, b
’t there something like “It just works” ?
Only: HandOff from Mac to iOS devices is still not working. No idea why.
Gerriet.
>
> On Thu, Oct 13, 2016 at 7:40 AM, Gerriet M. Denkmann
> wrote:
> I have two apps for macOS 12 and iOS 10 which should do HandOff.
> HandOff works ok bet
I have two apps for macOS 12 and iOS 10 which should do HandOff.
HandOff works ok between iOS devices.
It once worked from any iOS device to Mac. (Never worked from Mac to an iOS
device).
Until recently it worked from iPad to Mac (but not from iPhone to Mac).
Then I rebooted the Mac, and now eve
> On 8 Oct 2016, at 11:22, Quincey Morris
> wrote:
>
> On Oct 7, 2016, at 21:06 , Gerriet M. Denkmann wrote:
>>
>> But, alas, it is also much slower: overhead almost 40 sec (whereas my
>> admittedly rather hackish way took less then half a second).
>
> T
> On 8 Oct 2016, at 05:01, Quincey Morris
> wrote:
>
> On Oct 7, 2016, at 07:49 , Gerriet M. Denkmann wrote:
>>
>> Is there a better way than this:
>> dsema = dispatch_semaphore_create( 0 );
>>
>> some loop to be counted
&g
> On 7 Oct 2016, at 23:18, Jens Alfke wrote:
>
>
>> On Oct 7, 2016, at 7:56 AM, Gerriet M. Denkmann wrote:
>>
>> Some app with NSLog (not running in Xcode) does not show anything in
>> Console.app.
>> Only when Iog in as administrator I can see
Some app with NSLog (not running in Xcode) does not show anything in
Console.app.
Only when Iog in as administrator I can see the NSLog lines.
Is this working as expected?
Can anything be done to make common people see the NSLog lines too?
Gerriet.
___
> On 7 Oct 2016, at 15:14, Quincey Morris
> wrote:
>
> On Oct 7, 2016, at 00:19 , Gerriet M. Denkmann wrote:
>>
>> So what is the proper way to count something atomicly and undeprecatedly?
>
> One straightforward way is to use dispatch_semaphore. IIRC it’s l
> On 7 Oct 2016, at 15:43, Ken Thomases wrote:
>
> On Oct 7, 2016, at 2:19 AM, Gerriet M. Denkmann wrote:
>>
>> I need (just for debugging purposes) to count something in a thread safe
>> way.
>> […]
>> So I tried OSIncrementAtomic.
>>
I need (just for debugging purposes) to count something in a thread safe way.
This works, but is deprecated:
SInt32 counter;
- (IBAction)doSomething:sender
{
counter = 0;
some loop
{
IncrementAtomic( &counter );// 'IncrementAtomic' is
d
The Icu stuff (57.1) is included in macOS 12.
There is:
/usr/lib/libicucore.A.dylib
and Xcode has:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/libicucore.tbd
But I cannot find the headers.
Gerriet.
_
> On 1 Oct 2016, at 01:33, Quincey Morris
> wrote:
>
> On Sep 30, 2016, at 02:57 , Gerriet M. Denkmann wrote:
>
>> Any ideas where to look for a reason?
>
> The next step is probably to clarify the times between:
>
> a. Accumulated execution time — the
> On 29 Sep 2016, at 16:05, Roland King wrote:
>
>
>> On 29 Sep 2016, at 16:59, Gerriet M. Denkmann wrote:
>>
>>
>>> On 29 Sep 2016, at 15:34, Quincey Morris
>>> wrote:
>>>
>>
>> Well, I count this as (bigArea = 4 GB)
> 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 of these things has to run on a CPU,
> On 29 Sep 2016, at 14:38, Quincey Morris
> wrote:
>
> On Sep 29, 2016, at 00:15 , Gerriet M. Denkmann wrote:
>>
>> dispatch_apply( nbrOfThreads, queue, ^void(size_t idx)
>>
>> As my computer has just 8 CPUs, I thought that using nbrOfThreads >
I have a big array (like a few GB) which is operated upon by some functions.
As these functions act purely local, an obvious idea is:
- (void)someFunction
{
nbrOfThreads = ...
sizeOfBigArray = ... a few GB
stride = sizeOfBigArray / nbrOfThreads
dispatch_ap
> On 13 Sep 2016, at 15:20, Quincey Morris
> wrote:
>
>> On Sep 13, 2016, at 00:57 , Gerriet M. Denkmann wrote:
>>
>> I was struggling to find a solution which is thread safe.
>
> Your problem didn’t really need thread safety, though. There appeared to be
&
> On 13 Sep 2016, at 14:14, Stephen J. Butler wrote:
>
> This site suggests a version using withUnsafeMutableBufferPointer:
>
> http://blog.human-friendly.com/swift-arrays-are-not-threadsafe
>
> let nbrOfThreads = 8
> let step = 2
> let itemsPerThread = number * step
> let bitLimit = nbrOfThre
> On 12 Sep 2016, at 22:49, Jens Alfke wrote:
>
>
>> On Sep 12, 2016, at 6:42 AM, Gerriet M. Denkmann
>> wrote:
>>
>> So: is the code ok and the compiler broken in Debug mode?
>> Or is the code fundamentally wrong and that it works in Release is just
> On 12 Sep 2016, at 22:49, Jens Alfke wrote:
>
>
>> On Sep 12, 2016, at 6:42 AM, Gerriet M. Denkmann
>> wrote:
>>
>> So: is the code ok and the compiler broken in Debug mode?
>> Or is the code fundamentally wrong and that it works in Release is just
> On 13 Sep 2016, at 00:14, Quincey Morris
> wrote:
>
> On Sep 12, 2016, at 03:17 , Gerriet M. Denkmann wrote:
>>
>> The I got back to the real project: and could also not reproduce it there.
>>
>> One explanation: working with Swift, I quite often (
This function works flawlessly in Release build:
func markAndTell( talk: Bool, number: Int)
{
let nbrOfThreads = 8
let step = 2
let itemsPerThread = number * step
let bitLimit = nbrOfThreads * itemsPerThread
var bitfield = [Bool](count: bitLimit, repeatedVal
> On 12 Sep 2016, at 15:51, Quincey Morris
> wrote:
>
> On Sep 12, 2016, at 01:32 , Gerriet M. Denkmann wrote:
>>
>> In my real (as opposed to playground) code, each class lives in a different
>> file.
>
> I just tried it with classes in different fil
> On 12 Sep 2016, at 15:10, Quincey Morris
> wrote:
>
> On Sep 12, 2016, at 01:00 , Gerriet M. Denkmann wrote:
>>
>> This is what I wanted to write:
>>
>> if self is SArray { … }
>> But the compiler warns me: Cast from ‘SBase.Type’ to unrelated type
> On 12 Sep 2016, at 14:55, Quincey Morris
> wrote:
>
> On Sep 12, 2016, at 00:50 , Gerriet M. Denkmann wrote:
>>
>> I would much prefer to have the semantics of “isKindOf”.
>
> Yes, I know, that’s why you should be using:
>
> if self is SArray
&
> On 12 Sep 2016, at 14:27, Quincey Morris
> wrote:
>
> On Sep 12, 2016, at 00:08 , Gerriet M. Denkmann wrote:
>>
>> I want to do:
>> if self.dynamicType == SomeClass { … }
>>
>> But the compiler won’t accept this (or any number of variations ther
I have a pure Swift class.
I want to do:
if self.dynamicType == SomeClass { … }
But the compiler won’t accept this (or any number of variations thereof).
isKindOfClass needs a “class object representing the Objective-C class to be
tested”.
How can this be done?
Gerriet.
_
1 - 100 of 1020 matches
Mail list logo