2 Beginner Bindings Questions

2010-11-03 Thread Peter Zegelin

I have two instances of the same tableview and controller that I am keeping 
synchronised via bindings to a common array. I have this working, in that I can 
add items via a button in one view and the other view instantly updates. Same 
with deleting selected items using [arrayController delete] via a button in 
each view. However I am having great difficulty showing the same selection of 
items using bindings. I would basically like to select rows in one table and 
have the selection updated in the other.

Pretty well everything I have tried either causes an exception or does nothing.

In the TableView I have tried binding the SelectionIndexes using various 
combinations of the selection based Controller Keys with various Model Key 
Paths ( including none ).
I have also done some things with the Selection Indexes in the ArrayController 
bindings as well.

So my question is - just what combination is required to get this to work?

My array is very simple with just some strings added. The tableviews are single 
column with description for the identifier and the table column is bound using 
arrangedObjects as the Controller Key and 
description as the Model Key Path

My other question is related. I would like to enable the delete button only if 
there is a selection in the table. Again, I have tried binding the enabled 
property of the button to the controller with various combinations of 
Controller Key and Model Key Path, with no luck.

I have also done some google searches but nothing of any real help.

I am sure I'm missing something simple so any help here would be great!

cheers,

Peter___

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

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

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

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


Re: Joining App Developer Program

2010-11-03 Thread Remco Poelstra

Hi,

I just enrolled into the iOS program and the we are trying to contact  
the legal representative took two weeks. The lady on the phone said  
there was a large queue causing the delay.


Regards,

Remco Poelstra

Op 3 nov 2010, om 00:00 heeft Chris Idou het volgende geschreven:

Sorry if this is a little off topic, but I don't know who to ask and  
I can't get

any sense out of Apple.

I attempted to join the Mac dev program the day Steve Jobs announced  
it. A
couple of days later I was asked to submit some company documents,  
which I did,
and which was acknowledged. Now I've been waiting a week with no  
word, and I'm
eager to start making any necessary changes to my app to support the  
app store.

When I go to the site it says we are trying to contact the legal
representative of your company, which kind of contradicts a  
separate email
which says they are processing my documentation. How long should  
this process
take? When should I get worried? Is there any way to get access to  
technical
documentation without waiting? Is there any way to contact Apple  
since they

don't answer emails?



___

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

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

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/remco%40beryllium.net

This email sent to re...@beryllium.net


___

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

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

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

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


Re: 2 Beginner Bindings Questions

2010-11-03 Thread Quincey Morris
On Nov 2, 2010, at 23:08, Peter Zegelin wrote:

  I am having great difficulty showing the same selection of items using 
 bindings. I would basically like to select rows in one table and have the 
 selection updated in the other.
 
 Pretty well everything I have tried either causes an exception or does 
 nothing.
 
 In the TableView I have tried binding the SelectionIndexes using various 
 combinations of the selection based Controller Keys with various Model Key 
 Paths ( including none ).
 I have also done some things with the Selection Indexes in the 
 ArrayController bindings as well.
 
 So my question is - just what combination is required to get this to work?

Some single object -- I'll get back to the question of which one -- should have 
a property named something like selectionIndexes. Bind the selectionIndexes 
binding of the array controllers to this property. That's all you should have 
to do. (It isn't normally necessary to bind in IB the table view's 
selectionIndexes binding to the array controller, because this happens 
automatically by default.)

So which object should have this selectionIndexes property that's shared by 
the views? The easiest way is to put it in your data model object -- presumably 
the same one that has the array property. This would make perfect sense, for 
example, if your application is document based and you actually wanted to save 
the selection in the document file.

However, if the selection is just an attribute of the user interface, it 
doesn't really belong in the data model. If the two table views are necessarily 
in the same window, you could put the property in the window controller. 
Otherwise, the property will need to be in some auxiliary singleton object. I 
think in this case you could just use a dictionary with a selectionIndexes 
key, or you could create a custom singleton object (which would be a C in the 
MVC paradigm). The File's Owner object(s) of the NIB(s) would then have a 
property whose value is this singleton, so that you can bind to it. Or, if 
there are 2 window controller classes, you could put it in one window 
controller and derive an identical property in the other window controller.

I'm not sure I'm making sense in this description. It's harder to say than to 
do.

Actually, you can probably just bind the selectionIndexes binding of one 
array controller to the selectionIndexes property of the other. I can't quite 
think that through, but it may be that simple.

 My array is very simple with just some strings added. The tableviews are 
 single column with description for the identifier and the table column is 
 bound using arrangedObjects as the Controller Key and 
 description as the Model Key Path
 
 My other question is related. I would like to enable the delete button only 
 if there is a selection in the table. Again, I have tried binding the enabled 
 property of the button to the controller with various combinations of 
 Controller Key and Model Key Path, with no luck.

Bind the enable state of the button to the canRemove property of the array 
controller. Note that it's actually inherited from the superclass, 
NSObjectController, which is probably why you didn't find it.


___

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

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

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

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


UITouch's function locationInView not working with iOS4.2

2010-11-03 Thread Angelica Grace Tanchico

Hello,

Why is it that UITouch's function locationInView not working with iOS4.2?

I have a table view with a UISwitch on each cell and added an action for a 
value change event.
It was successfully running with iOS4.1 and below but with iOS4.2, it is not 
working.

Do you have any suggestion how get a table view's row with a touch event? How?
Thanks in advance!

My code snippets are below:

CREATION OF UISWITCH:

snip

UISwitch *switchCtl = [[UISwitch alloc] initWithFrame:frame];
[switchCtl addTarget:self action:@selector(switchAction:event:) 
forControlEvents:UIControlEventValueChanged];

snip


THE switchAction() FUNCTION:

- (void)switchAction:(id)sender event:(id)event
{
NSSet *touches = [event allTouches];
UITouch *touch = [touches anyObject];

CGPoint currentTouchPosition = [touch locationInView: self.tblView];
NSLog(@switchAction: x=%f, y=%f, currentTouchPosition.x, 
currentTouchPosition.y);

NSIndexPath *indexPath = [self.tblView indexPathForRowAtPoint: 
currentTouchPosition];
NSLog(@switchAction: indexPath.row = %d, indexPath.row);

snip
}


Regards,
Angie


  
___

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

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)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


UITouch's function locationInView not working with iOS4.2‏ (cont)

2010-11-03 Thread Angelica Grace Tanchico


Hello,

Why is it that UITouch's function locationInView not working with iOS4.2?

I have a table view with a UISwitch on each cell and added an action for a 
value change event.
It was successfully running with iOS4.1 and below but with iOS4.2, it is not 
working.

According to logs, indexPath.row is always set to 0 with iOS4.2 (with old iOS, 
it gets the proper row).

Do you have any suggestion how get a table view's row with a touch event? How?
Thanks in advance!

My code snippets are below:

CREATION OF UISWITCH:

snip

UISwitch *switchCtl = [[UISwitch alloc] initWithFrame:frame];
[switchCtl addTarget:self action:@selector(switchAction:event:) 
forControlEvents:UIControlEventValueChanged];

snip


THE switchAction() FUNCTION:

- (void)switchAction:(id)sender event:(id)event
{
NSSet *touches = [event allTouches];
UITouch *touch = [touches anyObject];

CGPoint currentTouchPosition = [touch locationInView: self.tblView];
NSLog(@switchAction: x=%f, y=%f, currentTouchPosition.x, 
currentTouchPosition.y);

NSIndexPath *indexPath = [self.tblView indexPathForRowAtPoint: 
currentTouchPosition];
NSLog(@switchAction: indexPath.row = %d, indexPath.row);

snip
}


Regards,
Angie 
___

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

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)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: Writing an Uninstaller

2010-11-03 Thread Uli Kusterer
On 27.10.2010, at 15:52, Angus Hardie wrote:
 Have you considered just killing the background process and then 
 automatically moving your app to the trash before quitting?

 Ugh. Bad idea. We actually had to change Sparkle to use a little helper app to 
do the delete-old-binary-copy-in-new-one dance. There were lots of random 
crashes when operating on the innards of a running application.

Cheers,
-- Uli Kusterer
The Witnesses of TeachText are everywhere...
http://www.lookandfeelcast.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: 2 Beginner Bindings Questions

2010-11-03 Thread Peter Zegelin

On 03/11/2010, at 5:49 PM, Quincey Morris wrote:

 On Nov 2, 2010, at 23:08, Peter Zegelin wrote:
 
 I am having great difficulty showing the same selection of items using 
 bindings. I would basically like to select rows in one table and have the 
 selection updated in the other.
 
 Pretty well everything I have tried either causes an exception or does 
 nothing.
 
 In the TableView I have tried binding the SelectionIndexes using various 
 combinations of the selection based Controller Keys with various Model Key 
 Paths ( including none ).
 I have also done some things with the Selection Indexes in the 
 ArrayController bindings as well.
 
 So my question is - just what combination is required to get this to work?
 
 Some single object -- I'll get back to the question of which one -- should 
 have a property named something like selectionIndexes. Bind the 
 selectionIndexes binding of the array controllers to this property. That's 
 all you should have to do. (It isn't normally necessary to bind in IB the 
 table view's selectionIndexes binding to the array controller, because this 
 happens automatically by default.)

OK That makes sense. I was so focused on trying to get it to work that 
I forgot there is a shared array but 2 instances of the arrayController. 
Selection being the property of the table makes it obvious that 
my efforts would never work. I need a way to share the selection indexes as 
well.  UPDATE: This works!!
 
 So which object should have this selectionIndexes property that's shared by 
 the views? The easiest way is to put it in your data model object -- 
 presumably the same one that has the array property. This would make perfect 
 sense, for example, if your application is document based and you actually 
 wanted to save the selection in the document file.
 
 However, if the selection is just an attribute of the user interface, it 
 doesn't really belong in the data model. If the two table views are 
 necessarily in the same window, you could put the property in the window 
 controller. Otherwise, the property will need to be in some auxiliary 
 singleton object. I think in this case you could just use a dictionary with a 
 selectionIndexes key, or you could create a custom singleton object (which 
 would be a C in the MVC paradigm). The File's Owner object(s) of the NIB(s) 
 would then have a property whose value is this singleton, so that you can 
 bind to it. Or, if there are 2 window controller classes, you could put it in 
 one window controller and derive an identical property in the other window 
 controller.

I'll store it where the array is stored. My model is actually C++ so I already 
have an object that gets passed to each new view as it is created so it can 
access the model, and I already have other stuff there that doesn't really 
belong with the model or is in Obj-C.
 
 I'm not sure I'm making sense in this description. It's harder to say than to 
 do.
 
 Actually, you can probably just bind the selectionIndexes binding of one 
 array controller to the selectionIndexes property of the other. I can't 
 quite think that through, but it may be that simple.

Yeah I don't think that's possible - certainly not in IB. Its two or more 
instances of the same arrayController and they could be in different windows 
when they wake up.
 
 My array is very simple with just some strings added. The tableviews are 
 single column with description for the identifier and the table column is 
 bound using arrangedObjects as the Controller Key and 
 description as the Model Key Path
 
 My other question is related. I would like to enable the delete button only 
 if there is a selection in the table. Again, I have tried binding the 
 enabled property of the button to the controller with various combinations 
 of Controller Key and Model Key Path, with no luck.
 
 Bind the enable state of the button to the canRemove property of the array 
 controller. Note that it's actually inherited from the superclass, 
 NSObjectController, which is probably why you didn't find it.
 
 

Tried that and it didn't work. The button never disables/enables with the 
selection and pressing it removes the first object in the array even if not 
selected. When the last object is removed *then* the button disables.

Thanks for your help!

kind regards,

Peter Zegelin
http://www.fracturedsoftware.com
Rondo - MIDI for your mac
MacSimAVR - AVR microcontroller simulator for OS X

___

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

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)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: 2 Beginner Bindings Questions

2010-11-03 Thread Peter Zegelin

On 03/11/2010, at 8:02 PM, Peter Zegelin wrote:

 
 My other question is related. I would like to enable the delete button only 
 if there is a selection in the table. Again, I have tried binding the 
 enabled property of the button to the controller with various combinations 
 of Controller Key and Model Key Path, with no luck.
 
 Bind the enable state of the button to the canRemove property of the array 
 controller. Note that it's actually inherited from the superclass, 
 NSObjectController, which is probably why you didn't find it.
 
 
 
 Tried that and it didn't work. The button never disables/enables with the 
 selection and pressing it removes the first object in the array even if not 
 selected. When the last object is removed *then* the button disables.

I discovered the following works:

Bind the button enabled binding to the ArrayController.
Controller Key = selection
Model Key Path is left blank
Value Transformer = NSIsNotNil


cheers,

Peter___

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

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

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

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


[iPhone] HTTPS / client Certificate / configuration profile

2010-11-03 Thread Sandro Noël
Greetings.

Scenario:

Our application accesses the content of a secure web server, the server is 
configured to ask the client for a certificate.
and other security features.

HTTPS
1: SSL connection to server with server certificate
2: SSL Client certificate (different cert issued for every user)
3: Basic Auth authentication over SSL.

I've looked at the docs and took some code from Apple's advance NSURLConnection
...the server certificate challenge works fine.

When I get to the client certificate challenge the code does not seem to be 
able to find the client certificate.

I've tried installing the certificate 
1: as part of a configuration profile...(iPhone config utility)
2: certificate sent in an email to the phone and installed directly on the phone

The code from the advance NSURLConnection looks for certificates in the 
keychain, 
but does not seem to find anything to process and send back to the server.

So my question is, how do I access a certificate that has been installed on the 
phone 
that does not seem to be in the keychain?

Thank you for any pointers.
best regards.
Sandro,

___

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

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

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

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


Set Icon For Document-Based Files

2010-11-03 Thread PJBorges
Hi,

I've made a core data document-based application that works fine. When
you save the data to a file cocoa adds the standard plain white icon
representing the data file.

How do I change that standard icon into a custom one?

I've tried to add this to the Info.plist file, according to apple's
documentation:

keyCFBundleTypeIconFile/key
stringmyCustomIcon/string

But the icon of the file remains the same standard plain icon when I
save the data.

What am I doing wrong?

--Philip
___

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

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)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: Set Icon For Document-Based Files

2010-11-03 Thread Sherm Pendley
On Wed, Nov 3, 2010 at 10:17 AM, PJBorges philipjbor...@gmail.com wrote:

 How do I change that standard icon into a custom one?

 I've tried to add this to the Info.plist file, according to apple's
 documentation:

 keyCFBundleTypeIconFile/key
 stringmyCustomIcon/string

Some things to check:

First, make sure that your icon is in .icns format - you should use
/Developer/Applications/Utilities/Icon Composer.app to convert it if
it isn't. Second, did you forget to include the extension, or was that
just a typo in your email? Third, you should double-check to make sure
your .icns file is being copied into your app's Resources subdir.

sherm--

-- 
Cocoa programming in Perl:
http://camelbones.sourceforge.net
___

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

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

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

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


Re: UITouch's function locationInView not working with iOS4.2‏ (cont)

2010-11-03 Thread Kyle Sluder
2010/11/3 Angelica Grace Tanchico atanch...@live.com:
 Why is it that UITouch's function locationInView not working with iOS4.2?

iOS 4.2 is still under NDA.

Apple provides NDA discussion forums at http://devforums.apple.com.

--Kyle Sluder
___

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

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

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

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


Re: UITouch's function locationInView not working with iOS4.2‏ (cont)

2010-11-03 Thread Robert Claeson

On 3 Nov 2010, at 15:24, Kyle Sluder wrote:

 2010/11/3 Angelica Grace Tanchico atanch...@live.com:
 Why is it that UITouch's function locationInView not working with iOS4.2?
 
 iOS 4.2 is still under NDA.
 
 Apple provides NDA discussion forums at http://devforums.apple.com.

I'm actually not sure that we (e.g. us who are under the NDA) are even allowed 
to mention that it is under NDA, even less to mention that there are separate 
developer forums for it.

Perhaps the moderators can advise (before they close the thread).

Robert___

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

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)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: UITouch's function locationInView not working with iOS4.2‏ (cont)

2010-11-03 Thread Roland King
Reminding people that something is under NDA has never before been an issue in 
this forum (although Scott may also on occasion reply to the thread with that 
reminder personally to drive the point home officially). 

If it's not released software then basically it can't be discussed here, I 
would think anything unreleased is under NDA, but even were it not, you can't 
talk about it here, this forum is for software out in the wild, it's a public 
forum, it's available to all and it's indexed on the greater web. 

People have pointed to the forums before also, they are the right place to 
discuss anything non-public and it's no secret that they exist, you just have 
to be authorized to read them, reminding people of that has also never hitherto 
been an issue and that has always seemed eminently reasonable. 


On 03-Nov-2010, at 11:29 PM, Robert Claeson wrote:

 
 On 3 Nov 2010, at 15:24, Kyle Sluder wrote:
 
 2010/11/3 Angelica Grace Tanchico atanch...@live.com:
 Why is it that UITouch's function locationInView not working with iOS4.2?
 
 iOS 4.2 is still under NDA.
 
 Apple provides NDA discussion forums at http://devforums.apple.com.
 
 I'm actually not sure that we (e.g. us who are under the NDA) are even 
 allowed to mention that it is under NDA, even less to mention that there are 
 separate developer forums for it.
 
 Perhaps the moderators can advise (before they close the thread).
 
 Robert___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/cocoa-dev/rols%40rols.org
 
 This email sent to r...@rols.org

___

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

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)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: [iPhone] HTTPS / client Certificate / configuration profile

2010-11-03 Thread Jean-Daniel Dupas

Le 3 nov. 2010 à 14:58, Sandro Noël a écrit :

 Greetings.
 
 Scenario:
 
 Our application accesses the content of a secure web server, the server is 
 configured to ask the client for a certificate.
 and other security features.
 
 HTTPS
 1: SSL connection to server with server certificate
 2: SSL Client certificate (different cert issued for every user)
 3: Basic Auth authentication over SSL.
 
 I've looked at the docs and took some code from Apple's advance 
 NSURLConnection
 ...the server certificate challenge works fine.
 
 When I get to the client certificate challenge the code does not seem to be 
 able to find the client certificate.
 
 I've tried installing the certificate 
 1: as part of a configuration profile...(iPhone config utility)
 2: certificate sent in an email to the phone and installed directly on the 
 phone
 

When you tell Install certificate, I guess you mean Certificate and private 
key isn't it ? 

Does it works if you try to log using Safari ? I'm using it to access https 
with cert based auth, and don't get any problem.


-- Jean-Daniel




___

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

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

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

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


Re: Set Icon For Document-Based Files

2010-11-03 Thread PJBorges
Some things to check:

 First, make sure that your icon is in .icns format - you should use
 /Developer/Applications/Utilities/Icon Composer.app to convert it if
 it isn't.
  I've done that and copied it to all sizes.

 Second, did you forget to include the extension, or was that
 just a typo in your email?
 I haven't included the extentions, icns, since the
documentation says that it is not necessary. The app searches
automatically for that format.

 Third, you should double-check to make sure
 your .icns file is being copied into your app's Resources subdir.
   It's right there in the resources folder.


So what could be wrong?
___

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

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

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

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


Re: [iPhone] HTTPS / client Certificate / configuration profile

2010-11-03 Thread Sandro Noël
 
 When you tell Install certificate, I guess you mean Certificate and 
 private key isn't it ? 

Yes the p12.

 
 Does it works if you try to log using Safari ? I'm using it to access https 
 with cert based auth, and don't get any problem.

Will try that and get back with the report.

Sandro.

___

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

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

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

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


Re: Notifications on main thread

2010-11-03 Thread Jonny Taylor
OK, I think I have managed to read the release note again using your 
interpretation, but I think I will follow your suggestion of filing a 
documentation enhancement request.

However, I think their second bullet point Notifications posted through a 
queue might not ever be posted is still an important one though, that might be 
enough to rightly put people off using notifications for anything important. I 
would interpret their explanation as being compatible with a case where for 
example a notification posted just before a modal loop ended would evaporate 
into the aether (even though it was posted through the main thread's default 
queue and the main thread is still running). That sort of thing should probably 
put me off using them for many of the things I currently do...

On 2 Nov 2010, at 18:44, James Bucanek wrote:

 Jonny Taylor mailto:j.m.tay...@durham.ac.uk wrote (Tuesday, November 2, 
 2010 11:07 AM -):
 
 Empirically that does seem to behave in a common sense manner. However, if we
 examine the wording of the release note I believe it is explicitly stating
 that this should NOT be relied on - i.e. posting a notification from a
 selector on the main thread does not guarantee that the registered
 notification callbacks will be executed on the main thread. The release notes
 state [my emphasis]:
 Notifications can be posted by any given queue ON A DIFFERENT THREAD THAN
 THE THREAD THE QUEUE IS A DEFAULT QUEUE FOR (when a queue is
 a default queue for some thread);
 
 ...
 
 I agree with you that the approach you and I are talking about seems to work
 in practice, and certainly seems like a logical approach, but somebody at
 Apple seems to have taken the time to write an obscure release note
 specifically discouraging such an approach.
 
 Jonny,
 
 I think you're reading too much into the statement made in the release nodes. 
 If we assume that notifications are posted from the thread they are 
 _enqueued_ from, then the wording of the release note is absolutely correct. 
 It's a warning for those who would (rightfully, in my mind) assume that the 
 notification would be posted in the thread associated with the run loop that 
 the queue is connected to.
 
 What this footnote does NOT say is Warning, your notification will be posted 
 via some random thread that you have no control over, which is how I think 
 some people are interpreting it.
 
 I think this is because the release note is written from the perceptive of 
 the queue. From the queue's perspective, notifications could be executed from 
 any thread. But from the perspective of the enqueuer, the notification is 
 always posted in its thread.
 
I think it's clear from the document that notifications
ARE posted from the thread that ENQUEUES the notification,
NOT the thread that OWNS the queue's run loop.
 
 If you don't think that the documentation is clear about this point, file a 
 documentation enhancement request. I've filed requests like this in the past, 
 and have been almost universally reworded with improved documentation.
 
 James
 -- 
 James Bucanek
 

___

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

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)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: UITouch's function locationInView not working with iOS4.2

2010-11-03 Thread David Duncan
On Nov 3, 2010, at 12:01 AM, Angelica Grace Tanchico wrote:

 Why is it that UITouch's function locationInView not working with iOS4.2?

What is not working? How is the code you posted failing? All we can tell from 
what you've sent us is that you are potentially not getting the location you 
expect, but we have no idea what is actually going wrong.

Also, if you think this is a framework bug, file one.
--
David Duncan

___

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

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

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

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


Re: [iPhone] HTTPS / client Certificate / configuration profile

2010-11-03 Thread Sandro Noël
Yes it works.
Thanks for the hint.

Safari first asks me to accept the server certificate.
second step it warns me that the web site demands a client certificate and asks 
me to choose one from a list.
once selected i am prompted for user name and password from the server.

Which is the intended process.

I get the proper challenge from NSURLConnection delegate selectors.
somehow my application does not find the certificates when it is being 
challenged for the client certificate.
I must be doing something wrong in the lookup.

to be honest all this authentication is still a little blurry for me at this 
point.
I understand the concept...where should i look up for the 
certificates/credentials...
it is somewhere else than the keychain ?

to query the keychain I  currently use...
[NSDictionary dictionaryWithObjectsAndKeys:
(id) kSecClassIdentity, kSecClass, 
kSecMatchLimitAll, kSecMatchLimit, 
kCFBooleanTrue, kSecReturnRef, nil],

[NSDictionary dictionaryWithObjectsAndKeys:
(id) kSecClassCertificate,  kSecClass, 
kSecMatchLimitAll, kSecMatchLimit, 
kCFBooleanTrue, kSecReturnRef, nil],

both query come back empty.

Added info:
The Configuration profile's Identity is the same as the Bundle 
identifier and the 
Entitlements application-identifier and the keychain-access-groups
as i read, the applications only access keychains for their access 
groups.
if that makes a difference...


Sandro.

On 2010-11-03, at 11:51 AM, Sandro Noël wrote:

 
 When you tell Install certificate, I guess you mean Certificate and 
 private key isn't it ? 
 
 Yes the p12.
 
 
 Does it works if you try to log using Safari ? I'm using it to access https 
 with cert based auth, and don't get any problem.
 
 Will try that and get back with the report.
 
 Sandro.
 
 ___
 
 Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
 
 Please do not post admin requests or moderator comments to the list.
 Contact the moderators at cocoa-dev-admins(at)lists.apple.com
 
 Help/Unsubscribe/Update your Subscription:
 http://lists.apple.com/mailman/options/cocoa-dev/apple.lists%40gestosoft.com
 
 This email sent to apple.li...@gestosoft.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: FastEnumeration for TWO kinds of objects in class.

2010-11-03 Thread Ruslan Zasukhin
On 11/3/10 7:02 PM, Christiaan Hofman cmhof...@gmail.com wrote:

 On Nov 3, 2010, at 16:09, Sherm Pendley wrote:
 
 On Wed, Nov 3, 2010 at 8:58 AM, Ruslan Zasukhin
 ruslan_zasuk...@valentina-db.com wrote:
 
 I wonder if this is possible?
 
 Let we have class Vdatabase, which have few kinds of sub-elements
Tables
Links
Indexes
Triggers
 
 We was able make FastEnumeration for Tables.
 But we need more ?
 
 Is it possible?
 
for( Vtable pTable in db )
 
 And
 
for( VLink pLink in db )
 
 And so on?
 
 That *should* work - what problems are you having that lead you to
 think it might not?
 
 sherm--
 
 Not really. These two statements will do *exactly* the same thing.

right

 In Obj-C 
 the typing for objects does not matter for compilation, it only affects
 compile time *checking* (this is not C++). This also means that one of these
 would be lying about the class. Apart from that, strong typing requires the *.
 
 Of course you should know all that if you'd read a minimum of introduction to
 Obj-C.

This page gives nice answers

http://stackoverflow.com/questions/4087958/interesting-task-for-fast-enumera
tion-protocol


-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]


___

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

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)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: [iPhone] HTTPS / client Certificate / configuration profile

2010-11-03 Thread Alastair Houghton
On 3 Nov 2010, at 13:58, Sandro Noël wrote:

 Our application accesses the content of a secure web server, the server is 
 configured to ask the client for a certificate.

Historically, client certificates haven't really worked properly in Secure 
Transport, and therefore also not from Safari or from NSURLConnection.  I don't 
know if this has been fixed or not; it's been a while since I tried using 
client certificates for authentication with OS X.

Kind regards,

Alastair.

--
http://alastairs-place.net




___

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

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

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

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


Re: Set Icon For Document-Based Files

2010-11-03 Thread Reinhard Segeler
You have to register it by adding the document (type and icon name)  
for the document in the target's Properties pane and it must be part  
of your project, as well.


-- Reinhard 

Am 03.11.2010 um 15:17 schrieb PJBorges:


Hi,

I've made a core data document-based application that works fine. When
you save the data to a file cocoa adds the standard plain white icon
representing the data file.

How do I change that standard icon into a custom one?

I've tried to add this to the Info.plist file, according to apple's
documentation:

keyCFBundleTypeIconFile/key
stringmyCustomIcon/string

But the icon of the file remains the same standard plain icon when I
save the data.

What am I doing wrong?

--Philip
___

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

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

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

This email sent to macmeid...@googlemail.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: Set Icon For Document-Based Files

2010-11-03 Thread Sherm Pendley
On Wed, Nov 3, 2010 at 11:50 AM, PJBorges philipjbor...@gmail.com wrote:
 Some things to check:

 Second, did you forget to include the extension, or was that
 just a typo in your email?
         I haven't included the extentions, icns, since the
 documentation says that it is not necessary.

I double-checked the docs before replying, and it includes the
extension both in the inspector panel, and in the example .plist text:

  
http://developer.apple.com/library/mac/#documentation/Cocoa/Conceptual/Documents/Concepts/DocTypePList.html

sherm--

-- 
Cocoa programming in Perl:
http://camelbones.sourceforge.net
___

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

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

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

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


Re: Notifications on main thread

2010-11-03 Thread James Bucanek
Jonny Taylor mailto:j.m.tay...@durham.ac.uk wrote (Wednesday, 
November 3, 2010 9:05 AM -):



OK, I think I have managed to read the release note again using your
interpretation, but I think I will follow your suggestion of filing a
documentation enhancement request.

However, I think their second bullet point Notifications posted through a
queue might not ever be posted is still an important one though, that might
be enough to rightly put people off using notifications for anything
important. I would interpret their explanation as being compatible with a case
where for example a notification posted just before a modal loop ended would
evaporate into the aether (even though it was posted through the main thread's
default queue and the main thread is still running). That sort of thing should
probably put me off using them for many of the things I currently do...


Jonny,

I (finally!) found the NSNotficationQueue Warning that you're 
referring to.


Reading it, I can see where the panic and confusion comes from. 
But I don't think the situation is as dire as some are making 
out. Sure, there are some VW-sized open manholes to avoid, or at 
least some things to consider when using notification queues. 
But I don't see many as show stoppers for the vast majority of solutions.


Here's what the warning is (basically) saying: Notifications are 
queued and dequeued (i.e. posted) by run loops. Thus, in certain 
circumstances, the processing and posting of notifications may 
happen at unpredictable times on unpredictable threads.


But unpredictable under certain circumstances doesn't mean 
random. What the release note is saying is that it's the run 
loop of the current thread (the one that sends 
-[NSNotificationQueue enqueueNotification:...]) is the one 
that's going to process the enqueue notification message.


This has a number of ramifications, although the release note 
uses overly scary language (IMHO):


1) The run loop of the current thread is the one that's going to 
process the enqueue request.
1.a) The run loop must be running, and keep running, until the 
enqueue request is processed.
1.b) The run loop must be running in the correct mode for the 
enqueue request to be processed.


2) Enqueuing a notification may cause coalescing, or not. That 
means when the enqueued notification is processed, there may be 
other notifications before it that need to be posted first. If 
there are, those will be posted on the thread of the run loop 
that's processing the enqueued notification.


So this explains ALL of the things that the release note worries 
about: Notification never been posted, notifications being 
posted on a different thread, notifications being posted by a 
run loop of a thread different than the default for that thread, 
not being able to guarantee the thread a notification will be 
posted on, and so on.


But what the release note doesn't say is that almost all of 
these problems are problem only when you have multiple threads 
enqueuing notifications to a single notification queue. If all 
of the notifications come from a single thread, and that single 
thread has a running run loop (in the correct mode), none of 
these warnings apply. So if you enqueue all of your 
notifications on the main thread, everything gets enqueued, 
dequeued, and posted on the main thread. Easy peasy.


The other situation that's perfectly manageable is multiple 
threads enqueuing notifications, where each thread has a run 
loop (running the appropriate mode). The solution is to simply 
NOT assume the thread the notification will be posted on. Write 
your code so that the notification methods are thread safe and 
you're done.


I hope that helps.

James
--
James Bucanek

___

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

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)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


Layout vs. Frame Rectangle

2010-11-03 Thread Eric Gorr
I am pretty sure the answer is no, but I was wondering if it was possible to 
programmatically obtain the layout rectangle as shown in Interface Builder in 
my own code outside of IB?

I couldn't find anything, except for:

http://developer.apple.com/library/mac/#documentation/DeveloperTools/Reference/NSViewIBAdditions_Reference/Reference/Reference.html

but, as the documentation states, these methods are only relevant for IB 
plugins and I need the information outside of an IB plugin.

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: [iPhone] HTTPS / client Certificate / configuration profile

2010-11-03 Thread Sandro Noël
As i replied earlier, it works just fin in Safari for the iphone .
as i mentioned, 

the problem lies in getting the certificate out of the configuration profile, 
from the within application.

 Historically, client certificates haven't really worked properly in Secure 
 Transport, and therefore also not from Safari or from NSURLConnection.  I 
 don't know if this has been fixed or not; it's been a while since I tried 
 using client certificates for authentication with OS X.

Sandro.

___

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

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

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

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


iPad frame-by-frame animation

2010-11-03 Thread Leon Qiao
Hi everyone,

I got some problems on showing a frame-by-frame animations. I use some png
files in quite a big size(1024* 768). The frame rate I required is near
1/24.

I used to put all the images in one file, and then load a atlas texture. But
the loading action still need more time when the image size grows bigger.

Is there any way to solve this problem?

-- 
Best regards
Leon
___

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

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)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


won't work call from uitableview cell

2010-11-03 Thread Субач Павел Витальевич
Need some help, i want call from choose cell in my table with phone number:
 
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath 
*)indexPath {
NSString *phoneString = [NSString stringWithFormat:@tel://%@, 
[dataArray objectAtIndex:indexPath.row]];
[[UIApplication sharedApplication] openURL:[NSURL 
URLWithString:phoneString]];
}

And second question, how i can get phone number from cell with mix content (how 
recognize phone number in string)? 
such as [13880023323 office 302]
phone text   number

Please help...___

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

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)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


CALayer renderInContext: performance

2010-11-03 Thread Seth Willits

renderInContext: can be rally slow (2 seconds to draw a tree into a 
context). It seems that every CALayer is rendered using a Quartz transparency 
layer, and I know they're slow from past experience. I'm basically just firing 
off this email to ask if there's a method to make it a lot faster, or something 
else I could be doing. Everything that's being drawn (about 80 layers), was 
previously drawn using Quartz very quickly, so I'm hoping there's some way to 
force renderInContext: to ditch transparency layers or something.


--
Seth Willits



___

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

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

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

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


Re: CALayer renderInContext: performance

2010-11-03 Thread Gideon King
I haven't done any testing on performance, but are you using the opaque 
property of CALayer? Does that speed it up at all?

On 04/11/2010, at 2:36 PM, Seth Willits wrote:

 
 renderInContext: can be rally slow (2 seconds to draw a tree into a 
 context). It seems that every CALayer is rendered using a Quartz transparency 
 layer, and I know they're slow from past experience. I'm basically just 
 firing off this email to ask if there's a method to make it a lot faster, or 
 something else I could be doing. Everything that's being drawn (about 80 
 layers), was previously drawn using Quartz very quickly, so I'm hoping 
 there's some way to force renderInContext: to ditch transparency layers or 
 something.
 

___

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

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)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


Setting (not saving) NSPersistentDocument Metadata changes file Modification Date

2010-11-03 Thread Jerry Krinock
In Core Data Programming Guide ▸ Using Persistent Stores ▸ Store Metadata, I 
read:

Note that setting the metadata for a store does not change the information on 
disk until the store is actually
saved.

And indeed that is true.  So I add my metadata, in my document-saving method, 
*before* invoking NSPersistentDocument's -saveDocument: or saveDocumentAs:, 
which does the actual saving.

However, although the metadata does not get written to the disk by 
+[NSPersistentStoreCoordinator 
setMetadata:forPersistentStoreOfType:URL:error:], apparently the file 
modification time gets changed, because after doing so, and then invoking 
-saveDocument:, the dreaded warning sheet This document's file has been 
changed by another application since you opened or saved it shows its wretched 
face.

So, I do this:

• Read and remember the file's modification date (NSFileManager)
• Set the desired metadata
• Set the file's modification date back to the remembered value (NSFileManager)
• Invoke -saveDocument:

Voila - no more stupid warning sheet.

Why does +[NSPersistentStoreCoordinator 
setMetadata:forPersistentStoreOfType:URL:error:] change the file modification 
time given that, per documentation, it does not modify the file?

Is there a better way to do 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 arch...@mail-archive.com