Re: Image processing in Cocoa

2008-09-25 Thread Christian Giordano
Hi Helder, I found this post that can be really helpful when I will
have to do my pixel operations:

http://www.rodgutierrez.com/blog/2008/07/how-to-create-a-rgba-cgimagere.html

I still have to find how to draw an CGImageRef in another one
regardless the current context, I'm still wondering if this is the
right approach.

I will look better in the documentation.


Thanks, chr



On Thu, Sep 25, 2008 at 5:06 AM, Helder da Rocha
[EMAIL PROTECTED] wrote:
 Since you can't use NSImage, you could try Core Image.

 You can do all that with CGImage in your restricted environment. You can use
 a bitmap or layer context and then later render it on whatever view you
 wish.

 There is a good Core Graphics Quartz tutorial at
 http://developer.apple.com/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_intro/chapter_1_section_1.html

 Helder.

 --
 Helder da Rocha ([EMAIL PROTECTED])
 Sao Paulo, Brazil


 Christian Giordano wrote:

 Thanks Mike, I can't use NSImage (guess why) but a subset. Btw, the
 problem I have is that I have a view which contains an image. I would
 like to draw in the image, not in the container view so I need to
 provide to the draw method the image context. Is this a good approach
 or all the drawing should happen in the view context? Should I extend
 the image view and handle the routing internally?

 Thanks, chr


 On Wed, Sep 24, 2008 at 11:08 AM, Mike Abdullah
 [EMAIL PROTECTED] wrote:


 On 24 Sep 2008, at 10:50, Christian Giordano wrote:



 Hi guys, is there some good tutorial around about how to manipulate
 bitmaps in Cocoa?

 I would be interested on:

 - copy portion of image over another with a mask (this should be
 pretty straight forward with quartz2d)


 [[NSImage alloc] initWithSize:]
 [image lockFocus]
 [sourceImage drawAtPoint:point fromRect:imagePortionRect
 operation:operation
 fraction:1.0]
 [image unlockFocus]



 - apply threshold
 - apply effects like blur


 Core Image is your friend


 Not sure if some of this, like the blur, is recommended to do from an
 higher level instead of doing it pixel by pixel. In case of the
 latter, how to get the bytearray with all the pixels info?

 Thanks a lot, chr
 ___

 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:


 http://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net

 This email sent to [EMAIL PROTECTED]




 ___

 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:

 http://lists.apple.com/mailman/options/cocoa-dev/helder.darocha%40gmail.com

 This email sent to [EMAIL PROTECTED]



___

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

This email sent to [EMAIL PROTECTED]


Horizontal SplitView Resize Question

2008-09-25 Thread Steve Cronin

Folks;

I have a horizontal split bar inside of a resizable view -the parent  
view grows both horizontally and vertically.
The standard behavior for horizontal split views appears to be that  
the the bottom view is grown or shrunk.
(In my testing this is true regardless of the resize attributes of the  
enclosed bottom view)

I have ALL of the resize widgets set ON for this splitView.

What I would like is the divider to stay fixed at its current height  
from the bottom throughout a resize and the top view to grow or shrink.
Is there a setting I am overlooking or is the way to accomplish this  
by overriding -splitViewDidResizeSubviews?


Thanks,
Steve
___

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

This email sent to [EMAIL PROTECTED]


Re: Saving an annotated PDF to a flat image

2008-09-25 Thread Danny Greg

Get the size of said page (-[PDFPage boundsForBox:]) and create an
NSImage of this size (-[[NSImage alloc] initWithSize:]).  Lock the
image (-[NSImage lockFocus]) and then call PDFPage;s draw method (-
[PDFPage drawWithBox:]).  Unlock focus on the NSImage and you;re done.


Worked like a charm.

Just to up the anti, what do I need to do to save the annotations to a  
proper PDF, (ie keeping all its text, link properties etc). I tried to  
save off the page's data representation but no matter what I do it  
never contains any annotations! Again, I need to accomplish this  
without  opening the PDF up in a PDFView.


Thanks

Realmac Software
Danny Greg, Cocoa Junior

We are Realmac Software. We make nice things for Apple Macs.

Website: www.realmacsoftware.com

Office 4, 100 North Road
Brighton, BN1 1YE
United Kingdom



___

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

This email sent to [EMAIL PROTECTED]


NSURLDownload resumeData example

2008-09-25 Thread Andrew Zahra
Can anyone point me to an example of how to resume a download with
NSURLDOwnload? I have had no luck getting the resume data from it.
thanks,
Andrew
___

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

This email sent to [EMAIL PROTECTED]


Re: Image processing in Cocoa

2008-09-25 Thread Christian Giordano
I think I found what to do. I need to create a bitmap context from the
bitmap and drawing there. It makes sense that everything drawn is
handled by contexts of course, I'm just a bit concerned about
performances.

Thanks, chr


On Thu, Sep 25, 2008 at 7:35 AM, Christian Giordano
[EMAIL PROTECTED] wrote:
 Hi Helder, I found this post that can be really helpful when I will
 have to do my pixel operations:

 http://www.rodgutierrez.com/blog/2008/07/how-to-create-a-rgba-cgimagere.html

 I still have to find how to draw an CGImageRef in another one
 regardless the current context, I'm still wondering if this is the
 right approach.

 I will look better in the documentation.


 Thanks, chr



 On Thu, Sep 25, 2008 at 5:06 AM, Helder da Rocha
 [EMAIL PROTECTED] wrote:
 Since you can't use NSImage, you could try Core Image.

 You can do all that with CGImage in your restricted environment. You can use
 a bitmap or layer context and then later render it on whatever view you
 wish.

 There is a good Core Graphics Quartz tutorial at
 http://developer.apple.com/documentation/GraphicsImaging/Conceptual/drawingwithquartz2d/dq_intro/chapter_1_section_1.html

 Helder.

 --
 Helder da Rocha ([EMAIL PROTECTED])
 Sao Paulo, Brazil


 Christian Giordano wrote:

 Thanks Mike, I can't use NSImage (guess why) but a subset. Btw, the
 problem I have is that I have a view which contains an image. I would
 like to draw in the image, not in the container view so I need to
 provide to the draw method the image context. Is this a good approach
 or all the drawing should happen in the view context? Should I extend
 the image view and handle the routing internally?

 Thanks, chr


 On Wed, Sep 24, 2008 at 11:08 AM, Mike Abdullah
 [EMAIL PROTECTED] wrote:


 On 24 Sep 2008, at 10:50, Christian Giordano wrote:



 Hi guys, is there some good tutorial around about how to manipulate
 bitmaps in Cocoa?

 I would be interested on:

 - copy portion of image over another with a mask (this should be
 pretty straight forward with quartz2d)


 [[NSImage alloc] initWithSize:]
 [image lockFocus]
 [sourceImage drawAtPoint:point fromRect:imagePortionRect
 operation:operation
 fraction:1.0]
 [image unlockFocus]



 - apply threshold
 - apply effects like blur


 Core Image is your friend


 Not sure if some of this, like the blur, is recommended to do from an
 higher level instead of doing it pixel by pixel. In case of the
 latter, how to get the bytearray with all the pixels info?

 Thanks a lot, chr
 ___

 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:


 http://lists.apple.com/mailman/options/cocoa-dev/cocoadev%40mikeabdullah.net

 This email sent to [EMAIL PROTECTED]




 ___

 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:

 http://lists.apple.com/mailman/options/cocoa-dev/helder.darocha%40gmail.com

 This email sent to [EMAIL PROTECTED]




___

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

This email sent to [EMAIL PROTECTED]


[MEET] Aachen CocoaHeads TODAY (September 25, 2008)

2008-09-25 Thread Stefan Hafeneger

Hi everyone,

Aachen CocoaHeads is today (September 25, 2008) at 7PM.

Talk: Kai Brüning, Plug-ins for Interface Builder 3

Please visit http://www.cocoaheads.de/ for location information.

See you there!

Stefan


smime.p7s
Description: S/MIME cryptographic signature
___

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

This email sent to [EMAIL PROTECTED]

NSMutableData and thread safety

2008-09-25 Thread Roman Kishchenko
Hi,
It is said in the documentation that NSMutableData is not thread-safe. So,
its access needs to be synchronized, at least, when multiple contending
threads are using the object of this class. However, is synchronization
necessary when NSMutableData is used by multiple threads NOT concurrently,
i.e. first one thread adds some data to it, the the other, etc?

Also, is it ok to pass the object of this class as an argument to
performSelector:onThread:...?

Thanks,
Roman Kishchenko
___

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

This email sent to [EMAIL PROTECTED]


Re: NSMutableData and thread safety

2008-09-25 Thread Ken Thomases

On Sep 25, 2008, at 8:50 AM, Roman Kishchenko wrote:

It is said in the documentation that NSMutableData is not thread- 
safe. So,
its access needs to be synchronized, at least, when multiple  
contending
threads are using the object of this class. However, is  
synchronization
necessary when NSMutableData is used by multiple threads NOT  
concurrently,

i.e. first one thread adds some data to it, the the other, etc?


If you can guarantee that only one thread is accessing the object at a  
time, then that _is_ synchronization.




Also, is it ok to pass the object of this class as an argument to
performSelector:onThread:...?


Yes, that's safe so long as the calling thread doesn't access the  
object after it has been passed as an argument (unless such access is  
synchronized with the receiving thread).


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

This email sent to [EMAIL PROTECTED]


Re: What does @loader_path refer to when loading ibplugins from a linked-in framework?

2008-09-25 Thread Dalzhim Dalzhim
Hello Michael,

I would have also thought that @loader_path would be the same thing no
matter how I load my ibplugin into interface builder and maybe it is in fact
the case, although this is the only thing that I haven't successfully
investigated that I can think of up to now in order to solve my problem.  As
I explained previously, the ibplugin I have built successfully loads up in
Interface Builder when I manually add it through the Plugin tab of the
Preferences window.  Although if I do not load it up manually and that I try
to have Interface Builder load it dynamically by opening a nib file in a
xcode project which links against a framework which includes my ibplugin in
its resources directory, the plugin never loads up and I cannot seem to find
any errors to help me find the source of the problem.

I have looked at the man page for dyld and I have found some documentation
in the Dynamic Library Programming Topics.  Although I tried using the
DYLD_PRINT_BINDINGS environment variable I didn't find where this logging is
being done.  Nothing appeared on the console after I ran interface builder
and repeated the usual process:

DYLD_PRINT_BINDINGS=1
cd /Developer/Applications/Interface\ Builder.app/Contents/MacOS
./Interface\ Builder


regards


-Dalzhim


2008/9/25 Michael Ash [EMAIL PROTECTED]

 I would have thought that @loader_path would be the same thing each
 time, namely the path of the plugin binary (minus the last path
 component, of course).

 I'm not sure exactly what your problem might be, but if you type 'man
 dyld' you'll find a bunch of debugging environment variables you can
 set which might help you track it down.

 Mike
 ___

 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:
 http://lists.apple.com/mailman/options/cocoa-dev/dalzhim.mlist%40gmail.com

 This email sent to [EMAIL PROTECTED]

___

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

This email sent to [EMAIL PROTECTED]


How to set up a thread listening to performSelector: messages?

2008-09-25 Thread Oleg Krupnov
I want to create a secondary thread with its run loop running
(sleeping) until a performSelector is sent to it. Then it wakes up,
performs the selector, and go to sleep again. I imagine it to be
something like this:

- (void)threadMain:(id)data
{
while(true)
{
[[NSRunLoop currentRunLoop] run];
}
}

However, the -[NSRunLoop run] method exits immediately, because, in
accord with the the docs, there are no input sources or timers
attached to the run loop.

So I need to set up an input source, right?. The docs say input
sources can be port-based or custom *OR* just performSelector calls. I
am interested only in the performSelector calls.

So what should my code look like to set up such input source?

I have also read the Defining a Custom Input Source doc section, but
it seems too complicated and not really relevant to what I want to do.
I don't actually need the input source, I just want to send messages
from one thread to another. How do I do it?
___

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

This email sent to [EMAIL PROTECTED]


Re: How to set up a thread listening to performSelector: messages?

2008-09-25 Thread Ken Thomases

On Sep 25, 2008, at 10:30 AM, Oleg Krupnov wrote:


I want to create a secondary thread with its run loop running
(sleeping) until a performSelector is sent to it. Then it wakes up,
performs the selector, and go to sleep again. I imagine it to be
something like this:

- (void)threadMain:(id)data
{
   while(true)
   {
[[NSRunLoop currentRunLoop] run];
   }
}

However, the -[NSRunLoop run] method exits immediately, because, in
accord with the the docs, there are no input sources or timers
attached to the run loop.

So I need to set up an input source, right?. The docs say input
sources can be port-based or custom *OR* just performSelector calls. I
am interested only in the performSelector calls.

So what should my code look like to set up such input source?


You can just create an NSPort and add it to the run loop.  It doesn't  
matter that you won't actually be using the port.


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

This email sent to [EMAIL PROTECTED]


Re: How to set up a thread listening to performSelector: messages?

2008-09-25 Thread Oleg Krupnov
I actually have tried this. My code looks like this (is it correct?):

@implementation Worker

- (void)threadMain:(id)data
{
  runLoop = [NSRunLoop currentRunLoop];
  [runLoop addPort:[NSMachPort port] forMode:NSDefaultRunLoopMode];
  while(true)
  {
[runLoop run];
  }
}

- (void)processRequest:(id)sender
{
  NSLog(@hello);
}

@end

Then from the main thread I send:

[[worker runLoop] performSelector:@selector(processRequest:)
target:worker argument:request order:0 modes:[NSArray
arrayWithObject:NSDefaultRunLoopMode]];

This time the -[NSRunLoop run] method does not exit immediately.
However the problem is that processRequest is never called and the
-[NSRunLoop run] never exits.

What can be wrong? Should it work like this at all?


On Thu, Sep 25, 2008 at 6:46 PM, Ken Thomases [EMAIL PROTECTED] wrote:
 On Sep 25, 2008, at 10:30 AM, Oleg Krupnov wrote:

 I want to create a secondary thread with its run loop running
 (sleeping) until a performSelector is sent to it. Then it wakes up,
 performs the selector, and go to sleep again. I imagine it to be
 something like this:

 - (void)threadMain:(id)data
 {
   while(true)
   {
[[NSRunLoop currentRunLoop] run];
   }
 }

 However, the -[NSRunLoop run] method exits immediately, because, in
 accord with the the docs, there are no input sources or timers
 attached to the run loop.

 So I need to set up an input source, right?. The docs say input
 sources can be port-based or custom *OR* just performSelector calls. I
 am interested only in the performSelector calls.

 So what should my code look like to set up such input source?

 You can just create an NSPort and add it to the run loop.  It doesn't matter
 that you won't actually be using the port.

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

This email sent to [EMAIL PROTECTED]


Re: What does @loader_path refer to when loading ibplugins from a linked-in framework?

2008-09-25 Thread Michael Ash
On Thu, Sep 25, 2008 at 11:18 AM, Dalzhim Dalzhim
[EMAIL PROTECTED] wrote:
 Hello Michael,

 I would have also thought that @loader_path would be the same thing no
 matter how I load my ibplugin into interface builder and maybe it is in fact
 the case, although this is the only thing that I haven't successfully
 investigated that I can think of up to now in order to solve my problem.  As
 I explained previously, the ibplugin I have built successfully loads up in
 Interface Builder when I manually add it through the Plugin tab of the
 Preferences window.  Although if I do not load it up manually and that I try
 to have Interface Builder load it dynamically by opening a nib file in a
 xcode project which links against a framework which includes my ibplugin in
 its resources directory, the plugin never loads up and I cannot seem to find
 any errors to help me find the source of the problem.

 I have looked at the man page for dyld and I have found some documentation
 in the Dynamic Library Programming Topics.  Although I tried using the
 DYLD_PRINT_BINDINGS environment variable I didn't find where this logging is
 being done.  Nothing appeared on the console after I ran interface builder
 and repeated the usual process:

 DYLD_PRINT_BINDINGS=1
 cd /Developer/Applications/Interface\ Builder.app/Contents/MacOS
 ./Interface\ Builder

This just sets a shell variable. IB won't see it. Either export it:

export DYLD_PRINT_BINDINGS=1

Or set it as part of running the binary:

DYLD_PRINT_BINDINGS=1 ./Interface\ Builder

Mike
___

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

This email sent to [EMAIL PROTECTED]


Filtering an NSArrayController using a to-many relationship

2008-09-25 Thread Danny Greg

Hi list,

In my data model 2 of my enities are Snap and Tag and they have a  
many-to-many relationship between them.


My UI is controlled by an NSArrayController bound to the Snap entity,  
I have a search field that sets the filter predicate of this  
NSArrayController (through code not bindings for various reasons). The  
array controller needs to be filtered to show any snaps which have a  
tag that matches the search field's string value.


Tag has an attribute of title so I tried a straight forward  
predicate such as ANY tags.title like [search string]  (where tags  
is the relationship on the Snap entity). But this fails every time.


There seem to be a lot of unanswered messages in the archives  
regarding this, can someone tell me what I'm missing?


Thanks

Realmac Software
Danny Greg, Cocoa Junior

We are Realmac Software. We make nice things for Apple Macs.

Website: www.realmacsoftware.com

Office 4, 100 North Road
Brighton, BN1 1YE
United Kingdom



___

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

This email sent to [EMAIL PROTECTED]


Re: How to set up a thread listening to performSelector: messages?

2008-09-25 Thread Michael Ash
On Thu, Sep 25, 2008 at 11:53 AM, Oleg Krupnov [EMAIL PROTECTED] wrote:
 I actually have tried this. My code looks like this (is it correct?):

 @implementation Worker

 - (void)threadMain:(id)data
 {
  runLoop = [NSRunLoop currentRunLoop];
  [runLoop addPort:[NSMachPort port] forMode:NSDefaultRunLoopMode];
  while(true)
  {
[runLoop run];
  }
 }

 - (void)processRequest:(id)sender
 {
  NSLog(@hello);
 }

 @end

 Then from the main thread I send:

 [[worker runLoop] performSelector:@selector(processRequest:)
 target:worker argument:request order:0 modes:[NSArray
 arrayWithObject:NSDefaultRunLoopMode]];

 This time the -[NSRunLoop run] method does not exit immediately.
 However the problem is that processRequest is never called and the
 -[NSRunLoop run] never exits.

 What can be wrong? Should it work like this at all?

You can't do this. NSRunLoop is not thread safe. Since it is always
being used by the thread which it manages, this means that you cannot
use it from other threads at all.

If you can require 10.5, you can use this method:

- (void)performSelector:(SEL)aSelector onThread:(NSThread *)thr
withObject:(id)arg waitUntilDone:(BOOL)wait;

Otherwise, CFRunLoop is thread safe and does support this sort of
cross-thread invocation. You can also use Distributed Objects, use
that NSPort for messaging, or set up your own message queue system
using any number of mechanisms.

Mike
___

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

This email sent to [EMAIL PROTECTED]


Re: How to set up a thread listening to performSelector: messages?

2008-09-25 Thread Dave Dribin

On Sep 25, 2008, at 10:53 AM, Oleg Krupnov wrote:

Then from the main thread I send:

[[worker runLoop] performSelector:@selector(processRequest:)
target:worker argument:request order:0 modes:[NSArray
arrayWithObject:NSDefaultRunLoopMode]];


You cannot do this.  NSRunLoop is not thread safe and the docs say  
explicitly not to call methods on a different thread.


You need to use NSObject's performSelector:onThread:... method.

-Dave

___

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

This email sent to [EMAIL PROTECTED]


Re: How to set up a thread listening to performSelector: messages?

2008-09-25 Thread Ken Thomases

On Sep 25, 2008, at 10:53 AM, Oleg Krupnov wrote:


I actually have tried this. My code looks like this (is it correct?):

@implementation Worker

- (void)threadMain:(id)data
{
 runLoop = [NSRunLoop currentRunLoop];
 [runLoop addPort:[NSMachPort port] forMode:NSDefaultRunLoopMode];
 while(true)
 {
   [runLoop run];
 }
}

- (void)processRequest:(id)sender
{
 NSLog(@hello);
}

@end

Then from the main thread I send:

[[worker runLoop] performSelector:@selector(processRequest:)
target:worker argument:request order:0 modes:[NSArray
arrayWithObject:NSDefaultRunLoopMode]];

This time the -[NSRunLoop run] method does not exit immediately.
However the problem is that processRequest is never called and the
-[NSRunLoop run] never exits.

What can be wrong? Should it work like this at all?


No, that's not how you do it.  NSRunLoop is not thread-safe.  That is,  
you can't message a run loop other than the current thread's.


You should use -performSelector:onThread:withObject:waitUntilDone:.   
You send it to the object you want to message -- the one that  
implements the method matching the selector.  You need to supply the  
NSThread object for the thread, which you can keep from the time when  
the thread was created.  Or the thread in question can query + 
[NSThread currentThread] and stash that object somewhere shared.  The  
withObject: parameter is an argument object which would be passed as  
an argument to the method, if the method and selector take an argument.


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

This email sent to [EMAIL PROTECTED]


Re: How to set up a thread listening to performSelector: messages?

2008-09-25 Thread Jean-Daniel Dupas


Le 25 sept. 08 à 17:53, Oleg Krupnov a écrit :


I actually have tried this. My code looks like this (is it correct?):

@implementation Worker

- (void)threadMain:(id)data
{
 runLoop = [NSRunLoop currentRunLoop];
 [runLoop addPort:[NSMachPort port] forMode:NSDefaultRunLoopMode];
 while(true)
 {
   [runLoop run];
 }
}

- (void)processRequest:(id)sender
{
 NSLog(@hello);
}

@end

Then from the main thread I send:

[[worker runLoop] performSelector:@selector(processRequest:)
target:worker argument:request order:0 modes:[NSArray
arrayWithObject:NSDefaultRunLoopMode]];



NSRunLoop is not known to be thread safe. Calling another thread's  
runloop methods does not works (as you see). You should only use this  
method one the current thread runloop.


Instead you should keep a pointer to the target thread and use [worker  
performSelector:onThread:withObject:waitUntilDone:].

Note that It works only on 10.5.

___

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

This email sent to [EMAIL PROTECTED]


Re: How to set up a thread listening to performSelector: messages?

2008-09-25 Thread Oleg Krupnov
Wow, it worked!

-performSelector:onThread:withObject:waitUntilDone: rules.

I don't know how I overlooked this method. Many thanks. :)


On Thu, Sep 25, 2008 at 7:12 PM, Ken Thomases [EMAIL PROTECTED] wrote:
 On Sep 25, 2008, at 10:53 AM, Oleg Krupnov wrote:

 I actually have tried this. My code looks like this (is it correct?):

 @implementation Worker

 - (void)threadMain:(id)data
 {
  runLoop = [NSRunLoop currentRunLoop];
  [runLoop addPort:[NSMachPort port] forMode:NSDefaultRunLoopMode];
  while(true)
  {
   [runLoop run];
  }
 }

 - (void)processRequest:(id)sender
 {
  NSLog(@hello);
 }

 @end

 Then from the main thread I send:

 [[worker runLoop] performSelector:@selector(processRequest:)
 target:worker argument:request order:0 modes:[NSArray
 arrayWithObject:NSDefaultRunLoopMode]];

 This time the -[NSRunLoop run] method does not exit immediately.
 However the problem is that processRequest is never called and the
 -[NSRunLoop run] never exits.

 What can be wrong? Should it work like this at all?

 No, that's not how you do it.  NSRunLoop is not thread-safe.  That is, you
 can't message a run loop other than the current thread's.

 You should use -performSelector:onThread:withObject:waitUntilDone:.  You
 send it to the object you want to message -- the one that implements the
 method matching the selector.  You need to supply the NSThread object for
 the thread, which you can keep from the time when the thread was created.
  Or the thread in question can query +[NSThread currentThread] and stash
 that object somewhere shared.  The withObject: parameter is an argument
 object which would be passed as an argument to the method, if the method and
 selector take an argument.

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

This email sent to [EMAIL PROTECTED]


Re: Filtering an NSArrayController using a to-many relationship

2008-09-25 Thread I. Savant
On Thu, Sep 25, 2008 at 12:06 PM, Danny Greg [EMAIL PROTECTED] wrote:

 Tag has an attribute of title so I tried a straight forward predicate such
 as ANY tags.title like [search string]  (where tags is the relationship on
 the Snap entity). But this fails every time.

  But this fails every time.

  Any more information than that? :-) How does it fail? Do you receive
any message in the run log or does the search turn up empty?

--
I.S.
___

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

This email sent to [EMAIL PROTECTED]


Re: How to set up a thread listening to performSelector: messages?

2008-09-25 Thread Dave Carrigan


On Sep 25, 2008, at 9:24 AM, Oleg Krupnov wrote:


-performSelector:onThread:withObject:waitUntilDone: rules.


Unless you need to target pre-Leopard.

If you need to do that, you should use -performSelectorOnMainThread.

If you want to message a run loop that isn't on the main thread, then  
you will most likely need to use distributed objects.


--
Dave Carrigan
[EMAIL PROTECTED]
Seattle, WA, USA



PGP.sig
Description: This is a digitally signed message part
___

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

This email sent to [EMAIL PROTECTED]

Re: Filtering an NSArrayController using a to-many relationship

2008-09-25 Thread Danny Greg



 But this fails every time.

 Any more information than that? :-) How does it fail? Do you receive
any message in the run log or does the search turn up empty?



Sure,

It prints out a bindings error:

[_NSFaultingMutableSet 0x14b8e830  
addObserver:forKeyPath:options:context:] is not supported. Key path:  
title


That is all I get, that and no filtering happens on the UI.

Realmac Software
Danny Greg, Cocoa Junior

We are Realmac Software. We make nice things for Apple Macs.

Website: www.realmacsoftware.com

Office 4, 100 North Road
Brighton, BN1 1YE
United Kingdom



___

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

This email sent to [EMAIL PROTECTED]


Re: Image processing in Cocoa

2008-09-25 Thread David Duncan

On Sep 25, 2008, at 3:52 AM, Christian Giordano wrote:


I think I found what to do. I need to create a bitmap context from the
bitmap and drawing there. It makes sense that everything drawn is
handled by contexts of course, I'm just a bit concerned about
performances.



Internally NSImage will basically do the same thing - create a  
CGContext to draw the other content into it. The performance shouldn't  
be an issue in the vast majority of use cases. I'm not convinced that  
alternatives would actually create a significant speed up, and the  
additional code required to make it work universally would likely make  
any of those cases less optimal than what the OS already provides.

--
David Duncan
Apple DTS Animation and Printing

___

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

This email sent to [EMAIL PROTECTED]


Re: Filtering an NSArrayController using a to-many relationship

2008-09-25 Thread I. Savant
On Thu, Sep 25, 2008 at 1:29 PM, Danny Greg [EMAIL PROTECTED] wrote:

 [_NSFaultingMutableSet 0x14b8e830
 addObserver:forKeyPath:options:context:] is not supported. Key path: title

 That is all I get, that and no filtering happens on the UI.

  You mentioned you were creating your predicate and setting it
programmatically. I recommend posting your code.

--
I.S.
___

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

This email sent to [EMAIL PROTECTED]


Re: Saving an annotated PDF to a flat image

2008-09-25 Thread John Calhoun

On Sep 25, 2008, at 3:24 AM, Danny Greg wrote:
Just to up the anti, what do I need to do to save the annotations to  
a proper PDF, (ie keeping all its text, link properties etc). I  
tried to save off the page's data representation but no matter what  
I do it never contains any annotations! Again, I need to accomplish  
this without  opening the PDF up in a PDFView.


Okay, I'll ante up. :-)

PDFDocument has methods for saving PDF's – since Leopard, annotations  
are preserved as annotations.


PDFPage has methods for adding, removing annotations.

The PDFAnnotation classes ave initializers so that annotations can be  
created.


PDFView is really just a view.  While it has a lot of convenience  
methods to aid in PDF viewing, the real functionailty of PDF Kit is in  
the other classes.


John Calhoun—___

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

This email sent to [EMAIL PROTECTED]


Causing systemUIServer to update the User Menu for Fast User Switching.

2008-09-25 Thread Ken Andrews
I¹ve got an app that creates users via dscl.  The users get created and
themselves are set up fine.
The problem I have is that the list of users in the fast user switching menu
does not get updated.
Using the login screen works fine.  The user is there just not in the fast
user switch pull down.

I can make it update by restarting systemUIServer but that is not something
I want to do.
If I add users from the system prefs they are immediately added to the user
list so there must be some method to get the list to update.
I send all the same notifications that system prefs sends but they do not
seem to help.
One thing that I did notice was in
SystemUIServer/Content/Resources/Autoload.plist
array
dict
keyid/key
integer-10014/integer
keymethod/key
string_userCanLoad/string
keypath/key
string/System/Library/CoreServices/Menu Extras/User.menu/string
/dict

This makes me think that there is some simple way to tell the ui server to
update just the user list.

Anyone have an idea of what it is?

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

This email sent to [EMAIL PROTECTED]


Re: Horizontal SplitView Resize Question

2008-09-25 Thread chaitanya pandit

I'm not sure but you can try limiting the min and max coordinate using:
- (CGFloat)splitView:(NSSplitView *)sender constrainMaxCoordinate: 
(CGFloat)proposedMax ofSubviewAt:(NSInteger)offset
- (CGFloat)splitView:(NSSplitView *)sender constrainMinCoordinate: 
(CGFloat)proposedMin ofSubviewAt:(NSInteger)offset


On 25-Sep-08, at 1:06 PM, Steve Cronin wrote:


Folks;

I have a horizontal split bar inside of a resizable view -the parent  
view grows both horizontally and vertically.
The standard behavior for horizontal split views appears to be that  
the the bottom view is grown or shrunk.
(In my testing this is true regardless of the resize attributes of  
the enclosed bottom view)

I have ALL of the resize widgets set ON for this splitView.

What I would like is the divider to stay fixed at its current height  
from the bottom throughout a resize and the top view to grow or  
shrink.
Is there a setting I am overlooking or is the way to accomplish this  
by overriding -splitViewDidResizeSubviews?


Thanks,
Steve
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/chaitanya%40expersis.com

This email sent to [EMAIL PROTECTED]


___

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

This email sent to [EMAIL PROTECTED]


Interface Building help with box labels

2008-09-25 Thread Dale Jensen
Sorry if there is an Interface Builder specific list, I couldn't find  
one on the lists page.


I have a window with five boxes which are used to separate UI elements  
on the window.  Three of these five have their labels displayed in  
bold font, two do not, and nothing I've tried doing with the Bold  
command in the Font menu, or any of the settings in the Fonts window  
does anything at all to change the two plain text labels to bold.  On  
the other hand, nothing I do to the bold ones make them plain.  Paste  
and Match Style doesn't work either.  I can't see anything (obvious)  
different between the boxes in the Inspector.  New boxes that I drag  
out of the Library have plain font.


Any ideas, short of starting over?  This seems like really basic  
functionality, so there must be an easy solution.


Thanks!


dale

--
Dale Jensen, CEO
Ntractive, LLC
[EMAIL PROTECTED]
http://www.ntractive.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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Interface Building help with box labels

2008-09-25 Thread I. Savant
On Thu, Sep 25, 2008 at 3:11 PM, Dale Jensen [EMAIL PROTECTED] wrote:
 Sorry if there is an Interface Builder specific list, I couldn't find one on
 the lists page.

  Technically, I think this belongs in the xcode-users list, since
it's part of Xcode Tools. However ... ;-)

 Any ideas, short of starting over?  This seems like really basic
 functionality, so there must be an easy solution.

  I've never seen this behavior. You should definitely file a bug:

http://bugreport.apple.com/

  I don't think you need to 'start over', though ... just select each
individual box, then choose Layout - Unimbed Objects from the menu.
Then select the now-unboxed items, and choose Layout - Embed Objects
In - Box. You should be able to recover in less than a minute.

--
I.S.
___

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

This email sent to [EMAIL PROTECTED]


What happens to the user dictionary when coalescing notifications in NSNotificationQueue?

2008-09-25 Thread Karan, Cem (Civ, ARL/CISD)
I've got a class that acts like a super-lightweight server within my program.  
It listens for incoming packets of information, decodes them, and then tells 
the rest of my code that something changed.  So far, this sounds like a job for 
NSNotificationCenter, except that I'm getting the packets by UDP, and don't 
want to tell all the listeners about every single update that happens; it would 
be better to coalesce them into one notification and notify them when the run 
loop is idle.  OK, so this sounds perfect for NSNotificationQueue with 
(NSNoticationCoalescingOnName|NSNotificationCoalescingOnSender) as the options. 
 The problem is that I want to send all the data along in the user dictionary.  
How is that coalesced?  Note that I want ALL the data I'm putting in the 
dictionary, not just the last user dict.

Thanks,
Cem Karan
___

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

This email sent to [EMAIL PROTECTED]

Re: What happens to the user dictionary when coalescing notifications in NSNotificationQueue?

2008-09-25 Thread Jason Coco


On Sep 25, 2008, at 16:07 , Karan, Cem (Civ, ARL/CISD) wrote:

I've got a class that acts like a super-lightweight server within my  
program.  It listens for incoming packets of information, decodes  
them, and then tells the rest of my code that something changed.  So  
far, this sounds like a job for NSNotificationCenter, except that  
I'm getting the packets by UDP, and don't want to tell all the  
listeners about every single update that happens; it would be better  
to coalesce them into one notification and notify them when the run  
loop is idle.  OK, so this sounds perfect for NSNotificationQueue  
with (NSNoticationCoalescingOnName|NSNotificationCoalescingOnSender)  
as the options.  The problem is that I want to send all the data  
along in the user dictionary.  How is that coalesced?  Note that I  
want ALL the data I'm putting in the dictionary, not just the last  
user dict.


You could create a method on your server class that returns the all  
the data as one NSData object. So, create a mutable data object in  
your server object and
every time you get a UDP packet, add that to the data and then post a  
notification. When the notification gets received, the notified object  
messages your server
object and retrieves all the data that way. Just make sure that the  
retrieve call is properly synchronized or that everything is running  
on the same thread

and you should have no problems. That's the way I would do it, anyway.

Jason

smime.p7s
Description: S/MIME cryptographic signature
___

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

This email sent to [EMAIL PROTECTED]

showing window causes EXC_BAD_ACCESS

2008-09-25 Thread Daniel Child

Hi,

I'm stumped. I have a button in a master window tied to a method that  
simply shows another window. The method is as simple as they come.


- (IBAction) showMLTableListings: (id) sender
{
[mLTableListingsWindow makeKeyAndOrderFront: self];
}

where mLTableListingsWindow is simply the reference to the data  
listing window cached within the App Controller.


If I press the button in question once, the window dutifully comes up.  
If I close the window and press the button a second time, I get  
EXC_BAD_ACCESS. Debugging, I found that both self and  
mLTableListingsWindow still exist.


Incidentally, the tables and windows were set up automatically using  
the entity object in IB, as I'm simply testing a CoreData app. I  
didn't set any of the bindings manually. This seems to happen on a  
number of my automatically generated CoreData windows?


Why is this happening? How can I track down the problem?

Thanks.

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

This email sent to [EMAIL PROTECTED]


Re: showing window causes EXC_BAD_ACCESS

2008-09-25 Thread Kyle Sluder
On Thu, Sep 25, 2008 at 4:17 PM, Daniel Child [EMAIL PROTECTED] wrote:
 If I press the button in question once, the window dutifully comes up. If I
 close the window and press the button a second time, I get EXC_BAD_ACCESS.
 Debugging, I found that both self and mLTableListingsWindow still exist.

Sounds like your window is set to release when closed.  Uncheck this
box in Interface Builder.

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

This email sent to [EMAIL PROTECTED]


[MEET] LA CocoaHeads meeting tonight 7:30pm

2008-09-25 Thread Rob Ross

Hey LA CocoaHeads.

Tonight we continue our study group meeting for the Aaron Hillegass  
book Cocoa Programming for Mac OS X, 3rd Edition.


http://search.barnesandnoble.com/Cocoa-Programming-for-Mac-OS-X/Aaron-Hillegass/e/9780321503619/?itm=1

We'll be covering chapters 7-9. Please jot down any question you come  
up with during your reading.


We meet at the offices of E! Entertainment at 7:30pm.

Our meeting location is

5750 Wilshire Blvd
Los Angeles, CA 90036.

Here's a google map of the location:

http://www.google.com/maps?f=qhl=enq=5750+Wilshire+Blvd,+Los+Angeles+CA+90036ie=UTF8z=15om=1iwloc=addr

Free street parking is available. I'd suggest trying Masselin Ave,  
which is one block East of Courtyard Place.


We meet near the lobby of the West building at 5750 Wilshire Blvd, on  
the West side of Courtyard Place. There are picknick tables in front  
of the lobby and we'll gather there starting at 7:20pm. From there we  
go inside and up to conference room 3A at around 7:45pm .


If you arrive late, please ask the building security personnel in the  
lobby to direct you to the E! Security office, and they will be able  
to contact the group in conference room 3A and send someone down to  
meet you.


Rob Ross, Lead Software Engineer
E! Networks

___

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

This email sent to [EMAIL PROTECTED]


Autostart item in user profile.

2008-09-25 Thread Sandro Noel

Gretings.

I would like my application to have the option to auto-start itself  
when the user log's in
but I cant seem to find information on how to do it in the  
documentation.
I'm probably not looking for the right keywords, could someone point  
me in the right direction ?


thank you !
Sandro.
___

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

This email sent to [EMAIL PROTECTED]


Re: showing window causes EXC_BAD_ACCESS

2008-09-25 Thread Daniel Child

THANK YOU! That solved it for all of the windows.

On Sep 25, 2008, at 4:25 PM, Kyle Sluder wrote:

On Thu, Sep 25, 2008 at 4:17 PM, Daniel Child [EMAIL PROTECTED]  
wrote:
If I press the button in question once, the window dutifully comes  
up. If I
close the window and press the button a second time, I get  
EXC_BAD_ACCESS.
Debugging, I found that both self and mLTableListingsWindow still  
exist.


Sounds like your window is set to release when closed.  Uncheck this
box in Interface Builder.

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

This email sent to [EMAIL PROTECTED]


Re: Autostart item in user profile.

2008-09-25 Thread I. Savant
On Thu, Sep 25, 2008 at 4:48 PM, Sandro Noel [EMAIL PROTECTED] wrote:

 I would like my application to have the option to auto-start itself when the
 user log's in
 but I cant seem to find information on how to do it in the documentation.
 I'm probably not looking for the right keywords, could someone point me in
 the right direction ?

  Login Item or Log in item.

--
I.S.
___

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

This email sent to [EMAIL PROTECTED]


Re: Adding external library in cocoa app

2008-09-25 Thread Scott Ribe
 The linker does link in static libraries, but it prefers dynamic
 libraries over static ones, and will always link to a dynamic library
 if one exists with the same name as the desired static one. Since
 there's no way to change this behavior, the only workaround is to add
 an absolute path to the static library as a linker flag in the other
 linker flags build settings.

Or put a copy of the static lib into a folder within your project, and drag
that one into the project. (And possibly delete the prior path from lib
paths, if you already dragged in the lib from the default location.)

-- 
Scott Ribe
[EMAIL PROTECTED]
http://www.killerbytes.com/
(303) 722-0567 voice


___

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

This email sent to [EMAIL PROTECTED]


Re: Adding external library in cocoa app

2008-09-25 Thread Scott Ribe
 The linker does link in static libraries, but it prefers dynamic
 libraries over static ones, and will always link to a dynamic library
 if one exists with the same name as the desired static one. Since
 there's no way to change this behavior, the only workaround is to add
 an absolute path to the static library as a linker flag in the other
 linker flags build settings.
 
 Or put a copy of the static lib into a folder within your project, and drag
 that one into the project. (And possibly delete the prior path from lib paths,
 if you already dragged in the lib from the default location.)

Or, for libs you're building yourself that are not part of the standard
system install, delete the dynamic libs ;-)


-- 
Scott Ribe
[EMAIL PROTECTED]
http://www.killerbytes.com/
(303) 722-0567 voice


___

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

This email sent to [EMAIL PROTECTED]


Re: Adding external library in cocoa app

2008-09-25 Thread Sherm Pendley
On Thu, Sep 25, 2008 at 5:19 PM, Scott Ribe [EMAIL PROTECTED]wrote:

 Or, for libs you're building yourself that are not part of the standard
 system install, delete the dynamic libs ;-)


Or, if it's a project that uses autoconf, just './configure
--disable-dynamic' - why waste time building dynamic libraries if you're
just going to delete them?

sherm--

-- 
Cocoa programming in Perl: http://camelbones.sourceforge.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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Adding external library in cocoa app

2008-09-25 Thread Nick Zitzmann


On Sep 25, 2008, at 4:19 PM, Sherm Pendley wrote:


Or, if it's a project that uses autoconf, just './configure
--disable-dynamic' - why waste time building dynamic libraries if  
you're

just going to delete them?



Because some autoconf projects (such as liboil) depend on getting a  
list of symbols from a dynamic library in order to work, and thus  
break the moment you turn off shared libraries.


Nick Zitzmann
http://www.chronosnet.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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: What happens to the user dictionary when coalescing notifications in NSNotificationQueue?

2008-09-25 Thread Cem
I've got a class that acts like a super-lightweight server within  
my program.  It listens for incoming packets of information,  
decodes them, and then tells the rest of my code that something  
changed.  So far, this sounds like a job for NSNotificationCenter,  
except that I'm getting the packets by UDP, and don't want to tell  
all the listeners about every single update that happens; it would  
be better to coalesce them into one notification and notify them  
when the run loop is idle.  OK, so this sounds perfect for  
NSNotificationQueue with (NSNoticationCoalescingOnName| 
NSNotificationCoalescingOnSender) as the options.  The problem is  
that I want to send all the data along in the user dictionary.  How  
is that coalesced?  Note that I want ALL the data I'm putting in  
the dictionary, not just the last user dict.


You could create a method on your server class that returns the all  
the data as one NSData object. So, create a mutable data object in  
your server object and
every time you get a UDP packet, add that to the data and then post  
a notification. When the notification gets received, the notified  
object messages your server
object and retrieves all the data that way. Just make sure that the  
retrieve call is properly synchronized or that everything is running  
on the same thread

and you should have no problems. That's the way I would do it, anyway.


The problem is that each packet is an individual chunk of data that I  
store in a data structure.  I don't want to tell listeners that  
something changed, because there is going to be a lot of stuff; I want  
to be able to tell them 'here are the things that changed'.  I could  
probably maintain a cache, and have all registered listeners tell me  
when they've received a message (so I can merge the cache back into  
the database), but that gets messier than I'd like.


Basically, if I know what is supported in coalescing, then I can work  
with it, if necessary, working around it.  I just need to know that  
things won't suddenly change one day.  That is why I'm trying to  
figure out the precise meaning of coalesce when it comes to the user  
dictionaries.


Thanks,
Cem Karan
___

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

This email sent to [EMAIL PROTECTED]


Re: Autostart item in user profile.

2008-09-25 Thread Gregory Weston

Sandro Noel wrote:


I would like my application to have the option to auto-start itself
when the user log's in but I cant seem to find information on how  
to do

it in the documentation.
I'm probably not looking for the right keywords, could someone point
me in the right direction ?


I believe this is the officially preferred solution:

http://developer.apple.com/samplecode/LoginItemsAE/index.html
___

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

This email sent to [EMAIL PROTECTED]


popup button wierdness

2008-09-25 Thread Chris Idou

I've got a NSPopupButton with a menu (A gear action menu), that has 7 items 
in it and working fine.


But now if I click on the button in IB and remove one of the menu items by 
pressing Delete, then I rebuild and run the app, the whole popup button menu is 
frozen and doesn't work. If I undo the deletion and rebuild, it works fine 
again.

What am I doing wrong?




  
___

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

This email sent to [EMAIL PROTECTED]


Use other key than tab to cycle through text fields

2008-09-25 Thread Gerd Knops
I would like to use a key other than tab to advance to the next text  
field, so that users can use a numeric keypad to enter something like  
11-22-33 and have 11, 22 and 33 end up in different text fields.


Is there an elegant way to do that, preferably cocoa binding compatible?

Thanks

Gerd

___

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

This email sent to [EMAIL PROTECTED]


Bindings Question

2008-09-25 Thread Eric Lee
I have an app that I'm making for practice that has a tableview, and a  
text field (and many other things, but the ones that are the problem  
are these two)


I just successfully changed my app to use bindings. However, whenever  
I pressed a button before, something would be added into a  
NSMutableArray, and then the string would show up in the table view.


Now, something IS added into the NSmutableArray, and will show up, but  
not the string. The thing that's added is just this blank.


How do you solves these so that when I press the button, the string in  
the text field will actually be added and shown in the table view?


Thanks!
___

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

This email sent to [EMAIL PROTECTED]


Re: Bindings Question

2008-09-25 Thread Chris Idou

Normally you would have the table controlled by a NSArrayController. You would 
bind the button to an action method which would take the value from the text 
field and pass it to addObject: method of the array controller.


--- On Thu, 9/25/08, Eric Lee [EMAIL PROTECTED] wrote:

 From: Eric Lee [EMAIL PROTECTED]
 Subject: Bindings Question
 To: Cocoa-dev@lists.apple.com
 Date: Thursday, September 25, 2008, 5:34 PM
 I have an app that I'm making for practice that has a
 tableview, and a  
 text field (and many other things, but the ones that are
 the problem  
 are these two)
 
 I just successfully changed my app to use bindings.
 However, whenever  
 I pressed a button before, something would be added into a 
 
 NSMutableArray, and then the string would show up in the
 table view.
 
 Now, something IS added into the NSmutableArray, and will
 show up, but  
 not the string. The thing that's added is just this
 blank.
 
 How do you solves these so that when I press the button,
 the string in  
 the text field will actually be added and shown in the
 table view?
 
 Thanks!
 ___
 
 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:
 http://lists.apple.com/mailman/options/cocoa-dev/idou747%40yahoo.com
 
 This email sent to [EMAIL PROTECTED]


  
___

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

This email sent to [EMAIL PROTECTED]


Re: popup button wierdness

2008-09-25 Thread Graham Cox


On 26 Sep 2008, at 10:08 am, Chris Idou wrote:



I've got a NSPopupButton with a menu (A gear action menu), that  
has 7 items in it and working fine.



But now if I click on the button in IB and remove one of the menu  
items by pressing Delete, then I rebuild and run the app, the whole  
popup button menu is frozen and doesn't work. If I undo the deletion  
and rebuild, it works fine again.


What am I doing wrong?



Nothing - it's a bug in IB.

Select all the items in the menu and then uncheck Hidden.

IB incorrectly keeps setting the Hidden state of menu items at  
various times.


hth,

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

This email sent to [EMAIL PROTECTED]


Collections can be simple Attributes in Core Data

2008-09-25 Thread Jerry Krinock
When I first looked at Core Data, I saw that there was no such  
attribute type as Array or Set, and concluded that collections  
must be modelled as relationships.  This would be overkill in many  
cases, for example, in a Person type of application if you wanted to  
list the names of each Person's pets, but had no interest in the pets  
themselves.


So, one way I worked around this was to store the pet names as an  
attribute petNamesString of type String, using a delimiter character,  
and transforming on the way in and out of the store.  But now I find  
there is an even more natural way, which is to just leave them as a  
set or array, and store in an attribute of type Transformable.  The  
default transformer en/decodes the collection into/from an NSData, and  
everything just works.


I'm surprised that I've never seen this discussed or documented.  Is  
this going to get me into any trouble?


___

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

This email sent to [EMAIL PROTECTED]


Re: Bindings Question

2008-09-25 Thread Eric Lee

Sorry for the late response...computer froze

Anyways, yeah, I have a NSArrayController, and I binded the table view  
to it, which let me actually add something. How do you bind a button  
to an action? Just control-drag?

On Sep 25, 2008, at 7:39 PM, Chris Idou wrote:



Normally you would have the table controlled by a NSArrayController.  
You would bind the button to an action method which would take the  
value from the text field and pass it to addObject: method of the  
array controller.



--- On Thu, 9/25/08, Eric Lee [EMAIL PROTECTED] wrote:


From: Eric Lee [EMAIL PROTECTED]
Subject: Bindings Question
To: Cocoa-dev@lists.apple.com
Date: Thursday, September 25, 2008, 5:34 PM
I have an app that I'm making for practice that has a
tableview, and a
text field (and many other things, but the ones that are
the problem
are these two)

I just successfully changed my app to use bindings.
However, whenever
I pressed a button before, something would be added into a

NSMutableArray, and then the string would show up in the
table view.

Now, something IS added into the NSmutableArray, and will
show up, but
not the string. The thing that's added is just this
blank.

How do you solves these so that when I press the button,
the string in
the text field will actually be added and shown in the
table view?

Thanks!
___

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:
http://lists.apple.com/mailman/options/cocoa-dev/idou747%40yahoo.com

This email sent to [EMAIL PROTECTED]




___

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:
http://lists.apple.com/mailman/options/cocoa-dev/ericlee1994%40gmail.com

This email sent to [EMAIL PROTECTED]


___

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

This email sent to [EMAIL PROTECTED]


Re: Use other key than tab to cycle through text fields

2008-09-25 Thread Graham Cox


On 26 Sep 2008, at 10:24 am, Gerd Knops wrote:

I would like to use a key other than tab to advance to the next  
text field, so that users can use a numeric keypad to enter  
something like 11-22-33 and have 11, 22 and 33 end up in different  
text fields.



I'd suggest not using a different key from 'Tab', since that's very  
much hardwired into every Mac user.


Alternative, why not just detect when the field has the required  
number of characters and move to the next field automatically? For  
numeric entry this is much more user-friendly.


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

This email sent to [EMAIL PROTECTED]


Re: Autostart item in user profile.

2008-09-25 Thread Ken Thomases

On Sep 25, 2008, at 6:58 PM, Gregory Weston wrote:


Sandro Noel wrote:


I would like my application to have the option to auto-start itself
when the user log's in but I cant seem to find information on how  
to do

it in the documentation.
I'm probably not looking for the right keywords, could someone point
me in the right direction ?


I believe this is the officially preferred solution:

http://developer.apple.com/samplecode/LoginItemsAE/index.html


Actually, Leopard introduced the LSSharedFileList API, which is the  
new preferred solution.  Unfortunately, this API is undocumented.  The  
only documentation (other than a brief mention in the release notes)  
is the header file:


/System/Library/Frameworks/CoreServices.framework/Frameworks/ 
LaunchServices.framework/Headers/LSSharedFileList.h


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

This email sent to [EMAIL PROTECTED]


Re: Use other key than tab to cycle through text fields

2008-09-25 Thread Ken Thomases

On Sep 25, 2008, at 9:18 PM, Graham Cox wrote:


On 26 Sep 2008, at 10:24 am, Gerd Knops wrote:

I would like to use a key other than tab to advance to the next  
text field, so that users can use a numeric keypad to enter  
something like 11-22-33 and have 11, 22 and 33 end up in  
different text fields.



I'd suggest not using a different key from 'Tab', since that's very  
much hardwired into every Mac user.


Alternative, why not just detect when the field has the required  
number of characters and move to the next field automatically? For  
numeric entry this is much more user-friendly.


For implementing such a thing, see -[NSWindow selectNextKeyView:].

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

This email sent to [EMAIL PROTECTED]


Re: showing window causes EXC_BAD_ACCESS

2008-09-25 Thread Michael Ash
On Thu, Sep 25, 2008 at 4:25 PM, Kyle Sluder
[EMAIL PROTECTED] wrote:
 On Thu, Sep 25, 2008 at 4:17 PM, Daniel Child [EMAIL PROTECTED] wrote:
 If I press the button in question once, the window dutifully comes up. If I
 close the window and press the button a second time, I get EXC_BAD_ACCESS.
 Debugging, I found that both self and mLTableListingsWindow still exist.

 Sounds like your window is set to release when closed.  Uncheck this
 box in Interface Builder.

Wandering slightly, but this makes me wonder, why does this flag
exist? I can't think of a single reasonable use case for it, and it
seems to cause no end to trouble to people who have somehow enabled it
without knowing it. It violates the memory management rules and makes
programs crash. Is there a good use case for it, or is it just some
sort of leftover?

Mike
___

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

This email sent to [EMAIL PROTECTED]


Re: What happens to the user dictionary when coalescing notifications in NSNotificationQueue?

2008-09-25 Thread Michael Ash
On Thu, Sep 25, 2008 at 4:07 PM, Karan, Cem (Civ, ARL/CISD)
[EMAIL PROTECTED] wrote:
 I've got a class that acts like a super-lightweight server within my program. 
  It listens for incoming packets of information, decodes them, and then tells 
 the rest of my code that something changed.  So far, this sounds like a job 
 for NSNotificationCenter, except that I'm getting the packets by UDP, and 
 don't want to tell all the listeners about every single update that happens; 
 it would be better to coalesce them into one notification and notify them 
 when the run loop is idle.  OK, so this sounds perfect for 
 NSNotificationQueue with 
 (NSNoticationCoalescingOnName|NSNotificationCoalescingOnSender) as the 
 options.  The problem is that I want to send all the data along in the user 
 dictionary.  How is that coalesced?  Note that I want ALL the data I'm 
 putting in the dictionary, not just the last user dict.

I have to wonder, why are you coalescing these things at all? You *do*
want to tell them about every single update that happens, as far as I
can see, since that is essentially what your user info dictionary
contains. You want to tell them about multiple messages using a single
notification, but why? Just send the multiple notifications and be
happy. There's no effective difference between sending one
notification with multiple data items and sending multiple
notifications with one data item each. Coalescing is useful when you
have many notifications which each trigger an identical, idempotent
action such that getting a bunch in a row would be redundant. That's
not the case for what you're doing.

Mike
___

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

This email sent to [EMAIL PROTECTED]


Re: showing window causes EXC_BAD_ACCESS

2008-09-25 Thread Kyle Sluder
On Fri, Sep 26, 2008 at 12:07 AM, Michael Ash [EMAIL PROTECTED] wrote:
 Wandering slightly, but this makes me wonder, why does this flag
 exist? I can't think of a single reasonable use case for it, and it
 seems to cause no end to trouble to people who have somehow enabled it
 without knowing it. It violates the memory management rules and makes
 programs crash. Is there a good use case for it, or is it just some
 sort of leftover?

The bigger problem, I think, is that the flag is enabled by default
when creating windows in Interface Builder.  There are plenty of
advanced options such as the backing store type that aren't configured
improperly by default.

Perhaps it was originally a way of breaking nib-induced retain cycles?

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

This email sent to [EMAIL PROTECTED]