This code executes in a strange way: SubClass takes much longer than BaseClass.
class BaseClass
{
let hugeNumber: Int
var bitfield: UnsafeMutablePointer
init()
{
hugeNumber = 1_000_000_000
bitfield = calloc( hugeNumber, 1)
}
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.
_
> 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
> 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 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 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
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 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 (
> 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 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 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
&
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 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 >
> 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 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 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
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.
_
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
> 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.
>>
> 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
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 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
> 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 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
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
’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
> 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
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 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
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 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
> 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 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 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
>>
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
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 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
> 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
> 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
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 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
> 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 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
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 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
> 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
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 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
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
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
> 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”,
> 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
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 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,
> 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
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 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
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
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
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
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.
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
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
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
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
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
I searched the Swift book for "thread" and found nothing.
A quicksort algorithm works like:
quicksort(array)
{
partition(array)
quicksort( left side)
quicksort( right side)
}
On Obj-C I just did:
quicksort(array)
{
partition(array)
dispatch_apply( 2, queu
On 24 Aug 2014, at 01:23, Jens Alfke wrote:
>
>> On Aug 23, 2014, at 12:46 AM, Gerriet M. Denkmann
>> wrote:
>
>> Works fine and is twice as fast.
>
> That approach is a bit naive, as it's going to spawn a huge number of
> [dispatched blocks] (somet
On 24 Aug 2014, at 02:00, Holmberg Bertil wrote:
> The first part of this method shows how to get the glyph from any character
> Works fine with non-Latin characters such as Japanese too
Does it also work with aChar starting with the Japanese HIRAGANA LETTER ARCHAIC
YE (U+1B001) ?
Hint: chars[
This works fine in Xcode 6.0.1:
import Cocoa
enum ButtonTitle : String
{
case TitelStop = "Stop"
case TitelDone = "Done"
}
let buttonMode = ButtonTitle.TitelDone
let mode = ButtonTitle.toRaw( buttonMode )()
But Xcode 6.1 beta 2 says: "error: 'ButtonTitle.Type' does not have
On 19 Sep 2014, at 07:49, Roland King wrote:
>
>> On 19 Sep 2014, at 8:45 am, Gerriet M. Denkmann wrote:
>>
>> This works fine in Xcode 6.0.1:
>>
>> import Cocoa
>>
>> enum ButtonTitle : String
>> {
>> case TitelStop
My iOS app running on 8.0 says:
"Trying to start MapKit location updates without prompting for location
authorization. Must call -[CLLocationManager requestWhenInUseAuthorization] or
-[CLLocationManager requestAlwaysAuthorization] first."
Two questions:
1. where is requestWhenInUseAuthorization
On 19 Sep 2014, at 20:21, Roland King wrote:
>
>> On 19 Sep 2014, at 8:59 pm, Gerriet M. Denkmann wrote:
>>
>> My iOS app running on 8.0 says:
>> "Trying to start MapKit location updates without prompting for location
>> author
can't handle all this on its own.
Very good advice! This was the magic thing I was missing.
I'm sure this is clearly documented somewhere (maybe at the local planning
department in Alpha Centauri).
Anyway, all is well now and thanks very much!
Kind regards,
Gerriet.
>
>>
>
I have a problem with NSLinguisticTagger / CFStringTokenizer on iOS 8.0
OS X 10.9.5 (and iOS 7 and earlier) parses "สีเหลือง" quite rightly as two
words: "สี" = colour and "เหลือง" = yellow.
No dictionary will ever contain "yellow colour". Every dictionary will contain
"yellow" and "colour".
Th
On 24 Sep 2014, at 11:46, Roland King wrote:
>
>> On 24 Sep 2014, at 12:31 pm, Gerriet M. Denkmann
>> wrote:
>>
>> I have a problem with NSLinguisticTagger / CFStringTokenizer on iOS 8.0
>>
>> OS X 10.9.5 (and iOS 7 and earlier) parses "ส
On 24 Sep 2014, at 12:23, Roland King wrote:
>
>> On 24 Sep 2014, at 1:02 pm, Gerriet M. Denkmann wrote:
>>
>>
>> On 24 Sep 2014, at 11:46, Roland King wrote:
>>
>>>
>>>> On 24 Sep 2014, at 12:31 pm, Gerriet M. Denkmann
>>&
On 24 Sep 2014, at 12:23, Roland King wrote:
Seems there are two classes of algorithms:
Low class:
CFStringTokenizer
NSStringEnumerationByWords
NSLinguisticTagger
These get "我今天还没有去健身房" wrong, and are available on iOS.
High class:
Icu
NSTextView (selectionRangeForProposedRange:granula
On 24 Sep 2014, at 23:57, 2551 <2551p...@gmail.com> wrote:
> That's correct behaviour. There is no such word as เหลือง in Thai. It's a
> particle that always exists as an adjunct to something else. Although สี is
> a word on its own, เหลือง is not. Even when Thais speakers say something like
I have an app which sometimes receives: applicationDidReceiveMemoryWarning:.
Is there some rule, how much Ram use is ok? Like: not more than x KB, or: not
more than y % of total Ram?
Is there a way for the app to find out how much memory it is currently using?
Is there a way for the app to fin
On 8 Oct 2014, at 13:42, Quincey Morris
wrote:
> (reposted after editing for length)
>
> On Oct 7, 2014, at 22:12 , Gerriet M. Denkmann wrote:
>
>> Is there a way for the app to find out how much memory it is currently using?
>
> Here’s my take on this, w
On iOS 8.0:
UInt64 sum = 16494631536958186120UL;
NSString *sumString = [ NSNumberFormatter localizedStringFromNumber:
@(sum)
numberStyle:NSNumberFormatterDecimalStyle
On 11 Oct 2014, at 13:44, Greg Parker wrote:
>
>> On Oct 10, 2014, at 11:03 PM, Gerriet M. Denkmann
>> wrote:
>>
>> On iOS 8.0:
>>
>> UInt64 sum = 16494631536958186120UL;
>> NSString *sumString =[ NSNumberFormatter
UInt64 sum = 16494631536958187520UL;
double doubleSum = sum;
NSString *strSum = [ NSNumberFormatter localizedStringFromNumber:
@(doubleSum)
numberStyle:NS
On 11 Oct 2014, at 20:47, Scott Ribe wrote:
> On Oct 11, 2014, at 7:36 AM, Scott Ribe wrote:
>
>> On Oct 11, 2014, at 2:04 AM, Gerriet M. Denkmann
>> wrote:
>>
>>> Note: converting to double does NOT loose any digits.
>>
>> Well, it has to. N
WebFrame *mainFrame = [ webView mainFrame ];
DOMDocument *domDoc = [ mainFrame DOMDocument ];
When I print domDoc, I get with 10.9 something like:
with 1 children
with 3 children
[ 0] with 15 children
[ 0] DOMText = "** white **"
> On 19 Oct 2014, at 00:52, Jens Alfke wrote:
>
>
>> On Oct 18, 2014, at 5:33 AM, Gerriet M. Denkmann
>> wrote:
>>
>> Note: the head has only 12 children (the first 10 are identical to 10.9),
>> and there is no body at all.
>
> Weird! Are you s
10.10, Xcode 6.1, using Arc.
The following code works fine, with USE_INVOCATION defined or not:
#define USE_INVOCATION (or commented out)
- (NSSet *)doSomethingWith: (NSArray *)listOfActions onSet: (NSSet *)originSet
{
NSSet *inputSet = originSet;
for( NSString *curSel
NSAlert has: - (void)beginSheetModalForWindow:(NSWindow *)sheetWindow
completionHandler:(void (^)(NSModalResponse returnCode))handler
NSModalResponse has three values: Stop, Abort, Continue - none of which bear
any resemblance with the buttons: Default, Alternate, Other in my NSAle
> On 22 Oct 2014, at 03:17, Greg Parker wrote:
>
>
>> On Oct 21, 2014, at 2:44 AM, Gerriet M. Denkmann
>> wrote:
>>
>> 10.10, Xcode 6.1, using Arc.
>>
>> The following code works fine, with USE_INVOCATION defined or not:
>
> [...]
>
> On 23 Oct 2014, at 01:02, Scott Ribe wrote:
>
> On Oct 22, 2014, at 11:46 AM, Gerriet M. Denkmann
> wrote:
>>
>> But how to fix this?
>
> ARC expects a retained pointer; I'd retain it.
I tried, but got told: "error: ARC forbids explicit messag
> On 23 Oct 2014, at 01:37, Scott Ribe wrote:
>
> On Oct 22, 2014, at 12:19 PM, Jonathan Mitchell
> wrote:
>>
>> Surely the code that returns the object pointed to by temp has to ensure
>> that the object has been correctly retained?
>
> So, maybe __autorelease?
Tried:
[ iv invoke ];
NSDic
> On 23 Oct 2014, at 04:31, Greg Parker wrote:
>
>
>> On Oct 22, 2014, at 12:04 PM, Gerriet M. Denkmann
>> wrote:
>>
>>> On 23 Oct 2014, at 01:37, Scott Ribe wrote:
>>>
>>> On Oct 22, 2014, at 12:19 PM, Jonathan Mitchell
>>
In 10.9 there was this nice pacemaker daemon (keeping the clock in sync).
In 10.10:
/private/var/db/ntp.drift exists and has a plausible value:
-rw-r--r--@ 1 root wheel 8 21 Oct 17:29 /private/var/db/ntp.drift
cat /private/var/db/ntp.drift
-26.396
-rwxr-xr-x 1 root wheel 24720 10 Sep 06:27
App with NSTimer, which periodically starts an NSTask, which has a
terminationHandler.
Sometimes (no idea how to trigger this) the terminationHandlers do NOT get
executed when the task terminates.
Only when I make my app active, a whole bunch of them will - but not in the
correct order.
Is thi
10.10
From left to right:
fixed distance from super view
Label
fixed distance
TextField (this should be ≥ something, otherwise fitting to content)
fixed distance
Label
variable distance (≥ some minimum)
Button
fixed distance to super view
When I set the width of TextField to ≥ something, Xcode
> On 2 Nov 2014, at 00:41, Marco S Hyman wrote:
>
> On Nov 1, 2014, at 9:17 AM, Gerriet M. Denkmann wrote:
>>
>> TextField (this should be ≥ something, otherwise fitting to content)
>> ...
>> variable distance (≥ some minimum)
>
> Are they the same
> On 2 Nov 2014, at 09:01, Roland King wrote:
>
>
>> On 2 Nov 2014, at 12:17 am, Gerriet M. Denkmann wrote:
>>
>> 10.10
>>
>> From left to right:
>>
>> fixed distance from super view
>> Label
>> fixed distance
>>
I want to monitor a file for changed content.
Polling is generally not a good idea, so I tried dispatch_source.
But it does not work.
Here the code:
static NSString *const kTestPath= @"/tmp/a.test";
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
101 - 200 of 1020 matches
Mail list logo