Re: Help Indexer error - what does it MEAN?

2012-08-13 Thread Graham Cox

On 14/08/2012, at 10:47 AM, Dennis  wrote:

> Running this script might help. It was posted by somebody on the Apple Help 
> list some time ago. That's a good resource for questions like these.
> 
> 


Thanks...

Seems out of date for ML but I was able to kill off the various caches manually 
by looking in similar locations.

--Graham



___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Using NSPipe to get system command output

2012-08-13 Thread Ken Thomases
On Aug 13, 2012, at 6:52 PM, Andy Lee wrote:

> You're very welcome. Although I wonder if you could simply replace the 
> do-while loop with a call to NSTask's waitUntilExit method.

You can't unless you issue a -read..InBackgroundAndNotify method on the output 
file handle.  Otherwise, if you're not reading from the pipe, it can fill up 
and block the task.  Then you're deadlocked.

Also, -waitUntilExit has the nasty problem of running the run loop in the 
default mode.  On the main thread, that mode is likely to have various and 
sundry sources and timers scheduled on it.  That means that they may fire 
during your call to -waitUntilExit, which can have unpleasant side effects that 
you weren't expecting, possibly including recursion.

Regards,
Ken


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSTextView paste:

2012-08-13 Thread Seth Willits
On Aug 13, 2012, at 3:55 PM, ecir hana wrote:

> Thank you for the reply! Unfortunately, there seem to be a tiny bug with 
> undo. My textview has "setRichText:" set to NO so that it triggers the first 
> condition. When the textview looks like this:
> 
> aaa
> bbb
> 
> and I select and copy "aaa", then select "bbb", delete it by hitting "<--", 
> paste "aaa", and then I try to undo, it does nothing, i.e. the last line 
> remains "bbb", instead of "". In menubar, there it even says "Undo Paste" but 
> it does nothing.
> 
> Any idea would that could be?


The insertText: isn't being registered with the undo manager properly. That was 
the wrong method to use. (NSTextView & friends can be confusing.) Pretty sure 
this is always correct:


- (BOOL)readSelectionFromPasteboard:(NSPasteboard *)pboard type:(NSString *)type
{
if ([type isEqual:NSStringPboardType]) {
if ([[pboard stringForType:type] isEqual:@"foo"]) {
NSRange range = [self selectedRange];

if ([self shouldChangeTextInRange:range 
replacementString:@"bar"]) {
[self replaceCharactersInRange:range 
withString:@"bar"];
}

return YES;
}
}

return [super readSelectionFromPasteboard:pboard type:type];
}





But in case I missed something else again, a simple workaround is to just 
swizzle the string on the pasteboard like so: 


- (BOOL)readSelectionFromPasteboard:(NSPasteboard *)pboard type:(NSString *)type
{
if ([type isEqual:NSStringPboardType]) {
if ([[pboard stringForType:type] isEqual:@"foo"]) {
BOOL result;

[pboard setString:@"bar" forType:NSStringPboardType];
result = [super readSelectionFromPasteboard:pboard 
type:type];
[pboard setString:@"foo" forType:NSStringPboardType];

return result;
}
}

return [super readSelectionFromPasteboard:pboard type:type];
}


;-)



But really, the first one should be fine.



--
Seth Willits




___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Help Indexer error - what does it MEAN?

2012-08-13 Thread Graham Cox

On 14/08/2012, at 12:17 AM, Kyle Sluder  wrote:

> Help Indexer is broken for HTML input on Mountain Lion. You could try XHTML 
> input, or do what we do and run the indexer on 10.7.



Thanks! I was able to index my help by doing it in 10.7. (I tried 4.2, the 
latest I could find, and it doesn't work).

One problem I'm left with is that the Help System on 10.8 seems to have cached 
my broken help to the extent that I can't test whether the indexes are actually 
working. Do you (or anyone) know how to force help to re-read my app's help 
book?

--Graham



___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSTextView paste:

2012-08-13 Thread Graham Cox

On 14/08/2012, at 3:54 AM, ecir hana  wrote:

> Please, does anyone know how to approach this?


You don't need to do anything, AFAICS. NSTextView supports -paste: and will do 
the right thing internally. You only have to ensure it's first responder at the 
time you want to paste.

--Graham




___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Using NSPipe to get system command output

2012-08-13 Thread Kyle Sluder
On Mon, Aug 13, 2012, at 04:38 PM, Ken Thomases wrote:
> On Aug 13, 2012, at 5:42 PM, Kyle Sluder wrote:
> 
> > On Mon, Aug 13, 2012, at 02:17 PM, Charlie Dickman wrote:
> >> I'm trying to get the output from a vm_stat command using the following
> >> code. My app hangs in the [vmRead availableData] call as it should if
> >> there is no data available but it never comes back. What am I doing
> >> wrong? I have searched through the sample code on apples developer site
> >> with no luck.
> >> 
> >>NSPipe *vmPipe = [NSPipe pipe];
> >>NSFileHandle *vmRead = [vmPipe fileHandleForReading];
> >> 
> >>[vm setLaunchPath: @"/usr/bin/vm_stat"];//  1 page = 4096 
> >> bytes
> >>[vm setStandardOutput: vmPipe];
> >>[vm launch];
> >>NSData *vmData = nil;
> >>int vmDataLength = 0;
> >>do {
> >>vmData = [vmRead availableData];
> >>vmDataLength = [vmData length];
> >>} while (vmDataLength != 0);
> > 
> > 
> > You can't do this. You need to run the runloop.
> 
> For what?  Neither NSPipe nor NSFileHandle rely on the runloop except for
> the InBackgroundAndNotify methods, as far as I'm aware.  They are just
> thin wrappers around system calls.

Hmm. I thought we'd established a dependency on the runloop for even
basic uses of these classes. But it appears I'm mistaken.

> 
> You need to run the runloop to get notified of an NSTask's termination,
> too, but he's not relying on that.

This is the only context in which I see NSPipe being used frequently, so
I probably just extended the runloop requirement to that case.

> 
> Of course, he is potentially blocking his main thread, if this is run on
> the main thread, which is always bad.  But the code should work.

Yeah, regardless of whether it's mandatory, it's almost certainly a good
idea. :)

--Kyle Sluder
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Using NSPipe to get system command output

2012-08-13 Thread Andy Lee
You're very welcome. Although I wonder if you could simply replace the do-while 
loop with a call to NSTask's waitUntilExit method.

--Andy

On Aug 13, 2012, at 7:42 PM, Charlie Dickman <3tothe...@comcast.net> wrote:

> Andy,
> 
> THANK YOU SO MUCH!!
> 
> I am glad my inquiry spawned some interest but you have taught me how to fish 
> ;^)
> 
> Thanks again
> 
> On Aug 13, 2012, at 7:27 PM, Andy Lee wrote:
> 
>> Apple seems to have pulled the ancient "Moriarity" example which 
>> demonstrates basic use of NSTask, but my cleanup of it should still work.
>> 
>> 
>> 
>> --Andy
>> 
>> On Aug 13, 2012, at 6:42 PM, Kyle Sluder  wrote:
>> 
>>> On Mon, Aug 13, 2012, at 02:17 PM, Charlie Dickman wrote:
 I'm trying to get the output from a vm_stat command using the following
 code. My app hangs in the [vmRead availableData] call as it should if
 there is no data available but it never comes back. What am I doing
 wrong? I have searched through the sample code on apples developer site
 with no luck.
 
NSPipe *vmPipe = [NSPipe pipe];
NSFileHandle *vmRead = [vmPipe fileHandleForReading];
 
[vm setLaunchPath: @"/usr/bin/vm_stat"];//  1 page = 4096 
 bytes
[vm setStandardOutput: vmPipe];
[vm launch];
NSData *vmData = nil;
int vmDataLength = 0;
do {
vmData = [vmRead availableData];
vmDataLength = [vmData length];
} while (vmDataLength != 0);
>>> 
>>> 
>>> You can't do this. You need to run the runloop.
>>> 
>>> --Kyle Sluder
>>> ___
>>> 
>>> 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:
>>> https://lists.apple.com/mailman/options/cocoa-dev/aglee%40mac.com
>>> 
>>> This email sent to ag...@mac.com
>> 
> 
> Charlie Dickman
> 3tothe...@comcast.net
> 
> 
> 

___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Classes incompatible with weak references

2012-08-13 Thread Ken Ferry
On Aug 13, 2012, at 9:29 AM, Jean-Daniel Dupas  wrote:

> 
> Le 13 août 2012 à 17:56, Kyle Sluder  a écrit :
> 
>> On Aug 13, 2012, at 8:42 AM, Ben  wrote:
>> 
>>> I see in the documentation - and from a compiler error - that some classes 
>>> are not compatible with weak references.
>>> 
>>> What makes these classes incompatible?
>> 
>> They have custom implementations of -retain and -release.
>> 
>> When NextSTEP was first released, there was no refcounting, just +new and 
>> +free. That's why NSObject (actually Object at the time) has only one ivar: 
>> isa, a pointer to the object's class.
>> 
>> Some time later -retain and -release came into being, but the storage for 
>> refcount couldn't be added to Object because of the fragile base class 
>> problem—all existing code expected sizeof(Object)==sizeof(id), so they 
>> hardcoded offsets for accessing subclass ivars.
> 
> I don't get it. retain/release has been introduced by NSObject.
> As all classed that use ref counting are based on NSObject and not Object, it 
> was perfectly possible to declare 2 ivars in NSObject without breaking 
> anything when it was first introduced.

It was a memory optimization. All live objects have an implicit +1 ref count by 
virtue of being alive. Anything with refcount > 1 has to have an entry in the 
external table, but anything with a single owner has _no_ memory dedicated to 
refcount. 

At least at the time, most objects had single owners, so this was a win. It 
still was in Mail when last I saw the measurement. 

> 
>> This means these new, super-common operations had to access memory stored 
>> somewhere else than the object they were operating on. And to be 
>> thread-safe, these accesses had to be protected by synchronization 
>> primitives. 
>> 
>> Blowing out your processor's cache every time you issue a -retain sucks, as 
>> does taking a spinlock on an object that should only ever be accessed from 
>> the main thread. So some classes that had some spare bits overrode -retain 
>> and -release to store the retain count in the object's instance data and 
>> possibly not protect it with synchronization.
>> 
>> For example, either NSView or NSControl has such a retain count in one of 
>> its bitfields. We also have a common base class, OFObject, that has an 
>> inline retain count that is manipulated with atomic lockless 
>> increments/decremnts. But with the advent of ARC, and the concurrent 
>> improvement of the data structure that stores object retain counts, we're 
>> going to eventually eliminate OFObject.
>> 
>> Hopefully once Apple removes support for 32-bit OS X they will be able to 
>> move the retain count storage into NSObject.
>> 
>> --Kyle Sluder
>> ___
>> 
>> 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:
>> https://lists.apple.com/mailman/options/cocoa-dev/devlists%40shadowlab.org
>> 
>> This email sent to devli...@shadowlab.org
> 
> -- Jean-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 Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/kenferry%40gmail.com
> 
> This email sent to kenfe...@gmail.com

___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Using NSPipe to get system command output

2012-08-13 Thread Charlie Dickman
Andy,

THANK YOU SO MUCH!!

I am glad my inquiry spawned some interest but you have taught me how to fish 
;^)

Thanks again

On Aug 13, 2012, at 7:27 PM, Andy Lee wrote:

> Apple seems to have pulled the ancient "Moriarity" example which demonstrates 
> basic use of NSTask, but my cleanup of it should still work.
> 
> 
> 
> --Andy
> 
> On Aug 13, 2012, at 6:42 PM, Kyle Sluder  wrote:
> 
>> On Mon, Aug 13, 2012, at 02:17 PM, Charlie Dickman wrote:
>>> I'm trying to get the output from a vm_stat command using the following
>>> code. My app hangs in the [vmRead availableData] call as it should if
>>> there is no data available but it never comes back. What am I doing
>>> wrong? I have searched through the sample code on apples developer site
>>> with no luck.
>>> 
>>> NSPipe *vmPipe = [NSPipe pipe];
>>> NSFileHandle *vmRead = [vmPipe fileHandleForReading];
>>> 
>>> [vm setLaunchPath: @"/usr/bin/vm_stat"];//  1 page = 4096 
>>> bytes
>>> [vm setStandardOutput: vmPipe];
>>> [vm launch];
>>> NSData *vmData = nil;
>>> int vmDataLength = 0;
>>> do {
>>> vmData = [vmRead availableData];
>>> vmDataLength = [vmData length];
>>> } while (vmDataLength != 0);
>> 
>> 
>> You can't do this. You need to run the runloop.
>> 
>> --Kyle Sluder
>> ___
>> 
>> 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:
>> https://lists.apple.com/mailman/options/cocoa-dev/aglee%40mac.com
>> 
>> This email sent to ag...@mac.com
> 

Charlie Dickman
3tothe...@comcast.net




___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Using NSPipe to get system command output

2012-08-13 Thread Ken Thomases
On Aug 13, 2012, at 5:42 PM, Kyle Sluder wrote:

> On Mon, Aug 13, 2012, at 02:17 PM, Charlie Dickman wrote:
>> I'm trying to get the output from a vm_stat command using the following
>> code. My app hangs in the [vmRead availableData] call as it should if
>> there is no data available but it never comes back. What am I doing
>> wrong? I have searched through the sample code on apples developer site
>> with no luck.
>> 
>>  NSPipe *vmPipe = [NSPipe pipe];
>>  NSFileHandle *vmRead = [vmPipe fileHandleForReading];
>> 
>>  [vm setLaunchPath: @"/usr/bin/vm_stat"];//  1 page = 4096 
>> bytes
>>  [vm setStandardOutput: vmPipe];
>>  [vm launch];
>>  NSData *vmData = nil;
>>  int vmDataLength = 0;
>>  do {
>>  vmData = [vmRead availableData];
>>  vmDataLength = [vmData length];
>>  } while (vmDataLength != 0);
> 
> 
> You can't do this. You need to run the runloop.

For what?  Neither NSPipe nor NSFileHandle rely on the runloop except for the 
InBackgroundAndNotify methods, as far as I'm aware.  They are just thin 
wrappers around system calls.

You need to run the runloop to get notified of an NSTask's termination, too, 
but he's not relying on that.

Of course, he is potentially blocking his main thread, if this is run on the 
main thread, which is always bad.  But the code should work.

Regards,
Ken


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Using NSPipe to get system command output

2012-08-13 Thread Charlie Dickman
So why doesn't it work???

On Aug 13, 2012, at 7:08 PM, Ken Thomases wrote:

> On Aug 13, 2012, at 5:09 PM, Jens Alfke wrote:
> 
>> On Aug 13, 2012, at 2:17 PM, Charlie Dickman <3tothe...@comcast.net> wrote:
>> 
>>> int vmDataLength = 0;
>>> do {
>>> vmData = [vmRead availableData];
>>> vmDataLength = [vmData length];
>>> } while (vmDataLength != 0);
>> 
>> Don't you mean "== 0" on the final line?
>> Also, spin-loops like this are a really bad idea — this loop is going to 
>> consume something like 100% CPU. If you have to loop like this, run the 
>> current run loop in between tests.
> 
> This isn't a spin loop and he has the termination condition correct.  
> -[NSFileHandle availableData] blocks if there's no data available.  It 
> returns a zero-length NSData on end-of-file.
> 
> Regards,
> Ken
> 

Charlie Dickman
3tothe...@comcast.net




___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Using NSPipe to get system command output

2012-08-13 Thread Charlie Dickman
This is just test code to see if I can actually get the vm_stat data. It is run 
only under the debugger 1 or 2 steps at a time. When I have the concept down I 
will modify it.

No, I actually mean != 0, see below - it is the description of how reading 
available data from a NSFileHandleForReading...

Return Value
 The data currently available through the receiver.
 
 Discussion
 If the receiver is a file, returns the data obtained by reading the 
file from the file pointer to the end of the file. If the receiver is a 
communications channel, reads up to a buffer of data and returns it; if no data 
is available, the method blocks. Returns an empty data object if the end of 
file is reached. Raises NSFileHandleOperationException if attempts to determine 
file-handle type fail or if attempts to read from the file or channel fail.

On Aug 13, 2012, at 6:09 PM, Jens Alfke wrote:

> 
> On Aug 13, 2012, at 2:17 PM, Charlie Dickman <3tothe...@comcast.net> wrote:
> 
>>  int vmDataLength = 0;
>>  do {
>>  vmData = [vmRead availableData];
>>  vmDataLength = [vmData length];
>>  } while (vmDataLength != 0);
> 
> Don't you mean "== 0" on the final line?
> Also, spin-loops like this are a really bad idea — this loop is going to 
> consume something like 100% CPU. If you have to loop like this, run the 
> current run loop in between tests.
> 
> —Jens

Charlie Dickman
3tothe...@comcast.net



___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Using NSPipe to get system command output

2012-08-13 Thread Andy Lee
Apple seems to have pulled the ancient "Moriarity" example which demonstrates 
basic use of NSTask, but my cleanup of it should still work.



--Andy

On Aug 13, 2012, at 6:42 PM, Kyle Sluder  wrote:

> On Mon, Aug 13, 2012, at 02:17 PM, Charlie Dickman wrote:
>> I'm trying to get the output from a vm_stat command using the following
>> code. My app hangs in the [vmRead availableData] call as it should if
>> there is no data available but it never comes back. What am I doing
>> wrong? I have searched through the sample code on apples developer site
>> with no luck.
>> 
>>  NSPipe *vmPipe = [NSPipe pipe];
>>  NSFileHandle *vmRead = [vmPipe fileHandleForReading];
>> 
>>  [vm setLaunchPath: @"/usr/bin/vm_stat"];//  1 page = 4096 
>> bytes
>>  [vm setStandardOutput: vmPipe];
>>  [vm launch];
>>  NSData *vmData = nil;
>>  int vmDataLength = 0;
>>  do {
>>  vmData = [vmRead availableData];
>>  vmDataLength = [vmData length];
>>  } while (vmDataLength != 0);
> 
> 
> You can't do this. You need to run the runloop.
> 
> --Kyle Sluder
> ___
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/aglee%40mac.com
> 
> This email sent to ag...@mac.com

___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSTextView paste:

2012-08-13 Thread ecir hana
On Tue, Aug 14, 2012 at 12:55 AM, ecir hana  wrote:

>
>
>
> aaa
> bbb
>
>
> I mean:

foo
foo
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Using NSPipe to get system command output

2012-08-13 Thread Ken Thomases
On Aug 13, 2012, at 5:09 PM, Jens Alfke wrote:

> On Aug 13, 2012, at 2:17 PM, Charlie Dickman <3tothe...@comcast.net> wrote:
> 
>>  int vmDataLength = 0;
>>  do {
>>  vmData = [vmRead availableData];
>>  vmDataLength = [vmData length];
>>  } while (vmDataLength != 0);
> 
> Don't you mean "== 0" on the final line?
> Also, spin-loops like this are a really bad idea — this loop is going to 
> consume something like 100% CPU. If you have to loop like this, run the 
> current run loop in between tests.

This isn't a spin loop and he has the termination condition correct.  
-[NSFileHandle availableData] blocks if there's no data available.  It returns 
a zero-length NSData on end-of-file.

Regards,
Ken


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: NSTextView paste:

2012-08-13 Thread ecir hana
On Mon, Aug 13, 2012 at 11:45 PM, Seth Willits  wrote:

>
>
> - (BOOL)readSelectionFromPasteboard:(NSPasteboard *)pboard type:(NSString
> *)type
> {
> if ([type isEqual:NSStringPboardType]) {
> if ([[pboard stringForType:type] isEqual:@"foo"]) {
> [self insertText:@"bar"];
> return YES;
> }
> }
>
> return [super readSelectionFromPasteboard:pboard type:type];
> }
>

Thank you for the reply! Unfortunately, there seem to be a tiny bug with
undo. My textview has "setRichText:" set to NO so that it triggers
the first condition. When the textview looks like this:

aaa
bbb

and I select and copy "aaa", then select "bbb", delete it by hitting "<--",
paste "aaa", and then I try to undo, it does nothing, i.e. the last line
remains "bbb", instead of "". In menubar, there it even says "Undo Paste"
but it does nothing.

Any idea would that could be?
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Using NSPipe to get system command output

2012-08-13 Thread Kyle Sluder
On Mon, Aug 13, 2012, at 02:17 PM, Charlie Dickman wrote:
> I'm trying to get the output from a vm_stat command using the following
> code. My app hangs in the [vmRead availableData] call as it should if
> there is no data available but it never comes back. What am I doing
> wrong? I have searched through the sample code on apples developer site
> with no luck.
> 
>   NSPipe *vmPipe = [NSPipe pipe];
>   NSFileHandle *vmRead = [vmPipe fileHandleForReading];
> 
>   [vm setLaunchPath: @"/usr/bin/vm_stat"];//  1 page = 4096 
> bytes
>   [vm setStandardOutput: vmPipe];
>   [vm launch];
>   NSData *vmData = nil;
>   int vmDataLength = 0;
>   do {
>   vmData = [vmRead availableData];
>   vmDataLength = [vmData length];
>   } while (vmDataLength != 0);


You can't do this. You need to run the runloop.

--Kyle Sluder
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Classes incompatible with weak references

2012-08-13 Thread Kyle Sluder
On Mon, Aug 13, 2012, at 02:47 PM, Mike Abdullah wrote:
> An idea I've vaguely wondered about would be turning the isa variable
> into a tagged pointer. If you know nothing is accessing it directly (to
> do so was deprecated with the modern runtime), then, say, the last 4 bits
> of the pointer could be used to record the retain count. Once they're
> used up (for those rare, highly retained objects), you spill over to
> runtime's existing system. Any calls to the runtime to determine an
> object's class would of course be aware of this and ignore those bits.

Unfortunately a lot of code out there accesses isa directly. We used to
be a pretty big offender.

--Kyle Sluder
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: How do I get memory usage numbers?

2012-08-13 Thread Alex Zavatone
Actually, when Safari is paging to the HD because it decided it needed to use 
5+ GB of RAM, purge is really useful in temporarily getting the Mac back to 
normal speed until the memory bloats again.

On Aug 13, 2012, at 5:54 PM, Jens Alfke wrote:

> 
> On Aug 13, 2012, at 2:01 PM, Charlie Dickman <3tothe...@comcast.net> wrote:
> 
>> What I want to do is determine the ratio of inactive to free in order to 
>> determine when to execute the purge command to free up the inactive memory 
>> before the system gets into trouble.
> 
> That's not what purge(1) does. It simply forces all resident pages to be 
> paged back out. It's not going to free up any address space, and it's not 
> going to speed up the system (rather, it'll slow it down a lot, as every 
> active process has to start hitting the disk to page its address space back 
> in.)
> 
> —Jens
> ___
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/zav%40mac.com
> 
> This email sent to z...@mac.com


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Using NSPipe to get system command output

2012-08-13 Thread Jens Alfke

On Aug 13, 2012, at 2:17 PM, Charlie Dickman <3tothe...@comcast.net> wrote:

>   int vmDataLength = 0;
>   do {
>   vmData = [vmRead availableData];
>   vmDataLength = [vmData length];
>   } while (vmDataLength != 0);

Don't you mean "== 0" on the final line?
Also, spin-loops like this are a really bad idea — this loop is going to 
consume something like 100% CPU. If you have to loop like this, run the current 
run loop in between tests.

—Jens
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: How do I get memory usage numbers?

2012-08-13 Thread Jens Alfke

On Aug 13, 2012, at 2:01 PM, Charlie Dickman <3tothe...@comcast.net> wrote:

> What I want to do is determine the ratio of inactive to free in order to 
> determine when to execute the purge command to free up the inactive memory 
> before the system gets into trouble.

That's not what purge(1) does. It simply forces all resident pages to be paged 
back out. It's not going to free up any address space, and it's not going to 
speed up the system (rather, it'll slow it down a lot, as every active process 
has to start hitting the disk to page its address space back in.)

—Jens
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Classes incompatible with weak references

2012-08-13 Thread Mike Abdullah

On 13 Aug 2012, at 19:30, Jean-Daniel Dupas  wrote:

> 
> Le 13 août 2012 à 19:54, John McCall  a écrit :
> 
>> On Aug 13, 2012, at 9:29 AM, Jean-Daniel Dupas wrote:
>>> Le 13 août 2012 à 17:56, Kyle Sluder  a écrit :
 On Aug 13, 2012, at 8:42 AM, Ben  wrote:
 
> I see in the documentation - and from a compiler error - that some 
> classes are not compatible with weak references.
> 
> What makes these classes incompatible?
 
 They have custom implementations of -retain and -release.
 
 When NextSTEP was first released, there was no refcounting, just +new and 
 +free. That's why NSObject (actually Object at the time) has only one 
 ivar: isa, a pointer to the object's class.
 
 Some time later -retain and -release came into being, but the storage for 
 refcount couldn't be added to Object because of the fragile base class 
 problem—all existing code expected sizeof(Object)==sizeof(id), so they 
 hardcoded offsets for accessing subclass ivars.
>>> 
>>> I don't get it. retain/release has been introduced by NSObject.
>>> As all classed that use ref counting are based on NSObject and not Object, 
>>> it was perfectly possible to declare 2 ivars in NSObject without breaking 
>>> anything when it was first introduced.
>> 
>> In the so-called "fragile" ABI, which is what you get on PPC, PPC64, and 
>> i386, class layout is performed at compile time, and the machine code 
>> pattern for accessing an ivar is the same as accessing a struct member:  the 
>> compiler knows that 'int count;' is at offset 32 (say), so it just adds 32 
>> to the base pointer value to find the address of the ivar.  This is why all 
>> ivars have to be declared in the main @interface when compiling for these 
>> platforms:  it would otherwise be impossible to do class layout for 
>> subclasses.  Adding an ivar to a class would change that layout, causing all 
>> code with class layouts or ivar accesses compiled against the existing 
>> layout to stop working.
>> 
>> There were releases made with NSObject having no ivars (except 'isa').  
>> Therefore adding new ivars would have broken binary compatibility with those 
>> releases.
> 
> Thanks for the details. I know what the fragile ABI, and the modern ABI are 
> but where I don't agree is when Kyle says that it was not possible to add a 
> refcount ivar when retain/release was introduced. As retain/release was 
> already defined in the first OpenStep specification 
> (http://www.gnustep.org/resources/OpenStepSpec/FoundationKit/Protocols/NSObject.html),
>  it was perfectly possible at that time to choose to add a refcount ivar to 
> the new NSObject class without breaking anything.
> 
> I don't know the rational behind this choice, but it was probably to not 
> force all classes to have an eventually useless ivar (constant NSString for 
> instance don't need it).

Exactly. There's also the simple saving in memory usage: As I understand it, 
objects with a retain count of 1 don't appear in the global retain count table; 
instead the system can deduce that since the object exists and isn't in the 
table, it must have a count of 1. This is quite handy for any objects which you 
create, do something temporary with, and then release.

An idea I've vaguely wondered about would be turning the isa variable into a 
tagged pointer. If you know nothing is accessing it directly (to do so was 
deprecated with the modern runtime), then, say, the last 4 bits of the pointer 
could be used to record the retain count. Once they're used up (for those rare, 
highly retained objects), you spill over to runtime's existing system. Any 
calls to the runtime to determine an object's class would of course be aware of 
this and ignore those bits.


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: NSTextView paste:

2012-08-13 Thread Seth Willits
On Aug 13, 2012, at 10:54 AM, ecir hana wrote:

> I have a NSTextView, where the user can paste plain text into.
> 
> When the users has "foo" in the pasteboard I would like "bar" to be pasted.
> In other words, a user goes to, say, a web browser, selects "foo", cmd+c,
> switches to my NSTextView, cmd+v and "bar" appears at insertion point.
> 
> Please, does anyone know how to approach this?
> 
> I thought about subclassing "readSelectionFromPasteboard:type:" but what to
> do then? Or is there better way of doing this?


Typed in Mail…


- (BOOL)readSelectionFromPasteboard:(NSPasteboard *)pboard type:(NSString *)type
{
if ([type isEqual:NSStringPboardType]) {
if ([[pboard stringForType:type] isEqual:@"foo"]) {
[self insertText:@"bar"];
return YES;
}
}

return [super readSelectionFromPasteboard:pboard type:type];
}



--
Seth Willits




___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: NSCopyObject is a disaster (was Re: Another NSOutlineView issue)

2012-08-13 Thread Greg Parker
On Aug 13, 2012, at 2:12 PM, Uli Kusterer  wrote:
> On 09.08.2012, at 01:21, Graham Cox  wrote:
>> If a superclass implements copies using NSCopyObject, then any pointer ivars 
>> we add in a subclass need to be additionally -retained. But if the 
>> superclass implements copy by alloc/initing a new object and setting 
>> properties, then this extra step would lead to an over-retain and so leak.
> 
> Not really. It *must* correctly do the additional retains for the ivars it 
> created, but yours are just copied as integers to the new object. So you 
> could simply rely on that if you know your base class uses NSCopyObject(). 
> Alternately (and more safely) you can just ignore the value in there (as you 
> know it either hasn't been retained, or is NIL altogether)

You don't know that. If the superclass called alloc/init, and your subclass 
init sets that ivar to a retained value, then the copy's ivar is retained and 
not nil.


-- 
Greg Parker gpar...@apple.com Runtime Wrangler



___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Using NSPipe to get system command output

2012-08-13 Thread Charlie Dickman
I'm trying to get the output from a vm_stat command using the following code. 
My app hangs in the [vmRead availableData] call as it should if there is no 
data available but it never comes back. What am I doing wrong? I have searched 
through the sample code on apples developer site with no luck.

NSPipe *vmPipe = [NSPipe pipe];
NSFileHandle *vmRead = [vmPipe fileHandleForReading];

[vm setLaunchPath: @"/usr/bin/vm_stat"];//  1 page = 4096 
bytes
[vm setStandardOutput: vmPipe];
[vm launch];
NSData *vmData = nil;
int vmDataLength = 0;
do {
vmData = [vmRead availableData];
vmDataLength = [vmData length];
} while (vmDataLength != 0);

Charlie Dickman
3tothe...@comcast.net



___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSCopyObject is a disaster (was Re: Another NSOutlineView issue)

2012-08-13 Thread Uli Kusterer

On 09.08.2012, at 02:01, Greg Parker  wrote:

>- (id) copyWithZone:(NSZone*) zone
>{
>MyCell* copy = [super copyWithZone:zone];
>copy->someInternalPointer = [copy->someInternalPointer copy];
>return copy;
>}

Change this to

> - (id) copyWithZone:(NSZone*) zone
>{
>MyCell* copy = [super copyWithZone:zone];
>copy->someInternalPointer = [someInternalPointer copy];
>return copy;
>}


And it's correct even without ARC. Replace copy with retain for those non-ARC 
cases where it makes sense.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de




___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSCopyObject is a disaster (was Re: Another NSOutlineView issue)

2012-08-13 Thread Uli Kusterer

On 09.08.2012, at 01:21, Graham Cox  wrote:
> If a superclass implements copies using NSCopyObject, then any pointer ivars 
> we add in a subclass need to be additionally -retained. But if the superclass 
> implements copy by alloc/initing a new object and setting properties, then 
> this extra step would lead to an over-retain and so leak.

 Not really. It *must* correctly do the additional retains for the ivars it 
created, but yours are just copied as integers to the new object. So you could 
simply rely on that if you know your base class uses NSCopyObject(). 
Alternately (and more safely) you can just ignore the value in there (as you 
know it either hasn't been retained, or is NIL altogether) and change the ivar 
directly without going through any getter/setter:

foo = [other->foo retain];

 Now all is hunky-dory, with or without NSCopyObject.

Cheers,
-- Uli Kusterer
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de




___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: How do I get memory usage numbers?

2012-08-13 Thread Charlie Dickman
I'm using the system "say" command to speak phrases within my app. I've tried 
NSSpeechSynthesizer and Carbon's Speech Synthesis Engine but both have a 
serious memory leak problem which gets my app into trouble. By using the system 
"say" command I move the problem out of my app and into the system.

What I want to do is determine the ratio of inactive to free in order to 
determine when to execute the purge command to free up the inactive memory 
before the system gets into trouble.

On Aug 13, 2012, at 1:56 PM, David Duncan wrote:

> On Aug 12, 2012, at 7:10 PM, Charlie Dickman <3tothe...@comcast.net> wrote:
> 
>> Initially I'm interested in system wide memory usage (free, wired,active, 
>> inactive) but following on I might like numbers for just my process.
>> If hacking through Darwin is the only way to do this than never mind but 
>> with all of the programs out there that include these numbers there must be 
>> a better way to find out how it's done.
> 
> 
> What are you trying to debug?
> --
> David Duncan
> 

Charlie Dickman
3tothe...@comcast.net



___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: NSSegmentedControl in ToolBar [ANSWER]

2012-08-13 Thread koko
So it must be that the KVO of a tool bar item to its underlying control is out 
of whack.

Select the toolbar item and adjust its width.

-koko





On Aug 13, 2012, at 12:41 PM, koko wrote:

> Add a Toolbar to a window in IB
> 
> Add a Segmented Control as a Toolbar Item
> 
>   The default Label is 'Custom View'
>   The control has 3 segments
>   The label is centered under segment 1
> 
> Change the number of segment to 2
> 
>   The label is centered on the center of the control
> 
> Run the program
> 
>   The label is center under segment 1
> 
> How does one get the label centered under the control?
> 
> 
> -koko
> 
> 
> ___
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/koko%40highrolls.net
> 
> This email sent to k...@highrolls.net
> 


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: 32-bit on 10.8

2012-08-13 Thread Greg Parker
On Aug 11, 2012, at 6:16 PM, Jayson Adams  wrote:
> Poor reading skills are keeping this thread alive.  No, I have not been 
> saying anything related to whatever work I may or may not have that's related 
> to 64-bit porting.  What I have been ranting and raving about is the fact 
> that the 64-bit porting guide currently states that you may not want to move 
> to 64-bit.  That is the official advice any straggler developer will see 
> right at this moment when they consult that document.  If Apple decides to 
> just up-and-drop 32-bit support, anyone relying on this official bit of Apple 
> documentation, as it currently stands, between now and then will be screwed.  
> If Apple is considering dropping 32-bit support they need to change this 
> piece of documentation.  

You're right, that documentation is out of date with respect to our current 
recommendations. You should file a bug report for the benefit of any straggler 
developers out there.


> And no, I am not going to file a bug on it.

Oh. 


-- 
Greg Parker gpar...@apple.com Runtime Wrangler



___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


PackageMaker Unable to Change Content Permission

2012-08-13 Thread Tony S. Wu
Hi,

I am trying to use PackageMaker to create a package for my application. This is 
the first time I opened up PackageMaker in Mountain Lion. I am running into a 
problem where the content permission cannot be changed to anyone else but me. I 
don't see any other users populated in the drop-down menu like it used to show 
up before. Wondering if anyone has any advice.

Please see screenshot here:
http://dl.dropbox.com/u/8901595/s3.png

Thanks,

- T
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Classes incompatible with weak references

2012-08-13 Thread Kyle Sluder
On Mon, Aug 13, 2012, at 11:30 AM, Jean-Daniel Dupas wrote:
> 
> Thanks for the details. I know what the fragile ABI, and the modern ABI
> are but where I don't agree is when Kyle says that it was not possible to
> add a refcount ivar when retain/release was introduced. As retain/release
> was already defined in the first OpenStep specification
> (http://www.gnustep.org/resources/OpenStepSpec/FoundationKit/Protocols/NSObject.html),
> it was perfectly possible at that time to choose to add a refcount ivar
> to the new NSObject class without breaking anything.

I wasn't exactly around at the time, but a wild guess: NSObject might
have needed to stay layout-identical to Object in order for OpenStep to
remain compatible with NeXTSTEP binaries.

--Kyle Sluder
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


NSSegmentedControl in ToolBar

2012-08-13 Thread koko
Add a Toolbar to a window in IB

Add a Segmented Control as a Toolbar Item

The default Label is 'Custom View'
The control has 3 segments
The label is centered under segment 1

Change the number of segment to 2

The label is centered on the center of the control

Run the program

The label is center under segment 1

How does one get the label centered under the control?


-koko


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Help Indexer error - what does it MEAN?

2012-08-13 Thread Jerry Krinock

On 2012 Aug 13, at 07:17, Kyle Sluder  wrote:

> Help Indexer is broken for HTML input on Mountain Lion. You could try XHTML 
> input, or do what we do and run the indexer on 10.7.

There is a new version of Help Indexer, version 4.2 (50).  Please tell me that 
you're using an older version and that the new version is fixed.

Otherwise, tell us about the bugs so we can either test it or start filing 
dupes :((

Thanks,

Jerry



___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Classes incompatible with weak references

2012-08-13 Thread Jean-Daniel Dupas

Le 13 août 2012 à 19:54, John McCall  a écrit :

> On Aug 13, 2012, at 9:29 AM, Jean-Daniel Dupas wrote:
>> Le 13 août 2012 à 17:56, Kyle Sluder  a écrit :
>>> On Aug 13, 2012, at 8:42 AM, Ben  wrote:
>>> 
 I see in the documentation - and from a compiler error - that some classes 
 are not compatible with weak references.
 
 What makes these classes incompatible?
>>> 
>>> They have custom implementations of -retain and -release.
>>> 
>>> When NextSTEP was first released, there was no refcounting, just +new and 
>>> +free. That's why NSObject (actually Object at the time) has only one ivar: 
>>> isa, a pointer to the object's class.
>>> 
>>> Some time later -retain and -release came into being, but the storage for 
>>> refcount couldn't be added to Object because of the fragile base class 
>>> problem—all existing code expected sizeof(Object)==sizeof(id), so they 
>>> hardcoded offsets for accessing subclass ivars.
>> 
>> I don't get it. retain/release has been introduced by NSObject.
>> As all classed that use ref counting are based on NSObject and not Object, 
>> it was perfectly possible to declare 2 ivars in NSObject without breaking 
>> anything when it was first introduced.
> 
> In the so-called "fragile" ABI, which is what you get on PPC, PPC64, and 
> i386, class layout is performed at compile time, and the machine code pattern 
> for accessing an ivar is the same as accessing a struct member:  the compiler 
> knows that 'int count;' is at offset 32 (say), so it just adds 32 to the base 
> pointer value to find the address of the ivar.  This is why all ivars have to 
> be declared in the main @interface when compiling for these platforms:  it 
> would otherwise be impossible to do class layout for subclasses.  Adding an 
> ivar to a class would change that layout, causing all code with class layouts 
> or ivar accesses compiled against the existing layout to stop working.
> 
> There were releases made with NSObject having no ivars (except 'isa').  
> Therefore adding new ivars would have broken binary compatibility with those 
> releases.

Thanks for the details. I know what the fragile ABI, and the modern ABI are but 
where I don't agree is when Kyle says that it was not possible to add a 
refcount ivar when retain/release was introduced. As retain/release was already 
defined in the first OpenStep specification 
(http://www.gnustep.org/resources/OpenStepSpec/FoundationKit/Protocols/NSObject.html),
 it was perfectly possible at that time to choose to add a refcount ivar to the 
new NSObject class without breaking anything.

I don't know the rational behind this choice, but it was probably to not force 
all classes to have an eventually useless ivar (constant NSString for instance 
don't need it).


-- Jean-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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: reading preferences from com.apple.mail under 10.8

2012-08-13 Thread Rob McBroom
Sorry to revive an old thread. I've been out on vacation.

To clarify, my application is *not* sandboxed. The application who's prefs I'm 
interested in (Mail) is. The question is: Should that matter? Documentation 
says "no". Trial and error says "yes". Since no one seems to know, I guess I'll 
file a bug and see what happens.

On Aug 2, 2012, at 4:46 PM, Charles Srstka  wrote:

> This is obviously non-ideal, but in the absence of a better solution, you 
> could use the /usr/bin/defaults program. I just tried it, and it appears to 
> be able to read and write from Mail's defaults domain successfully.

Yes, it does. And wouldn't you assume it uses the NSUserDefaults class for 
that? But apparently not.

For now, I'm just using `dictionaryWithContentsOfFile:`, which is also 
non-ideal, but it works.

-- 
Rob McBroom



___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: How do I get memory usage numbers?

2012-08-13 Thread David Duncan
On Aug 12, 2012, at 7:10 PM, Charlie Dickman <3tothe...@comcast.net> wrote:

> Initially I'm interested in system wide memory usage (free, wired,active, 
> inactive) but following on I might like numbers for just my process.
> If hacking through Darwin is the only way to do this than never mind but with 
> all of the programs out there that include these numbers there must be a 
> better way to find out how it's done.


What are you trying to debug?
--
David Duncan

___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Classes incompatible with weak references

2012-08-13 Thread John McCall
On Aug 13, 2012, at 9:29 AM, Jean-Daniel Dupas wrote:
> Le 13 août 2012 à 17:56, Kyle Sluder  a écrit :
>> On Aug 13, 2012, at 8:42 AM, Ben  wrote:
>> 
>>> I see in the documentation - and from a compiler error - that some classes 
>>> are not compatible with weak references.
>>> 
>>> What makes these classes incompatible?
>> 
>> They have custom implementations of -retain and -release.
>> 
>> When NextSTEP was first released, there was no refcounting, just +new and 
>> +free. That's why NSObject (actually Object at the time) has only one ivar: 
>> isa, a pointer to the object's class.
>> 
>> Some time later -retain and -release came into being, but the storage for 
>> refcount couldn't be added to Object because of the fragile base class 
>> problem—all existing code expected sizeof(Object)==sizeof(id), so they 
>> hardcoded offsets for accessing subclass ivars.
> 
> I don't get it. retain/release has been introduced by NSObject.
> As all classed that use ref counting are based on NSObject and not Object, it 
> was perfectly possible to declare 2 ivars in NSObject without breaking 
> anything when it was first introduced.

In the so-called "fragile" ABI, which is what you get on PPC, PPC64, and i386, 
class layout is performed at compile time, and the machine code pattern for 
accessing an ivar is the same as accessing a struct member:  the compiler knows 
that 'int count;' is at offset 32 (say), so it just adds 32 to the base pointer 
value to find the address of the ivar.  This is why all ivars have to be 
declared in the main @interface when compiling for these platforms:  it would 
otherwise be impossible to do class layout for subclasses.  Adding an ivar to a 
class would change that layout, causing all code with class layouts or ivar 
accesses compiled against the existing layout to stop working.

There were releases made with NSObject having no ivars (except 'isa').  
Therefore adding new ivars would have broken binary compatibility with those 
releases.

In theory, we could have introduced refcount ivars at any of the natural 
binary-compatibility breaks that happened after refcounting became pervasive, 
like moving to i386.  I'm not privy to all the rationale for why we didn't, but 
I assume that at least part of it was not wanting to increase the porting 
burden in case someone was relying on the size of NSObject.  I know that there 
are some very tightly-optimized object layouts out there.  These aren't 
impossible hurdles to clear, but they're a lot of extra effort.

Even in modern ABIs, like those on ARM and x86-64, we are aware of code that 
still assumes that NSObject, at least, has a fixed layout.  We don't *promise* 
anything about that layout, but that never stopped anyone from depending on it 
before.

John.
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

NSTextView paste:

2012-08-13 Thread ecir hana
Dear list,

I have a NSTextView, where the user can paste plain text into.

When the users has "foo" in the pasteboard I would like "bar" to be pasted.
In other words, a user goes to, say, a web browser, selects "foo", cmd+c,
switches to my NSTextView, cmd+v and "bar" appears at insertion point.

Please, does anyone know how to approach this?

I thought about subclassing "readSelectionFromPasteboard:type:" but what to
do then? Or is there better way of doing this?

Thanks in advance!
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: __weak pointer collection firing prematurely???

2012-08-13 Thread Quincey Morris
On Aug 13, 2012, at 09:01 , Kyle Sluder  wrote:

> As was discussed on the objc-language list recently, the ARC spec 
> specifically guarantees that an object's lifetime includes the entire 
> duration of a method invocation. An object *cannot* be deallocated while one 
> of its methods is executing.

That was only under the assumption that the receiver's pointer was loaded from 
a weak variable.

It'll also be true if the receiver's pointer is loaded from a strong stack 
variable (because the stack reference's lifetime cannot end before the 
receiver's method is called -- even under optimization -- and there isn't 
AFAICT any subsequent way for it to end until the receiver's method returns).

However, if the receiver's pointer is loaded from a *strong* instance variable, 
there's no memory management applied to it. It's not retained when loaded 
(which I just verified by looking at a disassembly), and it's not retained on 
entry to the method itself (the Clang ARC spec explains why not). Setting the 
strong ivar to nil during the method execution would be a really bad idea.

At least, that's how I understand the situation.




___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: __weak pointer collection firing prematurely???

2012-08-13 Thread Kyle Sluder
On Aug 13, 2012, at 9:01 AM, Kyle Sluder  wrote:

> Xcode 4.1.1 is pretty old

Whoops, you said 4.4.1. My mistake.

--Kyle Sluder
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Classes incompatible with weak references

2012-08-13 Thread Jean-Daniel Dupas

Le 13 août 2012 à 17:56, Kyle Sluder  a écrit :

> On Aug 13, 2012, at 8:42 AM, Ben  wrote:
> 
>> I see in the documentation - and from a compiler error - that some classes 
>> are not compatible with weak references.
>> 
>> What makes these classes incompatible?
> 
> They have custom implementations of -retain and -release.
> 
> When NextSTEP was first released, there was no refcounting, just +new and 
> +free. That's why NSObject (actually Object at the time) has only one ivar: 
> isa, a pointer to the object's class.
> 
> Some time later -retain and -release came into being, but the storage for 
> refcount couldn't be added to Object because of the fragile base class 
> problem—all existing code expected sizeof(Object)==sizeof(id), so they 
> hardcoded offsets for accessing subclass ivars.

I don't get it. retain/release has been introduced by NSObject.
As all classed that use ref counting are based on NSObject and not Object, it 
was perfectly possible to declare 2 ivars in NSObject without breaking anything 
when it was first introduced.

> This means these new, super-common operations had to access memory stored 
> somewhere else than the object they were operating on. And to be thread-safe, 
> these accesses had to be protected by synchronization primitives. 
> 
> Blowing out your processor's cache every time you issue a -retain sucks, as 
> does taking a spinlock on an object that should only ever be accessed from 
> the main thread. So some classes that had some spare bits overrode -retain 
> and -release to store the retain count in the object's instance data and 
> possibly not protect it with synchronization.
> 
> For example, either NSView or NSControl has such a retain count in one of its 
> bitfields. We also have a common base class, OFObject, that has an inline 
> retain count that is manipulated with atomic lockless increments/decremnts. 
> But with the advent of ARC, and the concurrent improvement of the data 
> structure that stores object retain counts, we're going to eventually 
> eliminate OFObject.
> 
> Hopefully once Apple removes support for 32-bit OS X they will be able to 
> move the retain count storage into NSObject.
> 
> --Kyle Sluder
> ___
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/devlists%40shadowlab.org
> 
> This email sent to devli...@shadowlab.org

-- Jean-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 Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: How to size a TextView to fit a given line?

2012-08-13 Thread Ross Carter
On Aug 12, 2012, at 5:34 AM, Gerriet M. Denkmann  wrote:

> In windowWillUseStandardFrame:defaultFrame: in a subclass of NSDocument 
> (which is also the delegate of it's window) I want to set the window to just 
> contain a certain line.
> 
> - (NSRect)windowWillUseStandardFrame:(NSWindow *)sender 
> defaultFrame:(NSRect)defaultFrame
> {
>   //  myTextView is an NSTextView inside a scroll view, which is the 
> sole window content
> 
>   NSString *mySpecialLine = @"... something...";
>   NSDictionary *typingAttributes = [ myTextView typingAttributes ];
>   NSFont *typingFont = [ typingAttributes objectForKey: 
> NSFontAttributeName ];
> 
>   NSSize oneSize = [ mySpecialLine sizeWithAttributes: typingAttributes 
> ];
>   //  this does not work - it always uses printer fonts even if 
> myTextView does not.

I think the basic problem is in assuming that the Cocoa text system and the 
string drawing methods use the same layout. That assumption is not safe. If you 
need to know the metrics of a line as it appears in a NSTextView, you need to 
ask the NSLayoutManager for the metrics of that specific line fragment; you 
cannot ask the attributed string itself, because its calculations are likely to 
be different. For one thing, the string drawing methods might use a different 
typesetter compatibility setting.
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: __weak pointer collection firing prematurely???

2012-08-13 Thread Kyle Sluder
On Aug 13, 2012, at 1:00 AM, Quincey Morris 
 wrote:

> There's nothing about the fact that the document is executing a method that 
> prevents it from being deallocated before the method ends.

As was discussed on the objc-language list recently, the ARC spec specifically 
guarantees that an object's lifetime includes the entire duration of a method 
invocation. An object *cannot* be deallocated while one of its methods is 
executing.

Britt, have you tried upgrading your tools? Xcode 4.1.1 is pretty old in terms 
of ARC bugfixes. This might be a codegen issue.

--Kyle Sluder
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: How do I get memory usage numbers?

2012-08-13 Thread Jens Alfke

On Aug 12, 2012, at 7:10 PM, Charlie Dickman <3tothe...@comcast.net> wrote:

> Initially I'm interested in system wide memory usage (free, wired,active, 
> inactive)

Hm, I've always found those numbers to be nearly useless, but YMMV.

> If hacking through Darwin is the only way to do this than never mind but with 
> all of the programs out there that include these numbers there must be a 
> better way to find out how it's done.

It's not 'hacking' exactly, just a bunch of low-level C APIs with too few 
vowels in their names. If you've ever used sysctl or ioctl it's the same genre. 
I'm fairly sure that's what everyone uses, because every time this question 
comes up, the advice is to go look at 'top'.

—Jens
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Classes incompatible with weak references

2012-08-13 Thread Kyle Sluder
On Aug 13, 2012, at 8:42 AM, Ben  wrote:

> I see in the documentation - and from a compiler error - that some classes 
> are not compatible with weak references.
> 
> What makes these classes incompatible?

They have custom implementations of -retain and -release.

When NextSTEP was first released, there was no refcounting, just +new and 
+free. That's why NSObject (actually Object at the time) has only one ivar: 
isa, a pointer to the object's class.

Some time later -retain and -release came into being, but the storage for 
refcount couldn't be added to Object because of the fragile base class 
problem—all existing code expected sizeof(Object)==sizeof(id), so they 
hardcoded offsets for accessing subclass ivars.

This means these new, super-common operations had to access memory stored 
somewhere else than the object they were operating on. And to be thread-safe, 
these accesses had to be protected by synchronization primitives. 

Blowing out your processor's cache every time you issue a -retain sucks, as 
does taking a spinlock on an object that should only ever be accessed from the 
main thread. So some classes that had some spare bits overrode -retain and 
-release to store the retain count in the object's instance data and possibly 
not protect it with synchronization.

For example, either NSView or NSControl has such a retain count in one of its 
bitfields. We also have a common base class, OFObject, that has an inline 
retain count that is manipulated with atomic lockless increments/decremnts. But 
with the advent of ARC, and the concurrent improvement of the data structure 
that stores object retain counts, we're going to eventually eliminate OFObject.

Hopefully once Apple removes support for 32-bit OS X they will be able to move 
the retain count storage into NSObject.

--Kyle Sluder
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Classes incompatible with weak references

2012-08-13 Thread Ben
I see in the documentation - and from a compiler error - that some classes are 
not compatible with weak references.

What makes these classes incompatible?

Perhaps I'm using the wrong search terms, but I can't seem to find information 
on why this should be the case. Can anyone shed some light on this? It's just 
for curiosity's sake really.

- Ben
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: filtering the values in an NSTableColumn

2012-08-13 Thread Koen van der Drift
Just to follow up, I decided to show both valueA and valueB in my
table, which not only made perfectly sense in my app, but also made my
question no longer relevant.

Thanks everyone for chiming in.

- Koen.



On Sat, Aug 11, 2012 at 7:31 AM, Koen van der Drift
 wrote:
>
> On Aug 11, 2012, at 7:26 AM, Ken Thomases  wrote:
>
>> On Aug 11, 2012, at 6:10 AM, Koen van der Drift wrote:
>>
>>> I'd … like to be able to change all values in the same NSTableColumn based 
>>> on a check box.
>>>
>>> Say my entity has two properties valueA and valueB; if the checkbox is 
>>> checked, then the column should show valueA, otherwise it should show 
>>> valueB.
>>
>>> But the column is bound to valueA in IB, so it will always show valueA.
>>
>> So, how about changing the column's bindings programmatically when the 
>> checkbox state changes?
>
>
> I thought about that too after I posted the question.  Another possibility 
> could be to have the entity return either valueA or valueB (as 'value') based 
> on the checkbox.  This way I can just bind to 'value' and make my predicate 
> with 'value'.  Although that would incorporate some controller tasks into the 
> model.
>
> I'll try both and see what works in my case.
>
> - Koen.
>

___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Sending keyboard events with unicode strings causes Pages/Keynote/Numbers to hang

2012-08-13 Thread Ken Thomases
On Aug 11, 2012, at 3:39 PM, Huy Phan wrote:

> Every time I send keyboard events with unicode strings contain 2-byte unicode 
> characters, …

>CGEventKeyboardSetUnicodeString(keyEventDown, 1, unicodeString);
>CGEventKeyboardSetUnicodeString(keyEventUp, 1, unicodeString);

> Pages doesn't hang if unicodeString contains only 1-byte unicode character.

Above you mention 2-byte unicode characters and here you mention 1-byte unicode 
characters.  What precisely do you mean?  A "UniChar" is inherently 2-bytes.  
So the first mention (2-byte) seems redundant and the second is just wrong.

Also, note that there are some Unicode characters which can't be represented by 
a single UniChar.  Apple's UniChar and unichar types, the basis of CFString and 
NSString, are actually UTF-16 "code units", not really Unicode characters or 
"code points".  These terms have precise definitions in the Unicode standard, 
with which Apple's terminology does not conform.  Anyway, some Unicode 
characters will require two UTF-16 code units (a.k.a. UniChar values) to 
represent completely.  These are surrogate pairs.  Is there any chance you're 
putting an incomplete Unicode character, an unpaired surrogate, in your event?

Regards,
Ken


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Help Indexer error - what does it MEAN?

2012-08-13 Thread Kyle Sluder
Help Indexer is broken for HTML input on Mountain Lion. You could try XHTML 
input, or do what we do and run the indexer on 10.7.

--Kyle Sluder
(Sent from the road)

On Aug 13, 2012, at 5:43 AM, Graham Cox  wrote:

> I'm trying to index our help files with Help Indexer, a process that has 
> worked smoothly in all our previous versions. Now though, I'm getting a 
> screed of errors that mean nothing to me, e.g:
> 
> helptopics/lessons/Working_with_Layers.html -- Parse error: The operation 
> couldn’t be completed. (NSXMLParserErrorDomain error 76.)
> 
> Followed by about a hundred similar.
> 
> We haven't changed our help pages significantly since the last version, but 
> haven't seen this before. Any ideas what it actually means? Why has this 
> suddenly started happening (on Mountain Lion, this is our first build with 
> ML)?
> 
> --Graham
> 
> 
> 
> ___
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/kyle%40ksluder.com
> 
> This email sent to k...@ksluder.com

___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Help Indexer error - what does it MEAN?

2012-08-13 Thread Andy Lee
I haven't used Help Indexer, so this is an un-educated guess: maybe you have 
something like

 ... 

in your HTML? Maybe earlier versions of Help Indexer were more forgiving. Have 
you run your files through an HTML validator?

--Andy

On Aug 13, 2012, at 8:51 AM, Graham Cox  wrote:
> 
> On 13/08/2012, at 10:43 PM, Graham Cox  wrote:
> 
>> errors that mean nothing to me
> 
> BTW, I looked up the error - but I'm none the wiser. What's a "tag name 
> mismatch"?
> 
> NSXMLParserTagNameMismatchError = 76,
> 
> NSXMLParserTagNameMismatchError
> Tag name mismatch.
> Available in OS X v10.3 and later.
> Declared in NSXMLParser.h.
> 
> 
> --Graham


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Help Indexer error - what does it MEAN?

2012-08-13 Thread Graham Cox

On 13/08/2012, at 10:43 PM, Graham Cox  wrote:

> errors that mean nothing to me

BTW, I looked up the error - but I'm none the wiser. What's a "tag name 
mismatch"?

 NSXMLParserTagNameMismatchError = 76,

NSXMLParserTagNameMismatchError
Tag name mismatch.
Available in OS X v10.3 and later.
Declared in NSXMLParser.h.


--Graham



___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Help Indexer error - what does it MEAN?

2012-08-13 Thread Graham Cox
I'm trying to index our help files with Help Indexer, a process that has worked 
smoothly in all our previous versions. Now though, I'm getting a screed of 
errors that mean nothing to me, e.g:

helptopics/lessons/Working_with_Layers.html -- Parse error: The operation 
couldn’t be completed. (NSXMLParserErrorDomain error 76.)

Followed by about a hundred similar.

We haven't changed our help pages significantly since the last version, but 
haven't seen this before. Any ideas what it actually means? Why has this 
suddenly started happening (on Mountain Lion, this is our first build with ML)?

--Graham



___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Core Graphics optimisation

2012-08-13 Thread Graham Cox

On 10/08/2012, at 6:09 PM, Fulbert Boussaton <4...@flubb.net> wrote:

> CGContextSetShadow(Ctx, CGSizeMake(3, 4), 3.0f);


As well as the advice you've received, do you have to have shadows?

They drag performance into the gutter. Try losing this line and watch your code 
speed up dramatically.

--Graham
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Core Graphics optimisation

2012-08-13 Thread Bill Dudney
A much faster and simpler approach to do exactly what you have here is 
CAShapeLayer. That will draw the path via OpenGL on your behalf without you 
having to study OpenGL.

That said, copying and pasting from stack overflow or cocoa-dev list is never a 
good solution in the long run. You might not be looking to do that, but the 
question formulation below suggest that is your goal.

> CGLayerRef

only makes things better because you're not redrawing the shape.

Much better IMO for you to spend the 56 minutes to watch a WWDC video on your 
fav subject, or better yet trick iTunes into thinking its a podcast so you can 
set the speed to 2x then you could watch 2 in the same hour.

Good luck,

-bd

On Aug 10, 2012, at 4:09 AM, Fulbert Boussaton <4...@flubb.net> wrote:

> Hi everyone,
> 
> on iOS, I was using the following "immediate CG code" to display hundreds 
> procedural sprites :
> 
> CGContextSetShadow(Ctx, CGSizeMake(3, 4), 3.0f);
> CGMutablePathRef  ShapePath = CGPathCreateMutable();
> CGPathAddArc(ShapePath, &CGAffineTransformIdentity, radius+3, radius+3, 
> radius, 0, deg2rad(360), YES);
> CGContextSetStrokeColorWithColor(Ctx, [strokeColor CGColor]);
> CGContextSetFillColorWithColor(Ctx, [fillColor CGColor]);
> CGContextSetLineWidth(Ctx, strokeWidth);
> CGContextAddPath(Ctx, ShapePath);
> CGContextDrawPath(Ctx, kCGPathFillStroke);
> CGPathRelease(ShapePath);
> 
> Ctx is the current context and the sprite is a filled circle with a shadow.
> 
> Of course, an iPad was *really* slow to draw all of these, even if each one 
> represents 32px * 32px. So I optimized it using CGLayerRef stored in a 
> NSdictionary and, yes, it was a lot faster.
> 
> But still, it's not really satisfying, and I'm sure something better can be 
> done. Do any of you got any idea ? I'm kind of stuck in the CG documentation. 
> Is there a book specifically dedicated to CG optimisation ? (I know a WWDC 12 
> presentation talks about CG optimisation but haven't had time to spare yet).
> 
> My goal is to display and animate a thousand of these drawings without using 
> OpenGL. Do you think it's possible ?
> 
> 
> Thanks.
> 
> Fulbert.
> ___
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/bdudney%40mac.com
> 
> This email sent to bdud...@mac.com

___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Core Graphics optimisation

2012-08-13 Thread Richard Altenburg (Brainchild)
You have no time to watch WWDC 2012 presentations and like to avoid OpenGL ES 
as an alternative, how on earth are you going to write a fast app with 
thousands of drawings on a device with (in worst case) 256 MB of internal 
memory? I am not sure OpenGL ES will help, and one session from WWDC will not 
change life either, but at least studying for a few days instead of writing 
code will help you find your direction!

I am having some serious issues with memory and speed, especially on the iPod 
Touch family of devices, but before I ask anything here I will make sure to try 
and find out what is available and what has already been explained in books and 
online sessions.

I wish I could help in answering your question, in spite of the above...

[[[Brainchild alloc] initWithName:@"Richard Altenburg"] saysBestRegards];

Op 10 aug. 2012, om 10:09 heeft Fulbert Boussaton <4...@flubb.net> het volgende 
geschreven:

> My goal is to display and animate a thousand of these drawings without using 
> OpenGL. Do you think it's possible ?

___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Core Graphics optimisation

2012-08-13 Thread Mike Abdullah

On 10 Aug 2012, at 09:09, Fulbert Boussaton <4...@flubb.net> wrote:

> Hi everyone,
> 
> on iOS, I was using the following "immediate CG code" to display hundreds 
> procedural sprites :
> 
> CGContextSetShadow(Ctx, CGSizeMake(3, 4), 3.0f);
> CGMutablePathRef  ShapePath = CGPathCreateMutable();
> CGPathAddArc(ShapePath, &CGAffineTransformIdentity, radius+3, radius+3, 
> radius, 0, deg2rad(360), YES);
> CGContextSetStrokeColorWithColor(Ctx, [strokeColor CGColor]);
> CGContextSetFillColorWithColor(Ctx, [fillColor CGColor]);
> CGContextSetLineWidth(Ctx, strokeWidth);
> CGContextAddPath(Ctx, ShapePath);
> CGContextDrawPath(Ctx, kCGPathFillStroke);
> CGPathRelease(ShapePath);
> 
> Ctx is the current context and the sprite is a filled circle with a shadow.
> 
> Of course, an iPad was *really* slow to draw all of these, even if each one 
> represents 32px * 32px. So I optimized it using CGLayerRef stored in a 
> NSdictionary and, yes, it was a lot faster.
> 
> But still, it's not really satisfying, and I'm sure something better can be 
> done. Do any of you got any idea ? I'm kind of stuck in the CG documentation. 
> Is there a book specifically dedicated to CG optimisation ? (I know a WWDC 12 
> presentation talks about CG optimisation but haven't had time to spare yet).

So you have a performance problem. You used Instruments to diagnose it, yes? 
What did you learn?


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Alternative method for makeViewWithIdentifier

2012-08-13 Thread Mike Abdullah
You need to go back to old school cell-based table views then.

On 13 Aug 2012, at 09:52, Alfian Busyro  wrote:

> Hi,
> I have an application that must support minimum OS X. Snow Leopard (10.6).
> But accidentally I using makeViewWithIdentifier inside a delegate of table 
> view to calling object that created on the nib, unfortunately this is only 
> supported minimum Lion.
> So instead of using this, what should I do to make an alternative of calling 
> object from the nib.
> 
> With Regards,
> Alfian
> ___
> 
> 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:
> https://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net
> 
> This email sent to cocoa...@mikeabdullah.net


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Alternative method for makeViewWithIdentifier

2012-08-13 Thread Alfian Busyro

Hi,
I have an application that must support minimum OS X. Snow Leopard (10.6).
But accidentally I using makeViewWithIdentifier inside a delegate of 
table view to calling object that created on the nib, unfortunately this 
is only supported minimum Lion.
So instead of using this, what should I do to make an alternative of 
calling object from the nib.


With Regards,
Alfian
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: __weak pointer collection firing prematurely???

2012-08-13 Thread Britt Durbrow

On Aug 13, 2012, at 1:00 AM, Quincey Morris 
 wrote:

> On Aug 13, 2012, at 00:04 , Britt Durbrow 
>  wrote:
> 
>> This is the exact line of code in question:
>> 
>> TrDocument *document=(TrDocument *)__RPCPersistentInfo__pool->document;
>> 
>> The document object in question is, when this happens, still in the middle 
>> of it's init method when that __weak __RPCPersistentInfo__pool->document 
>> variable gets zeroed out.
> 
> There's nothing about the fact that the document is executing a method that 
> prevents it from being deallocated before the method ends. It's really only a 
> question of whether there's a strong reference being maintained at the 'init' 
> call site for the duration of the 'init' call (assuming that, since the 
> document is in the process of being created, there can't be any strong 
> reference anywhere else yet).
> 
> So, before focusing too much on the the load of the weak reference, I'd 
> suggest you implement a 'dealloc' override in the document class, set a 
> breakpoint there, and see what's actually triggering deallocation.
> 
> 

Did that - no go. The dealloc method is not being called. Also, there's a 
printf statement in the dealloc method as well, so it's not just that the 
debugger is missing the breakpoint; the document object is in fact not being 
deallocated.



___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Core Graphics optimisation

2012-08-13 Thread Thomas Davie

On 10 Aug 2012, at 09:09, Fulbert Boussaton <4...@flubb.net> wrote:

> Hi everyone,
> 
> on iOS, I was using the following "immediate CG code" to display hundreds 
> procedural sprites :

I'd suggest simply dropping CG, and drawing them using OpenGL ES instead.

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Sending keyboard events with unicode strings causes Pages/Keynote/Numbers to hang

2012-08-13 Thread Huy Phan

Hi all,

I'm having this weird issue after upgrading iWork on Mountain Lion.
I wrote a small app to monitor and modify user's keystrokes, it works 
fine with other applications except latest version of Pages. Every time 
I send keyboard events with unicode strings contain 2-byte unicode 
characters, Pages will hang.


My code to simulate keystrokes is just simple like this:

CGEventRef KeyHandler(CGEventTapProxy proxy, CGEventType type, 
CGEventRef event, void *refcon)

{

..

CGEventRef keyEventDown = CGEventCreateKeyboardEvent( NULL, 1, true);
CGEventRef keyEventUp = CGEventCreateKeyboardEvent(NULL, 1, false);

CGEventKeyboardSetUnicodeString(keyEventDown, 1, unicodeString);
CGEventKeyboardSetUnicodeString(keyEventUp, 1, unicodeString);

CGEventTapPostEvent(proxy, keyEventDown);
CGEventTapPostEvent(proxy, keyEventUp);

CFRelease(keyEventDown);
CFRelease(keyEventUp);

..

}

Pages doesn't hang if unicodeString contains only 1-byte unicode character.

I used gdb to debug Pages and noticed 2 infinite loops at that time, not 
sure if it's related to this issue.


0x91f7528c in -[NSApplication 
nextEventMatchingMask:untilDate:inMode:dequeue:] () which waited for 
event with mask 0x
0x91f7528c in -[NSApplication 
nextEventMatchingMask:untilDate:inMode:dequeue:] () which waited for 
event with mask 0x0400



Does anybody know why this is happening ? Numbers and Keynote also have 
the same issue.


Thanks,
--
--huy
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Core Graphics optimisation

2012-08-13 Thread Fulbert Boussaton
Hi everyone,

on iOS, I was using the following "immediate CG code" to display hundreds 
procedural sprites :

CGContextSetShadow(Ctx, CGSizeMake(3, 4), 3.0f);
CGMutablePathRefShapePath = CGPathCreateMutable();
CGPathAddArc(ShapePath, &CGAffineTransformIdentity, radius+3, radius+3, radius, 
0, deg2rad(360), YES);
CGContextSetStrokeColorWithColor(Ctx, [strokeColor CGColor]);
CGContextSetFillColorWithColor(Ctx, [fillColor CGColor]);
CGContextSetLineWidth(Ctx, strokeWidth);
CGContextAddPath(Ctx, ShapePath);
CGContextDrawPath(Ctx, kCGPathFillStroke);
CGPathRelease(ShapePath);

Ctx is the current context and the sprite is a filled circle with a shadow.

Of course, an iPad was *really* slow to draw all of these, even if each one 
represents 32px * 32px. So I optimized it using CGLayerRef stored in a 
NSdictionary and, yes, it was a lot faster.

But still, it's not really satisfying, and I'm sure something better can be 
done. Do any of you got any idea ? I'm kind of stuck in the CG documentation. 
Is there a book specifically dedicated to CG optimisation ? (I know a WWDC 12 
presentation talks about CG optimisation but haven't had time to spare yet).

My goal is to display and animate a thousand of these drawings without using 
OpenGL. Do you think it's possible ?


Thanks.

Fulbert.
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: __weak pointer collection firing prematurely???

2012-08-13 Thread Quincey Morris
On Aug 13, 2012, at 00:04 , Britt Durbrow 
 wrote:

> This is the exact line of code in question:
> 
> TrDocument *document=(TrDocument *)__RPCPersistentInfo__pool->document;
> 
> The document object in question is, when this happens, still in the middle of 
> it's init method when that __weak __RPCPersistentInfo__pool->document 
> variable gets zeroed out.

There's nothing about the fact that the document is executing a method that 
prevents it from being deallocated before the method ends. It's really only a 
question of whether there's a strong reference being maintained at the 'init' 
call site for the duration of the 'init' call (assuming that, since the 
document is in the process of being created, there can't be any strong 
reference anywhere else yet).

So, before focusing too much on the the load of the weak reference, I'd suggest 
you implement a 'dealloc' override in the document class, set a breakpoint 
there, and see what's actually triggering deallocation.


___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


__weak pointer collection firing prematurely???

2012-08-13 Thread Britt Durbrow
I am looking at something very strange. I have a document object, that has an 
object that it owns; which has a __weak pointer back to the document object. 
Another object also has an indirect pointer to the document object. So, 
something like this:

@interface MyDoc : NSDocument
{
MySubObj *subObj;
}
@end

@interface MySubObj : NSDocument
{
@public
__weak MyDoc *doc;
}
@end

@interface SomeOtherObject : NSObject
{
MySubObj *subObj;
}
@end

During the execution of MyDoc's init method, an instance of MySubObj is 
created, and stored in the document's ivar. During MySubObj's init method, the 
__weak pointer back to the document object is set. This seems to work OK - I've 
traced it thru in the debugger. Then, an instance of SomeOtherObject is 
created, and it's subObj ivar is set. Again, works OK. The next thing 
SomeOtherObject does is to load a local variable with a reference to the 
document object, by copying it out of MySubObj's public __weak doc pointer.

OK, now the strange part: performing that copy causes the __weak doc ivar to 
get zeroed. I''ve watched it in the debugger; before executing that line of 
code, it's got the right value; after, it's nil. Changing __weak to 
__unsafe_unretained makes the problem go away.

This is the exact line of code in question:

TrDocument *document=(TrDocument *)__RPCPersistentInfo__pool->document;

The document object in question is, when this happens, still in the middle of 
it's init method when that __weak __RPCPersistentInfo__pool->document variable 
gets zeroed out.

Has anyone ever seen anything remotely like this? How and why is it happening 
on a *read*, of all places (I would have expected it to occur on a scope 
transition, where ARC would have possibly fired to do a release)? And do I need 
to worry about other places where I'm using __weak?

Oh, and this is on 10.8, with Xcode 4.4.1.

ANY insight would be much appreciated!
___

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com