Re: [NSPipe pipe] returning nil (running out of filehandles?)

2008-04-02 Thread Jean-Daniel Dupas
You may have a look to the source as it is part to Darwin (package  
CommonCrypto), but the answer is "not at all".

It look like a really standard implementation.
It has just the advantage to avoid a dependency over a third party  
library if you need only simple digest functions (10.4) or if you need  
simple cipher functions (10.4 + 10.5).



Le 2 avr. 08 à 01:55, John Stiles a écrit :

I haven't experimented with CC_MD5, but we do have code which  
calculates MD5s (calculated via simple C code).
Is CC_MD5 optimized e.g. using SSE or AltiVec? Should I expect to  
see a perf boost if I swapped in this code instead of our regular C  
code?



Jean-Daniel Dupas wrote:


Le 2 avr. 08 à 01:36, stephen joseph butler a écrit :
On Tue, Apr 1, 2008 at 6:20 PM, Martin Redington <[EMAIL PROTECTED] 
>

wrote:


I'm running /sbin/md5 via an NSTask on a number of files (3,000 or
so, with a new NSTask each time).



This would run a lot faster (and avoid fd issues) if you used  
libcrypto. Try

"man EVP_DigestInit" to get an idea of where to start.



And this would not require libcrypto dependency if you use  
CommonDigest that is part of the Mac OS X libSystem. (usr/include/ 
CommonCrypto/CommonDigest.h) and that is not more complexe than EVP:


extern unsigned char *CC_MD5(const void *data, CC_LONG len,  
unsigned char *md);



___

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/jstiles%40blizzard.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: NSView out of memory problem

2008-04-02 Thread Matthew Whillock

Hi Graham,

Yes, you're right. Moments after I sent my email I found the right  
tree to bark up.


Cheers,
Matt

On 2 Apr 2008, at 00:05, Graham Cox wrote:

As I said, it says nothing about how it's implemented. Chances are,  
it will avoid creation of an unnecessary NSBezierPath object, but  
relying on that being the case is folly.



On 2 Apr 2008, at 2:23 am, Matthew Whillock wrote:

The class reference has this to say about it:

Strokes a line between two points using the current stroke color  
and the default drawing attributes.

+ (void)strokeLineFromPoint:(NSPoint)point1 toPoint:(NSPoint)point2


So it will just draw a line.

Cheers,
Matt


Are you sure? This could be just a convenient interface for  
creating a

bezier object with the points passed, stroking it and releasing or
autoreleasing it. The docs say nothing about how it's implemented.




--
Matthew Whillock
[EMAIL PROTECTED]

Mullard Space Science Laboratory
Holmbury St Mary
Surrey RH5 6NT
UK




___

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]


Modifying the clip view before scrolling.

2008-04-02 Thread Peter Zegelin
I have a custom view inside a scrollview and need to modify the clip  
view before a user begins to scroll as I have some custom rulers built  
into my view. Is there any way of being notified when a user is about  
to scroll? I tried overriding the mousedown of the scrollview but was  
only able to trap a mousedown in the bottom right corner, not in the  
scrollbars themselves.


thanks!

Peter
___

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: [NSPipe pipe] returning nil (running out of filehandles?)

2008-04-02 Thread Jean-Daniel Dupas


Le 2 avr. 08 à 09:43, Jean-Daniel Dupas a écrit :

You may have a look to the source as it is part to Darwin (package  
CommonCrypto), but the answer is "not at all".

It look like a really standard implementation.
It has just the advantage to avoid a dependency over a third party  
library if you need only simple digest functions (10.4) or if you  
need simple cipher functions (10.4 + 10.5).


Sorry I mean digest on 10.4 and later and cipher for 10.5 only.

___

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]


Untitled NSPersistentDocument has no persistent store

2008-04-02 Thread Quincey Morris
It appears that a new (unsaved) NSPersistentDocument has no persistent  
store associated with it.


AFAICT, this makes it impossible to fault out any objects until the  
document is saved (there's nowhere to fault them back in from later).  
This effectively means it's impossible to put a lot of data into the  
document until after it's saved once -- until it's saved, all data has  
to be held in memory by the managed object context, and there just  
isn't enough memory.


Am I missing something here?. There seems to be nothing in the Core  
Data documentation that discusses memory management in an unsaved  
document. Forcing the user to save a document *before* putting things  
in it turns a very well established UI behavior on its head


(What I'm actually trying to do is import a lot of data from an  
external source into a new Core Data document. The smallest import is  
a couple of hundred MB. Larger imports could be several GB. Trying to  
use virtual memory to "cache" that much data will quickly bring a  
machine to its knees.)



___

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: Untitled NSPersistentDocument has no persistent store

2008-04-02 Thread Ian Jackson

Have you done the tutorial?

http://developer.apple.com/documentation/Cocoa/Conceptual/NSPersistentDocumentTutorial/NSPersistentDocumentTutorial.pdf

You can add in the data as you like, and save when you've finished.

Ian.

On 2/04/2008, at 9:42 PM, Quincey Morris wrote:

It appears that a new (unsaved) NSPersistentDocument has no  
persistent store associated with it.


AFAICT, this makes it impossible to fault out any objects until the  
document is saved (there's nowhere to fault them back in from  
later). This effectively means it's impossible to put a lot of data  
into the document until after it's saved once -- until it's saved,  
all data has to be held in memory by the managed object context, and  
there just isn't enough memory.


Am I missing something here?. There seems to be nothing in the Core  
Data documentation that discusses memory management in an unsaved  
document. Forcing the user to save a document *before* putting  
things in it turns a very well established UI behavior on its head


(What I'm actually trying to do is import a lot of data from an  
external source into a new Core Data document. The smallest import  
is a couple of hundred MB. Larger imports could be several GB.  
Trying to use virtual memory to "cache" that much data will quickly  
bring a machine to its knees.)



___

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/bianface%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: Untitled NSPersistentDocument has no persistent store

2008-04-02 Thread Quincey Morris


On Apr 2, 2008, at 01:52, Ian Jackson wrote:


Have you done the tutorial?

http://developer.apple.com/documentation/Cocoa/Conceptual/NSPersistentDocumentTutorial/NSPersistentDocumentTutorial.pdf

You can add in the data as you like, and save when you've finished.


Yes, but the amount of data involved in the tutorial is tiny. There's  
no problem leaving it in memory until the document is saved.


What I'm doing is loading hundreds of megabytes (or more) sequentially  
into the new document. The earlier data needs to be saved persistently  
so that it can be faulted out to make room for later data.


This issue is complicated by the fact that "save" means somewhat  
different things in [NSManagedContext save] and [NSDocument save].



___

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]


to-Some Relationship (Core Data/IB questions)

2008-04-02 Thread Ian Jackson
Following on from a previous question (Core Data/IB questions), I am  
seeking advice again on how I should accomplish the following:


I need to select an arbitrary number (i.e. not necessarily 1 or all)  
of objects from a set of all objects belonging to another entity. I  
assumed this was a job for a to-many relationship, but I can't see how  
to use a to-many relationship, without having all the objects in the  
related entity included.


So will I need to write my own code to select objects via a to-one  
relationship, and add them to an array one by one? I guess the array  
would have to become a kind of property of the entity which is  
choosing from the relationship.


The point of this is to have a store of objects in the second entity,  
which can be picked from by objects of the second entity as needed.


I'd appreciate any advice, thank you.

Ian.


___

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: Modifying the clip view before scrolling.

2008-04-02 Thread Cathy Shive

Hi Peter,

NSScroller has the following methods that might help:

- (void)trackKnob:(NSEvent *)theEvent



- (void)trackScrollButtons:(NSEvent *)theEvent




I've never subclassed NSScroller, so can't comment on the havoc that  
may ensue if you go down this path.



NSClipView also receives a notification when the document view  
changes its frame during a scroll:


-(void)viewFrameChanged:(NSNotification *)notification;

This is the method I use to do things *during* a scroll.

Best,
Cathy

On Apr 2, 2008, at 10:25 AM, Peter Zegelin wrote:

I have a custom view inside a scrollview and need to modify the  
clip view before a user begins to scroll as I have some custom  
rulers built into my view. Is there any way of being notified when  
a user is about to scroll? I tried overriding the mousedown of the  
scrollview but was only able to trap a mousedown in the bottom  
right corner, not in the scrollbars themselves.


thanks!

Peter
___

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/catshive%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: NSView out of memory problem

2008-04-02 Thread Andre Schnoor


Am 02.04.2008 um 01:05 schrieb Graham Cox:
As I said, it says nothing about how it's implemented. Chances are,  
it will avoid creation of an unnecessary NSBezierPath object, but  
relying on that being the case is folly.



On 2 Apr 2008, at 2:23 am, Matthew Whillock wrote:

The class reference has this to say about it:

Strokes a line between two points using the current stroke color  
and the default drawing attributes.

+ (void)strokeLineFromPoint:(NSPoint)point1 toPoint:(NSPoint)point2


So it will just draw a line.

Cheers,
Matt


Are you sure? This could be just a convenient interface for  
creating a

bezier object with the points passed, stroking it and releasing or
autoreleasing it. The docs say nothing about how it's implemented.





I've done a FPS benchmark recently and can confirm it is significantly  
faster. This indicates it is implemented in a more efficient way.


Andre

___

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: Modifying the clip view before scrolling.

2008-04-02 Thread Quincey Morris


On Apr 2, 2008, at 01:25, Peter Zegelin wrote:

I have a custom view inside a scrollview and need to modify the clip  
view before a user begins to scroll as I have some custom rulers  
built into my view. Is there any way of being notified when a user  
is about to scroll? I tried overriding the mousedown of the  
scrollview but was only able to trap a mousedown in the bottom right  
corner, not in the scrollbars themselves.


It depends what you're trying to achieve. If the scrolling is messing  
up something you've drawn within the area visible through the clip  
view, you can tell the clip view to post bounds change notifications,  
then register to receive them and redraw your content on every  
notification (i.e. as the scrolling happens). You may need to turn off  
the automatic pixel copying to prevent the content from seeming to  
jump around.


If you really need to do something before the scrolling starts, you  
might reconsider your approach. It might be easier to subclass  
NSScrollView to lay out your custom ruler views outside the clip view  
by overriding the 'tile' method.


___

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: Untitled NSPersistentDocument has no persistent store

2008-04-02 Thread Ian Jackson

Ah OK, I see. But I can't help.

However the business of saving before you start happens with  
Garageband and iMovie. So on the plus side, it's not unheard of. On  
the downside, I agree it's a bit odd.


Ian.


On 2/04/2008, at 10:26 PM, Quincey Morris wrote:



On Apr 2, 2008, at 01:52, Ian Jackson wrote:


Have you done the tutorial?

http://developer.apple.com/documentation/Cocoa/Conceptual/NSPersistentDocumentTutorial/NSPersistentDocumentTutorial.pdf

You can add in the data as you like, and save when you've finished.


Yes, but the amount of data involved in the tutorial is tiny.  
There's no problem leaving it in memory until the document is saved.


What I'm doing is loading hundreds of megabytes (or more)  
sequentially into the new document. The earlier data needs to be  
saved persistently so that it can be faulted out to make room for  
later data.


This issue is complicated by the fact that "save" means somewhat  
different things in [NSManagedContext save] and [NSDocument save].



___

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/bianface%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: activate my application while dragging on other application window

2008-04-02 Thread Apparao Mulpuri
Seems this is not implementable because both application workspaces
are different.

Is there any undocumented apis available to achieve this?

Thanks & Regards,
- Apparao.

On Wed, Apr 2, 2008 at 9:58 AM, Apparao Mulpuri
<[EMAIL PROTECTED]> wrote:
> I want to activate my application while dragging on other application window?.
>
>  Is it implementable in Cocoa?
>
>  - Apparao.
>
___

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 for NSComboBox?

2008-04-02 Thread Ian Jackson
Does this mean that you want to create a new object and add it to the  
array, by typing a new string into the combo box (and pressing enter)?  
My feeling is you'd need to write a bit of code yourself for that.


Ian.

On 1/04/2008, at 9:44 AM, David Springer wrote:


All,

I'm having trouble setting up the bindings for my NSComboBox.  I bind
the NSComboBox's content to NSArrayController's arrangedObjects.  This
works fine.

Now, I want to add to the content array when you enter a new string
into the combo box.  Say, for example, I start with an array of @"file
1", @"file 2", @"file 3".  Then, in the combo box, I enter "file foo".
I want to add this string to the content array, but I am at a loss as
to how to set up the bindings to do this.  Do I bind NSComboBox's
value to something?  My experiments in doing this so far are failing.

Help?
- Dave.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/bianface%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]


Problem with Grouping the rotated object.

2008-04-02 Thread Ghufran Ahamad
Hi All,

 

We are developing a kind of drawing application in Objective C using Cocoa
framework. We have several separate graphical objects, each having their own
position and rotation angle, are then grouped. As soon as we group the
objects the rotated object has got shift with their angle. This happen only
with rotated object. Below is the code snippet that we are using.

 

NSRect stRect = NSZeroRect;

NSArray *objTlGraphic = [[self document] graphics];

unsigned iIndex, nCount =[objTlGraphic count];

if(in_Group != 0)

{

   for(iIndex = 0; iIndex < nCount; iIndex ++)

   {

 if([[objTlGraphic objectAtIndex:i] GroupNO] == in_Group)

   {

 stRect =NSUnionRect(stRect,[[objTlGraphic objectAtIndex:
iIndex] bounds]);

   }   

   }

 }   

 

NSAffineTransform* xform = [NSAffineTransform transform];

[currentContext saveGraphicsState];

[NSBezierPath clipRect:drawingBounds];

NSPoint center = NSMakePoint(NSMidX(stRect), NSMidY(stRect));

[xform translateXBy:center.x yBy:center.y];

[xform rotateByDegrees:[curGraphic GetAngle]];

[xform translateXBy:-center.x yBy:-center.y];

[xform concat];

 

Any one tells me what I'm missing here.

 

Thanks,

Ghufran Ahmad

+91 - 9953130470

Skype ID: ghufran_khan81

AOL ID: gahmad81

 

___

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: Need for a creator code?

2008-04-02 Thread Keith Duncan
Oh. Looks like I'm off the hook. The UTI, I expect, is the bundle  
identifier, no?


I don't think anyone actually answered this question for you.  
Basically no, your bundle identifier is a URI.

___

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 store NSRect as Core Data attribute?

2008-04-02 Thread Daniel Thorpe

Hello everyone,

I'm trying to get to grips with non-standard persistent attributes in  
Core Data. I've read through the docs I can find (http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdNSAttributes.html 
)  but I'm still having some issues storing an NSRect in an entity.  
I've set the type to be transformable, and left the value transformer  
field empty using the model editor.


To actually set and get the NSRect values, I've been using NSValue's  
valueWithRect: and rectValue methods. However, when CD trys to saving  
the entities to the store, I get this error:


*** -[NSKeyedArchiver encodeValueOfObjCType:at:]: this archiver cannot  
encode structs


I've also changed the property defined in the header file for the  
entity to:

@property(retain) NSValue *extent;

from
@property(retain) id extent;

What am I doing wrong here? The docs seem to suggest for KVO/KVC  
compliant structs, NSRect, NSPoint, NSSize and NSRange, you don't need  
to overwrite the getters and setters?


Any help is much appreciated!

Cheers
Dan


___

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: Need for a creator code?

2008-04-02 Thread Jean-Daniel Dupas


Le 2 avr. 08 à 12:52, Keith Duncan a écrit :

Oh. Looks like I'm off the hook. The UTI, I expect, is the bundle  
identifier, no?


I don't think anyone actually answered this question for you.  
Basically no, your bundle identifier is a URI.




And to complete the answer, UTI are here to «replace» Type code, not  
Creator code.


The type code, is a field of the UTI declaration, that contains all  
you need to know about a file type.
(http://developer.apple.com/documentation/Carbon/Conceptual/understanding_utis/understand_utis_intro/chapter_1_section_1.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]


prefPane with background process

2008-04-02 Thread Yogesh Potdar
Hi,

I want to create a service which can be launched from the system
preferences, do some config setting and continue working even if the system
preferences application is closed. 
To achieve this, I have created a myapp.prefPane which is of type BUNDLE and
installed this in the ~/Library/PreferencePanes. This works fine but the
problem is, it does not indicate any extra process for my .prefPane. When my
prefPane is launched, only "system preferences" process is indicated. When
system preferences is closed it also closes my service which was not
expected. 
How to make the service offered by myapp.prefPane continue even after
quitting system preferences? Is there any way by which I can run service
offered by myapp.prefPane in background?

Thanks and regards,
Yogesh

___

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 store NSRect as Core Data attribute?

2008-04-02 Thread Felix Franz

On 02.04.2008, at 13:28, Daniel Thorpe wrote:


Hello everyone,

I'm trying to get to grips with non-standard persistent attributes  
in Core Data. I've read through the docs I can find (http://developer.apple.com/documentation/Cocoa/Conceptual/CoreData/Articles/cdNSAttributes.html 
)  but I'm still having some issues storing an NSRect in an entity.  
I've set the type to be transformable, and left the value  
transformer field empty using the model editor.


If you leave the transformer field empty it uses  
NSKeyedUnarchiveFromDataTransformerName as
default. But unfortunately NSKeyedArchiver can not encode/decode  
NSValues containing
a struct. You could use NSUnarchiveFromDataTransformerName as a  
workaround. (NSArchiver/NSUnarchiver)

is able to encode/decode a NSValue containing a NSRect).

Or implement the approach described in the section "Scalar Values" in  
the documentation you

mentioned (it contains an example using a NSRect).

Cheers,

felix


___

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]


Subviews of a borderless window - autoresizing mask does not work for me

2008-04-02 Thread Hendrik Holtmann

Hi,

I am creating a borderless window in source like this:

containerWindow = [[[ContainerWindow alloc]  
initWithContentRect:NSMakeRect 
(rect.origin.x,rect.origin.y-22-34,387,34)  
styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered  
defer:NO] retain];


Then I add a custom view (created in interface builder) as a subview  
using the following code:


NSRect frame = [mySearchView bounds];
[mySearchView  
setFrame:NSMakeRect(0.0,0,frame.size.width,frame.size.height)];
[[containerWindow contentView] addSubview:mySearchView positioned:1  
relativeTo:nil];

[mySearchView setNeedsDisplay:YES];

That works fine. I want the customs subview position to be fixed now,  
so when resizing occurs it does not change its position and stays  
fixed to the upper left corner of the window.

Therefore I used
[[containerWindow contentView] setAutoresizesSubviews:YES];
[mySearchView setAutoresizingMask:NSViewMinYMargin];

According to the documentation this should be the right way to do it  
(hopefully). Then I change the height of containerWindow in source  
using:

NSRect frame = [containerWindow frame];
frame.size.height += 200;
frame.origin.y -= 200;
[containerWindow setFrame: frame display: YES animate: NO];
What happens now is that mySearchView moves to the buttom of the  
window. What I would like to achieve is that its fixed to the top of  
the window (left corner). Obviously the autoresizing mask does not  
work here?

Did I miss something? any help would be appreciated!

Best,

Hendrik
___

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: Problem with Grouping the rotated object.

2008-04-02 Thread Jens Alfke
That's not enough code to go on — it's not showing all the drawing.  
Are you remembering to restore the saved graphics state after you  
finish drawing an object?


Also, if you could paste in the code without the extra blank lines, it  
would make it more readable.


—Jens

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]

Re: Accessing a windows share

2008-04-02 Thread Jens Alfke


On 1 Apr '08, at 10:59 PM, Valentin Dan wrote:

How can I access (from Cocoa, Objective-C code) a path like : \ 
\192.1.1.1\c$\SomeDir\AnotherOne\SomePicture.jpg  ?


Well, you know the IP address of the server, and the path in its  
filesystem. That's a start. The key question is: what protocol? Again,  
I think the answer is "SMB". So I think what you need to do is find  
out how to mount an SMB volume programmatically. Once you've done that  
you can translate the path to Unix syntax, prepend the system path to  
the mount point of the volume, and now you have a filesystem path to  
the resource that you can access with something like +[NSData  
dataWithContentsOfFile:].


There aren't any Cocoa APIs for mounting filesystems, so you're going  
to have to investigate lower-level APIs, either CoreServices or BSD/ 
POSIX. (And this isn't the appropriate mailing list for that.) Look  
through the online reference documents in Xcode, or if that fails,  
look at the list of other mailing lists on http://lists.apple.com to  
find a place to ask.


—Jens

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]

Re: NSWindow z-depth

2008-04-02 Thread Jens Alfke


On 1 Apr '08, at 11:16 PM, Mike R. Manzano wrote:
Is there a way to get a window's z-depth in relation to my app's  
other windows?


NSWindowList
Gets information about onscreen windows.

void NSWindowList (
   NSInteger size,
   NSInteger list[]
);

Discussion
Provides an ordered list of all onscreen windows. It fills list with  
up to size window numbers; the order of windows in the array is the  
same as their order in the window server’s screen list (their front-to- 
back order on the screen). Use the count obtained by NSCountWindows to  
specify the size of the array for NSWindowList.


Availability
• Available in Mac OS X v10.0 and later.
Declared InNSGraphics.h



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]

Re: activate my application while dragging on other application window

2008-04-02 Thread Jens Alfke


On 2 Apr '08, at 3:02 AM, Apparao Mulpuri wrote:


Is there any undocumented apis available to achieve this?


If there were, we wouldn't be allowed to talk about them on this list.

Maybe you can describe in more detail what you want to do, and we can  
offer some advice. But keep in mind that there are good reasons for  
the OS keeping applications from groping each others' state (security,  
mostly, and system stability.)


—Jens

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]

Re: prefPane with background process

2008-04-02 Thread Jens Alfke


On 2 Apr '08, at 5:20 AM, Yogesh Potdar wrote:


How to make the service offered by myapp.prefPane continue even after
quitting system preferences? Is there any way by which I can run  
service

offered by myapp.prefPane in background?


You'll need to create a separate executable that runs as an "agent" (a  
per-user background process, as opposed to a daemon, which is system- 
wide.) You can package this inside your pref-pane's bundle, so the  
user doesn't have to separately install any other pieces.


You probably want the agent to start running when the user logs in, so  
s/he doesn't have to keep launching System Preferences to start the  
service every time. The usual way to set this up is to register the  
agent with launchd by putting a property-list file into ~/Library/ 
LaunchAgents.


There's a lengthy Apple tech-note on daemons and agents that describes  
this.

Also check the man page for "launchd.plist" and "launchctl".

—Jens

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]

Re: Need for a creator code?

2008-04-02 Thread Uli Kusterer

On 01.04.2008, at 21:59, Marc Respass wrote:
I haven't registered for a creator code since System 7.5. Apple has  
information and registration page (http://developer.apple.com/datatype/index.html 
) about it but no indication if it's actually still required. Can  
anyone tell me if it is still required or maybe point me at the  
right information?



 Creator codes are still used in many places in practice. So, while  
you needn't provide a creator code for your app these days, and for  
most uses you don't need a signature either, when you *do* use it,  
please make sure you register. Otherwise, you're likely to choose a  
code that collides with another app's code, and then you break either  
your app or that other party's, which is not a nice thing to do.


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

This email sent to [EMAIL PROTECTED]


Re: Bindings for NSComboBox? [SOLVED]

2008-04-02 Thread David Springer
All,

I figured it out: you need to have a separate controller (or provider
object) that handles the binding to the NSComboBox's value.  In my
case, I bind NSComboBox's value to my object's currentTemplatePath
key, then implement the code to add to my source array in
-setCurrentTemplatePath:(NSString *)newPath.  The -(NSString
*)currentTemplatePath method just returns the NSComboBox's current
selection (for all intents and purposes, it's a noop).  Works great.

Thanks!

On Wed, Apr 2, 2008 at 4:33 AM, Ian Jackson <[EMAIL PROTECTED]> wrote:
> Does this mean that you want to create a new object and add it to the array,
> by typing a new string into the combo box (and pressing enter)? My feeling
> is you'd need to write a bit of code yourself for that.
>
>  Ian.
>
>
>
>  On 1/04/2008, at 9:44 AM, David Springer wrote:
>
>
> >
> >
> >
> > All,
> >
> > I'm having trouble setting up the bindings for my NSComboBox.  I bind
> > the NSComboBox's content to NSArrayController's arrangedObjects.  This
> > works fine.
> >
> > Now, I want to add to the content array when you enter a new string
> > into the combo box.  Say, for example, I start with an array of @"file
> > 1", @"file 2", @"file 3".  Then, in the combo box, I enter "file foo".
> > I want to add this string to the content array, but I am at a loss as
> > to how to set up the bindings to do this.  Do I bind NSComboBox's
> > value to something?  My experiments in doing this so far are failing.
> >
> > Help?
> > - Dave.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/bianface%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: Subviews of a borderless window - autoresizing mask does not work for me

2008-04-02 Thread Nate Weaver
You probably want to use NSViewMaxYMargin instead of NSViewMinYMargin  
(NSViewMinYMargin is the bottom margin of the content view and not the  
top).


On Apr 2, 2008, at 9:35 AM, Hendrik Holtmann wrote:

Hi,

I am creating a borderless window in source like this:

containerWindow = [[[ContainerWindow alloc]  
initWithContentRect:NSMakeRect 
(rect.origin.x,rect.origin.y-22-34,387,34)  
styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered  
defer:NO] retain];


Then I add a custom view (created in interface builder) as a subview  
using the following code:


NSRect frame = [mySearchView bounds];
[mySearchView  
setFrame:NSMakeRect(0.0,0,frame.size.width,frame.size.height)];
[[containerWindow contentView] addSubview:mySearchView positioned:1  
relativeTo:nil];

[mySearchView setNeedsDisplay:YES];

That works fine. I want the customs subview position to be fixed  
now, so when resizing occurs it does not change its position and  
stays fixed to the upper left corner of the window.

Therefore I used
[[containerWindow contentView] setAutoresizesSubviews:YES];
[mySearchView setAutoresizingMask:NSViewMinYMargin];

According to the documentation this should be the right way to do it  
(hopefully). Then I change the height of containerWindow in source  
using:

NSRect frame = [containerWindow frame];
frame.size.height += 200;
frame.origin.y -= 200;
[containerWindow setFrame: frame display: YES animate: NO];
What happens now is that mySearchView moves to the buttom of the  
window. What I would like to achieve is that its fixed to the top of  
the window (left corner). Obviously the autoresizing mask does not  
work here?

Did I miss something? any help would be appreciated!

Best,

Hendrik


___

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: prefPane with background process

2008-04-02 Thread Trygve Inda
> Hi,
> 
> I want to create a service which can be launched from the system
> preferences, do some config setting and continue working even if the system
> preferences application is closed.
> To achieve this, I have created a myapp.prefPane which is of type BUNDLE and
> installed this in the ~/Library/PreferencePanes. This works fine but the
> problem is, it does not indicate any extra process for my .prefPane. When my
> prefPane is launched, only "system preferences" process is indicated. When
> system preferences is closed it also closes my service which was not
> expected. 
> How to make the service offered by myapp.prefPane continue even after
> quitting system preferences? Is there any way by which I can run service
> offered by myapp.prefPane in background?

You need to create two apps. The prefpane will handle the GUI and user
settings, the background app will read the settings created by the prefPnae
and do the real work. You will need to setup some sort of IAC system for
them to talk to each other.

Place the worker.app inside the resources folder of your prefpane and have
the prefpane launch it (or set it up as a login item).

To make sure the worker app does not show up in the dock add this to its
info.plist:

 NSUIElement
 1

Cheers,

Trygve


___

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: Problem with Grouping the rotated object.

2008-04-02 Thread Quincey Morris


On Apr 2, 2008, at 04:00, Ghufran Ahamad wrote:


NSAffineTransform* xform = [NSAffineTransform transform];

[currentContext saveGraphicsState];

[NSBezierPath clipRect:drawingBounds];

NSPoint center = NSMakePoint(NSMidX(stRect), NSMidY(stRect));

[xform translateXBy:center.x yBy:center.y];

[xform rotateByDegrees:[curGraphic GetAngle]];

[xform translateXBy:-center.x yBy:-center.y];

[xform concat];


This looks kind of wrong. Mathematically, wouldn't you want:

[xform translateXBy:-center.x yBy:-center.y];
[xform rotateByDegrees:[curGraphic GetAngle]];
[xform translateXBy:center.x yBy:center.y];

?


___

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: Subviews of a borderless window - autoresizing mask does not work for me

2008-04-02 Thread Cathy Shive

Hi Hendrik,

It seems that you're using the correct mask.  The documentation  
states that NSViewMinYMargin would make the bottom margin flexible,  
which is what you want.


I notice that you originally set the frame for the subview at (0,  
0).  Is this because the subview is originally the same size as the  
window's content view?  If not, you should calculate the proper  
origin so that the subview is positioned exactly where you want in to  
be in the window's content view before you set the autoresizing  
mask.  Also, make sure that your top margin isn't something strange.   
If, for example, the top of the subview is beyond the top of the  
window's content view when the mask is set, there will probably be  
strange behavior with autoresizing.  Double check your original  
layout code so that the subview is without a doubt completely within  
the frame of the superview.


Another long shot.  Try using the plain -(void)addSubview method  
instead of the one you're using.  I'm not sure why this would effect  
autoresizing except that it seems that it might be effecting the view  
hierarchy in some way so maybe the superview isn't autoresizing that  
view for some weird reason.  Like I said, real long shot


Good luck,
Cathy

On Apr 2, 2008, at 4:35 PM, Hendrik Holtmann wrote:


Hi,

I am creating a borderless window in source like this:

containerWindow = [[[ContainerWindow alloc]  
initWithContentRect:NSMakeRect 
(rect.origin.x,rect.origin.y-22-34,387,34)  
styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered  
defer:NO] retain];


Then I add a custom view (created in interface builder) as a  
subview using the following code:


NSRect frame = [mySearchView bounds];
[mySearchView setFrame:NSMakeRect 
(0.0,0,frame.size.width,frame.size.height)];
[[containerWindow contentView] addSubview:mySearchView positioned:1  
relativeTo:nil];

[mySearchView setNeedsDisplay:YES];

That works fine. I want the customs subview position to be fixed  
now, so when resizing occurs it does not change its position and  
stays fixed to the upper left corner of the window.

Therefore I used
[[containerWindow contentView] setAutoresizesSubviews:YES];
[mySearchView setAutoresizingMask:NSViewMinYMargin];

According to the documentation this should be the right way to do  
it (hopefully). Then I change the height of containerWindow in  
source using:

NSRect frame = [containerWindow frame];
frame.size.height += 200;
frame.origin.y -= 200;
[containerWindow setFrame: frame display: YES animate: NO];
What happens now is that mySearchView moves to the buttom of the  
window. What I would like to achieve is that its fixed to the top  
of the window (left corner). Obviously the autoresizing mask does  
not work here?

Did I miss something? any help would be appreciated!

Best,

Hendrik
___

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/catshive%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: How to store NSRect as Core Data attribute?

2008-04-02 Thread Ben Lachman
I think the easiest way to encode/decode NSRects for storage is  
NSStringFromRect() and NSRectFromString().  Then you can just  
implement a custom accessor for the property that converts in the  
direction you need.


->Ben
--
Ben Lachman
Acacia Tree Software

http://acaciatreesoftware.com

[EMAIL PROTECTED]
740.590.0009



On Apr 2, 2008, at 7:28 AM, Daniel Thorpe wrote:

Hello everyone,

I'm trying to get to grips with non-standard persistent attributes  
in Core Data. I've read through the docs I can find (http:// 
developer.apple.com/documentation/Cocoa/Conceptual/CoreData/ 
Articles/cdNSAttributes.html)  but I'm still having some issues  
storing an NSRect in an entity. I've set the type to be  
transformable, and left the value transformer field empty using the  
model editor.


To actually set and get the NSRect values, I've been using  
NSValue's valueWithRect: and rectValue methods. However, when CD  
trys to saving the entities to the store, I get this error:


*** -[NSKeyedArchiver encodeValueOfObjCType:at:]: this archiver  
cannot encode structs


I've also changed the property defined in the header file for the  
entity to:

@property(retain) NSValue *extent;

from
@property(retain) id extent;

What am I doing wrong here? The docs seem to suggest for KVO/KVC  
compliant structs, NSRect, NSPoint, NSSize and NSRange, you don't  
need to overwrite the getters and setters?


Any help is much appreciated!

Cheers
Dan


___

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/blachman%40mac.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: [NSPipe pipe] returning nil (running out of filehandles?)

2008-04-02 Thread John Stiles

Jens Alfke wrote:



Also, you're aware that MD5 shouldn't be used for anything 
security-related anymore? Last I heard it's pretty close to being 
fully broken. SHA-1 is a lot more secure, and has a larger output 
which itself makes collisions less likely.


"Fully broken"? I don't know about that. Simpler variants—I think it was 
MD4?—have some kind of non-threatening attacks, e.g. the keyspace for 
finding a packet with the same signature is several powers of 2 less 
than the full keyspace. But the matching packet will basically be 
identical except a handful of bits are flipped. And AFAIK nobody is even 
remotely close to finding a technique which would let you write 
arbitrary data and then tack on a few bytes to get the signature you 
want, and that's what I'd call "fully broken," at least that's what 
you'd need to find in order to make an exploit. Nobody has done any of 
this for real MD5 yet as far as I know. (In fact, I am not sure that 
anyone has found any two packets that generate an identical MD5 signature!)


If you are not CPU bound, SHA-1 is probably better anyway, but don't 
feel obligated to use it if it turns out to be a performance concern. I 
think it's going to be quite some years before we see a viable approach 
for hacking MD5 in such a way that it would create an actual security 
concern.


___

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: [NSPipe pipe] returning nil (running out of filehandles?)

2008-04-02 Thread John Stiles

John Stiles wrote:

Jens Alfke wrote:



Also, you're aware that MD5 shouldn't be used for anything 
security-related anymore? Last I heard it's pretty close to being 
fully broken. SHA-1 is a lot more secure, and has a larger output 
which itself makes collisions less likely.


"Fully broken"? I don't know about that. Simpler variants—I think it 
was MD4?—have some kind of non-threatening attacks, e.g. the keyspace 
for finding a packet with the same signature is several powers of 2 
less than the full keyspace. But the matching packet will basically be 
identical except a handful of bits are flipped. And AFAIK nobody is 
even remotely close to finding a technique which would let you write 
arbitrary data and then tack on a few bytes to get the signature you 
want, and that's what I'd call "fully broken," at least that's what 
you'd need to find in order to make an exploit. Nobody has done any of 
this for real MD5 yet as far as I know. (In fact, I am not sure that 
anyone has found any two packets that generate an identical MD5 
signature!)


If you are not CPU bound, SHA-1 is probably better anyway, but don't 
feel obligated to use it if it turns out to be a performance concern. 
I think it's going to be quite some years before we see a viable 
approach for hacking MD5 in such a way that it would create an actual 
security concern.
I take it all back; in 2007 there was an MD5 attack discovered which 
actually allows for completely different binaries that sign the same. 
Check Wikipedia for the details, but basically MD5 is totally broken 
now. Wow, times change!!


SHA-1 it is, if security is a concern.

___

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: [NSPipe pipe] returning nil (running out of filehandles?)

2008-04-02 Thread Michael Ash
On Wed, Apr 2, 2008 at 12:19 PM, John Stiles <[EMAIL PROTECTED]> wrote:
>  I take it all back; in 2007 there was an MD5 attack discovered which
> actually allows for completely different binaries that sign the same. Check
> Wikipedia for the details, but basically MD5 is totally broken now. Wow,
> times change!!
>
>  SHA-1 it is, if security is a concern.

While SHA-1 has not yet been broken, there are worrying signs. Related
and weakened versions have been broken, SHA-1 itself has been "broken"
by algorithms which are still impractically expensive but much cheaper
than brute force, and it's generally accepted that the full SHA-1 is
just a matter of time. It's premature to start ripping SHA-1 out of
existing code, but if you are writing new code for which security is a
concern, it's best to start using one of the SHA-2 family of hashes.

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]


IPhone Mac developer

2008-04-02 Thread Armand Daniels
Mac Application Developer

Small startup is looking for an exceptional engineer to work on
state-of-the art communication technology for Mac OS X for iPhone.

 Working on a suite of elegant, powerful applications, you will have
the opportunity to have a major impact on the design and
implementation of Apple's embedded device experience.

Responsibilities
- Work with a highly skilled team in the design and development of
native mobile applications
- Drive product features and functional/industry specifications
- Utilize existing connection technologies on iPhone, Mac OS X and
Windows

 Requirements
- BS or MS in Computer Science or equivalent.

- Leadership qualities- team lead.
- 2 to 5 years Mac product development experience.
- Extensive experience programming in C/C++/Objective C
- In-depth knowledge of Carbon and Cocoa preferred.
- Previous experience shipping Macintosh products is required.
- Knowledge of scripting languages such as Perl, Python, or Ruby on Rails
desired
- A passion for making great Mac software and apps a must.


Location: Los Angeles

Flexible schedule

Full-time permanent position

Employee benefits package and stock options

Relocation Allowance

Please forward resume or requests for additional information 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: Subviews of a borderless window - autoresizing mask does not work for me

2008-04-02 Thread Nate Weaver
Whoops, this jogged my memory. For some reason in my last response I  
thought -setAutoresizingMask specified the pinned margin and not the  
expanding margin. I'm not sure why...


On Apr 2, 2008, at 11:13 AM, Cathy Shive wrote:

Hi Hendrik,

It seems that you're using the correct mask.  The documentation  
states that NSViewMinYMargin would make the bottom margin flexible,  
which is what you want.



___

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]


Alert merely beeping, not displaying

2008-04-02 Thread Randall Meadows
- (BOOL)burnProgressPanel:(DRBurnProgressPanel *)theBurnPanel  
burnDidFinish:(DRBurn *)burn

{
   [theBurnPanel orderOut:self];

   NSAlert *reminder = [NSAlert alertWithMessageText:msg
defaultButton:@"OK"
alternateButton:nil
otherButton:nil
informativeTextWithFormat:info];

   [reminder beginSheetModalForWindow:myWindow
modalDelegate:self
 
didEndSelector:@selector(burnReminderDidEnd:returnCode:contextInfo:)

contextInfo:NULL];

   return YES;
}

All I get out of that beginSheet... method is a beep; the alert does  
not display, I get no messages anywhere (that I can find) that might  
indicate what's wrong.  The orderOut: message to theBurnPanel works,  
so it's not like I'm trying to put one sheet on top of another.


"msg", "info", and "myWindow" all appear to be valid objects.

Any ideas on how to figure out the problem here?


Thanks!
randy
___

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: Need for a creator code?

2008-04-02 Thread Ali Ozer
Totally agreed that seeing extensions on file names is unfortunate.
But as long as applications are properly setting/using the hidden  
extension bit (and many do), most of the time users should not see  
extensions on any of their files, except the ones where they want to  
(for instance, developers usually like to see extensions on their  
source files).


As someone else also pointed out, file extensions replace and augment  
type codes, not creator codes. Creator codes are often used to cause  
documents to open in a particular app.  But having an app explicitly  
and automatically mark documents it saves as opening in itself can get  
frustrating for the user. Clearly for documents specific to a single  
app, there is no issue; the document will automatically open in that  
app thanks to its type (declared via file extension and/or type  
code).  For documents that are recognized by multiple apps, the user  
has the power to bind a particular document to any app they wish,  
using the file inspector in Finder.  So at least for this purpose the  
creator code is not needed.


Ali





On Apr 1, 2008, at 7:00 PM, Dave Sopchak wrote:


Ah, a subject near and dear to my heart.

I agree with Rainer, UTIs can be deduced from file types, extensions  
and file creators, but I would sure like it if one could set a UTI  
for a document and have this take care of things, not the other way  
around.


Also, it certainly seems that UTIs do not do anything to function as  
creator codes. Maybe we need a Universal Creator Identifier as well ;)


I love Cocoa, but I absolutely hate file extensions. Sure, they're  
nice for compatibility with those "other" operating systems, but I  
get tired of


.jpg
.xcodeproj
.iMovieProject
.extensionskeepgettinglongerandlonger

I tried looking around both Carbon (where UTIs seemed to be embraced  
first for files) and Cocoa, and cannot find a reasonable way to set  
a file's UTI and forgetaboutit, so that it's recognized by the  
system as belonging to a specific application, without putting in an  
extension or type/creator code. UTIs are clearly an improvement over  
32 bit type codes, but what do I have to do? Would the UTI be  
associated with the file's metadata? I think maybe, but in this case  
I would expect a specific way for the system to look for this and  
cannot find documentation to this end. It seems silly to have UTIs  
and have them serve in what seems to me a superfluous manner.


Any advice would be welcome.

I would love (LOVE!) Apple to allow me a way to use UTIs as an  
effective way to make file extensions optional, like in the good old  
days.


Thanks for any and all. Apologies for the rant.

Dave


On Apr 1, 2008, at 4:44 PM, Rainer Brockerhoff wrote:


At 15:21 -0700 01/04/08, [EMAIL PROTECTED] wrote:

From: Andrew Farmer <[EMAIL PROTECTED]>
References: <[EMAIL PROTECTED]>
In-Reply-To: <[EMAIL PROTECTED]>
Date: Tue, 1 Apr 2008 13:26:58 -0700
Message-ID: <[EMAIL PROTECTED]>

On 01 Apr 08, at 12:59, Marc Respass wrote:
I haven't registered for a creator code since System 7.5. Apple  
has information and registration page (http://developer.apple.com/datatype/index.html 
) about it but no indication if it's actually still required. Can  
anyone tell me if it is still required or maybe point me at the  
right information?


Type and creator codes have been deprecated since Tiger, which  
introduced UTIs. (Maybe even longer; I'm not sure.) Either way,  
you can safely forget they ever existed.


Type and Creator codes are alive and well in 10.5.x, and I haven't  
seen any mention that they're deprecated.


They're still used by LaunchServices to bind documents to  
applications. UTIs haven't substituted them, mostly because there's  
no field in HFS+ that directly defines a UTI for a specific file;  
instead the UTI is deduced from type, creator and extension  
(perhaps also from file contents in some cases).


What actually happens is that file type is checked first, then file  
extension, then file creator. LaunchServices matches them, in that  
order, to registered applications. The same metadata are also used  
to produce UTIs for that file, which are also used for matching.


It's still useful to register a creator code for your application  
if you have documents/files that have no extensions (in that case,  
also use a type), or that have some otherwise common extension, but  
still need to show your app's document icon. All-lowercase code are  
reserved.


There used to be some problems with using codes that contained  
MacRoman characters with the high bit set - the codes use MacRoman  
but the PkgInfo files (which are mostly obsolete these days) used  
UTF8. I suppose that should work now, although I haven't checked.


Registering a code is much faster now - you get a response within  
minutes, instead of the week it used to take in the System 7 days.


--
Rainer Brockerhoff  <[EMAIL PROTECTED]>
Belo Horizonte, Brazil
"In the affairs of others e

Re: Subviews of a borderless window - autoresizing mask does not work for me

2008-04-02 Thread Cathy Shive
The names of the margin-related masks are confusing for sure, I  
always have to look it up because when I think about the names of the  
masks and then think about the "springs and struts" UI in Interface  
Builder, I always reverse them, too.


On Apr 2, 2008, at 6:38 PM, Nate Weaver wrote:

Whoops, this jogged my memory. For some reason in my last response  
I thought -setAutoresizingMask specified the pinned margin and not  
the expanding margin. I'm not sure why...


On Apr 2, 2008, at 11:13 AM, Cathy Shive wrote:

Hi Hendrik,

It seems that you're using the correct mask.  The documentation  
states that NSViewMinYMargin would make the bottom margin  
flexible, which is what you want.



___

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/catshive%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: [NSPipe pipe] returning nil (running out of filehandles?)

2008-04-02 Thread Alastair Houghton

On 2 Apr 2008, at 17:19, John Stiles wrote:

I take it all back; in 2007 there was an MD5 attack discovered which  
actually allows for completely different binaries that sign the  
same. Check Wikipedia for the details, but basically MD5 is totally  
broken now. Wow, times change!!



Actually I don't think you should take it back; it looks to me like  
the problem that has been solved (that of finding two files with the  
same prefix that have the same MD5 sum) is not a useful exploit in  
most cases.


In order for it to be a real vulnerability, you would need an  
algorithm that, as you say, allows someone to take an arbitrary file  
and add some bytes that are determined by the algorithm in order to  
match a given hash.  I don't believe, from what I've read, that that  
particular problem has been solved.


The vulnerability that we have currently would only allow the original  
creator of a file to generate another file with the same checksum, and  
only under certain preconditions, so I contend that, as you originally  
stated, MD5 is not fully broken (and not even usefully broken in many  
respects).


Kind regards,

Alastair.

--
http://alastairs-place.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: [NSPipe pipe] returning nil (running out of filehandles?)

2008-04-02 Thread John Stiles

Alastair Houghton wrote:

On 2 Apr 2008, at 17:19, John Stiles wrote:

I take it all back; in 2007 there was an MD5 attack discovered which 
actually allows for completely different binaries that sign the same. 
Check Wikipedia for the details, but basically MD5 is totally broken 
now. Wow, times change!!


Actually I don't think you should take it back; it looks to me like 
the problem that has been solved (that of finding two files with the 
same prefix that have the same MD5 sum) is not a useful exploit in 
most cases.


In order for it to be a real vulnerability, you would need an 
algorithm that, as you say, allows someone to take an arbitrary file 
and add some bytes that are determined by the algorithm in order to 
match a given hash.  I don't believe, from what I've read, that that 
particular problem has been solved.


The vulnerability that we have currently would only allow the original 
creator of a file to generate another file with the same checksum, and 
only under certain preconditions, so I contend that, as you originally 
stated, MD5 is not fully broken (and not even usefully broken in many 
respects).


Well, you're right, but I still wouldn't want to use it for anything 
where security was a real concern; I'd be worried that the next attack 
wouldn't be so forgiving.

___

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 store NSRect as Core Data attribute?

2008-04-02 Thread Thomas Engelmeier


On 02.04.2008, at 18:12, Ben Lachman wrote:
I think the easiest way to encode/decode NSRects for storage is  
NSStringFromRect() and NSRectFromString().  Then you can just  
implement a custom accessor for the property that converts in the  
direction you need.


That potentially means opening Pandoras can to localisation issues.  
Any time you go that route, be sure to check that code with switching  
decimal separators.


In my opinion it sucks like hell when your Pages document containing a  
table has all numeric data messed up due to "unparseable" numbers...


Regards,
Tom_E

___

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: Southern California Coders?

2008-04-02 Thread Boyd Collier

I 'm also interested in knowing if there's a San Diego area group.

Boyd


On Apr 1, 2008, at 4:46 PM, James Merkel wrote:


On Tue, 1 Apr 2008 15:23:40, Casey Becking wrote:

Sorry to take any ones time if this has been discussed before. I  
was curious

if there was any group meeting for Southern California coders to get
together?


Well, Southern California is a pretty big area. I have seen  
reference to Lake Forest meetings.


Are there any groups in the San Diego area?

Jim Merkel

___

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/bcollier%40sunstroke.sdsu.edu

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]


Question about NSOutlineView and NSTreeController

2008-04-02 Thread Jeff LaMarche
I posted a question yesterday, and some of the responses were very  
helpful (thanks, by the way), but also showed me I didn't fully  
understand what I needed to ask. After several more hours of  
exploration last night, I think I have a grasp on my real question. My  
problem comes down to this (I think): when no item is selected in the  
an outline view, the tree controller instance that it is bound to  
still returns an array for selectedObjects with objects in it, and  
when binding the content set of another controller to that tree  
controller's selection key, the other controller shows data as if  
something were still selected in the tree controller.


Essentially, I have three views - the main NSOutlineView with a tree  
controller, and then I have two subordinate views, each of which shows  
items relative to the selected root object in the main NSOutlineView,  
one shows them hierarchically in an NSOutlineView, and the other shows  
a flat, alphabetized list of the same objects using an NSTableView.  
There is a different association from the root object for each of  
these views.  Both of these subordinate views have their own  
controllers, and they work just fine, except that when the main  
NSOutlineView has nothing selected, but previously did, the two  
subordinate views should show nothing, but they seem to show the data  
from the last selection; the Tree Controller doesn't seem to be aware  
that there is nothing selected in the outline view bound to it.


Am I, perhaps, doing something wrong here, or is there some setting I  
can set to cause the tree controller to get informed by the outline  
view when nothing is selected? If not, is there some accepted way of  
doing this? Or have I stumbled across an honest-to-goodness bug and  
should file a bug report?


Thanks much,
Jeff
___

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]


Ordering all day events via CalCalendarStore API

2008-04-02 Thread Brad Willoughby
Is it possible to define the ordering in iCal of all day events  
created via the CalCalendarStore API?


I'm looping through a list of sorted items that I would like to appear  
in the same order in iCal.  However, it looks like iCal does not honor  
the item creation order and I don't see any API for display  
sequencing.  The creation code looks something like this:


for (MyItem *item in collection.sortedItems) {
if (!item.isSynced) {
CalEvent *event = [CalEvent event];
		event.calendar = [[CalCalendarStore defaultCalendarStore]  
calendarWithUID:self.calCalendarUID];

event.title = item.name;
event.notes = item.details;
event.startDate = event.endDate = item.date;
event.isAllDay = YES;
NSError *error;
		[[CalCalendarStore defaultCalendarStore] saveEvent:event  
span:CalSpanThisEvent error:&error];

}
}

Any input is appreciated.

Cheers,
Brad Willoughby
TinyPlanet Software, LLC
http://tinyplanetsoftware.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]


CoreData NSTextView changes: not noticed with KVO, not accessible from program, but stored anyway

2008-04-02 Thread Theo Vosse

Hi,

I have an NSTextField that has a "data" binding to an  
NSObjectController, configured for an Entity, in a CoreData app  
(freshly created in XCode under Tiger).


When I edit the text field and save the file, all changes are stored.  
But when I try to get the contents in my program, I only get the  
first object read. Changes made after that are simply not visible,  
nor are they passed on to observeValueForKeypath.


The code looks like this:

In the NSDocument derived class:

IBOutlet NSObjectController* grammarController;

which is connected to an object controller in the nib file,  
configured for the entity GrammarTextObject, which has only one  
interesting member, text, of the type NSData. There is also an  
NSTextField in the nib which has data bound to the object  
controller's selection.text;


Then I try:

		GrammarTextObject* grammarObject = [grammarController  
selection]; // also tried: content

NSData* grammarText = [grammarObject valueForKey:@"text"];
		NSAttributedString* attrText = [[[NSAttributedString alloc]  
initWithRTF:grammarText documentAttributes:nil] autorelease];


but all I get is the text read from the file, not the text that is  
visible in the text field. Also, attempts to get a notification upon  
change don't work:


	[[grammarController selection] addObserver:self forKeyPath:@"text"  
options:0 context:0]


Does anyone have a clue? Thanks in advance,

Theo Vosse
___

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 for NSComboBox?

2008-04-02 Thread Adam Gerson
You could set up a delegate for the combo box and implement
controlTextDidEndEditing. Then programatically add the value to your
array controller:

NSManagedObjectContext * context = [[NSApp delegate] managedObjectContext];
NSManagedObject *yourObject = [NSEntityDescription
insertNewObjectForEntityForName: @"entityName" inManagedObjectContext:
context];

[server yourObject:[comboBox stringValue] forKey: @"key"];




On Mon, Mar 31, 2008 at 4:44 PM, David Springer <[EMAIL PROTECTED]> wrote:
> All,
>
>  I'm having trouble setting up the bindings for my NSComboBox.  I bind
>  the NSComboBox's content to NSArrayController's arrangedObjects.  This
>  works fine.
>
>  Now, I want to add to the content array when you enter a new string
>  into the combo box.  Say, for example, I start with an array of @"file
>  1", @"file 2", @"file 3".  Then, in the combo box, I enter "file foo".
>   I want to add this string to the content array, but I am at a loss as
>  to how to set up the bindings to do this.  Do I bind NSComboBox's
>  value to something?  My experiments in doing this so far are failing.
>
>  Help?
>  - Dave.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/agersonl%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: How to store NSRect as Core Data attribute?

2008-04-02 Thread Uli Kusterer

On 02.04.2008, at 18:58, Thomas Engelmeier wrote:
That potentially means opening Pandoras can to localisation issues.  
Any time you go that route, be sure to check that code with  
switching decimal separators.



 Potentially? Maybe. But I just tried it, and for me  
NSStringFromRect() never uses localized separators. So, since it  
always gives and takes periods as the decimal separator, I see no  
problem. Do you have a particular test case where it behaves  
differently?


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

This email sent to [EMAIL PROTECTED]


Re: prefPane with background process

2008-04-02 Thread Jens Alfke


On 2 Apr '08, at 8:36 AM, Trygve Inda wrote:

To make sure the worker app does not show up in the dock add this to  
its

info.plist:
NSUIElement
1


It's actually LSUIElement.
Whether this key is appropriate depends on what the service does. If  
it has a user interface (uses AppKit) but just doesn't want to show up  
in the Dock or have a menu bar, then LSUIElement is the way to go. But  
for a real background process with no UI, it's better to use  
LSBackgroundOnly instead. The difference is that LSBackgroundOnly  
processes don't get a connection to the window server, which saves  
system resources.


—Jens

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]

Re: Alternating Button

2008-04-02 Thread douglas a. welton

Gerriet,

Check out the documentation on User Interface Validation:

	


This should get you going in the right direction.

Alternately, you can listen for the NSWindowDidUpdateNotification and  
make the appropriate modifications to your button based on the state  
of the keyboard.


regards,

douglas

On Apr 1, 2008, at 3:51 PM, Gerriet M. Denkmann wrote:



On 1 Apr 2008, at 18:16, Jean-Daniel Dupas wrote:


I dont think there is an automatic way to have it (except for menu  
items), but you can have a look at the flagsChanged: method of  
NSResponder.


Le 1 avr. 08 à 17:24, Gerriet M. Denkmann a écrit :
The FindPanel in TextEdit has in the bottom left corner a button  
"Replace All" which changes to "In Selection" when the ⌥-key is  
pressed.


How is this done? I want to have such a changing button in some of  
my own panels.


Well, I did have a look at the flagsChanged: method of NSResponder.

My window has the following responder chain:

//  field editor of myTextField
<_NSKeyboardFocusClipView: 0x6b5920>
   //  myTextField
//  contentView
   //  window
(Mail.app did again eat all newlines when I pasted the text above.  
How can this be avoided? This kind of starts to get annoying.)


Now the question: where to override flagsChanged: ?
Or subclass NSPanel and override sendEvent ?
Or put a subclass of NSResponder on top of the responder chain? How  
to keep it there (overriding makeFirstResponder in NSWindow?)



Kind regards,

Gerriet.

___

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/douglas_welton%40earthlink.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/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Can't add new file extension to app's document types

2008-04-02 Thread Rick Mann
Hi. I've already reported a bug for this reproducible problem, but I'm  
hoping someone can suggest a workaround.


I created a Core Data document app from Xcode stationery. I then added  
a second file type to the target properties inspector so that it would  
open ".gpx" files. However, if I choose Open, the nav dialog comes up,  
and all .gpx files are grey. An Apple engineer sitting next to me last  
night was able to reproduce this problem, and so I filed a bug, but  
surely others are not stuck by this? It's kinda keeping me from doing  
any more work on my app.


Has anyone been able to make this work (adding new filename extensions  
to the list of an app's supported types)?


TIA,
--
Rick

___

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: NSTableView selectionShouldChangeInTableView: bug?

2008-04-02 Thread Jaime Rios
Hi,
This is an old message and I'm disappointed to see that no one has replied
to it. I'm working on a bug that only appears in Mac OS 10.3.x whereby my
NSTableView does not receive the tableViewSelectionDidChange message until I
click the Window.
The chain of events that cause this problem is as follows:

1 - User clicks on a row; controls on main window are modified to display
settings associated with row selection
2 - User clicks on another row; application displays a NSAlert dialog box
asking if they would like to save their changes
3 - User clicks either yes or no and NSTableView does not receive
the tableViewSelectionDidChange message

This problem does not happen in 10.4 or 10.5.

I've tried so many different recommendations, but I have't found anything
that works.

I'm contemplating whether or not I should simulate a keystroke to the window
to force the tableViewSelectionDidChange message to get to the NSTableView.

-- 
-Jaime

On Tue, Jul 10, 2007 at 1:31 PM, David Peredo <[EMAIL PROTECTED]>
wrote:

> I'm having a problem with the delegate for my NSTableView getting the
> selectionShouldChangeInTableView: method called twice when you return NO.
> This doesn't happen when YES is returned.
>
> for example, the following would print twice per click on the table:
> - (BOOL)selectionShouldChangeInTableView:(NSTableView *)aTableView {
>NSLog(@"foo");
>return NO;
> }
>
> I can't think of any reason why this behavior would be desirable. I also
> noticed that other people were experiencing the same problem (
> http://www.cocoadev.com/index.pl?SheetProblemsWithNSTableView). Anyone
> have a fix or work around? or is this, dare I say it, a Cocoa bug?
>
> Appreciate any help =)
> 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/xdev74%40gmail.com
>
> This email sent to [EMAIL PROTECTED]
>



-- 
-Jaime
http://www.jaimerios.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: Problem with Grouping the rotated object.

2008-04-02 Thread Gregory Weston

Quincey Morris wrote:


On Apr 2, 2008, at 04:00, Ghufran Ahamad wrote:


[xform translateXBy:center.x yBy:center.y];
[xform rotateByDegrees:[curGraphic GetAngle]];
[xform translateXBy:-center.x yBy:-center.y];

This looks kind of wrong. Mathematically, wouldn't you want:

[xform translateXBy:-center.x yBy:-center.y];
[xform rotateByDegrees:[curGraphic GetAngle]];
[xform translateXBy:center.x yBy:center.y];

?


Nope. The way the matrix multiplication works, the effect is that the  
transformations take place in the opposite order of the way they  
appeared in code.

___

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: Need for a creator code?

2008-04-02 Thread Ken Thomases

On Apr 2, 2008, at 6:46 AM, Jean-Daniel Dupas wrote:


Le 2 avr. 08 à 12:52, Keith Duncan a écrit :

Oh. Looks like I'm off the hook. The UTI, I expect, is the bundle  
identifier, no?


I don't think anyone actually answered this question for you.  
Basically no, your bundle identifier is a URI.




And to complete the answer, UTI are here to «replace» Type code, not  
Creator code.


Except it doesn't.  As others have pointed out, you can tag a file  
with a type code and/or you can tag it with a filename extension.  But  
you can't tag it with a UTI.  A UTI is _derived_from_ the things it  
would replace.  Given a naked file, you can't come up with its UTI  
(except perhaps in rare cases by file magic).


Thus we still need filename extensions and, I think, type codes.   
Which is a bit of a shame.


-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: CAOpenGLLayer

2008-04-02 Thread Stefan Hafeneger

Hi John,

I now setup the environment in copyCGLContextForPixelFormat. The  
folling code seemd to work fine. Do you see anything that would create  
a crash or is this okay? The code should work if the view moves from  
one screen to another, shouldn't it?


[CODE]
- (CGLPixelFormatObj)copyCGLPixelFormatForDisplayMask:(uint32_t)mask {
CGLPixelFormatAttribute attributes[] =
{
kCGLPFADisplayMask, mask,
kCGLPFAAccelerated,
kCGLPFAColorSize, 24,
kCGLPFAAlphaSize, 8,
kCGLPFADepthSize, 16,
kCGLPFANoRecovery,
kCGLPFAMultisample,
kCGLPFASupersample,
kCGLPFASampleAlpha,
0
};
CGLPixelFormatObj pixelFormatObj = NULL;
GLint numPixelFormats = 0;
CGLChoosePixelFormat(attributes, &pixelFormatObj, &numPixelFormats);
if(pixelFormatObj == NULL)
NSLog(@"Error: Could not choose pixel format!");
return pixelFormatObj;
}

- (void)releaseCGLPixelFormat:(CGLPixelFormatObj)pixelFormat {
CGLDestroyPixelFormat(pixelFormat);
}

- (CGLContextObj)copyCGLContextForPixelFormat: 
(CGLPixelFormatObj)pixelFormat {

CGLContextObj contextObj = NULL;
CGLCreateContext(pixelFormat, NULL, &contextObj);
if(contextObj == NULL)
NSLog(@"Error: Could not create context!");

CGLSetCurrentContext(contextObj);

//
// Setup OpenGL environment.
//

return contextObj;
}

- (void)releaseCGLContext:(CGLContextObj)glContext {

//
// Clean up OpenGL environment.
//

CGLDestroyContext(glContext);
}
[/CODE]

With best wishes, Stefan
___

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: Problem with Grouping the rotated object

2008-04-02 Thread Gordon Apple
Let me explain how we are handling grouped objects.

We have only one basic type of draw object with a dictionary of
characteristics.  That gives a lot of flexibility.  We do not let objects
draw themselves.  Instead, we use a separate rendering object.  This results
in a clean object data model.  (Hopefully, this will help when we do
Windows.)

We use an object of type "group" to replace grouped objects.  When the
renderer encounters a "group" type object, it creates another temporary
renderer object that draws the group.  This allows recursion for groups.  Of
course, the group object has to compute it's own bounds, including internal
and total rotations.  So far, this works quite well and we haven't
encountered the problem you have had.


> Message: 4
> Date: Wed, 2 Apr 2008 16:30:42 +0530
> From: "Ghufran Ahamad" <[EMAIL PROTECTED]>
> Subject: Problem with Grouping the rotated object.
> To: 
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain;charset="us-ascii"
> 
> Hi All,
> 
> 
> 
> We are developing a kind of drawing application in Objective C using Cocoa
> framework. We have several separate graphical objects, each having their own
> position and rotation angle, are then grouped. As soon as we group the
> objects the rotated object has got shift with their angle. This happen only
> with rotated object. Below is the code snippet that we are using.
> 

___

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: Need for a creator code?

2008-04-02 Thread Jean-Daniel Dupas


Le 2 avr. 08 à 20:56, Ken Thomases a écrit :

On Apr 2, 2008, at 6:46 AM, Jean-Daniel Dupas wrote:


Le 2 avr. 08 à 12:52, Keith Duncan a écrit :

Oh. Looks like I'm off the hook. The UTI, I expect, is the bundle  
identifier, no?


I don't think anyone actually answered this question for you.  
Basically no, your bundle identifier is a URI.




And to complete the answer, UTI are here to «replace» Type code,  
not Creator code.


Except it doesn't.  As others have pointed out, you can tag a file  
with a type code and/or you can tag it with a filename extension.   
But you can't tag it with a UTI.  A UTI is _derived_from_ the things  
it would replace.  Given a naked file, you can't come up with its  
UTI (except perhaps in rare cases by file magic).


Thus we still need filename extensions and, I think, type codes.   
Which is a bit of a shame.


I know, I'm one of the first that point this problem in the  
discussion, that why I put quote (or chevrons as you prefere) around  
“replace” ;-)
Anyway, even if it was possible to attach an UTI to a file, you would  
be force to continue to use (nasty old fashioned) extensions for  
compatibility with other OS.

Do not forget that OS X reintroduce extensions for this purpose.

___

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: CAOpenGLLayer

2008-04-02 Thread John Harper

Hi,

yes, that seems like a good solution,

John


On Apr 2, 2008, at 12:23 PM, Stefan Hafeneger wrote:

Hi John,

I now setup the environment in copyCGLContextForPixelFormat. The  
folling code seemd to work fine. Do you see anything that would  
create a crash or is this okay? The code should work if the view  
moves from one screen to another, shouldn't it?


[CODE]
- (CGLPixelFormatObj)copyCGLPixelFormatForDisplayMask:(uint32_t)mask {
CGLPixelFormatAttribute attributes[] =
{
kCGLPFADisplayMask, mask,
kCGLPFAAccelerated,
kCGLPFAColorSize, 24,
kCGLPFAAlphaSize, 8,
kCGLPFADepthSize, 16,
kCGLPFANoRecovery,
kCGLPFAMultisample,
kCGLPFASupersample,
kCGLPFASampleAlpha,
0
};
CGLPixelFormatObj pixelFormatObj = NULL;
GLint numPixelFormats = 0;
CGLChoosePixelFormat(attributes, &pixelFormatObj, &numPixelFormats);
if(pixelFormatObj == NULL)
NSLog(@"Error: Could not choose pixel format!");
return pixelFormatObj;
}

- (void)releaseCGLPixelFormat:(CGLPixelFormatObj)pixelFormat {
CGLDestroyPixelFormat(pixelFormat);
}

- (CGLContextObj)copyCGLContextForPixelFormat: 
(CGLPixelFormatObj)pixelFormat {

CGLContextObj contextObj = NULL;
CGLCreateContext(pixelFormat, NULL, &contextObj);
if(contextObj == NULL)
NSLog(@"Error: Could not create context!");

CGLSetCurrentContext(contextObj);

//
// Setup OpenGL environment.
//

return contextObj;
}

- (void)releaseCGLContext:(CGLContextObj)glContext {

//
// Clean up OpenGL environment.
//

CGLDestroyContext(glContext);
}
[/CODE]

With best wishes, Stefan


___

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: CAOpenGLLayer

2008-04-02 Thread Stefan Hafeneger

Okay thank you.

With best wishes, Stefan


Am 02.04.2008 um 22:19 schrieb John Harper:

Hi,

yes, that seems like a good solution,

John


On Apr 2, 2008, at 12:23 PM, Stefan Hafeneger wrote:

Hi John,

I now setup the environment in copyCGLContextForPixelFormat. The  
folling code seemd to work fine. Do you see anything that would  
create a crash or is this okay? The code should work if the view  
moves from one screen to another, shouldn't it?


[CODE]
- (CGLPixelFormatObj)copyCGLPixelFormatForDisplayMask: 
(uint32_t)mask {

CGLPixelFormatAttribute attributes[] =
{
kCGLPFADisplayMask, mask,
kCGLPFAAccelerated,
kCGLPFAColorSize, 24,
kCGLPFAAlphaSize, 8,
kCGLPFADepthSize, 16,
kCGLPFANoRecovery,
kCGLPFAMultisample,
kCGLPFASupersample,
kCGLPFASampleAlpha,
0
};
CGLPixelFormatObj pixelFormatObj = NULL;
GLint numPixelFormats = 0;
CGLChoosePixelFormat(attributes, &pixelFormatObj, &numPixelFormats);
if(pixelFormatObj == NULL)
NSLog(@"Error: Could not choose pixel format!");
return pixelFormatObj;
}

- (void)releaseCGLPixelFormat:(CGLPixelFormatObj)pixelFormat {
CGLDestroyPixelFormat(pixelFormat);
}

- (CGLContextObj)copyCGLContextForPixelFormat: 
(CGLPixelFormatObj)pixelFormat {

CGLContextObj contextObj = NULL;
CGLCreateContext(pixelFormat, NULL, &contextObj);
if(contextObj == NULL)
NSLog(@"Error: Could not create context!");

CGLSetCurrentContext(contextObj);

//
// Setup OpenGL environment.
//

return contextObj;
}

- (void)releaseCGLContext:(CGLContextObj)glContext {

//
// Clean up OpenGL environment.
//

CGLDestroyContext(glContext);
}
[/CODE]

With best wishes, Stefan




___

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]


NSArrayController and NSUserDefaultsController values not saving...

2008-04-02 Thread Samuel Williams

Hi,

I have an app I am working on which will eventually be released open  
source available from http://svn.oriontransfer.org/Applications/GPSTool


That program has a menu item under preferences which shows a window.  
That window has an NSTableView bound to an NSArrayController. This  
appears to work okay, for example, clicking + to add a row and then  
editing the text appears to work. However, the row hasn't been saved  
correctly - I made a debug button to print out the data from the array  
controller and user defaults controller:


2008-04-03 05:29:50.749 GPS Tool[12595:10b] NSUserDefaultsController  
presetScripts: (

{
}
)
2008-04-03 05:29:50.750 GPS Tool[12595:10b] Arranged Objects: (
{
name = Bob;
}
)

For some reason, a row has been created correctly, but the data has  
not been updated correctly (i.e. the name Bob).


 I can't seem to get this to work - I tried selecting continuously  
updates value, but that didn't have any effect.


It seems like for some reason, the updated data inside the  
NSMutableDictionary is not being written back into the  
NSUserDefaultsController, only when it is created is it added into the  
user defaults controller


What is the correct way to implement this kind of bindings connection?  
I could easily make some glue code to resolve this issue but it  
wouldn't be as nice as what I'd expect bindings to be capable of..


Regards,
Samuel
___

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]


Read jpeg comments from file?

2008-04-02 Thread Trygve Inda
I have a jpeg file which has a comment added as meta data. How can I read
this from the file?

Thanks,

Trygve


___

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: MD5 [was: [NSPipe pipe] returning nil (running out of filehandles?)]

2008-04-02 Thread Jens Alfke


On 2 Apr '08, at 9:12 AM, John Stiles wrote:

And AFAIK nobody is even remotely close to finding a technique which  
would let you write arbitrary data and then tack on a few bytes to  
get the signature you want,


From the Wikipedia article:
Because MD5 makes only one pass over the data, if two prefixes with  
the same hash can be constructed, a common suffix can be added to both  
to make the collision more reasonable.
Because the current collision-finding techniques allow the preceding  
hash state to be specified arbitrarily, a collision can be found for  
any desired prefix; that is, for any given string of characters X, two  
colliding files can be determined which both begin with X.
All that is required to generate two colliding files is a template  
file, with a 128-byte block of data aligned on a 64-byte boundary,  
that can be changed freely by the collision-finding algorithm.
Recently, a number of projects have created MD5 "rainbow tables" which  
are easily accessible online, and can be used to reverse many MD5  
hashes into strings that collide with the original input, usually for  
the purposes of password cracking. However, if passwords are combined  
with asalt before the MD5 digest is generated, rainbow tables become  
much less useful.


and that's what I'd call "fully broken," at least that's what you'd  
need to find in order to make an exploit.


That depends on what the digest is being used for — different  
cryptographic protocols rely on different features of the underlying  
algorithms. In some circumstances simply finding any hash collision  
could be enough to break security. (Schneier's "Advanced Cryptography"  
has several examples where a seemingly irrelevant weakness in an  
underlying algorithm led to an attack on a higher level protocol that  
used it. I believe the sad case of WEP was one.)


—Jens

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]

Re: NSManagedObject data only shows up in view sometimes

2008-04-02 Thread Adam Gerson
and the answer is...

I followed a nice article on how to conditionally repress disclosure
triangles for non leaf nodes. T

http://blog.petecallaway.net/?p=15

This part works. The parent node was not expanded so I couldn't see
the children. What is strange is this only happens sometimes.

I have an BOOL attribute "expanded" in my model. In awakeFromNib I
issued a fetchRequest and then check the value for "expanded" and
expand the node if it needs to be. So then the questions becomes why
is it that sometimes the data is available and my code in awakeFromNib
expands the parent, and sometimes it doesn't


//fetch items manualy so they are avilible in awakeFromNib
NSError *error;
[treeController fetchWithRequest:nil merge:NO error:&error];


//Auto expand group items
NSUInteger i, count = [outlineView numberOfRows];
for (i = 0; i < count; i++) {
NSObject * obj = [[outlineView itemAtRow:i] representedObject];

BOOL isLeaf = [[obj valueForKey:@"isLeaf"] boolValue];
BOOL expanded = [[obj valueForKey:@"expanded"] boolValue];

if (!isLeaf && expanded)
{
[outlineView expandItem:[outlineView itemAtRow:i]];
NSLog(@"%@",[outlineView itemAtRow:i]);
}
}

According to this tip on Apple's website the fetchRequest should fix
this. If I put this code in a method activated by a button it works
just fine.

"Cannot access contents of an object controller after a nib is loaded
Problem: You want to perform an operation with the contents of an
object controller (an instance of NSObjectController,
NSArrayController, or NSTreeController) after a nib file has been
loaded, but the controller's content is nil.

Cause: The controller's fetch is executed as a delayed operation
performed after its managed object context is set (by nib loading)—the
fetch therefore happens after awakeFromNib and
windowControllerDidLoadNib:.

Remedy: You can execute the fetch "manually" with
fetchWithRequest:merge:error:—see "Core Data and Cocoa Bindings."
"

On Wed, Apr 2, 2008 at 12:42 AM, Adam Gerson <[EMAIL PROTECTED]> wrote:
> I have a classic NSTreeController / NSOutlineView situation. The
>  TreeController has a SortDescriptor on it. I am programatically adding
>  a leaf node to a group node. It does not appear in the OutlineView
>  when I first add it. When I inspect the CoreData .xml file the leaf
>  node is there and it appears to have the right relationships. Then if
>  I launch the program again there is a 50/50 chance the leaf node will
>  appear. I just keep launching and quitting the program without making
>  any changes to the data. Sometimes the child is is the OutlineView and
>  sometimes it is not.
>
>  With a SortDescriptor applied what other changes could cause the
>  OutlineView to sometimes show a node and sometimes not on different
>  launches?
>
>  Thanks,
>  Adam
>
___

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]


Name of NSTableView

2008-04-02 Thread Mr. Gecko
How would I get the name of a table view? I am trying to make all of  
my tables use one class for the data source so I can make my code more  
smaller.  I know I can use autosave name but I am not sure if I am  
suppose to use that or what it does.

Here is what I have tried already
[tableView name];
___

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: Name of NSTableView

2008-04-02 Thread John Stiles

What do you mean by the "name"?
You could make one class that has all of the common code, and then 
subclass it for each table instance. That's a pretty common technique.



Mr. Gecko wrote:
How would I get the name of a table view? I am trying to make all of 
my tables use one class for the data source so I can make my code more 
smaller.  I know I can use autosave name but I am not sure if I am 
suppose to use that or what it does.

Here is what I have tried already
[tableView name];
___

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/jstiles%40blizzard.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]


GCDrawKit programmatically create object

2008-04-02 Thread James Maxwell

I'm just wondering whether anyone here uses the GCDrawKit framework?

I've been getting used to how it does things over the past few days,  
but there's something I really can't figure out how to do. I want to  
make an object on a layer programmatically - say, a rect that loads  
automatically with a new layer, at a default position and size.


If anybody's using the DrawKit, and knows how this might be done, any  
help would be greatly appreciated. I can make tools, and create custom  
objects that way, but it's all dependent on the mouse (event-driven);  
I can't make anything without the mouse.


Thanks in advance,

J.
___

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: GCDrawKit programmatically create object

2008-04-02 Thread James Maxwell

Duh, woops... sorry... found it:

+ (GCDrawableShape*)drawableShapeWithPath:(NSBezierPath*) path;

cheers,

J.



On 2-Apr-08, at 2:20 PM, James Maxwell wrote:


I'm just wondering whether anyone here uses the GCDrawKit framework?

I've been getting used to how it does things over the past few days,  
but there's something I really can't figure out how to do. I want to  
make an object on a layer programmatically - say, a rect that loads  
automatically with a new layer, at a default position and size.


If anybody's using the DrawKit, and knows how this might be done,  
any help would be greatly appreciated. I can make tools, and create  
custom objects that way, but it's all dependent on the mouse (event- 
driven); I can't make anything without the mouse.


Thanks in advance,

J.
___

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/jbmaxwell%40rubato-music.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]


unhandled property type encoding

2008-04-02 Thread Stefan Hafeneger

Hi,

I've made a subclass of CALayer (actually CAOpenGLLayer) and defined a  
struct property. In the init method the [super init] call produces a  
runtime message


unhandled property type encoding: `{_SHVector="x"f"y"f"z"f}'

The app doesn't crash, but I don't find a solution to avoid this  
message. I defined the struct via


typedef struct _SHVector {
CGFloat x;
CGFloat y;
CGFloat z;
} SHVector;

The same property in a NSView subclass works fine.

With best wishes, Stefan
___

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: Name of NSTableView

2008-04-02 Thread Mr. Gecko

What do you mean by the "name"?

in the identity tab of Interface builder
You could make one class that has all of the common code, and then  
subclass it for each table instance. That's a pretty common technique.
I did that before but I can't do shouldSelectRow with that which I  
need for filling out fields once a row is selected.





Mr. Gecko wrote:
How would I get the name of a table view? I am trying to make all  
of my tables use one class for the data source so I can make my  
code more smaller.  I know I can use autosave name but I am not  
sure if I am suppose to use that or what it does.

Here is what I have tried already
[tableView name];
___

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/jstiles%40blizzard.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: Name of NSTableView

2008-04-02 Thread John Stiles
Your delegate and data source can be the same object if you want. 
Nothing prevents it.



Mr. Gecko wrote:

What do you mean by the "name"?

in the identity tab of Interface builder
You could make one class that has all of the common code, and then 
subclass it for each table instance. That's a pretty common technique.
I did that before but I can't do shouldSelectRow with that which I 
need for filling out fields once a row is selected.





Mr. Gecko wrote:
How would I get the name of a table view? I am trying to make all of 
my tables use one class for the data source so I can make my code 
more smaller.  I know I can use autosave name but I am not sure if I 
am suppose to use that or what it does.

Here is what I have tried already
[tableView name];
___

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/jstiles%40blizzard.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/jstiles%40blizzard.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: Name of NSTableView

2008-04-02 Thread Jens Alfke


On 2 Apr '08, at 2:52 PM, Mr. Gecko wrote:

How would I get the name of a table view? I am trying to make all  
of my tables use one class for the data source so I can make my  
code more smaller.


Why does your code need to be smaller? How big is it? This sounds like  
something that would really complicate the code and make it harder to  
read. The computer's disk space and RAM are less important [within  
limits!] than your development and coding time.


In any case, I don't recommend trying to put special cases in your  
code that looks at some identifier of the table. Instead, subclass a  
base class.


I did that before but I can't do shouldSelectRow with that which I  
need for filling out fields once a row is selected.


I don't understand...

—Jens

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]

Re: Name of NSTableView

2008-04-02 Thread Andy Lee
Here's what it _sounds_ like you're trying to do.  Let me know if I've  
misunderstood:


 * You have multiple table views.
 * The data source logic for all of them is essentially the same.
 * You are trying to have one _instance_ of your data source class be  
the data source for all of your tables.
 * You want some way for the data source methods to tell which table  
view they are dealing with.
 * Specifically, you want to be able to get some kind of name that  
you can assign to the table view.


Here are my comments:

 * You _could_ use the autosave name if in fact you want your tables  
to autosave.  Autosaving means that certain attributes of your table  
view will be saved when your application quits and restored when you  
relaunch.  I'm not exactly sure offhand how autosaving works, and I  
must say I could not dig up this information by searching the Xcode  
documentation. One problem is that "autosave" is sometimes spelled  
"auto save"; another problem is that "autosave" also seems to refer to  
automatic saving of _documents_.


 * Another option is to subclass NSTableView and add your own "name"  
attribute.  You'd have to have some code somewhere that sets this  
attribute.  Then [tableView name] would work.  I'm not sure why you  
thought it might work otherwise; there's no -name method in the docs  
for NSTableView or any of its superclasses.  (Actually I would call it  
something more specific than "name", to avoid the possibility of name  
collision in case Apple decides to add a "name" to NSTableView.)


 * Another option is to add a "name" attribute to your data source  
class, and create a separate data source instance for each table  
view.  The cost of this is trivial unless there would be a lot of  
redundancy among the data source instances (and I mean a lot).  It's  
very likely you wouldn't be saving a meaningful amount of space by  
using just one shared data source instance.


 * I think it would help if you tell us what kind of information  
these table views contain, and how the data source works.  This seems  
to be partly a design question and not just about whether NSTableView  
has some method or other.


--Andy


On Apr 2, 2008, at 5:17 PM, Mr. Gecko wrote:

How would I get the name of a table view? I am trying to make all of  
my tables use one class for the data source so I can make my code  
more smaller.  I know I can use autosave name but I am not sure if I  
am suppose to use that or what it does.

Here is what I have tried already
[tableView name];
___

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/aglee%40mac.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]


NSAssert and Unused Variable

2008-04-02 Thread Richard Somers
I use a function which returns an error code. The error variable is  
used in a NSAssert.


int error = foo();
NSAssert(error == 0, @"We have an assertion failure!");

The NSAssert complies out in the release configuration by using the  
preprocessor macro NS_BLOCK_ASSERTIONS. This results in a warning:  
unused variable "error".


Do most programmers turn off the unused variable warnings or do  
something else to get this to work.


Regards, Richard

___

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: NSAssert and Unused Variable

2008-04-02 Thread John Newlin
It seems that even in release builds you should be checking the error code, 
otherwise foo() should just return void since you assume it can't fail in 
release builds, and instead foo() should have the assert internally.

-john

 
On Wednesday, April 02, 2008, at 05:04PM, "Richard Somers" <[EMAIL PROTECTED]> 
wrote:
>I use a function which returns an error code. The error variable is  
>used in a NSAssert.
>
> int error = foo();
> NSAssert(error == 0, @"We have an assertion failure!");
>
>The NSAssert complies out in the release configuration by using the  
>preprocessor macro NS_BLOCK_ASSERTIONS. This results in a warning:  
>unused variable "error".
>
>Do most programmers turn off the unused variable warnings or do  
>something else to get this to work.
>
>Regards, Richard
>
>___
>
>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/newlin_john%40mac.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: NSAssert and Unused Variable

2008-04-02 Thread Jens Alfke


On 2 Apr '08, at 5:03 PM, Richard Somers wrote:

The NSAssert complies out in the release configuration by using the  
preprocessor macro NS_BLOCK_ASSERTIONS. This results in a warning:  
unused variable "error".
Do most programmers turn off the unused variable warnings or do  
something else to get this to work.


I don't think most people use NS_BLOCK_ASSERTIONS; instead they leave  
the assertion checks in the shipping product. Every Cocoa app (and  
framework) that Apple ships has assertions enabled, as far as I know.


This does add a little bit of overhead (code size more than  
performance.) But it makes the app more resilient to unexpected  
failures — a bug is more likely to result in an error alert than a  
crash. It also makes bugs reported by users more informative, as you  
can glean a lot more information from an exception message than you  
can from a crash log. (Especially if you add a bit of code to display  
exception backtraces.)


But I'm not going to tell you not to compile the assertions out; it's  
a matter of individual judgment. I seem to recall a pragma or macro  
that can be used to tell the compiler "I know this variable is unused,  
don't complain about it", though I don't remember the details...


—Jens

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]

Re: Subviews of a borderless window - autoresizing mask does not work for me

2008-04-02 Thread Rob Keniger


On 03/04/2008, at 2:47 AM, Cathy Shive wrote:
The names of the margin-related masks are confusing for sure, I  
always have to look it up because when I think about the names of  
the masks and then think about the "springs and struts" UI in  
Interface Builder, I always reverse them, too.



I highly recommend Apple's "Sproing" example:

http://developer.apple.com/samplecode/Sproing

If you switch on the "geeky stuff" option, you can set the springs and  
struts and get the exact mask to use without even thinking about it.


--
Rob Keniger



___

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: Name of NSTableView

2008-04-02 Thread Adam Gerson
All good ideas from Andy. I sometimes get arround this issue by using
the "tag" in IB. It has to be an int so I define

#define TABLE1 1
#define TABLE2 2
#define TABLE3 3

Then you can get a reference to your table with

if ([tableView tag] == TABLE3)
{
//code
}


On Wed, Apr 2, 2008 at 6:07 PM, Jens Alfke <[EMAIL PROTECTED]> wrote:
>
>  On 2 Apr '08, at 2:52 PM, Mr. Gecko wrote:
>
>  >>> How would I get the name of a table view? I am trying to make all
>  >>> of my tables use one class for the data source so I can make my
>  >>> code more smaller.
>
>  Why does your code need to be smaller? How big is it? This sounds like
>  something that would really complicate the code and make it harder to
>  read. The computer's disk space and RAM are less important [within
>  limits!] than your development and coding time.
>
>  In any case, I don't recommend trying to put special cases in your
>  code that looks at some identifier of the table. Instead, subclass a
>  base class.
>
>
>  > I did that before but I can't do shouldSelectRow with that which I
>  > need for filling out fields once a row is selected.
>
>  I don't understand...
>
>  —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:
>  http://lists.apple.com/mailman/options/cocoa-dev/agersonl%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]


About the Primary Button problems in Cocoa Mouse Event Handling

2008-04-02 Thread Celery01 Lin
HI , all!
I have a question about how can we detect the primary button .
Cocoa Mouse Event handling gives us NSEvent . Though type of the
NSEvent ,we can know which mouse button is down, up or dragged ,and
then We can do something according to Leftmouse down or rightmouse
down . But if the user change the primary mouse button in the User
Preference . Dose that mean all our logic is reversed?
or Dose cocoa assume that Leftmouse is primary mouse and bind the
Leftmouse to primary mouse?
How can we determine which mouse button is primary mouse button in Cocoa?
___

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: NSAssert and Unused Variable

2008-04-02 Thread Chris Suter


On 03/04/2008, at 11:30 AM, Jens Alfke wrote:

I seem to recall a pragma or macro that can be used to tell the  
compiler "I know this variable is unused, don't complain about it",  
though I don't remember the details...


Apple gcc only:

#pragma unused (var)

or

_Pragma("unused(var)")

The implementation of that pragma has some bugs in it that will cause  
gcc to crash or hang in certain circumstances that I really should  
report.


or you can do:

(void)var;

or  you can use the unused attribute e.g.:

void my_func (int a, int b __attribute__((__unused__)))

or

int var __attribute__((__unused__));

Unfortunately, there's no way that I know of to apply that attribute  
to Objective-C method parameters.


- Chris



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]

DataSource for NSTableView with ButtonCell

2008-04-02 Thread Thomas Bartelmess
Hello List,

i've created a NSTableview with Interface Builder. In one of my Collums is a 
NSButton. I've no idea how to set up the DataSource for this.

Can anyone help me?

Thanks a lot
Thomas Bartelmess

[EMAIL PROTECTED]





  Lesen Sie Ihre E-Mails auf dem Handy.
www.yahoo.de/go
___

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]


Auto-resizing column based on the data inside it?

2008-04-02 Thread Rob Petrovec

Hey,
I have an NSScrollView with an NSTableView embedded inside it.  The  
NSTableView is bound to a custom NSArrayController as its data source  
and delegate.  The NSTableView only has one column that shows a string  
of text (NSTextFieldCell) in each row.  The problem is that when the  
text gets long in a given row, the horizontal scroll bar doesn't  
appear because the Column isn't adjusting its width based on the text  
inside it.  Anyone have an idea on how to set it up so that the column  
will auto-resize itself based on the text inside it?  The only column  
resizing docs/info I could find will make the column resize based on  
the NSTableView itself, which is not what I want.


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: Making a window fit its contents?

2008-04-02 Thread Jack Repenning

On Mar 31, 2008, at 1:33 AM, Nick Toumpelis wrote:

the most effective way to do this is by using Jerry Krinock's  
NS(Attributed)String+Geometrics categories [1]. Using this, you can  
determine the height or width of your text and size your window (and  
NSTextField) appropriately.



[1] http://sheepsystems.com/sourceCode


That is so unbeLIEVably cool!  Works perfectly, only took about five  
minutes to grok and use.


-==-
Jack Repenning
Chief Technology Officer
CollabNet, Inc.
8000 Marina Boulevard, Suite 600
Brisbane, California 94005
office: +1 650.228.2562
mobile: +1 408.835.8090
raindance: +1 877.326.2337, x844.7461
aim: jackrepenning
skype: jackrepenning





___

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: DataSource for NSTableView with ButtonCell

2008-04-02 Thread Gary L. Wade
Try having your NSTableView delegate's method return an NSNumber; that's what I 
did for the NSSliderCell column in my NSTableView.

>Hello List,
>
>i've created a NSTableview with Interface Builder. In one of my Collums is a 
>NSButton. I've no idea how to set up the DataSource for this.
>
>Can anyone help me?
>
>Thanks a lot
>Thomas Bartelmess
>
>[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: DataSource for NSTableView with ButtonCell

2008-04-02 Thread Randall Meadows

On Apr 2, 2008, at 12:35 AM, Thomas Bartelmess wrote:
i've created a NSTableview with Interface Builder. In one of my  
Collums is a NSButton. I've no idea how to set up the DataSource for  
this.


An NSButton as in a checkbox?  I've just recently coded 2 tables with  
this, so I might be able to shed some light.  If you're using  
something other than a checkbox, this won't apply directly, but maybe  
you can glean something from it.


You need to implement 3 data source methods:

1. - (NSInteger)numberOfRowsInTableView:(NSTableView *)aTableView

2. - (void)tableView:(NSTableView *)aTableView
  setObjectValue:(id)anObject
  forTableColumn:(NSTableColumn *)aTableColumn
 row:(NSInteger)rowIndex

3. - (id)tableView:(NSTableView *)aTableView
objectValueForTableColumn:(NSTableColumn *)aTableColumn
   row:(NSInteger)rowIndex

You need to maintain some sort of data model that represents each row;  
in my case, I have a checkbox column, and a "name" column.  I maintain  
the list of names in an NSArray, ordered appropriately.  I also  
maintain an NSMutableSet; if a corresponding object from the name  
array is present in the set, that means the checkbox for that row is  
set, otherwise it's clear.  So, for the three methods above:


1. return the count of items in the array

2. "anObject" is a NSCFBoolean (NSNumber subclass?) for the checkbox  
column, and an NSString for the name column; in my case, the name  
column is not editable, so I don't worry about this at all (if I did,  
then I'd have to use a NSMutableArray and change the name at index  
"rowIndex" to the "anObject" value).  For my checkbox column, I get  
the BOOL value out of "anObject", and if it's YES then I add the  
object at index "rowIndex" of my name array to the set, otherwise I  
remove it from the set.


3. For my checkbox column, I return an NSNumber object containing a  
BOOL value: YES if the name at index "rowIndex" of my name array is in  
my set, and NO otherwise.  For the name column, I simply return the  
name at that index in my name array.


May not be the cleanest way in the world to do it, but it works well  
for my needs (which don't involve very large amounts of data in my  
table).

___

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: About the Primary Button problems in Cocoa Mouse Event Handling

2008-04-02 Thread Ron Fleckner


On 03/04/2008, at 11:45 AM, Celery01 Lin wrote:

HI , all!
I have a question about how can we detect the primary button .
Cocoa Mouse Event handling gives us NSEvent . Though type of the
NSEvent ,we can know which mouse button is down, up or dragged ,and
then We can do something according to Leftmouse down or rightmouse
down . But if the user change the primary mouse button in the User
Preference . Dose that mean all our logic is reversed?
or Dose cocoa assume that Leftmouse is primary mouse and bind the
Leftmouse to primary mouse?
How can we determine which mouse button is primary mouse button in  
Cocoa?


I don't know, but one way to find out would be to change your mouse's  
primary and secondary buttons around in System Prefs, then see how  
that effects your code.  That is, try it and see.  I suspect that the  
NSLeftMouse... constants would map to whatever the user has set as  
the primary button.  Let us know what you find.


Ron
___

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]


duplicate symbol error

2008-04-02 Thread Daniel Child
I had an application that built fine on Tiger using Xcode 2.4.1. When  
I try building on Leopard, I get a duplicate symbol error as follows:


ld: duplicate symbol _evLanguageAsString in
/Users/.../build/.../Debug/LSC Data Preparation.build/Objects-normal/ 
ppc/DataDescription.o

and
/Users/.../build/.../Debug/LSC Data Preparation.build/Objects-normal/ 
ppc/Step1_SourceTypeController.o


I have no idea why this is happening, especially since there is no
evLanguageAsString in either DataDescription.h or .m. There is one in  
the sourcetype controller files, though not prefixed by _.


So how would a copy get in the object file???

FWIW, in Xcode 3, I  tried building for Tiger and Leopard and it made  
no difference.


Does anyone have a suggestion of how to fix this? 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: Name of NSTableView

2008-04-02 Thread Jonathan Hess
Sometimes using 'tag' in this manner is appropriate, but in most  
cases, its more descriptive to have an IBOutlet.


That way you can say:
if (tableView == courseListTableView) {
} else if (tableView == studentListTableView) {
}

Jon Hess

On Apr 2, 2008, at 5:41 PM, Adam Gerson wrote:


All good ideas from Andy. I sometimes get arround this issue by using
the "tag" in IB. It has to be an int so I define

#define TABLE1 1
#define TABLE2 2
#define TABLE3 3

Then you can get a reference to your table with

if ([tableView tag] == TABLE3)
{
//code
}


On Wed, Apr 2, 2008 at 6:07 PM, Jens Alfke <[EMAIL PROTECTED]> wrote:


On 2 Apr '08, at 2:52 PM, Mr. Gecko wrote:


How would I get the name of a table view? I am trying to make all
of my tables use one class for the data source so I can make my
code more smaller.


Why does your code need to be smaller? How big is it? This sounds  
like

something that would really complicate the code and make it harder to
read. The computer's disk space and RAM are less important [within
limits!] than your development and coding time.

In any case, I don't recommend trying to put special cases in your
code that looks at some identifier of the table. Instead, subclass a
base class.



I did that before but I can't do shouldSelectRow with that which I
need for filling out fields once a row is selected.


I don't understand...

—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:
http://lists.apple.com/mailman/options/cocoa-dev/agersonl%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/jhess%40apple.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: duplicate symbol error

2008-04-02 Thread stephen joseph butler
On Wed, Apr 2, 2008 at 11:32 PM, Daniel Child <[EMAIL PROTECTED]> wrote:

> ld: duplicate symbol _evLanguageAsString in
> /Users/.../build/.../Debug/LSC Data
> Preparation.build/Objects-normal/ppc/DataDescription.o
> and
> /Users/.../build/.../Debug/LSC Data
> Preparation.build/Objects-normal/ppc/Step1_SourceTypeController.o
>
> I have no idea why this is happening, especially since there is no
> evLanguageAsString in either DataDescription.h or .m. There is one in the
> sourcetype controller files, though not prefixed by _.
>
> So how would a copy get in the object file???
>

Does DataDescription.[mh] include Step1_SourceTypeController.h? It sounds to
me like you accidently included an implementation of evLanguageAsString in
the header file for Step1_SourceTypeController, instead of just the
prototype. But that doesn't really explain why it compiled on Tiger.
___

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: Southern California Coders?

2008-04-02 Thread Scott Ellsworth
On Wed, Apr 2, 2008 at 10:01 AM, Boyd Collier
<[EMAIL PROTECTED]> wrote:
> I 'm also interested in knowing if there's a San Diego area group.

At one point, a fair number of San Diego folks drove up for the Lake
Forest meetings.  The drive got to them about a year ago, and I have
not heard whether they have started their own group.

Scott

>  On Apr 1, 2008, at 4:46 PM, James Merkel wrote:
>
>  > On Tue, 1 Apr 2008 15:23:40, Casey Becking wrote:
>  >
>  >> Sorry to take any ones time if this has been discussed before. I
>  >> was curious
>  >> if there was any group meeting for Southern California coders to get
>  >> together?
>  >
>  > Well, Southern California is a pretty big area. I have seen
>  > reference to Lake Forest meetings.
>  >
>  > Are there any groups in the San Diego area?
>  >
>  > Jim Merkel
>  >
>  > ___
>  >
>  > 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/bcollier%40sunstroke.sdsu.edu
>  >
>  > 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/scott_ellsworth%40alumni.hmc.edu
>
>  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: Auto-resizing column based on the data inside it?

2008-04-02 Thread Jens Alfke


On 2 Apr '08, at 7:05 PM, Rob Petrovec wrote:

Anyone have an idea on how to set it up so that the column will auto- 
resize itself based on the text inside it?


As far as I know you have to do it yourself. You need to get the  
columns' data cell, set its value to each row's object in turn (i.e.  
the string the column would display for that row), and ask it for its  
preferred width. Then get the maximum of those and set the column's  
width accordingly.


—Jens

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]

Re: Southern California Coders?

2008-04-02 Thread James Merkel
Yeah, gas at ~ $4 per gallon, makes the drive from San Diego to Lake  
Forest kind of a luxury.


Jim Merkel

On Apr 2, 2008, at 9:55 PM, Scott Ellsworth wrote:


On Wed, Apr 2, 2008 at 10:01 AM, Boyd Collier
<[EMAIL PROTECTED]> wrote:

I 'm also interested in knowing if there's a San Diego area group.


At one point, a fair number of San Diego folks drove up for the Lake
Forest meetings.  The drive got to them about a year ago, and I have
not heard whether they have started their own group.

Scott


On Apr 1, 2008, at 4:46 PM, James Merkel wrote:


On Tue, 1 Apr 2008 15:23:40, Casey Becking wrote:


Sorry to take any ones time if this has been discussed before. I
was curious
if there was any group meeting for Southern California coders to  
get

together?


Well, Southern California is a pretty big area. I have seen
reference to Lake Forest meetings.

Are there any groups in the San Diego area?

Jim Merkel

___

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/bcollier%40sunstroke.sdsu.edu

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/scott_ellsworth%40alumni.hmc.edu

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: duplicate symbol error

2008-04-02 Thread Jens Alfke


On 2 Apr '08, at 9:32 PM, Daniel Child wrote:


I have no idea why this is happening, especially since there is no
evLanguageAsString in either DataDescription.h or .m.


I agree with Stephen — make sure you didn't forget the "extern" in the  
variable's declaration in the header.


There is one in the sourcetype controller files, though not prefixed  
by _.


The compiler prefixes most of your global identifiers with "_", for  
mysterious reasons. (Actually I think it's a kind of namespacing, to  
avoid name collisions with other types of global symbols like  
Objective-C class names, C++ vtables and such.)


—Jens

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]

Re: GCDrawKit programmatically create object

2008-04-02 Thread Graham Cox

Looks like you found it.

I would suggest this isn't really a good list to ask drawkit questions  
on - DK has its own mailing list http://lists.apptree.net/listinfo.cgi/drawkit-apptree.net 
 or you can mail me directly as you have been - very happy to help  
you out.


General note - EVERYTHING is programatically doable - the mouse is  
just applied to the data model through a controller of some sort, as  
usual.




cheers, Graham


On 3 Apr 2008, at 8:20 am, James Maxwell wrote:

I'm just wondering whether anyone here uses the GCDrawKit framework?

I've been getting used to how it does things over the past few days,  
but there's something I really can't figure out how to do. I want to  
make an object on a layer programmatically - say, a rect that loads  
automatically with a new layer, at a default position and size.


If anybody's using the DrawKit, and knows how this might be done,  
any help would be greatly appreciated. I can make tools, and create  
custom objects that way, but it's all dependent on the mouse (event- 
driven); I can't make anything without the mouse.


Thanks in advance,

J.
___

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/graham.cox%40bigpond.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]


Resorting normal field editor behaviour

2008-04-02 Thread K . Darcy Otto
I need to intercept changes in my NSTableView's field editor, and I am  
able to do this successfully implementing controlTextDidChange: in my  
controller.  I do this by having my controller create a field editor  
(fieldEd, an NSTextView) and setting the delegate of that field editor  
to my controller.  Then, I use windowWillReturnFieldEditor: to return  
fieldEd, so that when the NSTableView wants to do some editing, it  
gets pointed to the right object.  So far, so good.


The problem is that I lose some normal field-editor behaviour.  In  
particular, the field editor does not give up control when I press  
,  or , but instead enters these characters  
directly into the field (there may be some other issues as well;  
arrows work as expected).  How do I restore normal behaviour, and (for  
the interest's sake) why has normal behaviour disappeared?  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]


1 pixel bordered CALayer renders improperly

2008-04-02 Thread Martin

Hi,

It seems that a CALayer with a borderWidth of 1.0 renders improperly:  
all the border's pixels are good except the very top right pixel which  
has a different colour.


Example: http://img34.picoodle.com/img/img34/4/4/2/f_CALayerm_6e43e20.png

Is this a know bug? Is there a workaround?

Thanks,
Martin.
___

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: scrollRangeToVisible from within mouseDown causing crash?

2008-04-02 Thread Ben Lachman

To reply to my own post.  The problem lay in two things:

1) I had a bug in my selection constraining code that in a few odd  
places subtract a larger number from a smaller number when creating a  
range, thus creating a range with a really really big length--close  
to UINT_MAX.  When you then try to draw a textview after scrolling,  
the textview doesn't like it.


2) The NSRange functions, in particular NSIntersectionRange(), don't  
handle numbers close to UINT_MAX.  To be specific, if you have a  
range that the sum of the location and length is greater than  
UINT_MAX, NSIntersectionRange will wrap the result around which may  
make the range intersect in a way it really shouldn't.  For example,  
if you have aRange {20, UINT_MAX-10}, and you do NSIntersectionRange 
( aRange, NSMakeRange(0, [aString length]) ) --which is a quite  
common thing to do I think--as long as aString is longer than 20, the  
returned range will be {20, UINT_MAX-10}... not quite what you'd expect.


Anyway, I would have never run up against this if my code wasn't  
buggy, but I thought it might be helpful to someone down the line.


Peace,
->Ben
--
Ben Lachman
Acacia Tree Software

http://acaciatreesoftware.com

[EMAIL PROTECTED]
740.590.0009

On Mar 30, 2008, at 4:06 AM, Ben Lachman wrote:
I just added a call to scrollRangeToVisible: that is sometimes  
called from my text view's mouseDown method.  Now, whenever  
scrollRangeToVisible: is called on a range that is not visible, the  
next drawRect of the text view crashes with the exception: "***  
NSLayoutManager, _getGlyphBuffer(): NSZoneMalloc  
failed!" (EXC_BAD_ACCESS).  I had assumed that this was just a  
memory management bug on my part, but the fact that I can basically  
turn the crash on or off based on whether I call  
scrollRangeToVisible has me a bit confused.  Anyone know what this  
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]