h the fact that
ids come up all the time, and show some support for wanting a language where
the compiler can make more proofs for us.
Thanks
Tom Davie
* prove is a loaded term when it comes to objective-c, as the runtime can mess
up your compile time proo
EventTypes retain] autorelease];
> }
It’s not a hard and fast rule, and in fact collection access does not do this,
so it’s entirely possible to do things like:
id a = x[5];
[x removeObjectAtIndex:5];
[a crashMyProgram];
Tom Davie
___
Cocoa-dev maili
; Maybe, maybe not. The flip side is that pointers are twice as large, so half
> as many fit in cache.
And off when you do need to hit RAM you need to fetch more data.
Tom Davie
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do
ow-down due to the increase of instruction and
> pointer size.
Note, this was actually more significant on x86, where most of the mess caused
by CISC (like having bugger all registers) got sorted out.
Tom Davie
___
Cocoa-dev mailing list (Cocoa-dev@lis
er to parse.
>
> Yes. It's ridiculous that a lot of JSON APIs send ISO 8601-formatted (or
> other human-readable format) dates.
Yes, it absolutely is, when no human is going to read them.
Tom Davie
___
Cocoa-dev mailing list (Cocoa-dev@l
On 9 Sep 2013, at 11:49, Jean-Daniel Dupas wrote:
>
> Le 9 sept. 2013 à 11:33, Tom Davie a écrit :
>
>>
>> On 9 Sep 2013, at 10:18, Jean-Daniel Dupas wrote:
>>
>>>
>>> Le 9 sept. 2013 à 09:58, Tom Davie a écrit :
>>>
On 9 Sep 2013, at 10:18, Jean-Daniel Dupas wrote:
>
> Le 9 sept. 2013 à 09:58, Tom Davie a écrit :
>
>>
>> On 9 Sep 2013, at 09:44, Kyle Sluder wrote:
>>
>>> Thirded. I thought I wouldn't like it. As soon as I didn't have to manage
>
r
converting to ARC, I have seen numbers between 30% and 100% slowdown with ARC.
The average is probably around 50%. I have never seen performance improve when
using ARC.
Tom Davie
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do
urancesOfString:@“→”
withString:@“⤜”].
Tom Davie
___
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/Unsubscr
What I’m surprised no on has mentioned here is the trivial…
Remove the mutation methods. Make your object immutable, the referential
transparency will give you “free” parallelism. If you want a mutated version
of the object, create a new object.
Tom Davie
unsigned, as is the bigger issue in this case), you must cast them
either explicitly (by adding the casts in this expression), or implicitly, by
assigning the littorals to a variable of the desired type.
Tom Davie
___
Cocoa-dev mailing list (Cocoa-dev@l
to select
the export type, and a UIPicker to select the export format.
That said, don’t get disheartened – a good, high quality data table is
something that would be very useful on iOS – just try to polish it up more!
Tom Davie
On 27 Aug 2013, at 04:56, Jason Gibbs wrote:
> Also one m
anagement. Instead, whatever is holding strong references to the item
store needs to release those references.
Tom Davie
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the lis
is doing
very wrong here :D
Tom Davie
On 20 Aug 2013, at 09:55, Rick Mann wrote:
> I have filed literally hundreds of bug reports. I get the spirit of what
> you're saying, but I'm so stressed from this project (and IB's hand in it),
> and so demoralized from hav
extra view.
Tom Davie
On 20 Aug 2013, at 01:48, dangerwillrobinsondan...@gmail.com wrote:
> In general in 4.x add your constraints that will make a satisfiable layout,
> then remove the ones you don't want.
> The next one does less trying without asking but this one is not that ba
apRep release];
No need for the complex cocoa to CG manoeuvrings there, this will do fine:
NSSize size = …;
CGColorSpaceRef rgbColorSpace = CGColorSpaceCreateDeviceRGB();
CGContextRef ctx = CGBitmapContextCreate(NULL, size.width, size.height, 8, 8 *
4 * size.width, rgbColorS
On 18 Aug 2013, at 15:56, Gerriet M. Denkmann wrote:
>
> On 18 Aug 2013, at 20:09, Tom Davie wrote:
>
>>
>> On 18 Aug 2013, at 15:03, Gerriet M. Denkmann wrote:
>>
>>> I just noticed that the program I use to create Png files creates files
>>
suggested, it’s just unnecessary here.
Tom Davie
___
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/Unsubscr
On 10 Aug 2013, at 22:44, Keary Suska wrote:
> On Aug 10, 2013, at 12:17 PM, Tom Davie wrote:
>
>> Heh, I’d actually argue that NSScanner is a much much better API to use here
>> (and in fact nearly everywhere). Regular expressions constrain you only to
>> regul
turing complete program.
About the only use for regular expressions I can think of is asking NSScanner
to scan something that it doesn’t by default know about.
Tom Davie
On 10 Aug 2013, at 19:53, Jerry Krinock wrote:
>
> On 2013 Aug 10, at 10:07, Boyd Collier wrote:
>
>> but
> different kinds of whitespace.
This is incorrect. %20 is specifically for representing the 0x20th Unicode
character – that is “space”. It is not for representing other whitespace
characters like tab (%09) etc.
Tom Davie
___
Cocoa-dev mailin
hould be checked and set to stop any other operations
proceeding until the semaphore is unset. When the device responds, the
semaphore should be unset.
You can then make your operation queue a concurrent queue, rather than a serial
one, so that you can send messages to more than one device at t
t reason – making
everything effectively a global is just terrible design.
Tom Davie
___
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(a
The first gives me the following error:
Implicit conversion of Objective-C pointer type 'NSString *' to C pointer type
'CFStringRef' (aka 'const struct __CFString *') requires a bridged cast
Tom Davie
On Jul 27, 2013, at 8:31 PM, Matt Neuburg wrote:
> I feel
A workaround would be to use +[NSFileHandle fileHandleForWritingAtURL: error:]
and -[NSFileHandle fileDescriptor] to get you a FD to use in C land.
Tom Davie
On Jul 17, 2013, at 11:26 PM, koko wrote:
> With this character:
>
> LATIN SMALL LETTER U WITH DIAERESIS
> Unicode: U+00F
e the superclass implementation.
Except that view is a read/write property, and this is a type error, because of
this situation:
UIVCSubclass *s = [[UIVCSubclass alloc] init...];
UIViewController *vc = s;
[vc setView:[[[UIView alloc] init] autorelease];
Tom Davie
_
On 13 Jun 2013, at 20:29, Daniele Margutti wrote:
>
> On 13 Jun 2013, at 20:05, Tom Davie wrote:
>
>> The best way is to write an application that's stable. The only reason
>> browsers started doing this was because they had to deal with 3rd party code
>> (
The best way is to write an application that's stable. The only reason
browsers started doing this was because they had to deal with 3rd party
code (e.g. flash) that was giving them a terrible reputation for
instability. If you're controlling the entire app, you have no reasonable
reason to do th
up the request in the first
place. I would consider that a much much much higher penalty than having to a
bit careful about retain cycles.
Thanks
Tom Davie
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or
y time soon, nice as it
> might be.
Luckily, if you grab Landon Fuller's PLWeakCompatibility (and possibly Mike
Ash's MAZeroingWeakRef too), you'll be able to use __weak in your non-arc code
too.
Thanks
Tom Davie
___
Cocoa-dev mailing
he compiler *is* detecting some simple cases, as I suggested!
Note – this does not make throwing blocks around without paying attention to
retain cycles inherently safe though, the compiler can not statically infer all
potential cycles.
Thanks
Tom Davie
ng possible to detect a lot of cycles with a static analyser. Obviously you
couldn't detect all of them, but this would probably get a good way to stomping
on the "you used an ivar here, and self retains the block, that's bad m'kay"
bugs.
Thanks
Tom Davie
_
to other objects. It's not blocks that are doing any of the above,
it's reference counting. And we know that the issues are there – we just
choose to have them because the issues with the less leaky solutions are even
more severe (especially in C like languages).
Thanks
Tom Davie
_
st certainly be
using dependancy injection instead, or some other method of avoiding it.
Note also – simply using your app delegate as a store for things that aren't
singletons, but only one of them is pointed at by your app delegate is also
horrific – you're just substituting one sing
lass = [[MyClass alloc] init];
});
return _sharedMyClass;
}
This makes the access to the singleton thread safe when it's first created. Of
course, you then get into the nightmare of trying to maintain thread safety
when you have a chunk of global state lying around, but that's
;s a
subview of another view that's retained. The issue isn't quite as simple as
"never retain IBOutlets".
Thanks
Tom Davie
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderat
1) yes you could use the code you outlined to access the property
2) @property (assign, nonatomic) IBOutlet NSWindow *iWindow;
Note though to be careful about the assign tag there – you may well want that
to be a retain.
Thanks
Tom Davie
On 5 Apr 2013, at 15:06, Pax <45rpmli...@googlemail.
bility, you
would be replacing
someObject->someIvar = 56.9f;
with
someObject.someProperty = 56.9f;
and
{
float someIvar;
}
with
@property (assign, nonatomic) float someProperty;
So neither is really true.
Thanks
Tom Davie
___
Cocoa-dev mail
to steer well clear of bindings (along with a couple
of other techs that supposedly make life easier, like CoreData and Storyboards).
Thanks
Tom Davie
On 15 Feb 2013, at 19:42, Maximilian Marcoll wrote:
>
> Hi everyone!
>
> I have a problem with bindings, or so it seems.
>
&g
re selective. But I'd appreciate any thoughts in
> the meantime.
One possible approach to this (though not one that's going to be as fast as a
custom deepCopy method), would be to implement your own NSCoder subclass. I
have in the past made keyed archivers which are sub
On 21 Jan 2013, at 18:14, Dave wrote:
> Hi All,
>
> I have the following code:
>
> if (class_RespondsToSelector(myClass,@selector(initWithManager:) == NO)
> myObj = [[myClass alloc] init];
> else
> myObj = [[myClass alloc] initWithManager:sel]];
>
>
> I get a warning on the initWi
t there, doing nothing,
with no significant windows open, yet in an inconsistent state, and requiring
modal interaction to sort it out?
If that's your assertion, then I'd suggest you have a deeper seated design bug.
Thanks
Tom Davie
___
Cocoa-dev
quot; can change when an open panel
> is opened.
Wouldn't the correct thing in this state be to create a new project window
associated with the project document, and then fire of an open sheet for that
window so that it's only modal for the window?
Thanks
Tom Davie
_
go "oh crap, I forgot to start that
fade", and start it, with the open panel for the next video open?
Thanks
Tom Davie
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
interact
> the app while an open panel displaying.
But why?
What's the issue with the user pausing a video while an open panel happens to
be open?
Thanks
Tom Davie
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post
inish executing until the open
dialog is closed.
If the openDialog methods dispatch to the main queue, their dispatches will not
occur until the main queue is able to run another block, which won't happen
until your block finishes.
You are very much blocking the main queue.
Thanks
Tom Da
ay.
1) You know exactly how big the array's going to be – 1 object, so why hint
that it's going to contain 0 objects?
2) Why use insertObject: atIndex:0 rather than addObject:
3) Why use a mutable array at all? You could just use a constant array –
NSArray *filetype = [NSArray
spatch_once(&onceToken, ^
{
dispatchQueue = dispatch_queue_create("RXProgressQueue",
DISPATCH_QUEUE_SERIAL);
});
dispatch_sync(dispatchQueue, ^()
{
ProgressHandler handler = [self progressHandler];
handler(…);
});
…
}
Tom Davie
ected).
Does anyone know what weird property I've ended up accidentally selecting (or
not selecting) here?
Thanks
Tom Davie
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the lis
ill
> crash.
>
> Am I correct?
Yes, ARC is significantly smarter than analyse. ARC is guaranteed to get
memory management right (modulo retain cycles and weak refs that shouldn't be
weak). Meanwhile the analyser is trying to understand what *you* did to try
and m
ken is an ivar, unlike I
did.
Tom Davie
___
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/Up
On 12 Nov 2012, at 13:39, Marco Tabini wrote:
>> This is completely the wrong way to implement a property. The static
>> variable will be shared between all instances. Here's how you should be
>> doing a lazy loaded var:
>>
>> @implementation MyClass
>> {
>> NSDictionary *_someDictionary
nce block, and then continue to
execute (without touching the contents). Thus, both threads will receive the
same dictionary (assuming it's the same instance it's called on), and it will
be allocated only once.
Tom Davie
___
Cocoa-
se "free" memory for things like disk caches if I
currently do not need the RAM for applications.
Tom Davie
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact th
You want NSEvent's
+ (id)addGlobalMonitorForEventsMatchingMask:(NSEventMask)*mask* handler:(void
(^)(NSEvent*))*block*
*and*
*
+ (id)addLocalMonitorForEventsMatchingMask:(NSEventMask)mask handler:(NSEvent*
(^)(NSEvent*))block
Bob
*
On Sat, Feb 20, 2010 at 11:45 AM, Vikram Sethi wrote:
> Hi,
>
modalDelegate:self
didEndSelector:@selector(compressionSheetDidEnd:)
contextInfo:nil];
[compressingProgress startAnimation:self];
}
}];}
Thanks
Tom Davie
___
I need an NSMenuItem that rather than drawing an NSImage in it's cell draws
*part* of an NSImage, is it possible to override NSMenuItem's drawing in any
way to achieve this? I don't see the relevant methods.
Thanks
Tom Davie
___
Co
*)tableColumn byItem:(id)item
{
return @"Library";
// if (item == self.library)
// {
// return @"Library";
// }
}
Note that commenting out both lines that requests self.library cause the
error to go away.
Any help would be much appreciated.
Thanks
Tom Davie
p.s. Here's a st
An image doesn't carry a blend mode, merely the image data. You *draw* the
image in a given blend mode.
Bob
On Fri, Jan 22, 2010 at 3:52 PM, Eric E. Dolecki wrote:
> I'm not combining two or more images, I merely would like a single uiimage
> in a uiimageview to have a blend mode applied to it
Yes, that code is 100% fine.
Here's the logic from purely your point of view.
You allocate browserviewController and in doing so take ownership.
You do some stuff with browserviewController.
You are finished with browserviewController, and don't want to do anything
else with it, so you resign own
Simple answer: no.
If your application can still read the strings, so can a clever person, if
by nothing else than sitting and patiently emulating a CPU with a piece of
paper and a pencil.
In order to actually secure something *you, or your recipient* have to be
involved in decrypting it, by know
of
it?
Thanks
Tom Davie
___
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 Subscription
I'm trying desperately to find where the API for scanning images is, I've
found the Image Capture API on developer.apple.com, but I can't find a more
recent version than one for 10.4, and none of the sample code compiles any
more, worse the sample apps crash on launch.
What should I be searching t
I've been busy reading the documentation all day, and can't for the life of
me figure out how to change the editing behavior of an NSCell.
I have a cell, which I'd like to pop up a window over when the user attempts
to edit it (much like many websites do to present a date picker for
example).
I ha
64 matches
Mail list logo