Have you read
https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Multithreading/ThreadSafetySummary/ThreadSafetySummary.html
?
On 6 Mar 2012, at 19:51, Jan E. Schotsman wrote:
Hello,
I have an array of progress values (number objects) for subprojects, from
which I
On 3/6/12 11:51 AM, Jan E. Schotsman wrote:
Hello,
I have an array of progress values (number objects) for subprojects,
from which I calculate the overall progress .
The array is an atomic property of the project class.
Is it safe to access this array from multiple threads, using methods
On Tue, 6 Mar 2012 20:51:10 +0100, Jan E. Schotsman said:
I have an array of progress values (number objects) for subprojects,
from which I calculate the overall progress .
The array is an atomic property of the project class.
Is it safe to access this array from multiple threads, using
BOOL isTurnableToJSON = [NSJSONSerialization isValidJSONObject: responseData];
NSLog(@Is legit for JSON: %d, isTurnableToJSON );
NSLog(@Is legit for JSON: %@, isTurnableToJSON ? @YES : @NO); //
this is how we handle a bool :/
Are you sure that you are using isTurnableToJSON the
On 6 Mar 2012, at 1:51 PM, Jan E. Schotsman wrote:
Is it safe to access this array from multiple threads, using methods like
objectAtIndex and replaceObjectAtIndex?
You can access immutable Foundation objects across threads, but not mutable
ones, which is what you're thinking of. Your
On 6 Mar 2012, at 11:51 AM, Jan E. Schotsman wrote:
I have an array of progress values (number objects) for subprojects, from
which I calculate the overall progress .
The array is an atomic property of the project class.
Is it safe to access this array from multiple threads, using methods
On Mar 6, 2012, at 12:51 PM, Jan E. Schotsman wrote:
Hello,
I have an array of progress values (number objects) for subprojects, from
which I calculate the overall progress .
The array is an atomic property of the project class.
Is it safe to access this array from multiple threads,
I believe that reading is thread safe, but writing is not. You could wrap all
access to the array in methods which use the same GCD queue to read/write, and
that would be thread safe.
Thanks,
Jon
On Mar 6, 2012, at 11:51 AM, Jan E. Schotsman wrote:
Hello,
I have an array of progress
On Mar 6, 2012, at 11:51 AM, Jan E. Schotsman wrote:
Is it safe to access this array from multiple threads, using methods like
objectAtIndex and replaceObjectAtIndex?
It depends. The short answer: you should use your own synchronization around
your own critical sections instead of relying
On Mar 6, 2012, at 11:59 AM, Alex Zavatone wrote:
BOOL isTurnableToJSON = [NSJSONSerialization isValidJSONObject: responseData];
You’re calling it on the NSData? That’s the wrong way round. You call that
method to ask if you can turn an in-memory data structure _into_ JSON data, not
to see
I am trying to add an icon to only one NSMenuItem item but it is indenting the
icon and text by 1 level.
I tried to set the setIndentationLevel to 0 but that doesn't work.
An example of what I am trying to achieve can be seen in the Wireless status
bar menu where the tickbox is displayed
On Mon, 5 Mar 2012 13:44:24 -0800, Gus Mueller said:
That's because it's missing a CF_RETURNS_RETAINED in the header for that
method, which the analyzer needs to know what's going on. I'm not sure
there's any way around this other than filing a bug and hoping Apple
updates the headers in the
I have more than one table which will share a certain type of table cell. In
cell-based table cells, I'd make an NSCell subclass, add whatever needed
properties there are, and do all the drawing there. The layout of the cell is
part of the subclass itself.
In view-based tables, I'd create a
No. The atomic just means you can access the array property atomically, not
that methods called on that array are synchronized. For that you need to do
your own synchronization, like using @synchronized on the array itself.
On 7 Mar, 2012, at 3:51, Jan E. Schotsman jesc...@xs4all.nl wrote:
I have an array and I am iterating through it using this technique:
for (id object in array) {
// do something with object
}
Is there way to obtain the object's current array index position or do I
have to add a counter?
[array indexOfObject:object] should do the trick, though, if
On Mar 6, 2012, at 1:51 PM, Jan E. Schotsman wrote:
I have an array of progress values (number objects) for subprojects, from
which I calculate the overall progress .
The array is an atomic property of the project class.
Is it safe to access this array from multiple threads, using methods
You have to add a counter.
On 7 Mar, 2012, at 4:42, Prime Coderama prime.coder...@gmail.com wrote:
I have an array and I am iterating through it using this technique:
for (id object in array) {
// do something with object
}
Is there way to obtain the object's current array index
On Mar 6, 2012, at 12:42 PM, Prime Coderama wrote:
I have an array and I am iterating through it using this technique:
for (id object in array) {
// do something with object
}
Is there way to obtain the object's current array index position or do I
have to add a counter?
1) Add
On 3/6/12 12:42 PM, Prime Coderama wrote:
I have an array and I am iterating through it using this technique:
for (id object in array) {
// do something with object
}
Is there way to obtain the object's current array index position or do I
have to add a counter?
You could use
On Mar 6, 2012, at 12:42 PM, Prime Coderama wrote:
Is there way to obtain the object's current array index position or do I
have to add a counter?
You can add a counter, which is pretty easy. Or you can call
-enumerateObjectsAtIndexes:options:usingBlock:, which passes the index as well
as
On Mar 6, 2012, at 12:42 PM, Prime Coderama wrote:
I have an array and I am iterating through it using this technique:
for (id object in array) {
// do something with object
}
Is there way to obtain the object's current array index position or do I
have to add a counter?
This is
On Mar 6, 2012, at 1:42 PM, Prime Coderama wrote:
I have an array and I am iterating through it using this technique:
for (id object in array) {
// do something with object
}
Is there way to obtain the object's current array index position or do I
have to add a counter?
You have
No. Please see:
https://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Multithreading/ThreadSafetySummary/ThreadSafetySummary.html
Joar
On 6 mar 2012, at 11:51, Jan E. Schotsman wrote:
Hello,
I have an array of progress values (number objects) for subprojects,
If you use a block-iterator, the index is passed as a parameter to the iterator
block.
Joar
On 6 mar 2012, at 12:42, Prime Coderama wrote:
I have an array and I am iterating through it using this technique:
for (id object in array) {
// do something with object
}
Is there way to
On 07/03/2012, at 7:42 AM, Prime Coderama wrote:
I have an array and I am iterating through it using this technique:
for (id object in array) {
// do something with object
}
Is there way to obtain the object's current array index position or do I
have to add a counter?
[array
On Mar 6, 2012, at 2:28 PM, Mikkel Islay wrote:
Does anyone know the reason why the UIKit-additions for NSString, NSValue
etc. aren't mentioned in the respective class references in the Apple
documentation for iOS?
It appears that the same NSString Class Reference documentation for the Mac
26 matches
Mail list logo