Semi-document architecture

2009-09-04 Thread Rob Keniger
I have an app in development that is currently implemented as a  
document-based app, but I'm starting to think it makes little sense  
for it to be so.


What I would like is for the app to have a central document  
management window, from which you could create/delete documents.  
Although these are logically documents, I don't want the user to be  
able to be saved the file anywhere on disk, I want all the documents  
to be saved centrally in a location of my choosing (i.e. the  
Application Support folder).


The user should not be able to do a Save As. I also don't really want  
the Command-Clickable title in the document window as the location on  
disk is not relevant to the user.


However, I still want one window per app, undo support and Save menu  
item functionality, which all come for free with the NSDocument  
architecture.


Would I be best off to migrate away from the NSDocumentController/ 
NSDocument architecture and shoehorn my own document management  
controller logic in its place?


--
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 arch...@mail-archive.com


Re: Semi-document architecture

2009-09-04 Thread Kyle Sluder



--Kyle Sluder

On Sep 3, 2009, at 11:10 PM, Rob Keniger r...@menumachine.com wrote:

What I would like is for the app to have a central document  
management window, from which you could create/delete documents.  
Although these are logically documents, I don't want the user to be  
able to be saved the file anywhere on disk, I want all the documents  
to be saved centrally in a location of my choosing (i.e. the  
Application Support folder).


Sounds like a job for a custom NSDocumentController subclass.

The user should not be able to do a Save As. I also don't really  
want the Command-Clickable title in the document window as the  
location on disk is not relevant to the user.


Your NSDocument subclass can handle this  And you can disable the  
titlebar path control easily enough.


However, I still want one window per app, undo support and Save menu  
item functionality, which all come for free with the NSDocument  
architecture.


I assume you meant one window per document?

Would I be best off to migrate away from the NSDocumentController/ 
NSDocument architecture and shoehorn my own document management  
controller logic in its place?


No. You will still get a lot out of NSDocument with a moderate amount  
of customization.


--Kyle Sluder
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Hyper link text field overlap its text under box

2009-09-04 Thread Vijay Kanse
I am implemented Hyperlink text filed, and It's doing its all functionality.
But Under NSBox, It is giving me overlap text when User click on it.
Here I have attached snapshot for same.

If I am not using it within box, then it text does not overlap, but it is
narrowed with  some  pixels.

So,  am i missing any property to set for Text filed ?



Thanks.
attachment: Hyperlink field.png___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com

Re: Semi-document architecture

2009-09-04 Thread Rob Keniger


On 04/09/2009, at 4:42 PM, Kyle Sluder wrote:


Sounds like a job for a custom NSDocumentController subclass.


Of course, thanks for the pointer.

The user should not be able to do a Save As. I also don't really  
want the Command-Clickable title in the document window as the  
location on disk is not relevant to the user.


Your NSDocument subclass can handle this  And you can disable the  
titlebar path control easily enough.


Ah, I see, I can override -synchronizeWindowTitleWithDocumentName in  
NSWindowController. That is easier than I thought.


However, I still want one window per app, undo support and Save  
menu item functionality, which all come for free with the  
NSDocument architecture.


I assume you meant one window per document?


Yes, sorry, that was a typo.

Would I be best off to migrate away from the NSDocumentController/ 
NSDocument architecture and shoehorn my own document management  
controller logic in its place?


No. You will still get a lot out of NSDocument with a moderate  
amount of customization.



Great, thanks!

--
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 arch...@mail-archive.com


Re: What about revamping OpenUp.app for Snow Leopard?

2009-09-04 Thread Chris Hanson

On Sep 3, 2009, at 10:14 PM, Scott Anguish wrote:

Looking inside zip/tar/tar.gz files (something OpenUp never did)  
would best be accomplished by writing a QuickLook plug-in (which  
probably exists.


I don’t know about any Quick Look plug-ins, but the ZipBrowser example  
code both provides a skeleton of browsing zip archives and  
demonstrates a number of modern Cocoa development techniques:


This example shows two versions of a single application: the  
original version of the application, in ZipBrowserBefore, and the  
polished version, in ZipBrowserAfter. ZipBrowser is a simple  
document-based application used for perusing the contents of a zip  
archive without having to unarchive it. The modifications between  
ZipBrowserBefore and ZipBrowserAfter fall into six categories: 64- 
bit readiness, performance and responsiveness, security,  
localization and internationalization, usability, and accessibility.


Download ZipBrowser 1.1 here:

http://developer.apple.com/mac/library/samplecode/ZipBrowser/index.html

You can also search for ZipBrowser in the Snow Leopard documentation,  
and download  open the project right within Xcode.


  — Chris

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


Re: What about revamping OpenUp.app for Snow Leopard?

2009-09-04 Thread Charles Srstka

On Sep 4, 2009, at 12:14 AM, Scott Anguish wrote:

Looking inside zip/tar/tar.gz files (something OpenUp never did)  
would best be accomplished by writing a QuickLook plug-in (which  
probably exists.


Hopefully this isn't considered too much of a shameless plug, but the  
latest release of Pacifist includes a QuickLook plug-in that can view  
many of the formats that Pacifist can read, which include zip, tar,  
tar.gz, tar.bz2, and others.


Charles
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


performSelectorInBackground:anObject:

2009-09-04 Thread Rick C.
hello,

i use this method at various places in my project as an easy/safe way to do 
some background processing.  i realize with every call it will initiate the 
selector on a new background thread.  but i have noticed by observing activity 
monitor that it takes quite some time for these threads to go away once they 
have been initiated.  as far as i know the only thing required it having an 
autorelease pool inside the selector that is triggered by this method.  are 
there any additional steps to take to make sure these threads and the memory 
being used are ended properly?  or maybe there is a way i can end them 
manually?  as a note...snow leopard does a better job of getting rid of the 
finished threads showing in activity monitor than leopard.

thanks,

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 arch...@mail-archive.com


removeObserver:forKeyPath: thread safe?

2009-09-04 Thread Andreas Grosam

Hello,

while there are many aspects regarding thread-safety in KVO, I'm  
particularly interested in this question:



Using automatic KVO, is it safe to send  removeObserver:forKeyPath:  
from within a thread while there is another thread which may change  
the property that is being observed?


Pointers to a more comprehensive discussion about thread-safety in KVO  
is also very much appreciated.



Thanks in advance!


Regards
Andreas
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


Re: Problem with Core Midi on 10.6

2009-09-04 Thread Peter Zegelin

Thanks Bill,

Yes this was the problem.

Peter


On 04/09/2009, at 8:43 AM, William Stewart wrote:


Peter

That's the V1 versus V2 issue I was alluding too below. Up to Snow  
Leopard, 'aunt' type audio units (V1) worked. With SL we removed  
these (so it would fail). The V2 audio units (type is 'aumd' for a  
music device audio unit) have been available since 10.2


Bill

On Aug 29, 2009, at 5:06 AM, Peter Zegelin wrote:

Good news is I installed 10.6 this afternoon and found the error  
straight away. I had the ComponentDescription fields filled in  
incorrectly when creating a synthNode for my graph. The fix was  
easy but on reflection I am surprised it ever worked! Which it has  
for 4 years.


Peter


On 28/08/2009, at 1:47 PM, Peter Zegelin wrote:


Thanks William,

AFAIK RB doesn't do anything other than call through to the  
framework, as you can use pretty well all of Cocoa within it, if  
you are prepared to. I create my own graph and connect it all up  
just using declares.


At this point I think its best if I see if I can reproduce the  
problem when I install 10.6 this week end. Presumably I will get  
some sort of error when I try to create a graph, synth etc.


I was mainly asking the list to see if I'd missed something  
obvious as I don't follow it too closely.


I will report back.

Peter


On 28/08/2009, at 1:20 PM, William Stewart wrote:


I have an idea.

We have deprecated the V1 audio units for many releases now and  
in 10.6 we removed them. My guess is that Real Basic is relying  
on the V1 audio units, so it doesn't find them and it doesn't  
work - basically, there's no V1 DLSSynth.


It would be easy for them to fix (we ship a V2 DLSSynth since  
10.1), but they would need to fix that for you I think (unless  
you can construct your own graph)


Bill


___
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list  (coreaudio-...@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/coreaudio-api/bills 
%40apple.com


This email sent to bi...@apple.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 arch...@mail-archive.com


Re: Finding Out When my NSSplitView has Moved

2009-09-04 Thread Peter Zegelin

Thanks Jens,

Wouldn't that also get called continuously?

I think I have it working by getting the  
NSSplitViewDidResizeSubviewsNotification and just checking further to  
see if the subview has collapsed.


Peter

On 04/09/2009, at 1:11 PM, Jens Alfke wrote:



On Sep 3, 2009, at 6:27 PM, Peter Zegelin wrote:

I need to find out when my split view has moved so I can configure  
some buttons to reflect the change but I am finding it difficult to  
get that info. The splitview is a subclass of BWToolkit/BWSplitView.


Just observe either of the subviews and watch for frame-change  
notifications.


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

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


Re: What about revamping OpenUp.app for Snow Leopard?

2009-09-04 Thread Bill Cheeseman


On Sep 4, 2009, at 5:41 AM, Charles Srstka wrote:

the latest release of Pacifist includes a QuickLook plug-in that can  
view many of the formats that Pacifist can read, which include zip,  
tar, tar.gz, tar.bz2, and others


I just tried installing Charles's Pacifist.qlgenerator alongside  
Suspicious Package.qlgenerator, and I'm pleased to report that they  
don't seem to conflict. Pacifist.qlgenerator reveals the contents of  
zip files, and, with both installed, Suspicious Package is used (on my  
computer) instead of Pacifist.qlgenerator when I look at mpkg  
installer files. This is good because, currently at least, Suspicious  
Generator provides more information about mpkg files (e.g., lets you  
read scripts in the mpkg file, such as postinstall and postupgrade  
scripts, with a promise to add additional information such as  
privileges in the future).


Charles, you should beef up Pacifist.qlgenerator to provide more info  
about mpkg files, and maybe about zip files, too!



--

Bill Cheeseman
b...@cheeseman.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 arch...@mail-archive.com


Re: Distinguishing between return and enter in NSTextField

2009-09-04 Thread Michael Domino
Rick,

My Mac has a single enter/return key (both words appear on the key, I hate
not having a separate enter key). What would you do in that case?

On Sep 3, 2009, at 11:18 AM, Rick Mann rm...@latencyzero.com wrote:

 I would like to use the delegate, but it sends me insertNewLine: for
 both keys.

 Is there another method I can implement?

 On Sep 3, 2009, at 11:14:20, Douglas Davidson wrote:

 Short answer:  no. Stay away from keyDown: and look at delegate
 methods instead. I have a standard rant on this topic; I don't have
 it handy but it should be in the list archives.

 Douglas Davidson



 On Sep 3, 2009, at 10:54 AM, Rick Mann rm...@latencyzero.com wrote:

 Hi. I'd like to insert a new line when the user presses return in
 an NSTextField, but take completely custom action when they press
 Enter. Is the only way to do this to subclass NSTextField and
 override the NSResponder keyDown: method?

 TIA,
 Rick



-- 
Michael Domino
michael.dom...@identityfinder.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 arch...@mail-archive.com


Re: Image Thresholding

2009-09-04 Thread Uli Kusterer

Am 03.09.2009 um 07:29 schrieb fawad shafi:

I want to convert grayscale or RGB image to Binary Image.
Please provide sample code.


 You've misunderstood something: *you* provide sample code, tell us  
where it fails and what you've tried to find out why it fails, and we  
help you by correcting any mistakes you might have made that we can  
spot.


 Also, what do you mean by binary image? A black-and-white image?  
An image file? TIFF? JPEG? PNG?


 Have you looked at CoreImage, CoreGraphics, ImageIO documentation?

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 arch...@mail-archive.com


Re: What about revamping OpenUp.app for Snow Leopard?

2009-09-04 Thread Jean-Daniel Dupas


Le 4 sept. 2009 à 13:20, Bill Cheeseman a écrit :



On Sep 4, 2009, at 5:41 AM, Charles Srstka wrote:

the latest release of Pacifist includes a QuickLook plug-in that  
can view many of the formats that Pacifist can read, which include  
zip, tar, tar.gz, tar.bz2, and others


I just tried installing Charles's Pacifist.qlgenerator alongside  
Suspicious Package.qlgenerator, and I'm pleased to report that they  
don't seem to conflict. Pacifist.qlgenerator reveals the contents of  
zip files, and, with both installed, Suspicious Package is used (on  
my computer) instead of Pacifist.qlgenerator when I look at mpkg  
installer files. This is good because, currently at least,  
Suspicious Generator provides more information about mpkg files  
(e.g., lets you read scripts in the mpkg file, such as postinstall  
and postupgrade scripts, with a promise to add additional  
information such as privileges in the future).


Charles, you should beef up Pacifist.qlgenerator to provide more  
info about mpkg files, and maybe about zip files, too!


For archives types, have a look at BetterZipQL. Read almost all known  
archives formats.



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


Having problem with fetch request in NSDocument based application

2009-09-04 Thread Clayton Leitch

Here is the code in MyDocument:
-(IBAction)calculateStat:(id)sender{
fetchedObjects = nil;
context = [self managedObjectContext];
fetchRequest = [[NSFetchRequest alloc] init];
	entity = [NSEntityDescription entityForName:@Measurement  
inManagedObjectContext:context];

[fetchRequest setEntity:entity];
	fetchedObjects = [context executeFetchRequest:fetchRequest  
error:error];

if (fetchedObjects == nil) {
NSLog(@error);
[errorMessage setStringValue:@no objects];
}else {
[errorMessage setIntValue:[fetchedObjects count]];
}


[fetchRequest release];
The fetchedObjects count is always 0.  Any idea what silly thing I  
forgot.


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 arch...@mail-archive.com


Re: Having problem with fetch request in NSDocument based application

2009-09-04 Thread I. Savant

On Sep 4, 2009, at 9:47 AM, Clayton Leitch wrote:


Here is the code in MyDocument:
-(IBAction)calculateStat:(id)sender{
fetchedObjects = nil;
context = [self managedObjectContext];
fetchRequest = [[NSFetchRequest alloc] init];
	entity = [NSEntityDescription entityForName:@Measurement  
inManagedObjectContext:context];

[fetchRequest setEntity:entity];
	fetchedObjects = [context executeFetchRequest:fetchRequest  
error:error];

if (fetchedObjects == nil) {
NSLog(@error);
[errorMessage setStringValue:@no objects];
}else {
[errorMessage setIntValue:[fetchedObjects count]];
}


[fetchRequest release];
The fetchedObjects count is always 0.  Any idea what silly thing I  
forgot.


  ... do you *have* any Measurement instances in your context? Have  
you used the debugger to verify that all your variables were assigned  
objects when / as you expected?


--
I.S.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Having problem with fetch request in NSDocument based application

2009-09-04 Thread Andy Lee

Are any objects along the way nil?

--Andy

On Sep 4, 2009, at 9:47 AM, Clayton Leitch wrote:


Here is the code in MyDocument:
-(IBAction)calculateStat:(id)sender{
fetchedObjects = nil;
context = [self managedObjectContext];
fetchRequest = [[NSFetchRequest alloc] init];
	entity = [NSEntityDescription entityForName:@Measurement  
inManagedObjectContext:context];

[fetchRequest setEntity:entity];
	fetchedObjects = [context executeFetchRequest:fetchRequest  
error:error];

if (fetchedObjects == nil) {
NSLog(@error);
[errorMessage setStringValue:@no objects];
}else {
[errorMessage setIntValue:[fetchedObjects count]];
}


[fetchRequest release];
The fetchedObjects count is always 0.  Any idea what silly thing I  
forgot.


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

This email sent to ag...@mac.com


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Having problem with fetch request in NSDocument based application

2009-09-04 Thread I. Savant


  Taking this back on-list where it belongs.


On Sep 4, 2009, at 9:53 AM, Clayton Leitch wrote:

Yes, there is a Measurement instance in the the data model.   
Debugger shows that everything is set properly until the array gets  
no objects in answer to the query.



  Are you sure? How have you verified all of this?

  To verify an instance exists, have you saved the context to the  
store (as XML, perhaps) and looked inside the resulting file to make  
sure the instance is actually there?


--
I.S.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Having problem with fetch request in NSDocument based application

2009-09-04 Thread Clayton Leitch

Yes, I saved it as XML and opened the file.  Below is what I found:
?xml version=1.0?
!DOCTYPE database SYSTEM file:///System/Library/DTDs/CoreData.dtd

database
databaseInfo
version134481920/version
UUIDE968A00D-5333-4E12-909D-8709A682BBB7/UUID
nextObjectID124/nextObjectID
metadata
plist version=1.0
dict
keyNSPersistenceFrameworkVersion/key
integer246/integer
keyNSStoreModelVersionHashes/key
dict
keyMeasurement/key
data
iatDMdoCO7TpSerGFX5eZReCv4U51ctNJow7oefYP1o=
/data
/dict
keyNSStoreModelVersionHashesVersion/key
integer3/integer
keyNSStoreModelVersionIdentifiers/key
array/array
key_NSAutoVacuumLevel/key
string2/string
/dict
/plist
/metadata
/databaseInfo
object type=MEASUREMENT id=z102
attribute name=wheretaken type=stringHome/attribute
attribute name=timemeasured  
type=date252536460./attribute

attribute name=systolicpressure type=int32128/attribute
attribute name=pluserate type=int3275/attribute
attribute name=diastolicpressure type=int3288/attribute
attribute name=datemeasured  
type=date273470400./attribute

/object
object type=MEASUREMENT id=z103
attribute name=wheretaken type=stringHome/attribute
attribute name=timemeasured  
type=date252554760./attribute

attribute name=systolicpressure type=int32133/attribute
attribute name=pluserate type=int3278/attribute
attribute name=diastolicpressure type=int3290/attribute
attribute name=datemeasured  
type=date273643200./attribute

/object
As you can see there are Measurement objects.
On Sep 4, 2009, at 10:06 AM, I. Savant wrote:



 Taking this back on-list where it belongs.


On Sep 4, 2009, at 9:53 AM, Clayton Leitch wrote:

Yes, there is a Measurement instance in the the data model.   
Debugger shows that everything is set properly until the array gets  
no objects in answer to the query.



 Are you sure? How have you verified all of this?

 To verify an instance exists, have you saved the context to the  
store (as XML, perhaps) and looked inside the resulting file to make  
sure the instance is actually there?


--
I.S.




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Having problem with fetch request in NSDocument based application

2009-09-04 Thread I. Savant

On Sep 4, 2009, at 10:24 AM, Clayton Leitch wrote:


Yes, I saved it as XML and opened the file.  Below is what I found:


  Okay, so since there're definitely some instances in the store, and  
nothing is nil in the debugger, the only thing remaining is your  
message delivery.


  ... have you specifically verified in the debugger that the array  
in fact has a count of zero?


  If you find that it does not, I suspect your errorMessage field's  
outlet isn't connected and its default string is set to 0. That way,  
no matter what the count is, the field is never updated from 0.


  That's really the only thing I can see. I've gone over your code  
several times and can't find anything wrong with it. So, if someone  
points out something obvious, you're not the only one who will be  
embarrassed. :-)


--
I.S.




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Having problem with fetch request in NSDocument based application

2009-09-04 Thread I. Savant

On Sep 4, 2009, at 9:47 AM, Clayton Leitch wrote:


fetchedObjects = nil;

...

fetchRequest = [[NSFetchRequest alloc] init];

...
	fetchedObjects = [context executeFetchRequest:fetchRequest  
error:error];

...

[fetchRequest release];


  One other thing (memory-management-related). You seem not to be  
using garbage collection (since you release your fetch request), but  
your example indicates you don't appear to be retaining your  
fetchedObjects array (or releasing an existing one at the top of your  
method). You might want to think about that more closely.


--
I.S.




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Binding table columns that change at runtime

2009-09-04 Thread BareFeet

Hi all,

I'm fairly comfortable with setting up bindings for table columns to  
an NSArrayController. Now I'd like to use bindings where the columns  
change at runtime. Is this possible? I am avoiding using CoreData  
(so I can run on Mac OS X 10.3 ish and upwards).


Picking up on my own post:

I managed to create table columns at runtime and bind them to my array  
controller, using:


[newTableColumn bind:@value toObject:dataRowsController withKeyPath: 
[NSString stringWithFormat: @arrangedObjects.%@, columnName]  
options:nil];


I've appended the full code below. It took me a while to realise that  
in the bind:toObject:withKeyPath:options: method, the withKeyPath:  
parameter concatenates two fields that appear in Interface Builder's  
GUI: Controller Key and Model Key Path.


// Code to add new columns and bind them to the array controller
// Remove old columns:
NSMutableArray* oldTableColumns = [NSArray arrayWithArray:  
[dataRowsTableView tableColumns]];

for (NSTableColumn* oldTableColumn in oldTableColumns)
[dataRowsTableView removeTableColumn:oldTableColumn];

// Add new columns:
NSArray* columnNameArray = [[dataRowsArray objectAtIndex:0] allKeys];
for (NSString* columnName in columnNameArray)
{
	NSTableColumn* newTableColumn = [[[NSTableColumn alloc]  
initWithIdentifier:columnName] autorelease];

[[newTableColumn headerCell] setStringValue:columnName];
[dataRowsTableView addTableColumn:newTableColumn];
	[newTableColumn bind:@value toObject:dataRowsController withKeyPath: 
[NSString stringWithFormat: @arrangedObjects.%@, columnName]  
options:nil];

}

Now I've also bound my dataRowsController to the selection of another  
controller (an NSTreeController). I have a dataRowsArray accessor  
method setup, so the correct array loads. If the table columns are  
already in place (such as by me manually running the code above), the  
data displays perfectly. But I can't see how to trigger my code above  
(that creates and binds table columns) when the selection changes.


Any ideas?

Thanks,
Tom
BareFeet

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


Re: Having problem with fetch request in NSDocument based application

2009-09-04 Thread Clayton Leitch
The debugger shows 0 objects in the array.  Interestingly, this same  
code works perfectly in a non-NSDocument version of this application.

On Sep 4, 2009, at 10:29 AM, I. Savant wrote:


On Sep 4, 2009, at 10:24 AM, Clayton Leitch wrote:


Yes, I saved it as XML and opened the file.  Below is what I found:


 Okay, so since there're definitely some instances in the store, and  
nothing is nil in the debugger, the only thing remaining is your  
message delivery.


 ... have you specifically verified in the debugger that the array  
in fact has a count of zero?


 If you find that it does not, I suspect your errorMessage field's  
outlet isn't connected and its default string is set to 0. That  
way, no matter what the count is, the field is never updated from 0.


 That's really the only thing I can see. I've gone over your code  
several times and can't find anything wrong with it. So, if someone  
points out something obvious, you're not the only one who will be  
embarrassed. :-)


--
I.S.






___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Having problem with fetch request in NSDocument based application

2009-09-04 Thread I. Savant

On Sep 4, 2009, at 10:38 AM, Clayton Leitch wrote:

The debugger shows 0 objects in the array.  Interestingly, this same  
code works perfectly in a non-NSDocument version of this application.


  Wait, when you say it works in a non-NSDocument-based version, it  
makes me wonder: did you copy code from a non-doc-based app into a doc- 
based app? If so, is your document subclass really an NSDocument  
subclass or an NSPersistentDocument subclass?


--
I.S.



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: defaultConnection in Snow Leopard

2009-09-04 Thread Tim Murison
On 04/09/09 10:38 AM, Gerriet M. Denkmann gerr...@mdenkmann.de wrote:
 
 But it fails to mention, what I should use instead.
 Any ideas?

Take a look at serviceConnectionWIthName:rootObject:, new in 10.5.


***

This e-mail and its attachments are confidential, legally privileged, may be 
subject to copyright and sent solely for the attention of the addressee(s).
Any unauthorized use or disclosure is prohibited. Statements and opinions 
expressed in this e-mail may not represent those of Radialpoint.

Le contenu de ce courriel est confidentiel, privilégié et peut être soumis à 
des droits d'auteur. Il est envoyé à l'intention exclusive de son ou de ses
destinataires. Il est interdit de l'utiliser ou de le divulguer sans 
autorisation. Les opinions exprimées dans le présent courriel peuvent diverger 
de celles de Radialpoint.
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


Re: defaultConnection in Snow Leopard

2009-09-04 Thread Kyle Sluder
On Sep 4, 2009, at 7:38 AM, Gerriet M. Denkmann  
gerr...@mdenkmann.de wrote:



But it fails to mention, what I should use instead.


The release notes say, but I don't have them in front of me andjim  
hesitant to go by memory for fear of miquoting.


--Kyle Sluder
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Having problem with fetch request in NSDocument based application

2009-09-04 Thread Clayton Leitch
I re-typed everything in a freshly produced document based  
application.  Below is the top of the MyDocument.h file.

//
//  MyDocument.h
//  Blood Pressure Record
//
//  Created by Clayton Leitch on 9/3/09.
//  Copyright __MyCompanyName__ 2009 . All rights reserved.
//

#import Cocoa/Cocoa.h

@interface MyDocument : NSPersistentDocument {

As you can see it is an NSPresistentDocument.
On Sep 4, 2009, at 10:44 AM, I. Savant wrote:


On Sep 4, 2009, at 10:38 AM, Clayton Leitch wrote:

The debugger shows 0 objects in the array.  Interestingly, this  
same code works perfectly in a non-NSDocument version of this  
application.


 Wait, when you say it works in a non-NSDocument-based version, it  
makes me wonder: did you copy code from a non-doc-based app into a  
doc-based app? If so, is your document subclass really an NSDocument  
subclass or an NSPersistentDocument subclass?


--
I.S.





___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


defaultConnection in Snow Leopard

2009-09-04 Thread Gerriet M. Denkmann

Snow Leopard tells me about defaultConnection (NSConnection):
Returns the default NSConnection object for the current thread.  
(Deprecated in Mac OS X v10.6.)


But it fails to mention, what I should use instead.
Any ideas?

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

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


Re: Having problem with fetch request in NSDocument based application

2009-09-04 Thread I. Savant

On Sep 4, 2009, at 10:48 AM, Clayton Leitch wrote:

I re-typed everything in a freshly produced document based  
application.


  So you created a new Core Data Document based application and put  
your code and data model into it, and it's still not working  
correctly? I'm utterly mystified.


  Since this seems like a small project that you haven't gotten too  
far with, it might be a good idea to zip this up (delete the build  
folder so it's small) and post it to a file sharing site like rapidshare.com 
 ... this will allow everybody to take a look at it and see if they  
can spot the problem.


  The code itself looks fine. I can't imagine why it's not working.

--
I.S.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Distinguishing between return and enter in NSTextField

2009-09-04 Thread Rick Mann
I wouldn't do anything at all. I'd still treat return and enter  
differently.


As a separate matter, I hate not having a separate enter key. I wrote  
a program that re-maps the right-hand option key to behave like an  
enter key.


On Sep 4, 2009, at 05:31:15, Michael Domino wrote:


Rick,

My Mac has a single enter/return key (both words appear on the key,  
I hate not having a separate enter key). What would you do in that  
case?


On Sep 3, 2009, at 11:18 AM, Rick Mann rm...@latencyzero.com wrote:

 I would like to use the delegate, but it sends me insertNewLine: for
 both keys.

 Is there another method I can implement?

 On Sep 3, 2009, at 11:14:20, Douglas Davidson wrote:

 Short answer:  no. Stay away from keyDown: and look at delegate
 methods instead. I have a standard rant on this topic; I don't have
 it handy but it should be in the list archives.

 Douglas Davidson



 On Sep 3, 2009, at 10:54 AM, Rick Mann rm...@latencyzero.com  
wrote:


 Hi. I'd like to insert a new line when the user presses return in
 an NSTextField, but take completely custom action when they press
 Enter. Is the only way to do this to subclass NSTextField and
 override the NSResponder keyDown: method?

 TIA,
 Rick



--
Michael Domino
michael.dom...@identityfinder.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 arch...@mail-archive.com


Re: defaultConnection in Snow Leopard

2009-09-04 Thread Jean-Daniel Dupas


Le 4 sept. 2009 à 17:18, Kyle Sluder a écrit :

On Sep 4, 2009, at 7:38 AM, Gerriet M. Denkmann gerr...@mdenkmann.de 
 wrote:



But it fails to mention, what I should use instead.


The release notes say, but I don't have them in front of me andjim  
hesitant to go by memory for fear of miquoting.



Quote from the Release notes:
NSConnection method deprecation
The +defaultConnection method in NSConnection has been deprecated.  
This provided a singleton connection object per thread. For what  
should be obvious reasons, it was never a particularly good idea to  
use this method/connection unless you had absolute certainty that no  
one else was using it (or going to use it), which was problematic.  
Just use [[NSConnection new] autorelease] instead (in conjunction with  
NSThread's thread dictionary if you must have one stored per-thread,  
though as a design point that may cause you problems in the future, so  
it would be best to avoid a per-thread connection)



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


EXC_BAD_ACCESS in a Core Data application

2009-09-04 Thread Ian Piper

Hi all,

I have been putting together a Core Data application that has three  
windows. I wanted to control the appearance and disappearance of these  
windows during the course of the application, so added menu items and  
buttons with the action makeKeyAndOrderFront. However, I found that  
the program hung while running: specifically while re-opening a window  
that I had previously closed. The GDB message was 'Program received  
signal:  “EXC_BAD_ACCESS”.' I couldn't get very far with this: Tech  
QA 1367 said that it was probably the result of over-releasing an  
object. I couldn't see how that had happened, since I had really just  
gone with the code generated by Xcode: so I wasn't knowlingly  
releasing anything that I could see. However, after a bit more digging  
I realised that the problem was in IB: in the Window attributes I  
noticed that the Behaviour option Release When Closed was checked.  
When I unchecked this option the application ran fine - no hang.


I suppose that when I close the window it is released, so when I try  
to open it again there is nothing to open.


My questions are:

1. Why does a window default to having this option checked? It seems  
odd, since the auto-generated code seems to look after memory  
management and therefore this is more or less guaranteeing a problem.
2. What is the best strategy for tracking down this kind of problem? I  
tried using Instruments and that indeed showed a memory leak at the  
point that I tried to load this window, but I couldn't see how to use  
this information to zero in on the root cause.
3. Is there a way to attach a breakpoint to a UI action (such as  
clicking on the File menu, which is where the freeze happened)?
4. Without wishing to open any cans of worms, a Core Data application  
like this seems like a sensible place to use GC. Is that right?


Any illumination will be joyfully received.


Ian.
--
ianpi...@mac.com
07590 685840 | 01926 811383






___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


Re: EXC_BAD_ACCESS in a Core Data application

2009-09-04 Thread Eric Hermanson

In my experience this can happen for at least 3 reasons.

1. Over-releasing an object, as you state.

2. Sending a message to an object that has already been released (i.e.  
deallocated).


3. Attempting to access or return a local variable that has not been  
initialized (although you may get a segmentation fault instead of a  
BAD_ACCESS, I can't remember).  For example,


- (BOOL)someMethod
{
BOOL returnValue;
// code in the method that never sets the returnValue to anything
return returnValue;  // this is bad.
}





On Sep 4, 2009, at 12:35 PM, Ian Piper wrote:


Hi all,

I have been putting together a Core Data application that has three  
windows. I wanted to control the appearance and disappearance of  
these windows during the course of the application, so added menu  
items and buttons with the action makeKeyAndOrderFront. However, I  
found that the program hung while running: specifically while re- 
opening a window that I had previously closed. The GDB message was  
'Program received signal:  “EXC_BAD_ACCESS”.' I couldn't get very  
far with this: Tech QA 1367 said that it was probably the result of  
over-releasing an object. I couldn't see how that had happened,  
since I had really just gone with the code generated by Xcode: so I  
wasn't knowlingly releasing anything that I could see. However,  
after a bit more digging I realised that the problem was in IB: in  
the Window attributes I noticed that the Behaviour option Release  
When Closed was checked. When I unchecked this option the  
application ran fine - no hang.


I suppose that when I close the window it is released, so when I try  
to open it again there is nothing to open.


My questions are:

1. Why does a window default to having this option checked? It seems  
odd, since the auto-generated code seems to look after memory  
management and therefore this is more or less guaranteeing a problem.
2. What is the best strategy for tracking down this kind of problem?  
I tried using Instruments and that indeed showed a memory leak at  
the point that I tried to load this window, but I couldn't see how  
to use this information to zero in on the root cause.
3. Is there a way to attach a breakpoint to a UI action (such as  
clicking on the File menu, which is where the freeze happened)?
4. Without wishing to open any cans of worms, a Core Data  
application like this seems like a sensible place to use GC. Is that  
right?


Any illumination will be joyfully received.


Ian.
--
ianpi...@mac.com
07590 685840 | 01926 811383






___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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/zmonster%40mac.com

This email sent to zmons...@mac.com


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


NSComboboxCell + setButtonBordered:

2009-09-04 Thread Andrew Shamel

Hi all,

I am having trouble with NSComboBoxCell's setButtonBordered: setting,  
having just updated to the latest XCode+IB versions in Snow Leopard.   
It appears that my choices are now between a bordered button with one  
arrow (setButtonBordered:YES) or a bordered button with two arrows  
(setBorderedButton:NO).


Does anyone know, is this an intentional change, a known problem, or  
am I just missing something?


Thanks so much for your help,

Peace,

Andy Shamel
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


Re: EXC_BAD_ACCESS in a Core Data application

2009-09-04 Thread Quincey Morris

On Sep 4, 2009, at 09:35, Ian Piper wrote:

I have been putting together a Core Data application that has three  
windows. I wanted to control the appearance and disappearance of  
these windows during the course of the application, so added menu  
items and buttons with the action makeKeyAndOrderFront. However, I  
found that the program hung while running: specifically while re- 
opening a window that I had previously closed. The GDB message was  
'Program received signal:  “EXC_BAD_ACCESS”.' I couldn't get very  
far with this: Tech QA 1367 said that it was probably the result of  
over-releasing an object. I couldn't see how that had happened,  
since I had really just gone with the code generated by Xcode: so I  
wasn't knowlingly releasing anything that I could see. However,  
after a bit more digging I realised that the problem was in IB: in  
the Window attributes I noticed that the Behaviour option Release  
When Closed was checked. When I unchecked this option the  
application ran fine - no hang.


I suppose that when I close the window it is released, so when I try  
to open it again there is nothing to open.


Sometimes tracking down problems like this can be easy, sometimes  
hard. Either way, you need a precise understanding of what you're  
seeing, and based on the above description you don't have a lot of  
precision.


When you get EXC_BAD_ACCESS, your app crashes, not hangs. Since you  
were running monitored by gdb, the crash was intercepted by gbd, which  
held the app in a stopped state. That's not what's usually meant by a  
hang.


When gdb gets control, the first thing you need to do is to look at  
the backtrace -- what was the app doing? In the easy cases, that will  
tell you precisely what's going wrong (e.g. trying to message a  
deallocated object). In the hard cases, it won't help much because you  
crashed on a secondary error far beyond the point of the original  
problem. Still, you should post the backtrace (or at least the first  
few lines of it) to the list when asking for advice.


The problem isn't in IB. It's in your code. Your code crashes when  
Release When Closed is checked. Randomly flipping checkboxes in IB  
until a crash apparently goes away is a pretty lousy approach to  
application development. Knowing that your code crashes when Release  
When Closed is checked is, however, a clue to what's wrong.


At the coding level, there's nothing that you can usefully call  
opening a window, so the statement that there is nothing to open  
makes no sense. Windows can be initialized, loaded, shown and ordered  
front. Which of those gets done where and by whom depends on how the  
window is defined.


If a window is released when it's closed, then you obviously have to  
recreate (or cause to be recreated) a new NSWindow object if you want  
to display the window again. If you're using a window controller  
(which I highly recommend you do), then the window controller is  
responsible for creating the NSWindow object (well, loading the  
NSWindow object from the NIB, really). If you're trying to do without  
a window controller, you're responsible for managing your window NIB  
contents yourself, and that's a task with a few memory management  
gotchas.


Most likely, your EXC_BAD_ACCESS is a memory management problem.  
Either you're not managing the window NIB contents properly, or your  
calls to makeKeyAndOrderFront: are using a pointer to a NSWindow that  
got deallocated/garbage collected. Obviously, if Release When Closed  
is checked, you can't just store a pointer to you windows somewhere  
once at the start of application execution. You need to change those  
pointers whenever a window is recreated. Or use a window controller to  
do all this for you, since that's what it's for.


FWIW.

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


Re: NSScrollView: Scrollers invisible under Mac OS X 10.6

2009-09-04 Thread Matthias Arndt

Hi Graham, hi Kyle!

Another thing to be aware of is that if you do it right, the ruler  
views managed by the scrollview also just work and allow for the  
view's zoom. I don't think you should be doing what you're doing to  
the NSClipView.


I don't know what crossed my mind, but I used methods in my NSDocument  
class to scale the clip view ... When looking into Graham's GCZoomView  
I found nearly 90% of my code (although much better structured!), but  
used for scaling the custom view. I think I got a better understanding  
of scroll views, now:


NSDocument - NSScrollView - NSClipView - Custom View

The document wires IBActions for zoom actions. The scroll view  
provides rulers / scrollers (more or less) automatically and contains  
a subview with the clipped content of the custom view. The scaling is  
done in the custom view itself, changing its frame size, but its  
internal coordinates remain unchanged.


Things have worked out well, the scrollers appear just as expected.  
Tomorrow I just have to tweak a little for zooms  1, as the custom  
view should not be reduced  100% (to show e. g. a grid), but the  
drawing itself has to. So problem, I did that before by handling the  
zoom factor inside -drawRect.


Thanks again a lot for your help!

Matthias
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


Re: performSelectorInBackground:anObject:

2009-09-04 Thread Jens Alfke


On Sep 4, 2009, at 2:55 AM, Rick C. wrote:

i use this method at various places in my project as an easy/safe  
way to do some background processing.  i realize with every call it  
will initiate the selector on a new background thread.  but i have  
noticed by observing activity monitor that it takes quite some time  
for these threads to go away once they have been initiated.


Foundation may be keeping the thread alive for a while in case you  
want to run another background task on it, but I'm not sure.


are there any additional steps to take to make sure these threads  
and the memory being used are ended properly?


Not that I know of. If you're going to be running a lot of background  
operations and want more control over threading, try using  
NSOperationQueue instead (or the new Grand Central stuff in 10.6.)


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

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


Re: Input Managers in Snow Leopard

2009-09-04 Thread Kyle Sluder
I'd like to clarify what I said before.

What you want to do is not what input managers were intended for.  In
fact, what you want to do would go beyond the efforts of most input
manager haxies, because it would involve replacing window server or
Dock functionality.  There are a lot of very serious questions that
arise: How do you trap minification?  What happens to Carbon windows?
What if multiple users are logged in?  And so on.

In general, this list does not support discussion of code injection
because it leads to headaches.  Not too long ago, we received a
support request from a user who experienced a crash in one of our apps
after clicking the pencil.  There is no pencil in this app.  It
turns out the pencil was part of a menu-editing haxie.  We lost out
on this because it cost us time to track down what was going on, and
the user lost out because we had to inform them that it was someone
else's problem and we couldn't assist.

As far as not liking how the Dock does things, that's perfectly
understandable.  You're certainly not alone.  :)  The best you can do,
though, it file a Radar.

--Kyle Sluder
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: EXC_BAD_ACCESS in a Core Data application

2009-09-04 Thread Kyle Sluder
On Fri, Sep 4, 2009 at 9:35 AM, Ian Piperianpi...@mac.com wrote:
 I suppose that when I close the window it is released, so when I try to open
 it again there is nothing to open.

Yep.  Common pitfall.

 1. Why does a window default to having this option checked? It seems odd,
 since the auto-generated code seems to look after memory management and
 therefore this is more or less guaranteeing a problem.

History?  It's rare that any app actually takes advantage of Release
When Closed and/or Visible At Launch nowadays.  I've filed a Radar
asking that these be hidden, or at least their defaults changed.

 2. What is the best strategy for tracking down this kind of problem? I tried
 using Instruments and that indeed showed a memory leak at the point that I
 tried to load this window, but I couldn't see how to use this information to
 zero in on the root cause.

NSZombie.  Setting NSZombieEnabled=YES in your environment variables
will cause released objects to turn into zombie instances rather than
being deallocated.  Then when you message them they will log to the
console.

On Snow Leopard, use the Zombies Instruments.app template.  It's on
the Run  Run with Performance Tool menu.  It enables zombies and
presents them in a very nice interface.

 3. Is there a way to attach a breakpoint to a UI action (such as clicking on
 the File menu, which is where the freeze happened)?

It would require some serious conditional breakpoint actions.

 4. Without wishing to open any cans of worms, a Core Data application like
 this seems like a sensible place to use GC. Is that right?

There have been known GC incompatibilities in Core Data (specifically
with the SQLite store) in the past.  These are obviously bugs, and if
you encounter any you should file a bug report.  Overall GC seems as
stable with Core Data as it is with other technologies.

--Kyle Sluder
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


capturing a partial screen.

2009-09-04 Thread Development
I am attempting to capture part of the user screen, for instance a  
window. I'm using the OpenGL screen capture example code to build on  
so the following is my capture code. When I attempt to capture I get a  
garbled screen so I know I'm not passing the right value somewhere but  
I don't know where. Forgive me I'm very new to opengl.


-(void)readScreenRect:(NSRect)rect
{
long w =rect.size.width;
long h =rect.size.height;

	[self readPartialScreenToBuffer:w  bufferHeight: h origin:NSMakePoint 
(0, 0) bufferBaseAddress: mData];

}
// Use this routine if you want to read only a portion of the screen  
pixels
- (void) readPartialScreenToBuffer: (size_t) width bufferHeight: 
(size_t) height origin:(NSPoint)origin bufferBaseAddress: (void *)  
baseAddress

{
// select front buffer as our source for pixel data
glReadBuffer(GL_FRONT);

//Read OpenGL context pixels directly.

// For extra safety, save  restore OpenGL states that are changed
glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT);

glPixelStorei(GL_PACK_ALIGNMENT, 4); /* Force 4-byte alignment */
glPixelStorei(GL_PACK_ROW_LENGTH, 0);
glPixelStorei(GL_PACK_SKIP_ROWS, 0);
glPixelStorei(GL_PACK_SKIP_PIXELS, 0);

//Read a block of pixels from the frame buffer
glReadPixels(origin.x,
 origin.y,
 width,
 height,
 GL_BGRA,
 GL_UNSIGNED_INT_8_8_8_8_REV,
 baseAddress);

glPopClientAttrib();

//Check for OpenGL errors
GLenum theError = GL_NO_ERROR;
theError = glGetError();

}
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


Re: Binding table columns that change at runtime

2009-09-04 Thread Sean McBride
On 9/4/09 9:41 AM, BareFeet said:

I'm fairly comfortable with setting up bindings for table columns to
an NSArrayController. Now I'd like to use bindings where the columns
change at runtime. Is this possible? I am avoiding using CoreData (so
I can run on Mac OS X 10.3 ish and upwards).

One way to do this is to create all the columns in IB and bind them all
in IB.  Then at runtime, programatically hide columns as needed.

--

Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Software Developer  Montréal, Québec, Canada


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


Re: Need a launch/loading screen to be displayed while app is starting/initializing?

2009-09-04 Thread Michael A. Crawford

Graham, I followed your advice.  However, there just one minor hitch.

I neglected to emphasize that I want the main window to be invisible  
until the startup processing finished.  At that time I would remove  
the startup window and display the main window.  To this end, I  
unchecked the 'Visible at Launch' checkbox for my main window in my  
NIB.  So, when my app starts, the main window is not seen.  In my - 
[applicationDidFinishLaunching] method, I load the startup window's  
controller and NIB file and display the startup window.  When the  
startup processing is finished, I close the startup window and release  
the controller.  Here is where things go south.


-[[NSApplication sharedApplication] mainWindow] returns nil!  So, when  
I call -[window makeKeyAndOrderFront] I'm doing so with a nil object.   
I don't know how to make my main window visible.  From what I could  
tell the mainWindow property of the NSApplication will be nil if the  
app is hidden.  When I call -[NSApplication isHidden] it returns  
FALSE.  So, I would expect the associated window to be available.  By  
unchecking the 'Visible at Launch' checkbox I've don't seem to have a  
method for displaying my main window.


I need the help of someone who understands more about initialization  
from the NIB and how all this stuff fits together so they can instruct  
me as to how to display my main window without re-structuring my app.


-Michael

On Sep 2, 2009, at 11:41 AM, Graham Cox wrote:



On 03/09/2009, at 1:28 AM, Michael A. Crawford wrote:

Anyway, I thought of changing the structure of my app so that the  
main nib displays the startup and then loads what used to be my  
main nib with my primary view, menu, etc.  I'm not experienced  
enough with AppKit to know whether or not that is a good approach.



Just add a startup panel and, if there is one, a controller for it  
to your main nib. You'd probably want to hook it into your app  
delegate so it can be taken down when launching finishes. There's  
nothing to stop you having multiple windows in a single nib, and in  
this case that would definitely be the simplest thing.


--Graham




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Need a launch/loading screen to be displayed while app is starting/initializing?

2009-09-04 Thread Jens Alfke


On Sep 4, 2009, at 11:18 AM, Michael A. Crawford wrote:


-[[NSApplication sharedApplication] mainWindow] returns nil!


-mainWindow returns the frontmost visible document window. It will  
never return a hidden window.


 So, when I call -[window makeKeyAndOrderFront] I'm doing so with a  
nil object.  I don't know how to make my main window visible.


Declare an instance variable for it, and wire that up in the nib to  
point to the window. Then just call [myWindow makeKeyAndOrderFront:  
self].


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

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


Application main menu title behavior change in 10.6

2009-09-04 Thread Jim Turner
Hi all,

I have an application (QuicKeys) that allows the user to define menu
selection as an action. In our latest version and under Leopard, we
present UI that replaces the main menu bar of our app with the menu
bar of the target app (via setMainMenu:) so that we can correctly
retrieve which menu item the user selected. Works like a champ, even
under Snow Leopard, save for one problem.  Under 10.6, the application
name is always QuicKeys, not Finder or whatever the target
application name would be. This is causing confusion with our users as
while the menu is really the target app's menu, it has the wrong
application name.

Reading through the release notes for AppKit on 10.6, I found that
there's been a change to how the main menu bar displays the
application's name.  Specifically, under the NSApplication
application menu item title header, it states ... the application
menu always reflects the application name.  This appears to be what's
causing the issue and I'm curious if anyone knows of a work-around?

Thanks
Jim
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


Re: EXC_BAD_ACCESS in a Core Data application

2009-09-04 Thread Rippit the Ogg Frog



Eric Hermanson wrote:
3. Attempting to access or return a local variable that has not been 
initialized (although you may get a segmentation fault instead of a 
BAD_ACCESS, I can't remember).  For example,


- (BOOL)someMethod
{
BOOL returnValue;
// code in the method that never sets the returnValue to anything
return returnValue;  // this is bad.
}


That's not really the best example.  If someMethod returns a BOOL, than 
no matter what value happens to occupy the memory that returnValue is 
placed into, it will always be taken as true or false.  It might not do 
the right thing, but won't be likely to cause a crash.


A better example of code that would cause a crash is to return either an 
uninitialized pointer, or a pointer to a struct that is a local variable.


--
Rippit the Ogg Frog
rip...@oggfrog.com
http://www.oggfrog.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 arch...@mail-archive.com


Re: setNeedsDisplayInRect not triggering drawRect?

2009-09-04 Thread Michael de Haan
Quincey, thank you. With your suggestion, and a private email, and  
lots of reading :-), I have made some progress.


On Sep 3, 2009, at 8:54 PM, Quincey Morris wrote:


On Sep 3, 2009, at 20:37, Michael de Haan wrote:


Now the part that does not work.

changeViewDelta as follows:

-(IBAction) changeViewDelta: (id) sender
{
NSRect newBounds;
newBounds.origin.x = newBounds.origin.x + 50.0;
.



}


If that's your actual code, it's likely not going to work, because  
you're failing to initialize newBounds. So you're offsetting  
newBounds 50 pixels from a trash origin.



good point...thanks.





I expected this to call drawRect,.


You don't say explicitly what class this 'changeViewDelta:' method  
is in. If it's in the view, then of course 'self' is the correct  
receiver for the message.


Yes it is.








Well, I **think** I now know what the problem is, but really not sure  
**why** this occurs. (I have considerably modified the project to try  
and understand this more fully).


(For simplicity, I implement an int state ivar to which drawRect  
refers)



In init, this:

- (id)initWithFrame:(NSRect)frame {
self = 
[self setCurrentColor:[NSColor yellowColor]];
[self setState: 1];
  .
}



Here is the relevant code in drawRect;

static int status = 0;
if (status == 0)
[ [self currentColor] set];
else if ( status % 2)
[[NSColor blackColor]set];
else
[[NSColor blueColor]set];
status +=1;


and in


-(IBAction) changeViewDelta: (id) sender
{
//NSRect newBounds = [self bounds];
	NSRect newBounds = [view bounds];   -- Issue: self  
bounds...see below.


newBounds.origin.x = newBounds.origin.x + 50.0;
newBounds.origin.y = newBounds.origin.y + 50.0;
newBounds.size.width = 50.0;
newBounds.size.height = 75.0;

[self setState:2];

	//[view setNeedsDisplayInRect:newBounds];  -same Issue...see  
below.

[self setNeedsDisplayInRect:newBounds];

}


With this code, the changes are as I would expect. The view is  
initially yellow. Subsequent changes via changeViewDelta show a small  
block in the window which changes color from black to blue.



Now, here is what is puzzling.

1) Even though, as Quincey alluded to, I would have expected the  
outlet view and self to be equivalent, they are not.It seems as if  
self to changeViewDelta is a different entity from the outlet view.
2) The ivar set in the init method is used by drawRect during the  
first pass ( if that is the correct term ie when status is 0), but  
in subsequent calls, initiated by setNeedsDisplayInRect, ( and I do  
understand that setNeedsDisplayInRect informs the view of a need for  
a refresh), even thought drawRect gets passed the correct dirtyRect  
bounds, when , from within drawRect I try to access the state Ivar  
( which should now be 2) , what drawRect sees is still 1...and that  
seems to be the problem. (Note: I have used an int for simplicity, but  
the same occurred if I tried to use a color directly from drawRect).



So, in summary, changeViewDelta **seems** to work as expected, but  
drawRect does not see these changes, even though both methods are in  
the same class.


I hope I have articulated this clearly.

:-)








___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


Re: setNeedsDisplayInRect not triggering drawRect?

2009-09-04 Thread Quincey Morris

On Sep 4, 2009, at 12:23, Michael de Haan wrote:

(For simplicity, I implement an int state ivar to which drawRect  
refers)



In init, this:

- (id)initWithFrame:(NSRect)frame {
   self = 
[self setCurrentColor:[NSColor yellowColor]];
[self setState: 1];
 .
}



Here is the relevant code in drawRect;

static int status = 0;
if (status == 0)
[ [self currentColor] set];
else if ( status % 2)
[[NSColor blackColor]set];
else
[[NSColor blueColor]set];
status +=1;


But this drawRect code doesn't use a state ivar, it uses a static  
variable status, so setState: won't ever affect drawRect.


1) Even though, as Quincey alluded to, I would have expected the  
outlet view and self to be equivalent, they are not. It seems as  
if self to changeViewDelta is a different entity from the outlet  
view.


Ah, that's a different kettle of fish. It sounds like you've created 2  
view instances by mistake. Because you've got an 'initWithFrame', the  
implication is that you are creating the view in code ('[[MyView  
alloc] initWithFrame: frame]' somewhere). Because you've got a view  
outlet, the implication is that you have a custom view object in a XIB  
file.


Those are two different view objects. If that's what you've got, you  
need to choose one technique or the other.



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


Re: setNeedsDisplayInRect not triggering drawRect?

2009-09-04 Thread Michael de Haan


On Sep 4, 2009, at 12:38 PM, Quincey Morris wrote:




1) Even though, as Quincey alluded to, I would have expected the  
outlet view and self to be equivalent, they are not. It seems as  
if self to changeViewDelta is a different entity from the outlet  
view.


Ah, that's a different kettle of fish. It sounds like you've created  
2 view instances by mistake. Because you've got an 'initWithFrame',  
the implication is that you are creating the view in code ('[[MyView  
alloc] initWithFrame: frame]' somewhere). Because you've got a  
view outlet, the implication is that you have a custom view object  
in a XIB file.


Those are two different view objects. If that's what you've got, you  
need to choose one technique or the other.




Oh...the pains of progress!!
Well, at least I got close to realizing **what** was wrong  :-)
In order to implement my action method, I used a new NSObject ( owner  
StretchView)  :-(..wellyou can guess the rest. I did not  
realize I could control-drag **to** the view from my pushButton to  
implement this.

It works perfectly now...thanks for sticking by me.
Michael.








___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


NSString -initWithData:encoding returning nil

2009-09-04 Thread Alex Reynolds
I have the following method, which digests a string with the SHA-1
algorithm:

- (NSString *) HMACSHA1DigestWithSecretKey:(NSString *)secretKey {
   unsigned char digest[CC_SHA1_DIGEST_LENGTH];
   char *keyCharPtr = strdup([secretKey UTF8String]);
   char *dataCharPtr = strdup([self UTF8String]);
   printf( HMACSHA1DigestWithSecretKey: \n\tkeyCharPtr --
\n%s\n\tdataCharPtr -- \n%s\n, keyCharPtr, dataCharPtr);

   CCHmacContext hctx;
   CCHmacInit(hctx, kCCHmacAlgSHA1, keyCharPtr, strlen(keyCharPtr));
   CCHmacUpdate(hctx, dataCharPtr, strlen(dataCharPtr));
   CCHmacFinal(hctx, digest);

   NSData *encryptedStringData = [NSData dataWithBytes:digest
length:CC_SHA1_DIGEST_LENGTH];
   NSLog(@ HMACSHA1DigestWithSecretKey: \n\tencryptedStringData
-- \...@\n,
[encryptedStringData description]);

   NSString *encryptedString = [[[NSString alloc]
initWithData:encryptedStringData encoding:NSUTF8StringEncoding]
autorelease];
   NSLog(@ HMACSHA1DigestWithSecretKey: \n\tencryptedString -- \...@\n,
encryptedString);

   free(keyCharPtr);
   free(dataCharPtr);

   return encryptedString;
}

However, the step:

NSString *encryptedString =
[[[NSString alloc] initWithData:encryptedStringData
encoding:NSUTF8StringEncoding] autorelease];

returns nil.

Here's a sample transcript. I'm trying to digest a test-case key and data
from the RFC 2202 docs (cf. http://www.faqs.org/rfcs/rfc2202.html):

 HMACSHA1DigestWithSecretKey:
keyCharPtr --
Jefe

dataCharPtr --
what do ya want for nothing?

 HMACSHA1DigestWithSecretKey:
encryptedStringData --
effcdf6a e5eb2fa2 d27416d5 f184df9c 259a7c79

 HMACSHA1DigestWithSecretKey:
encryptedString --
(null)

Why would the call to -initWithData:encoding (the encryptedString
variable) fail?

Thanks for your advice.

Regards,
Alex
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


Re: NSString -initWithData:encoding returning nil

2009-09-04 Thread Kyle Sluder
On Fri, Sep 4, 2009 at 2:28 PM, Alex Reynoldsalexpreyno...@gmail.com wrote:
 Why would the call to -initWithData:encoding (the encryptedString
 variable) fail?

Question: What are the chances of SHA1 output being a valid UTF-8 string?
Answer: Very close to 0.

You can't take pseudorandom data (which is the whole point of message
digests) and expect to make a string out of it.

What are you trying to do?  Make a string representation (like 0xabcd
= @ABCD)?

--Kyle Sluder
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: NSString -initWithData:encoding returning nil

2009-09-04 Thread Jens Alfke


On Sep 4, 2009, at 2:28 PM, Alex Reynolds wrote:


NSString *encryptedString =
[[[NSString alloc] initWithData:encryptedStringData
encoding:NSUTF8StringEncoding] autorelease];


You can't interpret arbitrary binary data as a UTF-8 string. The UTF-8  
encoding has certain rules — it's a compressed packing of Unicode —  
and there are a lot of byte sequences that aren't valid UTF-8.  
Attempting to create an NSString from such data will fail with a nil  
result.


If you want binary data, stick with NSData. If you want to represent  
that data in a textual way, you'll have to translate it to something  
like hex or base64.


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

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


Re: capturing a partial screen.

2009-09-04 Thread David Hoerl
The solution is (using the original OpenGLScreenCapture project code) 
to modify this statement in FrameReader.m:


glCopyTexSubImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, 0, 0, 0, 0, mWidth, mHeight);

to

glCopyTexSubImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, 0, 0, 100, 50, 
mWidth+100, mHeight+50);


where I've obviously used constants, and mWidth and mHeight are the 
respective sizes of the desired snapshot.


I know it works - the product I used it in just shipped :-)

David
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


(no subject)

2009-09-04 Thread David Blanton
I want to develop a CocoaTouch app that talks to a web server without  
doing 'web pages'.  I.e. the app does http gets and posts driving php  
(or other) scripts on the server to access some sql database.


Reason for this approach - to use coca table view to display data,  
generally speaking to have a nicer UI.


Make sense or shoveling against the tide?

Pleas comment / advise.

db

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


Re: (no subject)

2009-09-04 Thread I. Savant

On Sep 4, 2009, at 6:16 PM, David Blanton wrote:

I want to develop a CocoaTouch app that talks to a web server  
without doing 'web pages'.  I.e. the app does http gets and posts  
driving php (or other) scripts on the server to access some sql  
database.

...

Make sense or shoveling against the tide?



  So ... you want to access a web service? Sounds perfectly typical  
to me.


--
I.S.




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: (no subject)

2009-09-04 Thread Steven Degutis
This is a common concept. In fact, it's exactly how nearly all twitter apps
on the iPhone work.
Usually it can be done manually with NSURLConnection and the like, though
you may consider using a third-party framework like ASI-HTTP-Request or
CocoaREST.

-- 
Steven Degutis
http://www.thoughtfultree.com/
http://www.degutis.org/

On Fri, Sep 4, 2009 at 5:16 PM, David Blanton aired...@tularosa.net wrote:

 I want to develop a CocoaTouch app that talks to a web server without doing
 'web pages'.  I.e. the app does http gets and posts driving php (or other)
 scripts on the server to access some sql database.

 Reason for this approach - to use coca table view to display data,
 generally speaking to have a nicer UI.

 Make sense or shoveling against the tide?

 Pleas comment / advise.

 db

 ___

 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

 Please do not post 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/steven.degutis%40gmail.com

 This email sent to steven.degu...@gmail.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Need a launch/loading screen to be displayed while app is starting/initializing?

2009-09-04 Thread Steven Degutis
Generally the idea of a splash screen (as this is called) in Mac apps is
frowned upon, by developers and users alike (though users seem to mind
slightly less than developers, from my experience).
What you should instead do, from my advise, is to asynchronously load your
data on a background thread, and disable any relevant UI elements in the
main interface until the load is done. This way, your main thread will stay
responsive, letting the user explore their options whilst they wait.

If you are targeting Snow Leopard, you can take advantage of Grand Central
Dispatch to leverage the async capabilities with great ease to accomplish
this feat. (Pardon the weird language, I've just seen Alice in Wonderland a
few times with the kids, it's stuck in my head now.)

Or, you can take the approach I just started with my apps at
http://www.thoughtfultree.com/ and display an introductory splash screen
that explains how to use the app using images (and movie files if needed).
Another nice example of this is in the app Things.app

That is all.

-- 
Steven Degutis
http://www.thoughtfultree.com/
http://www.degutis.org/

On Wed, Sep 2, 2009 at 10:28 AM, Michael A. Crawford 
michaelacrawf...@me.com wrote:

 I'm looking for techniques on how to display a startup or loading panel for
 my app.  There is some initial processing that needs to be done and it can
 sometimes be moderately lengthy in terms of making the user wait.

 What I'd like to do is display a startup graphic with licensing and
 copyright information as well as perhaps some updating text fields.  Well,
 maybe I'll add the updating text fields later.

 Anyway, I thought of changing the structure of my app so that the main nib
 displays the startup and then loads what used to be my main nib with my
 primary view, menu, etc.  I'm not experienced enough with AppKit to know
 whether or not that is a good approach.

 Any suggestions?  It looks like there are plenty of applications that do
 this sort of thing on startup.  How do you guys implement this type of
 behavior?

 -Michael




 ___

 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

 Please do not post 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/steven.degutis%40gmail.com

 This email sent to steven.degu...@gmail.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: capturing a partial screen.

2009-09-04 Thread Steven Degutis
If you're specifically trying to mimic the screenshot-capabilties in Mac OS
X itself, you can use the `screencapture` command line utility, coupled with
an NSTask object in Cocoa. This is what I use in one of my apps, and what
Papaya does.
-- 
Steven Degutis
http://www.thoughtfultree.com/
http://www.degutis.org/


On Fri, Sep 4, 2009 at 12:25 PM, Development developm...@fornextsoft.comwrote:

 I am attempting to capture part of the user screen, for instance a window.
 I'm using the OpenGL screen capture example code to build on so the
 following is my capture code. When I attempt to capture I get a garbled
 screen so I know I'm not passing the right value somewhere but I don't know
 where. Forgive me I'm very new to opengl.

 -(void)readScreenRect:(NSRect)rect
 {
long w =rect.size.width;
long h =rect.size.height;

[self readPartialScreenToBuffer:w  bufferHeight: h
 origin:NSMakePoint(0, 0) bufferBaseAddress: mData];
 }
 // Use this routine if you want to read only a portion of the screen pixels
 - (void) readPartialScreenToBuffer: (size_t) width bufferHeight:(size_t)
 height origin:(NSPoint)origin bufferBaseAddress: (void *) baseAddress
 {
// select front buffer as our source for pixel data
glReadBuffer(GL_FRONT);

//Read OpenGL context pixels directly.

// For extra safety, save  restore OpenGL states that are changed
glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT);

glPixelStorei(GL_PACK_ALIGNMENT, 4); /* Force 4-byte alignment */
glPixelStorei(GL_PACK_ROW_LENGTH, 0);
glPixelStorei(GL_PACK_SKIP_ROWS, 0);
glPixelStorei(GL_PACK_SKIP_PIXELS, 0);

//Read a block of pixels from the frame buffer
glReadPixels(origin.x,
 origin.y,
 width,
 height,
 GL_BGRA,
 GL_UNSIGNED_INT_8_8_8_8_REV,
 baseAddress);

glPopClientAttrib();

//Check for OpenGL errors
GLenum theError = GL_NO_ERROR;
theError = glGetError();

 }
 ___

 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

 Please do not post 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/steven.degutis%40gmail.com

 This email sent to steven.degu...@gmail.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: performSelectorInBackground:anObject:

2009-09-04 Thread Rick C.
thanks jens i'll look further into it,

rick





From: Jens Alfke j...@mooseyard.com
To: Rick C. jo_p...@yahoo.com
Cc: cocoa dev cocoa-dev@lists.apple.com
Sent: Saturday, September 5, 2009 1:29:05 AM
Subject: Re: performSelectorInBackground:anObject:


On Sep 4, 2009, at 2:55 AM, Rick C. wrote:

 i use this method at various places in my project as an easy/safe way to do 
 some background processing.  i realize with every call it will initiate the 
 selector on a new background thread.  but i have noticed by observing 
 activity monitor that it takes quite some time for these threads to go away 
 once they have been initiated.

Foundation may be keeping the thread alive for a while in case you want to run 
another background task on it, but I'm not sure.

 are there any additional steps to take to make sure these threads and the 
 memory being used are ended properly?

Not that I know of. If you're going to be running a lot of background 
operations and want more control over threading, try using NSOperationQueue 
instead (or the new Grand Central stuff in 10.6.)

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

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


Re: Application main menu title behavior change in 10.6

2009-09-04 Thread Steven Degutis
If that's indeed the case, then you're out of luck short of using a private
API in AppKit (which can be class-dump'd, by the way), which I would not
recommend. However, if you wanted, the way I would try it is by changing the
name of the application respective of the main menu, or at least look to see
if this is possible using private APIs in AppKit. But that's just me...
-- 
Steven Degutis
http://www.thoughtfultree.com/
http://www.degutis.org/


On Fri, Sep 4, 2009 at 1:31 PM, Jim Turner jturner.li...@gmail.com wrote:

 Hi all,

 I have an application (QuicKeys) that allows the user to define menu
 selection as an action. In our latest version and under Leopard, we
 present UI that replaces the main menu bar of our app with the menu
 bar of the target app (via setMainMenu:) so that we can correctly
 retrieve which menu item the user selected. Works like a champ, even
 under Snow Leopard, save for one problem.  Under 10.6, the application
 name is always QuicKeys, not Finder or whatever the target
 application name would be. This is causing confusion with our users as
 while the menu is really the target app's menu, it has the wrong
 application name.

 Reading through the release notes for AppKit on 10.6, I found that
 there's been a change to how the main menu bar displays the
 application's name.  Specifically, under the NSApplication
 application menu item title header, it states ... the application
 menu always reflects the application name.  This appears to be what's
 causing the issue and I'm curious if anyone knows of a work-around?

 Thanks
 Jim
 ___

 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

 Please do not post 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/steven.degutis%40gmail.com

 This email sent to steven.degu...@gmail.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Minimum alpha value for transparent windows

2009-09-04 Thread Gabriel Zachmann

I've got a window that is not opaque ( [self setOpaque: NO] ).
It contains basically just one view.

I fill the view with a semi-transparent gray, like this:

semiTransparentGray_ = [NSColor colorWithDeviceRed:0.1 green:0.1 blue: 
0.1 alpha: 0.05];

[semiTransparentGray_ set];
NSRectFill( [self frame] );

This makes the window receive all mouse events, which is exactly what  
I want.


The funny thing is: as soon as I set the alpha value to some value  
less than 0.05, the window does not receive the mouse events any more!  
I.e., it is click-through.


Can someone confirm that 0.05 is actually the minimum alpha value so  
that the window manager considers the window to be interested in the  
mouse events?

Or am I missing something?

Thanks a lot in advance.

Best regards,
Gabriel.

PS:
For other reasons, the window must be non-opqaue.







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 arch...@mail-archive.com

Re: Minimum alpha value for transparent windows

2009-09-04 Thread Jesper Storm Bache
If you are interested in mouse events in your entire window area, then  
you can use
[NSWindow setIgnoresMouseEvents:NO] and not have to worry about faint  
paint issues.

Jesper Storm Bache
Core Technologies
Adobe Systems Inc

On Sep 4, 2009, at 4:02 PM, Gabriel Zachmann wrote:

 I've got a window that is not opaque ( [self setOpaque: NO] ).
 It contains basically just one view.

 I fill the view with a semi-transparent gray, like this:

 semiTransparentGray_ = [NSColor colorWithDeviceRed:0.1 green:0.1 blue:
 0.1 alpha: 0.05];
 [semiTransparentGray_ set];
 NSRectFill( [self frame] );

 This makes the window receive all mouse events, which is exactly what
 I want.

 The funny thing is: as soon as I set the alpha value to some value
 less than 0.05, the window does not receive the mouse events any more!
 I.e., it is click-through.

 Can someone confirm that 0.05 is actually the minimum alpha value so
 that the window manager considers the window to be interested in the
 mouse events?
 Or am I missing something?

 Thanks a lot in advance.

 Best regards,
 Gabriel.

 PS:
 For other reasons, the window must be non-opqaue.





 smime.p7s___

 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

 Please do not post 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/jsbache%40adobe.com

 This email sent to jsba...@adobe.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 arch...@mail-archive.com


Re: Binding table columns that change at runtime

2009-09-04 Thread BareFeet

On 05/09/2009, at 3:16 AM, Sean McBride wrote:


On 9/4/09 9:41 AM, BareFeet said:


I'm fairly comfortable with setting up bindings for table columns to
an NSArrayController. Now I'd like to use bindings where the columns
change at runtime. Is this possible? I am avoiding using CoreData (so
I can run on Mac OS X 10.3 ish and upwards).


One way to do this is to create all the columns in IB and bind them  
all

in IB.  Then at runtime, programatically hide columns as needed.


Thanks for the input Sean.

Two problems with that:

1. The columns I'm generating are from input data (any SQLite  
database) so the combination of columns is infinite. I can't create  
infinite columns and hide some.


2. As per my second email I've managed to generate the table columns  
and bind them in code. But now I'm looking for the best way to trigger  
that code when the selection in the boundTo list changes. It would be  
the same dilemma ifI were to hide columns (vs creating them): how do I  
trigger that in bindings?


Thanks,
Tom
BareFeet
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


How do I update a constraint on my CALayer?

2009-09-04 Thread Austin Grigg
I have a CATextLayer that I want to be able to vertically align within  
my view. I can set a constraint to align it to the top of the view, to  
the middle, or to the bottom; but I want to be able to allow the user  
to change this on the fly. When I set up my CATextLayer, I use this  
constraint to align it in the middle:


[textLayer addConstraint: [CAConstraint  
constraintWithAttribute:kCAConstraintMidY

  relativeTo:@superlayer
   attribute:kCAConstraintMidY]];

This works fine, but if I want to update the layer to align it to the  
top of the view I try:


[textLayer addConstraint: [CAConstraint  
constraintWithAttribute:kCAConstraintMaxY

  relativeTo:@superlayer
   attribute:kCAConstraintMaxY]];

When I add the new constraint it doesn't get aligned to the top, but  
goes past the top of the view where you can only see part of it. It  
looks like it is trying to apply both of the constraints. There is no  
removeConstraint and the same thing seems to happen if I define a  
CAConstraint variable on my class and just update that variable after  
adding it to the CATextLayer. Do I need to recreate the CATextLayer  
every time?

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


Re: Having problem with fetch request in NSDocument based application

2009-09-04 Thread Clayton Leitch

URL is correct and entity is not nil.
On Sep 4, 2009, at 12:55 PM, Brent Gulanowski wrote:


So, all the other objects leading to the fetch execute look OK? Your
context isn't nil? Does your context actually have the right store
coordinator with the right store URL? Does NSEntityDescription return
an entity, and not nil? Does your context have a managed object model?


On Fri, Sep 4, 2009 at 9:47 AM, Clayton Leitchcaptch...@mac.com  
wrote:

Here is the code in MyDocument:
-(IBAction)calculateStat:(id)sender{
   fetchedObjects = nil;
   context = [self managedObjectContext];
   fetchRequest = [[NSFetchRequest alloc] init];
   entity = [NSEntityDescription entityForName:@Measurement
inManagedObjectContext:context];
   [fetchRequest setEntity:entity];
   fetchedObjects = [context executeFetchRequest:fetchRequest
error:error];
   if (fetchedObjects == nil) {
   NSLog(@error);
   [errorMessage setStringValue:@no objects];
   }else {
   [errorMessage setIntValue:[fetchedObjects count]];
   }


   [fetchRequest release];
The fetchedObjects count is always 0.  Any idea what silly thing I  
forgot.


Thanks


--
Brent Gulanowski


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


No Fix Continue all of a sudden

2009-09-04 Thread Laurent Daudelin
Not sure what I did but now the Fix  Continue option is disabled in  
the Run menu. Using the standard debug configuration for a standard  
application project, LLVM  GCC 4.2, Build active architecture  
only. Of course, Fix and Continue is turned on for the Debug  
configuration, both at the project level and at the target level. I  
thought it was working on this project last week, with the same Xcode  
3.2 on 10.6. I read the documentation about restrictions using Fix   
Continue and I cannot find anything that would explain why the menu  
option is disabled. When moving the mouse cursor over it, the tooltip  
says Fix is not supported by this debugger. I checked the full  
transcript of the compile command and the -mfix-and-continue is  
there. A bit annoying.


What am I missing? Any thought?

Thanks in advance!


-Laurent.
--
Laurent Daudelin
AIM/iChat/Skype:LaurentDaudelin 
http://nemesys.dyndns.org
Logiciels Nemesys Software  
laurent.daude...@verizon.net
Photo Gallery Store: http://laurentdaudelin.shutterbugstorefront.com/g/galleries

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


Re: (no subject)

2009-09-04 Thread David Blanton

Thank you I.S. and Steven ... I am off to the races!

On Sep 4, 2009, at 4:42 PM, Steven Degutis wrote:

This is a common concept. In fact, it's exactly how nearly all  
twitter apps on the iPhone work.


Usually it can be done manually with NSURLConnection and the like,  
though you may consider using a third-party framework like ASI-HTTP- 
Request or CocoaREST.


--
Steven Degutis
http://www.thoughtfultree.com/
http://www.degutis.org/

On Fri, Sep 4, 2009 at 5:16 PM, David Blanton  
aired...@tularosa.net wrote:
I want to develop a CocoaTouch app that talks to a web server  
without doing 'web pages'.  I.e. the app does http gets and posts  
driving php (or other) scripts on the server to access some sql  
database.


Reason for this approach - to use coca table view to display data,  
generally speaking to have a nicer UI.


Make sense or shoveling against the tide?

Pleas comment / advise.

db

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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/steven.degutis%40gmail.com

This email sent to steven.degu...@gmail.com





___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


No Fix Continue all of a sudden

2009-09-04 Thread Laurent Daudelin
I think I found it, if anybody is interested. Fix  Continue doesn't  
seem to work with the architecture set to Standard (32/64-bit  
Universal even if I have Build Active Architecture Only. Reverting  
to 32-bit Universal allows me to fix and continue. Not sure where  
the problem is. The debugger must not be ready for 64-bit that my  
MacBook Pro is capable of. I imagine that if I was working on a 32-bit  
machine, the problem would not happen, but this is just speculation...



-Laurent.
--
Laurent Daudelin
AIM/iChat/Skype:LaurentDaudelin 
http://nemesys.dyndns.org
Logiciels Nemesys Software  
laurent.daude...@verizon.net
Photo Gallery Store: http://laurentdaudelin.shutterbugstorefront.com/g/galleries

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


Custom Window not receiving full shadow

2009-09-04 Thread Francisco Tolmasky
I am have a custom window look that I accomplish by having a  
borderless window with a view that paints its contents. This works  
fine, however, for some reason the shadow on this window is less  
pronounced than on normal aqua windows. I've included images below:


Normal window:

inline: Screen shot 2009-09-04 at 6.14.13 PM.png


My Window:

inline: Screen shot 2009-09-04 at 6.14.05 PM.png


I've called invalidateShadow several times but that didn't help. Is  
there some sort of window shadow style that I am supposed to set or  
something?


Thanks,

Francisco___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com

Re: Custom Window not receiving full shadow

2009-09-04 Thread Steven Degutis
Francisco,
Generally this less pronounced shadow is produced by giving an NSPanel the
Utility style in IB. As I've never had to do it programmatically, I don't
know what the relevant method would be to set this style, but I'm sure it's
a style on the NSWindow class, not NSPanel.

-- 
Steven Degutis
http://www.thoughtfultree.com/
http://www.degutis.org/

On Fri, Sep 4, 2009 at 8:16 PM, Francisco Tolmasky tolma...@gmail.comwrote:

 I am have a custom window look that I accomplish by having a borderless
 window with a view that paints its contents. This works fine, however, for
 some reason the shadow on this window is less pronounced than on normal aqua
 windows. I've included images below:

 Normal window:




 My Window:




 I've called invalidateShadow several times but that didn't help. Is there
 some sort of window shadow style that I am supposed to set or something?

 Thanks,

 Francisco
 ___

 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

 Please do not post 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/steven.degutis%40gmail.com

 This email sent to steven.degu...@gmail.com

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Custom Window not receiving full shadow

2009-09-04 Thread Steven Degutis
Interestingly, after searching the NSWindow (and NSPanel) docs and google
for like 5 minutes, I still can't figure out how to set this small shadow
programmatically. Now I'm all curious! Anyone know?
-- 
Steven Degutis
http://www.thoughtfultree.com/
http://www.degutis.org/


On Fri, Sep 4, 2009 at 8:21 PM, Steven Degutis steven.degu...@gmail.comwrote:

 Francisco,
 Generally this less pronounced shadow is produced by giving an NSPanel the
 Utility style in IB. As I've never had to do it programmatically, I don't
 know what the relevant method would be to set this style, but I'm sure it's
 a style on the NSWindow class, not NSPanel.

 --
 Steven Degutis
 http://www.thoughtfultree.com/
 http://www.degutis.org/

 On Fri, Sep 4, 2009 at 8:16 PM, Francisco Tolmasky tolma...@gmail.comwrote:

 I am have a custom window look that I accomplish by having a borderless
 window with a view that paints its contents. This works fine, however, for
 some reason the shadow on this window is less pronounced than on normal aqua
 windows. I've included images below:

 Normal window:




 My Window:




 I've called invalidateShadow several times but that didn't help. Is there
 some sort of window shadow style that I am supposed to set or something?

 Thanks,

 Francisco
 ___

 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

 Please do not post 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/steven.degutis%40gmail.com

 This email sent to steven.degu...@gmail.com





___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Custom Window not receiving full shadow

2009-09-04 Thread Dave Keck
I seem to recall that the opacity of the window affects the intensity
of its shadow. Is your borderless window partially transparent?
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


Re: Custom Window not receiving full shadow

2009-09-04 Thread Francisco Tolmasky
So, I found this on cocoabuilder: http://www.cocoabuilder.com/archive/message/cocoa/2008/2/13/198777 
 , which suggests using this private API:


[window setValue:[NSNumber numberWithInt:10] forKey:@shadowStyle];

However, at least in my attempts, this did not seem to change my  
shadow, regardless the value I passed in.


On Sep 4, 2009, at 6:32 PM, Steven Degutis wrote:

Interestingly, after searching the NSWindow (and NSPanel) docs and  
google for like 5 minutes, I still can't figure out how to set this  
small shadow programmatically. Now I'm all curious! Anyone know?


--
Steven Degutis
http://www.thoughtfultree.com/
http://www.degutis.org/


On Fri, Sep 4, 2009 at 8:21 PM, Steven Degutis steven.degu...@gmail.com 
 wrote:

Francisco,

Generally this less pronounced shadow is produced by giving an  
NSPanel the Utility style in IB. As I've never had to do it  
programmatically, I don't know what the relevant method would be to  
set this style, but I'm sure it's a style on the NSWindow class, not  
NSPanel.


--
Steven Degutis
http://www.thoughtfultree.com/
http://www.degutis.org/

On Fri, Sep 4, 2009 at 8:16 PM, Francisco Tolmasky  
tolma...@gmail.com wrote:
I am have a custom window look that I accomplish by having a  
borderless window with a view that paints its contents. This works  
fine, however, for some reason the shadow on this window is less  
pronounced than on normal aqua windows. I've included images below:


Normal window:




My Window:




I've called invalidateShadow several times but that didn't help. Is  
there some sort of window shadow style that I am supposed to set or  
something?


Thanks,

Francisco
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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/steven.degutis%40gmail.com

This email sent to steven.degu...@gmail.com








___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Application main menu title behavior change in 10.6

2009-09-04 Thread Peter Ammon


On Sep 4, 2009, at 11:31 AM, Jim Turner wrote:


Hi all,

I have an application (QuicKeys) that allows the user to define menu
selection as an action. In our latest version and under Leopard, we
present UI that replaces the main menu bar of our app with the menu
bar of the target app (via setMainMenu:) so that we can correctly
retrieve which menu item the user selected. Works like a champ, even
under Snow Leopard, save for one problem.  Under 10.6, the application
name is always QuicKeys, not Finder or whatever the target
application name would be. This is causing confusion with our users as
while the menu is really the target app's menu, it has the wrong
application name.

Reading through the release notes for AppKit on 10.6, I found that
there's been a change to how the main menu bar displays the
application's name.  Specifically, under the NSApplication
application menu item title header, it states ... the application
menu always reflects the application name.  This appears to be what's
causing the issue and I'm curious if anyone knows of a work-around?


Hi Jim,

First let me thank you for checking the release notes.  However, that  
particular issue is unrelated, confusingly enough.


Here's what's going on.  The first menu item in the main menu (or more  
precisely, its submenu) is magic, in that when it becomes the first  
item, its title is ignored and instead the application name is used.   
This is why you do not have to update your MainMenu.nib every time you  
change your application name.  In Leopard, there was a bug that caused  
this to be applied inconsistently.  It sounds like your application  
was benefiting from this bug.


You can change the title of the application menu, after you set the  
main menu, like so:


NSApp mainMenu] itemAtIndex:0] submenu] setTitle:@New Title]

Hope this helps,
-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 arch...@mail-archive.com


Termination notifications in foundation tool?

2009-09-04 Thread Luke Evans
OK, mea culpa, this is not strictly about Cocoa, but I'm a member of  
this list and can see an obvious other list to join to post this  
(though perhaps someone will enlighten me).


I'm making a 'plain' foundation tool for the first time, though using  
things like Core Data within.
I need to know when the app/tool is going to terminate (for whatever  
reason), primarily in order to do a final Core Data save if there are  
changes to persist, though there may be other things to do.


This sort of thing is easy in Cocoa, and in the distant past I've  
written Unix apps with signal handlers, which would probably work.   
However, I'm wondering if there's an in-between here.
Maybe it's sufficient to have a top level exception handler around the  
code in main(...)?


Cheers

-- Luke

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


Re: defaultConnection in Snow Leopard

2009-09-04 Thread Gerriet M. Denkmann


On 5 Sep 2009, at 00:24, Tim Murison tim.muri...@radialpoint.com  
wrote:


On 04/09/09 10:38 AM, Gerriet M. Denkmann gerr...@mdenkmann.de  
wrote:


But it fails to mention, what I should use instead.
Any ideas?


Take a look at serviceConnectionWIthName:rootObject:, new in 10.5.


Thank you! This looks much more appropiate than the suggestion in the  
Foundation Release Notes of new + autorelease.


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

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


Application Design Question

2009-09-04 Thread Marek Kozubal


Hello everyone.

I have a DVR (digital video recorder) program I wrote in Windows that I 
want to re-write on the Mac.  And I wanted to get some ideas about how 
best to use Cocoa objects to make this program work as I'm still 
relatively new to Cocoa programming.


The application has 2 modes, one is capturing video from a camera of any 
sort, a NTSC capture card, usb, ethernet, etc, that isn't a big deal since 
that'd just be its own thread.  However I want to display the incoming 
video live on screen with the minimum of CPU loading as well as being able 
to scale the data and do some basic manipulations on it, perhaps including 
whats in Core Image.  The incoming data is often 8-bit monochrome and 
needs to be scaled to 8-bit grey for screen display.


The other mode is playing back a file, either frame by frame or playing 
back the video at a user settable frame rate.


I'd like to be able to have multiple sets of both open at once.

Another question related to this is what API set provides the fastest disk 
IO under Mac OS X?  On the windows side I used FILE_FLAG_NO_BUFFERING and 
FILE_FLAG_WRITE_THROUGH flags with the ReadFile/WriteFile API.


My thoughts are perhaps NSDocument with NSView's that use Core Animation 
for displaying everything assuming there is a way to sequence bitmaps into 
Core Animation.  But perhaps there is a better way?  Also I might want to 
do secondary floating windows that display histograms or camera controls, 
etc.


The file formats are a proprietary format and not related to Quicktime or 
Windows Media, etc.


Thanks
-Marek
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


Re: Termination notifications in foundation tool?

2009-09-04 Thread Greg Guerin

Luke Evans wrote:

I need to know when the app/tool is going to terminate (for  
whatever reason), primarily in order to do a final Core Data save  
if there are changes to persist, though there may be other things  
to do.


man 3 atexit

http://developer.apple.com/mac/library/documentation/Darwin/Reference/ 
ManPages/man3/atexit.3.html


  -- GG

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


Re: Custom Window not receiving full shadow

2009-09-04 Thread Dave Keck
 However, at least in my attempts, this did not seem to change my shadow,
 regardless the value I passed in.

It only appears to affect borderless windows; I just tested with a
normal, titled window and it didn't change at all.

But with borderless windows, it seems to toggle between two shadow styles:

1. A shadow that's less pronounced than the shadow applied to
titled windows.
2. A shadow that's even less pronounced than #1.

... so unless there's some other private API to do this, I have a
feeling your only option is going to be drawing it yourself, which
probably isn't worth it. :-/
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Application Design Question

2009-09-04 Thread Jens Alfke


On Sep 4, 2009, at 4:55 PM, Marek Kozubal wrote:

Another question related to this is what API set provides the  
fastest disk IO under Mac OS X?  On the windows side I used  
FILE_FLAG_NO_BUFFERING and FILE_FLAG_WRITE_THROUGH flags with the  
ReadFile/WriteFile API.


The fastest will be the low-level POSIX I/O calls (open / write /  
etc.). To disable caching, call fcntl() using the F_NOCACHE operand.  
Try to read/write as much as you can in one call -- on the write side,  
the writev() function can be very useful. For details you might want  
to look into the Big Nerd Ranch Advanced Mac OS X Programming book,  
or for that matter, any book that covers Unix file I/O in depth.


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

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


Re: Termination notifications in foundation tool?

2009-09-04 Thread Jens Alfke


On Sep 4, 2009, at 7:34 PM, Greg Guerin wrote:


man 3 atexit


This is really difficult to use for anything serious since it's called  
asynchronously, so you have no idea what state the main thread might  
be in at the time. It's like running on a separate thread, only worse  
because you can't wait for the main thread to continue (because you're  
on the main thread, you just can't return back to it.)


What I've done in the past is install a signal handler which tells the  
OS to ignore the signal, but also schedules a future callback on the  
main thread (via the runloop) that will then cleanly shut down the  
process. You probably want to catch the signals generated by Ctrl-C or  
a 'kill' command; IIRC that would be SIGINT, but my memory is hazy.


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

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


Re: Termination notifications in foundation tool?

2009-09-04 Thread Dave Keck
 What I've done in the past is install a signal handler which tells the OS to
 ignore the signal, but also schedules a future callback on the main thread
 (via the runloop) that will then cleanly shut down the process. You probably
 want to catch the signals generated by Ctrl-C or a 'kill' command; IIRC that
 would be SIGINT, but my memory is hazy.

Here's some example code:


http://developer.apple.com/mac/library/samplecode/PreLoginAgents/listing2.html

See InstallHandleSIGTERMFromRunLoop()
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


OpenGL screen captures

2009-09-04 Thread Development
I'm using opengl to do screen captures because that seems to be the  
fastest way. The problem is that I need the cursor to be visible but  
it is not. Is there a flag I can set with opengl to make the cursor  
visible? Or am I going to have to attach an image to it during capture?

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


Services Menu in Snow Leopard

2009-09-04 Thread Gerriet M. Denkmann

I have an app which provides info about files, folders, symlinks, etc.

In Leopard the Services Menu of e.g. Finder did show my Get  
Information regardless whether a file or a folder was selected.


In Snow Leopard the Services Menu of Finder is empty whenever a folder  
is selected (files and other stuff work ok).
(To be exact: aliases or symlinks to folders also result in an empty  
Services Menu)


System Preferences → Keyboard → Keyboard Shortcuts correctly  
contains my Get Information under the Text heading, but NOT under  
Files and Folders.

But, as I said, it IS working for files - only folders don't work.

My Info.plist has: Send Types = NSFilenamesPboardType +  
NSStringPboardType


What am I doing wrong?

Kind regards,

Gerriet.

P.S. I have just re-read the Services Implementation Guide but found  
no clou to my problem.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post 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 arch...@mail-archive.com


Re: Services Menu in Snow Leopard

2009-09-04 Thread Kyle Sluder
On Sep 4, 2009, at 9:26 PM, Gerriet M. Denkmann  
gerr...@mdenkmann.de wrote:



But, as I said, it IS working for files - only folders don't work.


You need to declare that your service is valid in a UTI context that  
covers all your needs. Perhaps public.item?


--Kyle Sluder



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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


Re: Massive slowdown in NSArrayController selections in 10.6

2009-09-04 Thread Rob Keniger


On 04/09/2009, at 12:43 PM, Rob Keniger wrote:

I'm interested to know if anyone else has been bitten by what seems  
to be a fairly serious performance regression bug in 10.6 with  
NSArrayController/NSTreeController.


Basically, if you have an NSArrayController with more than a few  
bindings, changing selection in the controller takes at least an  
order of magnitude more time than in Leopard.



I added a benchmark to my sample project to loop through the array  
controller, selecting each object in turn:


NSTimeInterval t = [NSDate timeIntervalSinceReferenceDate];
NSUInteger j=0;
for(j=0;j20;j++)
{
[arrayController setSelectionIndex:j];
}
NSLog(@duration %f, [NSDate timeIntervalSinceReferenceDate] - t); /*  
DEBUG LOG */


As you increase the number of bound properties this benchmark  
increases non-linearly:


10 properties: 12.989ms
25 properties: 50.816ms
50 properties: 166.453ms
100 properties: 681.625ms
150 properties: 2294.942ms
200 properties: 3295.174ms
250 properties: 7175.009ms
300 properties: 11204.541ms
600 properties: 65377.478ms

Has no-one else experienced these slowdowns?

--
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 arch...@mail-archive.com