Asynchronous downloading again

2009-10-31 Thread DKJ
I've got a series of data files that my app needs to download before  
the user can do anything. Because I want to have an activity indicator  
spinning while the download is in progress, I have to do asynchronous  
downloading. (Thanks to the list members who guided me to that  
epiphany.) So I'm going to use the NSURLConnection class to do the  
download.


Now I'm wondering if this will work: Suppose I want to download file1  
and file2. (Again, the user can do nothing until both files are  
downloaded.) I use NSURLConnection to download file1. Then in the  
connectionDidFinishLoading delegate method, I do a synchronous  
download of file2, with something like stringWithContentsOfURL.


My idea is that the synchronous download of file2 would be taking  
place in a separate thread from the one that started the asynchronous  
download of file1. So, from the first thread's point of view, file2 is  
being downloaded asynchronously too.


Am I on the right track here? If so, it sure would simplify  
downloading all those files.


dkj

P.S. It's time for my semi-anual global Thank You to all those list  
members who've responded to my queries over the last six months.


THANK YOU!
___

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

Please do not post admin requests or moderator comments to the list.
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: Asynchronous downloading again

2009-10-31 Thread DKJ
All of the files have to be downloaded before the app can do anything.  
I get the connectionDidFinishLoading delegate method of my one and  
only NSURLConnection to call a downloadFinished method at the end of  
the synchronous downloads, so the app knows everything is in place and  
can start processing the files.


I was worried that having a download connection for each file would  
make it more complicated for the app to know when they were all  
finished.


And the main thread doesn't seem to be blocked, because my activity  
indicator is now spinning quite nicely during the download.



On 2009-10-31, at 18:02 , Roland King wrote:

The whole point of doing things asynchronously is you don't have to  
care about waiting for one thing to do another thing, just set up  
two NSURLConnections and start them going at the same time. So  
unless you need some information from file 1 before starting on file 2


	connection1 = [ [ NSURLConnection alloc ] initWithRequest:request1  
delegate:self ];
	connection2 = [ [ NSURLConnection alloc ] initWithRequest:request2  
delegate:self ];


where connection1 and connection2  are instance variables of your  
class. Then when you get the callbacks in your delegate just look to  
see which connection they are for and deal with them appropriately.  
When they are both finished downloading (and don't forget to release  
the NSURLConnection(s) when they are) you start doing whatever else  
it is you want to do.


Don't understand why you keep trying to go back to synchronous  
downloads and you're talking about threads, who says NSURLConnection  
uses threads at all. Apart from that, if you read the documentation  
for NSURLConnection it tells you all delegate calls take place on  
the thread you initiated the download on so, no, even if you did  
what you suggested you'd just block the main thread with the  
download of file2.


=
Hatzic Intellectual Software
Victoria BC, Canada
www.hatzicware.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: Asynchronous downloading again

2009-10-31 Thread DKJ
I'm still not getting this. Why go to the trouble of setting up four  
separate NSURLConnections when one will do the job? And at the same  
time give me a very simple way to know when all the data is in place?


If the files took a long time to download, I could see it. But these  
take less than 5 seconds, even with a completely synchronous download.


dkj

On 2009-10-31, at 19:01 , Kyle Sluder wrote:


On Sat, Oct 31, 2009 at 6:50 PM, DKJ hatzicw...@shaw.ca wrote:
I was worried that having a download connection for each file would  
make it

more complicated for the app to know when they were all finished.


Translation: I don't know how to do it correctly, and therefore fear
it.  I want to stick to what I know.

You can overcome this fear; it's surprisingly easy to do.  All you
have to do is start writing the code, without concern that you're
doing it wrong.  Keep butting your head against it and eventually the
pattern will shine through.

This is a process with which I got very familiar while learning Cocoa.
The intricacy of correct usage is intimidating, but the only way to
overcome it is to try.

--Kyle Sluder


=
Hatzic Intellectual Software
Victoria BC, Canada
www.hatzicware.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: Asynchronous downloading again

2009-10-31 Thread DKJ

On 2009-10-31, at 19:22 , Roland King wrote:
You can trivially use one delegate to manage both these downloads,  
have them happen at the same time and only call downloadFinished  
when both of them have finished, or if you have more than 2, all 3,  
or 4 or 127 of them.



What would be the best way to do this? Have the delegate count the  
connections as they finish? That is starting to sound more appealing.

___

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

Please do not post admin requests or moderator comments to the list.
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: Asynchronous downloading again

2009-10-31 Thread DKJ

On 2009-10-31, at 19:34 , Roland King wrote:
. And why are you now talking about 4 NSURLConnections when you say  
you have 2 files?



The 2-file example was a simplified case I posted when I was asking  
whether the method would work. I actually have half-a-dozen or so data  
files to download. (It can vary.)


I'm using the delegate to save the files to disk under different  
names, so the delegate has to know which filename to use for which  
connection. There's even a file that needs to be downloaded containing  
the names of other files that need to be downloaded.


That's why I was doing things like this in the delegate (after the  
initial received data was dealt with):


   url = [NSURL URLWithString:[baseURL  
stringByAppendingPathComponent:filename]];

   dataString = [NSString stringWithContentsOfURL:url ...];
   [dataString writeToFile:filename ...];

(I left out some parameters to make it easier to read.)

I'd be quite happy to do the whole thing synchronously: it's plenty  
fast enough. But I wanted my little activity spinner to display, even  
if it was only for a few seconds.


Any suggestions about how to do all of this with multiple  
NSURLConnections would be quite welcome. Elegant code is a worthwhile  
end in itself, even if there is no practical benefit in a particular  
case. 
___


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

Please do not post admin requests or moderator comments to the list.
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


Showing activity indicator during data download

2009-10-29 Thread DKJ

I've implemented an update button like this:

- (IBAction)updateButton:(id)sender
{
   [UIApplication sharedApplication].networkActivityIndicatorVisible  
= YES;

   [downloadIndicator startAnimating];

   [[DataManager sharedDataManager] updateDataFiles];

   [downloadIndicator stopAnimating];
   [UIApplication sharedApplication].networkActivityIndicatorVisible  
= NO;

}

And in the DataManager class I have this:

- (void)updateDataFiles
{
   NSString *dataString = [NSString stringWithContentsOfURL:url
  encoding:NSASCIIStringEncoding
  error:NULL];
}

I have the downloadIndicator connected up using IB, and I'm pretty  
sure the wiring is OK. But when the button is clicked, I see an  
activity indicator spinning in the status bar, but I don't see the one  
I implemented myself using IB.


I know it's got something to do with my updateDataFiles method not  
being asynchronous, but beyond that I'm at a loss. I'd really rather  
avoid writing the extra code to do the download using NSURLConnection  
mechanisms: the user can't do anything until the download finishes  
anyway.


I'd like to have an alert panel or the second activity indicator  
visible during the download. Can someone point me towards a simple  
solution?


dkj

PS: I've started reading the Concurrency Programming Guide, but  
that's going to take awhile. And for all I know at present, the  
solution for this particular problem may not be in there.

___

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

Please do not post admin requests or moderator comments to the list.
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: Showing activity indicator during data download

2009-10-29 Thread DKJ

On 2009-10-29, at 0:30 , DKJ wrote:


- (IBAction)updateButton:(id)sender
{
  [UIApplication sharedApplication].networkActivityIndicatorVisible  
= YES;

  [downloadIndicator startAnimating];

  [[DataManager sharedDataManager] updateDataFiles];

  [downloadIndicator stopAnimating];
  [UIApplication sharedApplication].networkActivityIndicatorVisible  
= NO;

}



I replaced the line:

   [downloadIndicator startAnimating];

with this:

   NSInvocationOperation *theOp = [[[NSInvocationOperation alloc]  
initWithTarget:downloadIndicator

  selector:@selector(startAnimating) object:nil] autorelease];
   NSOperationQueue *theQ = [[[NSOperationQueue alloc] init]  
autorelease];

   [theQ addOperation:theOp];

and now it works just the way I want it to.

But am I taking a sledgehammer to a fly? Or have I found (quite by  
accident) the best way to do it?


dkj
___

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

Please do not post admin requests or moderator comments to the list.
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: Showing activity indicator during data download

2009-10-29 Thread DKJ

On 2009-10-29, at 7:05 , Alastair Houghton wrote:

You need to rewrite your code so that the download is asynchronous.


Would doing the NSOperationQueue thing with my updateDataFiles method  
be OK? The docs (Appendix A of Threading Programming Guide) lists  
NSString as being thread-safe.

___

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

Please do not post admin requests or moderator comments to the list.
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: Showing activity indicator during data download

2009-10-29 Thread DKJ

On 2009-10-29, at 9:00 , Alastair Houghton wrote:
it's going to be easiest just to use the asynchronous  
NSURLConnection approach.



I did implement this, and got it to work. But some of the files I'm  
downloading are XML data that needs to be parsed. And the parser can't  
start until the file download is complete, which is what made the  
synchronous download so appealing.


Since non-XML files are also being downloaded, I can't simply initiate  
the XML parsing from the connectionDidFinishLoading delegate method.  
But I could have that method set a flag, and hold off the parsing  
until the flag is set.


So how to start the parsing? The following seems rather amateurish:

   while( !downloadFinished )
[self amuseTheUser];
   [self startParsing];

I suspect there's a better way.

dkj

___

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

Please do not post admin requests or moderator comments to the list.
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: UIButton label

2009-10-27 Thread DKJ

I'm doing this instead:

 [self.updateButton setTitle:dateDisplay  
forState:UIControlStateNormal];


and it works. But I'd still like to know why the other code didn't.

dkj


On 2009-10-27, at 12:43 , DKJ wrote:

I'm having a ridiculous amount of trouble changing the text of a  
UIButton title. I have the button connected to the file's owner (a  
UIViewController) in IB, and I've defined this property:


@property(nonatomic,retain) IBOutlet UIButton *button;

The button's action method works, so I know the connections are OK.  
I put this in the controller's viewWillAppear: method:


self.button.titleLabel.text = @Why won't this work?;

and the button remains blank. (No text is set for the button in IB.)  
I've put an NSLog in the viewWillAppear: method, so I know it's  
being called.


Why won't this work?

dkj


___

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

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

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/hatzicware%40shaw.ca

This email sent to hatzicw...@shaw.ca


=
Hatzic Intellectual Software
Victoria BC, Canada
www.hatzicware.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


arrayWithContentsOfFile

2009-10-13 Thread DKJ

I'm using this code to read an array from a plist:

NSArray *data = [NSArray arrayWithContentsOfFile:[NSHomeDirectory()  
stringByAppendingPathComponent:@/Documents/file.plist]];


The docs say this method returns nil when the file doesn't exist  
(precisely: Returns nil if the file can’t be opened...). But the  
above code gives me an empty array instead, which caused some confusion.


Surely the docs can't be wrong...

dkj___

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

Please do not post admin requests or moderator comments to the list.
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: arrayWithContentsOfFile

2009-10-13 Thread DKJ


On 2009-10-13, at 12:01 , I. Savant wrote:


On Oct 13, 2009, at 2:54 PM, Jens Alfke wrote:

 A PLIST can have an array root or a dictionary root. Are you sure  
your PLIST has an array root? I would still expect nil (ie, it can't  
create an array from a dictionary-rooted PLIST), but it's worth  
checking.





I looked in the directory itself before running the code, and the  
plist files weren't there at all.


If someone else gets the same result, perhaps they could file a bug: I  
lack sufficient self-esteem to file one myself.


dkj

___

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

Please do not post admin requests or moderator comments to the list.
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: arrayWithContentsOfFile

2009-10-13 Thread DKJ


On 2009-10-13, at 12:12 , I. Savant wrote:

Let me see if I understand what you're saying: You are expecting  
there to be *no* PLIST files (and so, you expect to get nil) but are  
getting an empty array?



Bingo.
___

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

Please do not post admin requests or moderator comments to the list.
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: arrayWithContentsOfFile

2009-10-13 Thread DKJ


On 2009-10-13, at 12:35 , I. Savant wrote:

 Again, can you post your relevant code?




NSArray *data;

data = [NSArray arrayWithContentsOfFile:[NSHomeDirectory()  
stringByAppendingPathComponent:@/Documents/file.plist]];


if( data == nil )
 do this;


There's no file.plist in the directory. But do this doesn't get done.

However, do this does get done when I have this:


if( [data count] == 0 )
 do this;


So it looks like arrayWithContentsOfFile: is returning an empty array  
when file.plist doesn't exist.


dkj
___

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

Please do not post admin requests or moderator comments to the list.
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: arrayWithContentsOfFile

2009-10-13 Thread DKJ
Hmm... I ran a similar code snippet in another project, and nil is  
returned, as the docs say.


So the file must be created somewhere else. I'll find out where.

I'm glad the docs aren't wrong.

dkj
___

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

Please do not post admin requests or moderator comments to the list.
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: arrayWithContentsOfFile

2009-10-13 Thread DKJ

On 2009-10-13, at 13:27 , I. Savant wrote:

So that's exactly how the code appears?



Yes. But of course I have to look in the directory before the code  
runs. So the file must be created somewhere before processing gets to  
this point.


I created a test application with just this code in it, and couldn't  
reproduce the result either: nil was returned, just as the docs say it  
should be.


So my self-esteem takes another hit; but that's better than losing  
faith in scripture.


dkj
___

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

Please do not post admin requests or moderator comments to the list.
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


NSURLRequest

2009-10-10 Thread DKJ
I've got an NSArray that I initialise with data from a plist stored on  
a remote webserver. I've been doing it like this:


NSURL *url = [NSURL URLWithString:@http://www.server.com/data.plist;];
NSArray *myArray = [NSArray arrayWithContentsOfURL:url];

which has been working just fine so far.

But now I'm reading through the URL Loading System docs, and  
wondering if I should be using all the NSURLRequest stuff instead.  
It's more complicated, so are there any advantages it would have over  
what I'm doing now?


dkj
___

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

Please do not post admin requests or moderator comments to the list.
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


Clickable URLs in a UITextView

2009-10-04 Thread DKJ
I've subclassed a UITextView, and I want it to display clickable URLs.  
I put the URL string in the view using its drawRect: method. But when  
the view is displayed, the URL isn't clickable. Here's the code I'm  
using:



- (id)initWithFrame:(CGRect)frame
{
if (self = [super initWithFrame:frame])
{
self.editable = NO;
self.userInteractionEnabled = YES;
self.dataDetectorTypes = UIDataDetectorTypeAll;
}
return self;
}

- (void)drawRect:(CGRect)rect
{
CGRect r = CGRectMake(20, 20, 280, 30);
NSString *line = @http://www.erewhon.org;;
[line drawInRect:r
withFont:[UIFont systemFontOfSize:18.0]
lineBreakMode:UILineBreakModeWordWrap
alignment:UITextAlignmentCenter];
}
}

Why don't I get a clickable URL in this view?

Rather than simply setting the view's text property, I'm doing it this  
way so I can have different fonts in different lines. No doubt this is  
why the dataDetectorTypes setting isn't doing what I want. But I'd be  
interested to know what's going on behind the scenes here. Is the  
string actually being displayed as a subview of the text view?


dkj
___

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

Please do not post admin requests or moderator comments to the list.
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: reading (parsing) CSV (or Excel) data

2009-10-02 Thread DKJ
I've just been using NSXMLParser for the first time. Can Excel files  
be saved in XML format? If so, would NSXMLParser be a possible  
solution here?


dkj
___

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

Please do not post admin requests or moderator comments to the list.
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


Resizing UIView

2009-09-23 Thread DKJ

I'm trying to understand the autoresizingMask property of UIView.

I want to display 1, 2, or 3 text labels in the tableHeaderView of a  
UITableView. I'd like the header view to adjust its size  
(specifically, its height) according to how many labels it's  
displaying. (I'm using labels because I want each line to have a  
different colour or font.)


I had the fantasy that I would create a UIView with its  
autoresizingMask property set to UIViewAutoresizingFlexibleHeight, and  
assign it to the tableHeaderView property of the table view. Then I'd  
sit back and watch it resize itself to accommodate however many labels  
I stuffed into it as subviews.


I tried implementing this a couple of different ways, without success.  
Is what I want to do even possible?


I know I can just calculate each height value given the number of  
labels to be displayed, but I'd like to find an easier way if there is  
one. At the least, I need to learn more about how these resizing  
properties are supposed to work.


dkj
___

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

Please do not post admin requests or moderator comments to the list.
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: Circular references

2009-09-14 Thread DKJ
For the archives: Joar's suggestion did the trick. Now it's all  
working just the way I want.


Thanks to all those who thought about it.

dkj


On 2009-09-13, at 15:08 , Joar Wingfors wrote:


Foo.h
==
@class Bar; // - Forward declaration of the Bar class
@interface Foo : NSObject {
@private
Bar *_bar;
}
@end
==

Foo.m
==
#import Bar.h // - The forward declaration is resolved here
#import Foo.h
@implementation Foo
@end
==


___

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

Please do not post admin requests or moderator comments to the list.
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


Circular references

2009-09-13 Thread DKJ
I've got a MyViewController and a bunch of MySubview objects that are  
subviews of its view. I want MyViewController to keep track of certain  
things, such as the last MySubview that was clicked. So MySubview has  
to know about MyViewController to tell it it's been clicked; and  
MyViewController has to know about MySubview to define the property  
for the last-clicked subview.


But if I put this in MySubview.h:

   #import MyViewController.h

and this in MyViewController.h:

   #import MySubview.h

I get errors.

What's a good way to deal with this situation?

I know this must be a very basic question, but I don't even know what  
terms I should google to find out about it.


dkj
___

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

Please do not post admin requests or moderator comments to the list.
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


NSKeyedUnarchiver and memory management

2009-09-07 Thread DKJ
I included this method in the MyObject class as part of implementing  
the NSCoder protocol:


- (id)initWithCoder:(NSCoder *)aDecoder
{
self = [super init];
theData = [[aDecoder decodeObjectForKey:@theData] retain];
return self;
}

This is how I read the object from disk:

MyObject *myob = [NSKeyedUnarchiver unarchiveObjectWithFile:filepath];

(Garbage collection is not activated.) My understanding of the memory  
management rules is that I don't need to release myob. And I get  
EXC_BAD_ACCESS errors when I do.


But Instruments is complaining about a memory leak, and mentions  
NSKeyedUnarchiver. The retain message in the initWithCoder makes me  
wonder.


Is this code leaking? Should I add an autorelease to the retain in  
initWithCoder?


dkj


___

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

Please do not post admin requests or moderator comments to the list.
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: NSKeyedUnarchiver and memory management

2009-09-07 Thread DKJ

P.S.

Doing the autorelease thing gave me an EXC_BAD_ACCESS too. And theData  
is released in the dealloc method of MyObject.


dkj
___

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

Please do not post admin requests or moderator comments to the list.
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


Beep

2009-08-26 Thread DKJ
Once upon a time, there was a computer language called BASIC. It was  
installed in just about every computer; usually with a soldering iron.  
And a favourite beginner programmer project was getting the computer  
to emit sounds when keys were pressed. As I recall, there was  
something like a BEEP command that let you do this quite easily, and  
also let you set parameters like duration and frequency.


I've been searching though the iPhone audio API looking for something  
similar: i.e. a method that will let me generate a sound ex nihilo,  
with a given duration and frequency. But as far as I can tell, any  
sound that I want to produce has to use an audio file of some sort.


Have I missed something simple? If so, please point me to the right  
place in the docs.


dkj
___

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

Please do not post admin requests or moderator comments to the list.
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


Sound files needed

2009-08-23 Thread DKJ
I just need one more thing to finish my application: five .aiff sound  
files. Each of them needs to have three properties:


(1) Be one second in duration.
(2) Play a 3-pulse Morse code sequence (DAH-dit-DAH etc.).

And here's the tricky bit:

(3) Play at a frequency of 19,000 Hertz.

I've managed to create files with properties (1) and (2), but I'm  
stuck at (3).


I've downloaded the Audacity application, but the best I can get from  
it seems to be 12,000 Hertz. Other programmes I've tried (demo  
versions mostly) won't let me set an absolute frequency.


Any suggestions?

dkj

P.S. Yes, I know most people won't be able to hear a sound at a  
frequency of 19KHz; but that's a feature, not a bug!

___

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

Please do not post admin requests or moderator comments to the list.
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


UITableView updating problem

2009-08-12 Thread DKJ
I've got a UITableView where the colour of the row text can change  
depending on its place in the table. For example, a row may change  
colour if it's moved from the bottom to the top of the table; and  
sometimes its colour may change if another row is deleted or inserted.


The problem is that the text colour is not updated until the table  
reloads its data. So (e.g.) if I move a row from the bottom to the  
top, its colour doesn't change immediately.


I'd like the text colours to be updated when the table leaves edit  
mode. But according to the docs, I can't call reloadData in the  
tableview controller's commitEditingStyle or moveRowAtIndexPath  
methods. (I tried doing it anyway, and got into trouble.)


Is there any way I can get the table to update as soon as the user  
presses the Done button? Or even better, as soon as the row deletion  
or move is completed?


dkj

___

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

Please do not post admin requests or moderator comments to the list.
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


UINavigationBar delegate problem

2009-08-04 Thread DKJ
I've got a drill down app where table views are displayed with a  
navigation controller. I want my data object to do some things when  
the user presses the Back button. So I made the data object the  
delegate of the navigation bar, and added this method to it:


- (void)navigationBar:(UINavigationBar *)navigationBar
   didPopItem:(UINavigationItem *)item
{
[self restorePreviousArray];

}

As the docs indicate, once I set a delegate for the navigation bar,  
the previous view is no longer restored when the Back button is  
pressed. But I can't see how to restore this view in the delegate  
method. I'm reading the View Controller Programming Guide section on  
navigation controllers, but the answer hasn't leapt at me yet.


Is this the best way to react to the Back button being pressed? If so,  
how do I restore the previous view? If not, how should I do it?


dkj
___

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

Please do not post admin requests or moderator comments to the list.
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


Spacing buttons in UIToolbar

2009-07-28 Thread DKJ
I'm using the setToolbarItems:animated: of a UITableViewController to  
place buttons on the toolbar. If I was using IB, I could space the  
buttons evenly simply by inserting some flexible-space ones between  
them. Is there an easy way to do this in code? Or do I need to  
calculate widths for some blank buttons and insert them into the  
toolbar items array?


dkj
___

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

Please do not post admin requests or moderator comments to the list.
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


Where to release in UIView

2009-07-18 Thread DKJ
I've got a UIView object that uses an NSDictionary. The UIView is  
instantiated from a nib, so I initialise the dictionary in  
awakeFromNib, since the initWithFrame: method is never called. Is it  
appropriate to release this dictionary in the UIView dealloc method?


dkj
___

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

Please do not post admin requests or moderator comments to the list.
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: Where to release in UIView

2009-07-18 Thread DKJ

On 18-Jul-09, at 8:08 , Fritz Anderson wrote:
How did you create the NSDictionary? Do you declare a property or  
accessor methods for the instance variable? Did you use them? If a  
property, does it have the copy or retain attributes?

Show your declaration and initialization code.




This is what I have in awakeFromNib

 shadingAreas = [[NSDictionary alloc] initWithObjectsAndKeys:
  SaM, @SaM, SeM, @SeM, nil];

Which leads to my next question: The objects in this dictionary are  
CGMutablePathRefs. How should I wrap these for the dictionary? As  
NSValues, using valueWithPointer:?


dkj
___

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

Please do not post admin requests or moderator comments to the list.
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: Where to release in UIView

2009-07-18 Thread DKJ

On 18-Jul-09, at 8:50 , Fritz Anderson wrote:

You have to release shadingAreas. You alloc'ed it, you own it.



Yes, I realise that. What I'm wondering is where to do it, since it's  
initialised in the awakeFromNib method, rather than in initWithFrame:.


The NSDictionary does store the CGMutablePathRefs quite nicely,  
although the compiler complains about it.


dkj
___

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

Please do not post admin requests or moderator comments to the list.
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: Where to release in UIView

2009-07-18 Thread DKJ
Thanks to all who replied. I was concerned whether the object might  
somehow get re-instantiated from the nib without dealloc being called  
first. If I understand memory management correctly, that would produce  
a leak.


I'm assuming that the object wouldn't be re-instantiated without its  
previous instantiation being released. But I'd sleep better having an  
expert opinion.


dkj


On 18-Jul-09, at 7:59 , DKJ wrote:

I've got a UIView object that uses an NSDictionary. The UIView is  
instantiated from a nib, so I initialise the dictionary in  
awakeFromNib, since the initWithFrame: method is never called. Is it  
appropriate to release this dictionary in the UIView dealloc method?


dkj
___


___

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

Please do not post admin requests or moderator comments to the list.
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: Saving NSArray of custom objects

2009-07-14 Thread DKJ

On 14-Jul-09, at 2:51 , Mike Abdullah wrote:
Slightly separate to the question, have you actually declared that  
your class conforms to the protocol, or just implemented the  
methods? i.e. the header should be something like:


MyClass : NSObject NSCoding


Yes, I declared it as well. And NSKeyedArchiver is now doing exactly  
what I wanted to get done.


dkj
___

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

Please do not post admin requests or moderator comments to the list.
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


Initialising NSMutableArray

2009-07-13 Thread DKJ
I've subclassed an NSMutableArray, and I want it to be initialised  
with some objects already in place. So I did this:


- (id) init
{
self = [super init];
if (self != nil) {

for( int i = 0; i  3; i++ )
[self addObject:[[[myClass alloc] init] autorelease]];
}
return self;
}

But this produces an NSInvalidArgumentException, with the message:

 [NSMutableArray addObject:]: method only defined for abstract  
class.


I suspect I'm missing something simple here.

dkj
___

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

Please do not post admin requests or moderator comments to the list.
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


Saving NSArray of custom objects

2009-07-13 Thread DKJ
I've defined my own MyClass and made it conform to the NSCoding  
protocol by adding methods like this:


- (void)encodeWithCoder:(NSCoder *)encoder
{
[encoder encodeInt:index forKey:@index];
}

- (id)initWithCoder:(NSCoder *)decoder
{
   self = [super init];
   index = [decoder decodeIntForKey:@index];
   return self;
}

I then put a bunch of these into an NSArray and try to save the array  
like this:


   NSString *path = [NSHomeDirectory()  
stringByAppendingPathComponent:FILE_PATH];

   BOOL didIt = [theArray writeToFile:path atomically:NO];

But nothing is saved: didIt = 0.

I must be missing a step somewhere. I've been looking at Archives and  
Serializations Programming Guide for Cocoa, and finding it rather  
bewildering. A nudge in the right direction would be much appreciated.


dkj
___

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

Please do not post admin requests or moderator comments to the list.
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


Cocoa developers in Victoria BC

2009-07-09 Thread DKJ
If you're in Victoria BC or its environs, and would like to join an  
informal group of fellow sufferers, please contact me off-list.  
(iPhone OS developers are also welcome, of course.)


dkj
___

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

Please do not post admin requests or moderator comments to the list.
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


NSApplication and UIApplication

2009-07-06 Thread DKJ
I want to terminate my UIApplication under some specific error  
conditions. I'm used to doing this kind of thing using:


[[NSApplication sharedApplication] terminate];

But docs don't show a terminate method for UIApplication. Apparently  
it will respond to the message regardless; however, I'm very wary of  
using it if neither the compiler nor the docs mention it.


What should I do with UIApplication in these circumstances?

(exit(0) seems a bit extreme.)

dkj
___

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

Please do not post admin requests or moderator comments to the list.
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: NSApplication and UIApplication

2009-07-06 Thread DKJ

On 6-Jul-09, at 11:40 , Luke the Hiesterman wrote:
Wanting to programmatically terminate an iPhone application is  
typically indicative of a design flaw. On iPhone, only the user  
decides when to exit an application. Why do you feel you need to  
override the user here?


Good point. And as soon as I posted my message, I remembered something  
I'd read somewhere: don't terminate the app yourself; display an alert  
to the user apologising for the inconvenience and asking them to  
terminate the app themselves with the Home button. If only every  
computer worked that way...


In this specific instance, I'm getting an intermittent infinite loop  
in the simulator that I can't seem to reproduce. Definitely a design  
flaw. So the termination was to be for debuggering purposes only.


dkj
___

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

Please do not post admin requests or moderator comments to the list.
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: NSApplication and UIApplication

2009-07-06 Thread DKJ

On 6-Jul-09, at 11:48 , DKJ wrote:
I'm getting an intermittent infinite loop in the simulator that I  
can't seem to reproduce.


Both on the simulator and the device, the problem unfolds like this:  
The app goes into its loop and begins filling up all available memory  
with something or other. I press the Home button to terminate. Then  
afterwards the application refuses to restart: I have to recompile and  
put it back on the simulator or device.


I did a sample with Activity Monitor while the app was doing its  
infinite loop in the simulator. If I understand the output, it happens  
in a method that's parsing a string. So of course I'm looking at that  
part of the code closely. But the infinite loop occurs only  
infrequently, and I can't reproduce it, even with exactly the same  
string input.


Any idea why the app is refusing to restart? This is what I get in the  
Apple report:


   Exception Type:  EXC_BREAKPOINT (SIGTRAP)
   Exception Codes: 0x0002, 0x
   Crashed Thread:  0

   Application Specific Information:
   iPhone Simulator 3.0 (138), iPhone OS 2.2.1 (5H11)
   *** Terminating app due to uncaught exception  
'NSInvalidArgumentException',
   reason: '*** -[UITableViewCell initWithStyle:reuseIdentifier:]:  
unrecognized selector sent to instance 0x530f10'


Does this mean that the message listed is being sent to something that  
isn't a UITableViewCell? Is there away I can use that instance number  
to track down that something?


There are two small XML files that store data in the Documents  
directory. I've had a look at them, and they've not been corrupted. In  
any case, I've coded the app to reset itself if it can't load those  
data files. (My understanding is that arrayWithContentsOfFile: won't  
load the data if the XML can't be parsed properly.)


As always, any help is much appreciated.

dkj

___

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

Please do not post admin requests or moderator comments to the list.
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: NSApplication and UIApplication

2009-07-06 Thread DKJ

On 6-Jul-09, at 13:35 , David Duncan wrote:
Are you building with the 2.2.1 SDK and running on the iPhone OS 3  
simulator? Perhaps the other way around? Either way, it is not a  
supported configuration (the simulator OS must always match the SDK  
used).


No, I'm using the 3.0 SDK.


___

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

Please do not post admin requests or moderator comments to the list.
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: NSApplication and UIApplication

2009-07-06 Thread DKJ


On 6-Jul-09, at 15:02 , Luke the Hiesterman wrote:


I noticed your crash report says


iPhone Simulator 3.0 (138), iPhone OS 2.2.1 (5H11)


That indicates that your simulator is actually running 2.2.1  
software, where initWithStyle:reuseIdentifier doesn't exist, since  
it became available in 3.0.



So it does: I completely missed that. So does this mean that the I've  
got the wrong settings somewhere in Xcode? Base SDK in my project is  
set to iPhone Device 3.0. Should that read iPhone Simulator 3.0  
instead?


Strangely, when I change the Base SDK setting in the Architectures  
window of the project info panel, a second Architectures section opens  
beneath it. (I guess this should really now go to the Xcode list.)


dkj
___

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

Please do not post admin requests or moderator comments to the list.
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: Yet another memory management question

2009-07-05 Thread DKJ

On 4-Jul-09, at 21:53 , mmalc Crawford wrote:

Use of accessor methods is described plainly here:
http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Articles/mmPractical.html#//apple_ref/doc/uid/TP40004447-SW4 



If I understand this example correctly, I could do the same thing like  
this:


Header:
   NSNumber *count;
   ...
   @property(retain,readwrite) NSNumber *count;

Implementation:
   @synthesize count;
   ...
   (void)dealloc {
  [count release];
   }

This would automatically create the two accessor methods described in  
this section of the docs. Then whenever I want to do something with  
the variable, I do things like this:


   NSInteger otherVar = [self.count integerValue];
   self.count = [NSNumber numberWithInteger:0];

Have I finally got it right?

dkj

___

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

Please do not post admin requests or moderator comments to the list.
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


Convenience initialisers

2009-07-05 Thread DKJ
I'm trying to write one of those convenient class initialisers for one  
of my objects. On my still-incomplete understanding of these matters,  
this is what I need to have:


Header:

   + (MyObject *)myObject;

Implementation:

   + (MyObject *)myObject
   {
  return [[[self alloc] init] autorelease];
   }

(I'd have the usual init method in here as well, of course.)

Have I done this correctly? (My programme is crashing, but there are  
plenty of other mistakes I may have made.)


I've been looking in the docs for an explicit example of this kind of  
initialiser, but haven't found one yet.


dkj
___

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

Please do not post admin requests or moderator comments to the list.
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


Yet another memory management question

2009-07-04 Thread DKJ

Is this the right way to do it?

- (void)viewDidLoad
{
   id myObject = [[NSObject alloc] init];
}

- (void)viewDidUnload
{
   [myObject release];
   myObject = nil;
}

- (void)dealloc
{
   [myObject release];
}
___

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

Please do not post admin requests or moderator comments to the list.
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: Yet another memory management question

2009-07-04 Thread DKJ
In fact I'm now going through my code line-by-line, checking all the  
alloc, retain, copy etc. statements. While doing so I've come across  
another thing that puzzles me.


Xcode very kindly provides template code when I create new files for  
classes like UIViewController. (But this is still a Cocoa question.)  
In the template code for viewDidLoad, it provides [super viewDidLoad].


But there is no corresponding [super viewDidUnload] in the template  
code for viewDidUnload. Should it be there anyway?


dkj
___

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

Please do not post admin requests or moderator comments to the list.
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: Yet another memory management question

2009-07-04 Thread DKJ

On 4-Jul-09, at 21:10 , mmalc Crawford wrote:
you should use accessor methods rather than direct variable  
manipulation


Would declaring all the variables as properties, and then synthesising  
them, take care of this?


If so, what should I do in dealloc for those variables?

For example, suppose I've got this in the header:

   NSArray *myArray;
...
   @property(retain) NSArray *myArray;

And this in the implementation file:

   @synthesize myArray;

Should dealloc have this:

   [myArray release];

or something like this:

   self.myArray = nil;


Sorry for all these beginner questions; but they will probably prevent  
a lot more questions later on.


dkj
___

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

Please do not post admin requests or moderator comments to the list.
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: UITextView symbols

2009-06-28 Thread DKJ

On 28-Jun-09, at 5:13 , Graham Cox wrote:

Surely it would make more sense to trap these keys on the input side  
- in other words override the event handlers that get called to  
handle these keys before they process the text data.



I don't know how to do this. As far as I can tell, UIEvent doesn't  
have any info about keypresses.


I hope I'm missing something.

dkj
___

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

Please do not post admin requests or moderator comments to the list.
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


Docs warning unclear

2009-06-28 Thread DKJ

Well, it's unclear to me anyway.

 Warning: If the view belonging to a view controller is added to a  
view hierarchy directly, the view controller will not receive this  
message. If you insert or add a view to the view hierarchy, and it has  
a view controller, you should send the associated view controller this  
message directly. Failing to send the view controller this message  
will prevent any associated animation from being displayed. 

(In the description of UIViewController viewDidAppear: method)

How is a view controller added to a hierarchy directly? How would  
one be added indirectly?


dkj
___

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

Please do not post admin requests or moderator comments to the list.
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


UITextView symbols

2009-06-27 Thread DKJ

I'm using this method:

 textView:shouldChangeTextInRange:replacementText:

to let users put special symbols into a UITextView.

I detect the Return key by checking whether the input string is equal  
to @\n. But how would I detect the back-delete key? @\b doesn't do  
it. And I can't seem to find any docs that list these codes.


dkj

___

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

Please do not post admin requests or moderator comments to the list.
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: UITextView symbols

2009-06-27 Thread DKJ

On 27-Jun-09, at 16:26 , DKJ wrote:


I'm using this method:

textView:shouldChangeTextInRange:replacementText:

to let users put special symbols into a UITextView.

I detect the Return key by checking whether the input string is  
equal to @\n. But how would I detect the back-delete key? @\b  
doesn't do it. And I can't seem to find any docs that list these  
codes.




I wanted to let the back-delete key do what it normally does, while at  
the same time stopping other keys like '1', '', etc. from being  
processed. (i.e. The method returns 'NO' when those keys are pressed.)


I found (more or less by accident) that this will do the trick:

if( [text length] == 0 )
return YES;

where 'text' is the replacementText: parameter of the method.

I don't know why it works, but that's not important right now.

Thanks to anyone who's been thinking about this.

dkj
___

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

Please do not post admin requests or moderator comments to the list.
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: Substituting characters in a UITextField

2009-06-26 Thread DKJ

On 26-Jun-09, at 0:58 , Steve Fogel wrote:
You manipulate the text field's text property directly with methods  
like replaceOccurrencesOfString:withString: or insertString:atIndex:  
or deleteCharactersInRange:, and so on.



The methods you mention only work on mutable strings. I tried doing  
this:


- (BOOL)textField:(UITextField *)textField
shouldChangeCharactersInRange:(NSRange)range
replacementString:(NSString *)string
{   
if( [string isEqualToString:@C] )
{
NSString *newString =
			[textField.text stringByReplacingCharactersInRange:range  
withString:@\u2192];

textField.text = newString;
return NO;
}
return YES;
}

It gives me the character I want, where I want it. But then the cursor  
jumps to the end of the field.


Is there a way of re-positioning the cursor in a UITextField? Perhaps  
by manipulating a UITouch object?


dkj

___

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

Please do not post admin requests or moderator comments to the list.
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: Substituting characters in a UITextField

2009-06-26 Thread DKJ
This may be the solution: a UITextView instead of UITextField, with  
this in the delegate:



- (BOOL)textView:(UITextView *)textView
  shouldChangeTextInRange:(NSRange)range
  replacementText:(NSString *)text
{
  if( [text isEqualToString:@C] )
  {
NSString *newString = [textView.text  
stringByReplacingCharactersInRange:range withString:@\u2192];

textView.text = newString;
range = NSMakeRange(range.location+1, range.length);
textView.selectedRange = range;
return NO;
  }
  return YES;
}
___

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

Please do not post admin requests or moderator comments to the list.
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


Replacing chars in UITextField

2009-06-25 Thread DKJ
I'd like to make some character substitutions in a UITextField while  
the user is typing. For example, when the user types C, I'd like an  
arrow (\u2192) to appear in the textfield instead.


I've been playing with the textField:shouldChangeCharactersInRange  
delegate method. But I don't see how to get it to do what I want.


Any ideas?

dkj
___

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

Please do not post admin requests or moderator comments to the list.
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


Substituting characters in a UITextField

2009-06-25 Thread DKJ
I'd like to make some character substitutions in a UITextField while  
the user is typing.


For example, when the user types C, I'd like an arrow (\u2192) to  
appear in the textfield instead.


I've been playing with the textField:shouldChangeCharactersInRange  
delegate method. But I don't see how to get it to do what I want.


Any ideas?

dkj
___

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

Please do not post admin requests or moderator comments to the list.
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


UIImageView drawRect not called

2008-12-01 Thread DKJ
I have a subclass of UIImageView, MySubView, which is instantiated and  
added as a subview in the viewDidLoad method of a UIViewController.  
MySubView displays a picture without difficulty when its image  
property is set in its initWithFrame method. But its drawRect method  
is never called. (I put an NSLog call inside it to check.) I've tried  
sending MySubView setNeedsDisplay messages from all kinds of places,  
to no avail.


I suspect I'm missing something very simple. Any advice would be  
appreciated.


dkj
___

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

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

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

This email sent to [EMAIL PROTECTED]


QuartzCore and CIContext

2008-11-29 Thread DKJ
I've included QuartzCore.framework in my project frameworks. This is  
my header file:


#import UIKit/UIKit.h
#import QuartzCore/QuartzCore.h

@interface MyImageView : UIImageView {}
@end

I have this in MyImageView.m:

CGContextRef cgref = UIGraphicsGetCurrentContext();
CIContext *c = [CIContext contextWithCGContext:cgref options:nil];

And I get the error CIContext undeclared.

I'm stumped.
___

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

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

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

This email sent to [EMAIL PROTECTED]


Re: QuartzCore and CIContext

2008-11-29 Thread DKJ

I found out what's wrong: Core Image isn't available for the iPhone OS.

dkj
___

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

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

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

This email sent to [EMAIL PROTECTED]


Memory management puzzle

2008-11-26 Thread DKJ
I've got something this in my code, which is run several times by the  
app:


UIView *subView = [[MyView alloc] initWithFrame:frame];
[theView addSubview:subView];
[subView release];

Later on this happens:

[subView removeFromSuperView];
subView = nil;

These two code snippets are in different controller methods. I'm  
certain they're called the same number of times.


The docs say that subView gets a release message when  
removeFromSuperview is called. But the NSLog statement I put in the  
dealloc method for MyView is never called. The ObjectAlloc instrument  
shows the count of MyView instances increasing by 1 each time the code  
is run. And the Leaks instrument shows no leaks at all.


Just to see what would happen, I put [subView release] after the call  
to removeFromSuperview. My NSLog statement was then called twice; and  
of course I got an EXC_BAD_ACCESS as well.


I really want to get rid of these subView objects. Why aren't they  
being deallocated? And since they're not, why am I not getting any  
leaks when I set subView = nil?


dkj
___

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

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

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

This email sent to [EMAIL PROTECTED]


NaN values from presentationLayer

2008-11-24 Thread DKJ
I have a UIView myView that I animate by changing its center property.  
During the animation, this line is called by an NSTimer every 0.1  
seconds:


CGRect myViewFrame = [[myView.layer presentationLayer] frame];

But sometimes this gives me all NaN values in the CGRect, and things  
go off the rails.


What might be causing this? Is it some kind of between frames  
condition in the animation?


dkj
___

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

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

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

This email sent to [EMAIL PROTECTED]


Animated subviews

2008-11-23 Thread DKJ
I have two subviews sv1 and sv2 that I've animated by setting their  
center properties inside of an animation block. This animation code is  
in sv1.m and sv2.m. It all works just fine: they both move smoothly  
around in the superview by choosing new centre points in a continuous  
loop. It looks quite cute, really.


What I want to do now is detect when they come within a certain  
distance of one another as they're moving. But when I do this to move  
them:


sv1.center = p1;
sv2.center = p2;

their center properties are set immediately to the new values: i.e.  
they can't be read to find the intermediate positions. So I can't use  
these properties to find out if their centres come within a given  
distance of one another.


I've thought of some possible approaches:

1. Having the superview controller calculate whether the lines between  
the animation start and finish points intersect, and whether sv1 and  
sv2 will be at the intersection at the same time.


2. Breaking up the straight line moves into much smaller segments and  
having the center properties set successively to those.


3. Having the superview controller handle the animation and somehow  
keep track of the subview's relative distances.


4. Using keyframe animation instead.

#1 seems rather complicated. #2 seems likely to lead to a choppy  
animation, and would rule out using the speed-up-then-slow-down  
animation mode. #3 would involve throwing out a lot of the code I've  
written so far. And I don't yet have a clue whether #4 is plausible,  
not having used keyframe animation before.


If there are any other suggestions, I'd be grateful to hear them!

dkj
___

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

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

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

This email sent to [EMAIL PROTECTED]


Re: Animated subviews

2008-11-23 Thread DKJ

On 23-Nov-08, at 9:11 , Wyatt Webb wrote:

I have not done this myself, but I understand that you can find the  
actual positions of things in the middle of an animation by  
querying the [ [ myView layer ] presentationLayer ]. This is a  
version of the layer that has all of the current values in the  
middle of an animation. As long as you have a chance to check  
periodically, you should be able to do your comparisons.


I hadn't thought of using the presentation layer. It seems obvious now  
that you've mentioned it! Thanks for the tip; I'll give it a try.


dkj


___

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

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

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

This email sent to [EMAIL PROTECTED]


Re: Animated subviews

2008-11-23 Thread DKJ

Now I'm getting a very odd result. In the code for a UIView I have this:

CALayer *theLayer = self.layer;
id pLayer = [theLayer presentationLayer];

The first line is fine, but for the second I get a compiler warning:

no '-presentationLayer' method found

I'm looking at the CALayer docs, which has this:

- (id)presentationLayer

Return Value
A layer instance representing the current presentation layer.

Any idea what's going on? (I'm also puzzled why this method would  
return an id.)


dkj
___

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

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

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

This email sent to [EMAIL PROTECTED]


Re: Animated subviews

2008-11-23 Thread DKJ

Despite the compiler warning, this code:

CGRect cr = [[self.layer presentationLayer] frame];
NSLog( @%.1f %.1f, CGRectGetMidX( cr ), CGRectGetMidY( cr ) );

gives me just what I hoped for. I have the animation delegate start a  
timer when the animation begins, and the timer calls the above code  
every 0.1 seconds. I get a nice list of updated centre positions for  
the subview as it moves through the superview.


So now I guess I should make the superview controller the delegate for  
the animations in both the subviews, and have it test their changing  
positions however-often is needed to get the desired result.


Thanks again for the advice; it seems to be exactly what I needed!

dkj


On 23-Nov-08, at 9:54 , DKJ wrote:

Now I'm getting a very odd result. In the code for a UIView I have  
this:


CALayer *theLayer = self.layer;
id pLayer = [theLayer presentationLayer];

The first line is fine, but for the second I get a compiler warning:

no '-presentationLayer' method found

I'm looking at the CALayer docs, which has this:

- (id)presentationLayer

Return Value
A layer instance representing the current presentation layer.

Any idea what's going on? (I'm also puzzled why this method would  
return an id.)


___

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

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

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

This email sent to [EMAIL PROTECTED]


How do I get a CGContextRef?

2008-11-22 Thread DKJ
The Overview section of CGContext Reference says You can obtain a  
graphics context by using Quartz graphics context creation  
functions But it doesn't say where to find these functions. They  
don't appear to be listed in CGContext Reference itself, as far as I  
can see.


I know there are Cocoa methods for this; but where are the Quartz  
functions? I've been trying to find them for ages: very frustrating.

___

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

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

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

This email sent to [EMAIL PROTECTED]


Re: How do I get a CGContextRef?

2008-11-22 Thread DKJ

On 22-Nov-08, at 17:40 , Ken Ferry wrote:

Take a look here:



Thanks for the reference, but I'm doing this for iPhone, and the  
procedure seems to be different. The compiler doesn't recognise the  
NSGraphicsContext class. I tried using the UIGraphicsGetCurrentContext  
function, but that doesn't work either: I get an invalid context  
error when I use it in CGContextStrokeRect.


dkj



___

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

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

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

This email sent to [EMAIL PROTECTED]


Re: How do I get a CGContextRef?

2008-11-22 Thread DKJ


On 22-Nov-08, at 19:07 , Henry McGilton (Developer) wrote:


That's the standard way to
obtain the current context within drawRect



OK, I wasn't doing it within drawRect... silly me. I'll give it a try  
and see what happens.


dkj


___

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

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

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

This email sent to [EMAIL PROTECTED]


Re: Tabbing to Placeholders

2008-11-21 Thread DKJ

On 21-Nov-08, at 6:50 , Greg Deward wrote:
 Is it possible to tab or jump to the next placeholder in the  
selector?



Control-/ does it on my keyboard.



___

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

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

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

This email sent to [EMAIL PROTECTED]


CGPoint and CGRect

2008-11-21 Thread DKJ
I want to determine whether a line between two CGPoints in a view  
intersects with a given CGRect. There's nothing in the CGGeometry  
reference that does this specifically, and I don't yet see how to use  
the functions that are there to figure this out.


Before I dust off my Euclid (a rare first edition), has anyone got a  
quick solution? It seems the sort of thing that would be handy in many  
situations.


dkj
___

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

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

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

This email sent to [EMAIL PROTECTED]


Re: Autorelease Question

2008-11-19 Thread DKJ

If you've done this:

NSString *str = [NSString string];

then you can simply do this:

return str;

Whoever is getting the returned value should retain it, and then  
release it when they're done.


If you'd done this instead:

NSString *str = [[NSString alloc] init];

then you should do this:

return [str autorelease];

Once again, whoever is getting the returned value should retain it,  
and then release it when they're done.


In general, if you retain an object, or use a either a copy or an  
init... method to obtain it, you need to release it yourself when  
you're done with it.


Otherwise, you can assume that the object will dispose of itself at  
some future time. But when this will happen is in practice  
unpredictable, which is why you need to retain the object before doing  
anything else with it.


dkj


On 19-Nov-08, at 14:37 , Carmen Cerino Jr. wrote:


I am not sure the best way to phrase this question into words, so I
will phrase it using example code.

- (NSString*)foo
{

   NSString blah = [NSString string];

   .


   //Now do I do:
   return blah;

   //Or:
   return [[blah retain] autorelease]];
}
___

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

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

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/hatzicware%40shaw.ca

This email sent to [EMAIL PROTECTED]


=
Hatzic Intellectual Software
Victoria BC, 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 [EMAIL PROTECTED]


Re: Autorelease Question

2008-11-19 Thread DKJ


On 19-Nov-08, at 15:17 , Filip van der Meeren wrote:

If you already know you will autorelease the object and return it,  
then you should call the autorelease at the same moment you create  
the object.


NSString *str = [[[NSString alloc] init] autorelease];



Good point.
___

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

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

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

This email sent to [EMAIL PROTECTED]


Re: NSArrayController - Remove all objects?

2008-11-18 Thread DKJ
The superclass NSObjectController has a remove method that might do  
what you want.


dkj


On 18-Nov-08, at 19:31 , Jean-Nicolas Jolivet wrote:


I was able to get it done using:

[self removeObjectsAtArrangedObjectIndexes:[NSIndexSet  
indexSetWithIndexesInRange:NSMakeRange(0, [[self arrangedObjects]  
count])]];


can't believe there isn't a better way to do it??


On 18-Nov-08, at 10:23 PM, Jean-Nicolas Jolivet wrote:

I'm working on a custom NSArrayController (basically just a  
subclass that allows drag and drop for a table view)...


So far it's working well however, when new files are dropped on my  
table view, I need to remove all the current files... right now the  
dropped files are only added to the list (i.e. added to my Array  
Controller)...


Looking at NSArrayController's doc, I see methods for adding/ 
selecting/removing objects, but no method that removes all  
objects... I can't even find how to get the amount of objects in my  
array...


Is there any way to remove all files from an array controlled by an  
arraycontroller? Or at least a way to access the  array from within  
my custom ArrayController's code?? I tried [self  
setArrangedObjects:] but the method doesn't exist



Jean-Nicolas Jolivet
[EMAIL PROTECTED]
http://www.silverscripting.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/silvertab%40videotron.ca

This email sent to [EMAIL PROTECTED]


Jean-Nicolas Jolivet
[EMAIL PROTECTED]
http://www.silverscripting.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/hatzicware%40shaw.ca

This email sent to [EMAIL PROTECTED]


=
Hatzic Intellectual Software
Victoria BC, 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 [EMAIL PROTECTED]


Subview frames and bounds

2008-11-03 Thread DKJ
I'm still puzzled by frames and bounds. I put this in the drawRect: of  
MyView:


[[NSColor redColor] set];
NSRectFill( self.frame );
[[NSColor blueColor] set];
NSFrameRect( self.bounds );

I put this in the awakeFromNib of my controller:

NSRect r = NSMakeRect( 10.0, 10.0, 200.0, 200.0 );
MyView *mv = [[MyView alloc] initWithFrame:r];
[[theWindow contentView] addSubview:mv];

The blue bounds rectangle is drawn just where I would expect: inset 10  
pixels from the lower left corner of the window. But the red frame  
rectangle is inset another 10 pixels from the lower left corner of the  
blue bounds rectangle.


When I set the origin of r to (0.0, 0.0), the red and blue rectangles  
coincide.


What's happening here?

dkj
___

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

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

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

This email sent to [EMAIL PROTECTED]


Type comparison warning

2008-10-30 Thread DKJ
I'm probably missing something simple, but I don't understand why this  
line:


return (i == -1 ? [NSNull null] : [NSNumber numberWithInteger:i]);

(where i is an NSInteger) produces this warning:

comparison of distinct Objective-C types lacks a cast

(The return type of the method is id.)

___

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

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

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

This email sent to [EMAIL PROTECTED]


List members in Victoria BC

2008-10-30 Thread DKJ

Are there any other members of this list who live in Victoria, BC?

If so, and you'd be interested in starting some kind of informal  
group, please contact me off-list.


dkj
___

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

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

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

This email sent to [EMAIL PROTECTED]


Subview display problem

2008-10-28 Thread DKJ
I'm having no luck getting a subview to display. In the awakeFromNib  
of the controller I have this:


helpView = [[MyView alloc] init];
[helpView setFrameOrigin:RectCentre( [theView frame] )];
[helpView setFrameSize:NSZeroSize];
[theView addSubview:helpView];

(RectCentre is a function that finds the centre of a rectangle.) In  
the help button action I have this:


[[helpView animator] setFrameSize:[theView frame].size];
[helpView setNeedsDisplay:YES];

(I'm sure the button connection is set in IB.) Finally, in the  
drawRect: method of MyView I have this:


[[NSColor colorWithCalibratedRed:1.0 green:1.0 blue:0.8 alpha:0.9]
set];
[NSBezierPath fillRect:[self bounds]];
[NSBezierPath strokeRect:[self bounds]];

When I press my Help button, all I see is a small patch of colour  
appearing briefly in the main view.


theView does have animation layers. Would this make a difference?

dkj
___

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

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

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

This email sent to [EMAIL PROTECTED]


Re: Subview display problem

2008-10-28 Thread DKJ

On 28 Oct, 2008, at 06:54, I. Savant wrote:


On Tue, Oct 28, 2008 at 9:23 AM, DKJ [EMAIL PROTECTED] wrote:

I'm having no luck getting a subview to display. In the  
awakeFromNib of the

controller I have this:

  helpView = [[MyView alloc] init];


 NSView's designated initializer is -initWithFrame: ... what happens
if you use that instead?




Good point. I changed the line to this:

helpView = [[MyView alloc] initWithFrame:[theView frame]];

But the result was the same: a brief flash of colour. I also tried  
passing NSZeroRect instead of [theView frame], and it made no  
difference.

___

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

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

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

This email sent to [EMAIL PROTECTED]


Re: Subview display problem

2008-10-28 Thread DKJ

On 28 Oct, 2008, at 07:49, I. Savant wrote:

logging the view's frame each time it's drawn




This produces a strange result. The width of the subview's frame  
increases by stages to that of the superview, but its height stays  
constant at 14.0. All with nothing happening on the screen.

___

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

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

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

This email sent to [EMAIL PROTECTED]


Re: Subview display problem

2008-10-28 Thread DKJ

On 28 Oct, 2008, at 08:14, I. Savant wrote:

Do away with the animation logic for now. See if it
behaves as expected by setting the frames directly (without calls to
the view's -animator).


The subview appears for an instant, with its origin is in the centre  
of the superview, filling the upper-right quadrant.


It's also showing behind the CALayer objects, which I don't want either.

I thought of using a CATextLayer instead, and setting the zPosition  
accordingly. But then I don't have anything like the text formatting  
capabilities of an NSTextView. (MyView is a subclass of NSTextView.)


I should have made clear in my first post that the animation layers of  
theView are CALayer objects. Maybe I'll try hiding those.

___

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

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

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

This email sent to [EMAIL PROTECTED]


Re: Subview display problem

2008-10-28 Thread DKJ

On 28 Oct, 2008, at 08:31, I. Savant wrote:

I'd turn off
all layers and make sure it's working normally without them.




Alas, after having the Help button method hide theView's CALayer,  
there's still no sign of my NSTextView subclass.


Maybe I should just make my help info into a PDF file, and display  
that on a CATextLayer. (I think PDF is one of the formats that can be  
used.)


I do recall someone saying a few days ago that CALayers and NSViews  
shouldn't be mixed: one or the other should be used exclusively.


Thanks very much for taking the time to look at this.
___

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

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

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

This email sent to [EMAIL PROTECTED]


Re: Subview display problem

2008-10-28 Thread DKJ

On 28 Oct, 2008, at 08:55, DKJ wrote:
Maybe I should just make my help info into a PDF file, and display  
that on a CATextLayer.




Oops, it's the contents property of a CALayer I was thinking of here.
___

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

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

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

This email sent to [EMAIL PROTECTED]


Sage advice

2008-10-28 Thread DKJ

When I was but a newbie,
I heard a wise man say,
When using CALayers,
Put NSViews away.

Yet I set a CALayer,
Then added NSView;
Now many hours later,
I wail, T'is true, t'is true!
___

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

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

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

This email sent to [EMAIL PROTECTED]


CALayer properties

2008-10-28 Thread DKJ

When I did this:

myLayer.frame.size.width = rootLayer.frame.size.width;

I got an illegal lvalue error. But when I do this:

CGRect r = help.frame;
r.size.width = rootLayer.frame.size.width;

the compiler says nothing. Why can I use layer.frame.size on the right  
of =, but not the left?

___

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

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

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

This email sent to [EMAIL PROTECTED]


Re: CALayer properties

2008-10-28 Thread DKJ

It just clicked... no need for replies!


On 28 Oct, 2008, at 16:44, DKJ wrote:


When I did this:

myLayer.frame.size.width = rootLayer.frame.size.width;

I got an illegal lvalue error. But when I do this:

CGRect r = help.frame;
r.size.width = rootLayer.frame.size.width;

the compiler says nothing. Why can I use layer.frame.size on the  
right of =, but not the left?

___

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

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

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/hatzicware%40shaw.ca

This email sent to [EMAIL PROTECTED]


___

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

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

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

This email sent to [EMAIL PROTECTED]


Leaking CGColor objects

2008-10-26 Thread DKJ

I've got this in the init method of MyCALayer:

self.foregroundColor =
CGColorCreateGenericRGB( 1.0, 1.0, 0.9, 1.0 );

And in the controller I do this:

[[MyCALayer alloc] init];
[rootLayer addSublayer:myLayer];
[myArray addObject:myLayer];
[myLayer release];

Then later on this happens:

for( id layer in myArray )
[layer removeFromSuperlayer];
[myArray removeAllObjects];

Instruments tells me I'm leaking CGColor objects whenever I call those  
methods in the controller.


So I've got some questions:

1. Is there such a thing as a CGColor class? I don't see it in the  
documentation; but CGColor is what Instruments lists as the leaked  
objects.


2. Are the CGColor objects being leaked when I remove MyCALayer  
objects from myArray? Should I set foregroundColor to nil when doing  
this?


3. Are sublayers retained when added to a superlayer? I'm assuming so,  
since they're kept in an array. But then they should be released by  
removeFromSuperView, so that shouldn't cause a leak.


dkj


___

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

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

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

This email sent to [EMAIL PROTECTED]


Re: Leaking CGColor objects

2008-10-26 Thread DKJ

Misprint in  my last message:

[[MyCALayer alloc] init];

should be:

id mylayer = [[MyCALayer alloc] init];

___

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

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

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

This email sent to [EMAIL PROTECTED]


Re: Leaking CGColor objects

2008-10-26 Thread DKJ
Thanks to everyone for the replies. I have one (hopefully last)  
question (on this topic):


On 26 Oct, 2008, at 09:23, Clark Cox wrote:

As long as MyCALayer's dealloc is properly implemented (to release
foregroundColor, or set it to nil), you should never need to
explicitly do so in code that uses MyCALayer.



If I do this in MyCALayer's dealloc:

self.foregroundColor = nil;

do I need to do this in init:

CGColorRef temp = CGColorCreateGenericRGB( etc. );
self.foregroundColor = temp;
CFRelease( temp );

or can I just do this:

self.foregroundColor = CGColorCreateGenericRGB( etc. );

For the time being, I'll do both.
___

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

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

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

This email sent to [EMAIL PROTECTED]


Re: Leaking CGColor objects

2008-10-26 Thread DKJ

On 26 Oct, 2008, at 12:09, Clark S. Cox III wrote:

You must do both, otherwise you will leak.



I understand why I have to release the temp object, but why does it  
leak if I don't set foregroundColor to nil as well?

___

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

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

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

This email sent to [EMAIL PROTECTED]


Re: Leaking CGColor objects

2008-10-26 Thread DKJ

I'm still puzzled. When I put this:

self.foregroundColor = nil;

in my layer's dealloc method, I get this error:

attempting to modify layer that is being finalized

But if I don't put that line in dealloc, Instruments doesn't detect  
any leaks.


In the documentation, the foregroundColor property is defined like this:

@property CGColorRef foregroundColor

There's no retain parameter.
___

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

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

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

This email sent to [EMAIL PROTECTED]


Re: Rotation in CAAnimation layers

2008-10-25 Thread DKJ

I do this with a CAAnimation layer myLayer:

myLayer.shadowOffset = CGSizeMake( 5.0, 5.0 );

and get a shadow on the upper and right edges. But when I rotate the  
layer 180 degrees, the shadow then appears on the lower and left  
edges. Real shadows don't do that.


If the object were circular, I'd just put another stationary layer  
underneath and attach the shadow to it. But with other shapes this  
won't work.


So finally, my question: Is there an easy way of calculating the  
position and appearance of the shadow for non-circular shapes? (By  
easy I mean one that I can just copy from somewhere.) If not I'll  
try to figure it out myself; but I don't want to re-invent the wheel.


dkj



On 24 Oct, 2008, at 18:11, douglas welton wrote:


On Oct 24, 2008, at 6:50 PM, DKJ wrote:

Is there an easy way to provide a realistic shadow for a (non- 
circular) layer rotating round the z-axis? (I know  
layer.rotateShadow = YES is too much to hope for.)


To get a realistic answer, it might help if you provide a little  
more specific information about 1) what you are trying to do, 2)  
what is not working and 3) what you have tried. (consult: http://www.catb.org/~esr/faqs/smart-questions.html 
)


regards,

douglas





Hatzic Intellectual Software
Victoria BC, Canada
www.hatzicware.com

___

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

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

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

This email sent to [EMAIL PROTECTED]


Rotation in CAAnimation layers

2008-10-24 Thread DKJ
Is there an easy way to provide a realistic shadow for a (non- 
circular) layer rotating round the z-axis? (I know layer.rotateShadow  
= YES is too much to hope for.) 
___


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

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

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

This email sent to [EMAIL PROTECTED]


Re: CGPoint wrapper?

2008-10-23 Thread DKJ

On 23 Oct, 2008, at 11:26, Finlay Dobbie wrote:

I'm surprised nobody else has picked up on this - how is enumerating
an NSArray going to be faster than enumerating a C array?


I was referring to this:

for( TheClass *obj in TheArray ) {}

as fast enumeration.
___

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

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

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

This email sent to [EMAIL PROTECTED]


CALayer graphics context

2008-10-22 Thread DKJ
Is there a quick way to get a CGContextRef for a CALayer? I don't see  
anything obvious in the documentation for the CALayer class.


dkj
___

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

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

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

This email sent to [EMAIL PROTECTED]


Yet another CALayer puzzle

2008-10-22 Thread DKJ
I've got myView and myController objects in my nib file. myView is an  
IBOutlet of myController. I put this in the initWithFrame: method of  
myView:


CALayer *rootLayer = [CALayer layer];
[self setLayer:rootLayer];
[self setWantsLayer:YES];

But when I read myView's wantsLayer in the awakeFromNib method of  
myController, I find its value is 0. How did the value get changed?

___

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

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

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

This email sent to [EMAIL PROTECTED]


Re: Yet another CALayer puzzle

2008-10-22 Thread DKJ

That did the trick! Thanks.


___

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

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

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

This email sent to [EMAIL PROTECTED]


CGPoint wrapper?

2008-10-22 Thread DKJ
Is there some straightforward way of wrapping a CGPoint so I can put  
it in an NSArray? I don't want to use a C array because I want to have  
fast enumeration available. Or should I just write a simple NSPoint -  
CGPoint conversion method?


dkj
___

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

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

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

This email sent to [EMAIL PROTECTED]


Re: CGPoint wrapper?

2008-10-22 Thread DKJ

I've just found NSPointFromCGPoint() etc,.



On 22 Oct, 2008, at 18:49, DKJ wrote:

Is there some straightforward way of wrapping a CGPoint so I can put  
it in an NSArray? I don't want to use a C array because I want to  
have fast enumeration available. Or should I just write a simple  
NSPoint - CGPoint conversion method?


dkj
___

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

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

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/hatzicware%40shaw.ca

This email sent to [EMAIL PROTECTED]



Hatzic Intellectual Software
Victoria BC, Canada
www.hatzicware.com

___

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

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

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

This email sent to [EMAIL PROTECTED]


Putting an image on a CALayer

2008-10-21 Thread DKJ
I'd like to put an image stored in a JPEG file onto a CALayer. It  
seems that I do this by assigning a  CGImageRef to its contents  
property. But how do I get a CGImageRef from a file? Do I make an  
NSData object from the file and do something with that?


dkj
___

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

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

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

This email sent to [EMAIL PROTECTED]


Re: Putting an image on a CALayer

2008-10-21 Thread DKJ

On 21 Oct, 2008, at 08:51, Alex Heinz wrote:

then draw the NSImage to the CALayer




This is the bit I'm not sure how to do. I see a CALayer contents  
property, but I can't assign an NSImage to that.

___

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

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

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

This email sent to [EMAIL PROTECTED]


Re: Putting an image on a CALayer

2008-10-21 Thread DKJ

OK, I tried this:

NSURL *url = [NSURL fileURLWithPath:fname];
	CGImageSourceRef source = CGImageSourceCreateWithURL((CFURLRef)url,  
NULL);

CGImageRef image = CGImageSourceCreateImageAtIndex(source, 0, NULL);
CFRelease(source);

theView.layer.contents = image;

and now I get an incompatible pointer type warning on the last line.  
But the CALayer contents property has an id type.


And in any case, why is putting an image on a layer such an involved  
process?

___

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

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

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

This email sent to [EMAIL PROTECTED]


  1   2   >