Re: NSURLCache

2011-04-25 Thread Jerry Krinock

On 2011 Apr 25, at 21:03, Rick Mann wrote:

> One of the other things it's doing differently than I do is it creates an 
> NSURLRequest using a cache policy. I just create a plain NSURLRequest. Is 
> that a necessary step?

The default behavior I have seen, which is what you get with your "plain" 
NSURLRequest, is to use the cache.  So it may be an *un*-necessary and in fact 
undesired step in your application, if they set it to *not* use the cache.

___

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

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

2011-04-25 Thread Evadne Wu
It seems like you need to do something when the app resigns from the foreground 
— if that is the case just listen for 
UIApplicationDidEnterBackgroundNotification from that view controller?  It 
(kind of) makes things easy that way.

As the app enters background, it surely has “disappeared” but no, the 
particular view has not disappeared.  It is the entire app that has 
“disappeared”.

Hope that helps. :)

-ev

On Apr 26, 2011, at 13:19, Jeffrey Walton wrote:

> On Mon, Apr 25, 2011 at 11:04 PM, Heath Borders  
> wrote:
>> I've seen this behavior also, specifically on iOS 3.1 while using a
>> UIViewController inside a UINavigationController inside a
>> UITabBarController.
> YES - that is nearly my setup (iOS 4.3.2). I don't have the
> intermediate UINavigationController, but the view has an
> UINavigationBar.
> 
> Any ideas on how to locate an arbitrary view controller? The following
> only locates the 5 associated with the Tab Bar, and not the top most
> PasswordPromptController (which was presented modally).
> 
> It sure would have been helpful if viewWillDisappear was sent as
> documented. When the home button is pressed, and the home screen is
> presented, the view has clearly disappeared (no offense Alex).
> 
> Jeff
> 
> - (void)applicationWillResignActive:(UIApplication *)application
> {
>  if(tabBarController.viewControllers != nil)
>[self clearPasswords:tabBarController.viewControllers];
> }
> 
> - (void)clearPasswords:(NSArray *)viewsControllers
> {
>  Class passwordPromptClass = [PasswordPromptController class];
> 
>  for (UIViewController * viewController in viewsControllers)
>  {
>if ([viewController isKindOfClass:passwordPromptClass])
>  [(PasswordPromptController *)viewController clearPassworAndPin];
>  }
> }
> 
>> 
>> On Mon, Apr 25, 2011 at 9:59 PM, Jeffrey Walton  wrote:
>>> Hi All,
>>> 
>>> According to the documentation in the headers:
>>> 
>>>// UIViewController.h
>>>// Called when the view is dismissed, covered or otherwise hidden.
>>>- (void)viewWillDisappear:(BOOL)animated;
>>> 
>>> And Apple's documentation [1]:
>>> 
>>>Notifies the view controller that its view is about to be dismissed,
>>>covered, or otherwise hidden from view.
>>> 
>>> I'm not sure if I should be surprised or not, but viewWillDisappear
>>> does not appear to be called despite what the documentation claims.
>>> 
>>> The view is part of a custom view controller (built with IB - nothing
>>> fancy) and presented modally. To duplicate, show a view modally and
>>> press the home button.
>>> 
>>> Thanks in advance,
>>> Jeff
>>> 
>>> [1] 
>>> http://developer.apple.com/library/ios/#documentation/uikit/reference/UIViewController_Class/Reference/Reference.html
>>> [SNIP]
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/ev%40monoceroi.com
> 
> This email sent to e...@monoceroi.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: viewWillDisappear not being called

2011-04-25 Thread Heath Borders
> It sure would have been helpful if viewWillDisappear was sent as
> documented. When the home button is pressed, and the home screen is
> presented, the view has clearly disappeared (no offense Alex).

I was seeing this when switching tabs, not when the home button was pressed.

-Heath Borders
heath.bord...@gmail.com
Twitter: heathborders
http://heath-tech.blogspot.com



On Tue, Apr 26, 2011 at 12:19 AM, Jeffrey Walton  wrote:
> On Mon, Apr 25, 2011 at 11:04 PM, Heath Borders  
> wrote:
>> I've seen this behavior also, specifically on iOS 3.1 while using a
>> UIViewController inside a UINavigationController inside a
>> UITabBarController.
> YES - that is nearly my setup (iOS 4.3.2). I don't have the
> intermediate UINavigationController, but the view has an
> UINavigationBar.
>
> Any ideas on how to locate an arbitrary view controller? The following
> only locates the 5 associated with the Tab Bar, and not the top most
> PasswordPromptController (which was presented modally).
>
> It sure would have been helpful if viewWillDisappear was sent as
> documented. When the home button is pressed, and the home screen is
> presented, the view has clearly disappeared (no offense Alex).
>
> Jeff
>
> - (void)applicationWillResignActive:(UIApplication *)application
> {
>  if(tabBarController.viewControllers != nil)
>    [self clearPasswords:tabBarController.viewControllers];
> }
>
> - (void)clearPasswords:(NSArray *)viewsControllers
> {
>  Class passwordPromptClass = [PasswordPromptController class];
>
>  for (UIViewController * viewController in viewsControllers)
>  {
>    if ([viewController isKindOfClass:passwordPromptClass])
>      [(PasswordPromptController *)viewController clearPassworAndPin];
>  }
> }
>
>>
>> On Mon, Apr 25, 2011 at 9:59 PM, Jeffrey Walton  wrote:
>>> Hi All,
>>>
>>> According to the documentation in the headers:
>>>
>>>    // UIViewController.h
>>>    // Called when the view is dismissed, covered or otherwise hidden.
>>>    - (void)viewWillDisappear:(BOOL)animated;
>>>
>>> And Apple's documentation [1]:
>>>
>>>    Notifies the view controller that its view is about to be dismissed,
>>>    covered, or otherwise hidden from view.
>>>
>>> I'm not sure if I should be surprised or not, but viewWillDisappear
>>> does not appear to be called despite what the documentation claims.
>>>
>>> The view is part of a custom view controller (built with IB - nothing
>>> fancy) and presented modally. To duplicate, show a view modally and
>>> press the home button.
>>>
>>> Thanks in advance,
>>> Jeff
>>>
>>> [1] 
>>> http://developer.apple.com/library/ios/#documentation/uikit/reference/UIViewController_Class/Reference/Reference.html
>>> [SNIP]
>
___

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

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

2011-04-25 Thread Jeffrey Walton
On Mon, Apr 25, 2011 at 11:04 PM, Heath Borders  wrote:
> I've seen this behavior also, specifically on iOS 3.1 while using a
> UIViewController inside a UINavigationController inside a
> UITabBarController.
YES - that is nearly my setup (iOS 4.3.2). I don't have the
intermediate UINavigationController, but the view has an
UINavigationBar.

Any ideas on how to locate an arbitrary view controller? The following
only locates the 5 associated with the Tab Bar, and not the top most
PasswordPromptController (which was presented modally).

It sure would have been helpful if viewWillDisappear was sent as
documented. When the home button is pressed, and the home screen is
presented, the view has clearly disappeared (no offense Alex).

Jeff

- (void)applicationWillResignActive:(UIApplication *)application
{
  if(tabBarController.viewControllers != nil)
[self clearPasswords:tabBarController.viewControllers];
}

- (void)clearPasswords:(NSArray *)viewsControllers
{
  Class passwordPromptClass = [PasswordPromptController class];

  for (UIViewController * viewController in viewsControllers)
  {
if ([viewController isKindOfClass:passwordPromptClass])
  [(PasswordPromptController *)viewController clearPassworAndPin];
  }
}

>
> On Mon, Apr 25, 2011 at 9:59 PM, Jeffrey Walton  wrote:
>> Hi All,
>>
>> According to the documentation in the headers:
>>
>>    // UIViewController.h
>>    // Called when the view is dismissed, covered or otherwise hidden.
>>    - (void)viewWillDisappear:(BOOL)animated;
>>
>> And Apple's documentation [1]:
>>
>>    Notifies the view controller that its view is about to be dismissed,
>>    covered, or otherwise hidden from view.
>>
>> I'm not sure if I should be surprised or not, but viewWillDisappear
>> does not appear to be called despite what the documentation claims.
>>
>> The view is part of a custom view controller (built with IB - nothing
>> fancy) and presented modally. To duplicate, show a view modally and
>> press the home button.
>>
>> Thanks in advance,
>> Jeff
>>
>> [1] 
>> http://developer.apple.com/library/ios/#documentation/uikit/reference/UIViewController_Class/Reference/Reference.html
>> [SNIP]
___

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

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


iOS - AudioSession Category to play in sleep mode

2011-04-25 Thread Sasikumar JP
Hi,
  I am working on streaming audio player application for iOS. currently i am 
experimenting with AudioQueue and AudioUnit for playback.

Both works fine in the normal condition. But AudioUnit playback stopped playing 
when device (ipod touch 2nd gen) goes to sleep mode, where as it works fine 
with AudioQueue.

I have set "kAudioSessionCategory_MediaPlayback" session category for both 
cases. I assume this session category should continue the playback even in 
sleep mode.

I am not sure what i am missing here. 

I want to add pan/effects features to my application, so i am trying with 
AudioUnit.

Any help is highly appreciated 

Thanks
Sasikumar JP___

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

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


NSURLCache

2011-04-25 Thread Rick Mann
I'm trying to use an NSURLCache. I want to use one I create, just for this, 
rather than make it the shared cache.

(I'm also using the MVCNetworking classes to load resources, so I don't have a 
lot of access to the underlying NSHTTPURLRequests, etc.)

What I'm seeing is that after storing into the cache, the thing I just stored 
is not there. I even tried reading it out immediately after adding it, to make 
sure it wasn't an issue with the request I use as the key. No dice (there's 
also a note in the sample code about it taking some time to write to disk, so 
that may be part of that).

The CacheInfo sample code never seems to explicitly store the results in the 
cache, but it does explicitly try to get them out of the cache.

One of the other things it's doing differently than I do is it creates an 
NSURLRequest using a cache policy. I just create a plain NSURLRequest. Is that 
a necessary step?

Thanks,
Rick

___

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

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

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

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


Re: viewWillDisappear not being called

2011-04-25 Thread Alex Kac
The view is not being hidden - the whole app is. viewWillDisappear is called 
when within the life-cycle of a view, its actually about to get removed from 
the visible hierarchy. 

There are two life-cycles you are mixing up: app lifecycle and view controller 
life cycle. The two do not mix.

On Apr 25, 2011, at 9:59 PM, Jeffrey Walton wrote:

> Hi All,
> 
> According to the documentation in the headers:
> 
>// UIViewController.h
>// Called when the view is dismissed, covered or otherwise hidden.
>- (void)viewWillDisappear:(BOOL)animated;
> 
> And Apple's documentation [1]:
> 
>Notifies the view controller that its view is about to be dismissed,
>covered, or otherwise hidden from view.
> 
> I'm not sure if I should be surprised or not, but viewWillDisappear
> does not appear to be called despite what the documentation claims.
> 
> The view is part of a custom view controller (built with IB - nothing
> fancy) and presented modally. To duplicate, show a view modally and
> press the home button.

Alex Kac - President and Founder
Web Information Solutions, Inc.

“Don't forget until too late that the business of life is not business but 
living.”
-- B.C. Forbes,




___

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

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

2011-04-25 Thread Heath Borders
I've seen this behavior also, specifically on iOS 3.1 while using a
UIViewController inside a UINavigationController inside a
UITabBarController.

-Heath Borders
heath.bord...@gmail.com
Twitter: heathborders
http://heath-tech.blogspot.com



On Mon, Apr 25, 2011 at 9:59 PM, Jeffrey Walton  wrote:
> Hi All,
>
> According to the documentation in the headers:
>
>    // UIViewController.h
>    // Called when the view is dismissed, covered or otherwise hidden.
>    - (void)viewWillDisappear:(BOOL)animated;
>
> And Apple's documentation [1]:
>
>    Notifies the view controller that its view is about to be dismissed,
>    covered, or otherwise hidden from view.
>
> I'm not sure if I should be surprised or not, but viewWillDisappear
> does not appear to be called despite what the documentation claims.
>
> The view is part of a custom view controller (built with IB - nothing
> fancy) and presented modally. To duplicate, show a view modally and
> press the home button.
>
> Thanks in advance,
> Jeff
>
> [1] 
> http://developer.apple.com/library/ios/#documentation/uikit/reference/UIViewController_Class/Reference/Reference.html
> ___
>
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/heath.borders%40gmail.com
>
> This email sent to heath.bord...@gmail.com
>
___

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

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

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

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


viewWillDisappear not being called

2011-04-25 Thread Jeffrey Walton
Hi All,

According to the documentation in the headers:

// UIViewController.h
// Called when the view is dismissed, covered or otherwise hidden.
- (void)viewWillDisappear:(BOOL)animated;

And Apple's documentation [1]:

Notifies the view controller that its view is about to be dismissed,
covered, or otherwise hidden from view.

I'm not sure if I should be surprised or not, but viewWillDisappear
does not appear to be called despite what the documentation claims.

The view is part of a custom view controller (built with IB - nothing
fancy) and presented modally. To duplicate, show a view modally and
press the home button.

Thanks in advance,
Jeff

[1] 
http://developer.apple.com/library/ios/#documentation/uikit/reference/UIViewController_Class/Reference/Reference.html
___

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

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

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

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


Re: NSOpenPanel

2011-04-25 Thread Rick C.
Thanks Bob I was thinking that was the only way!


On Apr 25, 2011, at 8:10 PM, Thomas Davie wrote:

> 
> On 25 Apr 2011, at 12:55, Rick C. wrote:
> 
>> Hello,
>> 
>> I'm thinking the answer is no but just to double-check is there any way to 
>> get another button into an NSOpenPanel?  I only see the possibility for the 
>> default and cancel buttons unless I'm overlooking something.  Thanks!
> 
> See -setAccessoryView:
> 
> Thanks
> 
> Bob

___

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

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

2011-04-25 Thread koko
Just dawned on me 

1. The app only runs in landscape mode 
2. One UIPickerView with 3 components
3. Make selection for each of the three components
4. display below the UIPickerView the answer
5. There is a default selection for the three components
6. When the app quits the last setting of the three components is remembered, 
this becomes the default for next run
7. When any component value is changed the answer displays with no other user 
interaction (i.e. they don't hit 'show me")


Comments please.

-koko





On Apr 25, 2011, at 12:56 PM, Zajkowski, James wrote:

> Without more detail I'd suggest perhaps a nav controller-style app with
> table views.
> 
> --Jim
> 
> On 4/25/11 2:47 PM, "koko"  wrote:
> 
>> I haven't found sample code (if someone can point me to an example) ...
>> 
>> A current Windows app utilizes three pop up lists for the user to make a
>> selection
>> 
>> List 1 is the macro selection
>> List 2 and List 3 refine the selection
>> 
>> The combination of three selections determines an answer.
>> 
>> Now I understand that UIPickerView is the analog for the pop up list.
>> 
>> But, UIPickerView seems to take up lots of real estate so for an iOS app
>> deployed to the iPhone three UIPickerViews seem prohibitive.
>> 
>> What is the proper thing to do 
>> 
>> Display each UIPickerView when a UILabel (for example) is tapped?
>> 
>> Any suggestions or samples much appreciated.
>> 
>> -koko___
>> 
>> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>> 
>> Please do not post admin requests or moderator comments to the list.
>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>> 
>> Help/Unsubscribe/Update your Subscription:
>> http://lists.apple.com/mailman/options/cocoa-dev/jamesez%40umich.edu
>> 
>> This email sent to jame...@umich.edu
> 
> 

___

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

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

2011-04-25 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 4/25/11 11:47 AM, koko wrote:
> I haven't found sample code (if someone can point me to an example) ...
> 
> A current Windows app utilizes three pop up lists for the user to make a 
> selection
> 
> List 1 is the macro selection
> List 2 and List 3 refine the selection
> 
> The combination of three selections determines an answer.
> 
> Now I understand that UIPickerView is the analog for the pop up list.
> 
> But, UIPickerView seems to take up lots of real estate so for an iOS app 
> deployed to the iPhone three UIPickerViews seem prohibitive.
> 
> What is the proper thing to do 
> 
> Display each UIPickerView when a UILabel (for example) is tapped?
> 
> Any suggestions or samples much appreciated.

You could try having multiple "spinners" (columns) in one UIPickerView,
and have the selectable options in the latter columns depend on the
selected value in the former.  For example, see how in the timer part of
the clock app, you can't select 0:00.

This makes sense probably only if there are relatively few dependent
options and they don't require lengthy descriptions.

Otherwise, a UINavigationController as James suggested is probably the
way to go.

- -- 
Conrad Shultz

Synthetiq Solutions
www.synthetiqsolutions.com
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFNtcTbaOlrz5+0JdURAvcNAJ42yqm53q/k8BvIlNZGxCTX7Og5ZgCffuZ0
GCF0AeJleIzOXfOqm0cwonA=
=6oqr
-END PGP SIGNATURE-
___

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

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

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

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


Re: UIPickerView

2011-04-25 Thread Luke Hiesterman
You probably want to display 1 picker at a time, with a way for the user to 
navigate from one to the other. See what happens if you go to this page on iOS 
and tap on one of the selection boxes.

http://www.google.com/advanced_search

Luke

On Apr 25, 2011, at 11:47 AM, koko wrote:

> I haven't found sample code (if someone can point me to an example) ...
> 
> A current Windows app utilizes three pop up lists for the user to make a 
> selection
> 
> List 1 is the macro selection
> List 2 and List 3 refine the selection
> 
> The combination of three selections determines an answer.
> 
> Now I understand that UIPickerView is the analog for the pop up list.
> 
> But, UIPickerView seems to take up lots of real estate so for an iOS app 
> deployed to the iPhone three UIPickerViews seem prohibitive.
> 
> What is the proper thing to do 
> 
> Display each UIPickerView when a UILabel (for example) is tapped?
> 
> Any suggestions or samples much appreciated.
> 
> -koko___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/luketheh%40apple.com
> 
> This email sent to luket...@apple.com

___

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

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

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

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


Re: UIPickerView

2011-04-25 Thread Zajkowski, James
Without more detail I'd suggest perhaps a nav controller-style app with
table views.

--Jim

On 4/25/11 2:47 PM, "koko"  wrote:

>I haven't found sample code (if someone can point me to an example) ...
>
>A current Windows app utilizes three pop up lists for the user to make a
>selection
>
>List 1 is the macro selection
>List 2 and List 3 refine the selection
>
>The combination of three selections determines an answer.
>
>Now I understand that UIPickerView is the analog for the pop up list.
>
>But, UIPickerView seems to take up lots of real estate so for an iOS app
>deployed to the iPhone three UIPickerViews seem prohibitive.
>
>What is the proper thing to do 
>
>Display each UIPickerView when a UILabel (for example) is tapped?
>
>Any suggestions or samples much appreciated.
>
>-koko___
>
>Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>
>Please do not post admin requests or moderator comments to the list.
>Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
>Help/Unsubscribe/Update your Subscription:
>http://lists.apple.com/mailman/options/cocoa-dev/jamesez%40umich.edu
>
>This email sent to jame...@umich.edu

___

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

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


UIPickerView

2011-04-25 Thread koko
I haven't found sample code (if someone can point me to an example) ...

A current Windows app utilizes three pop up lists for the user to make a 
selection

List 1 is the macro selection
List 2 and List 3 refine the selection

The combination of three selections determines an answer.

Now I understand that UIPickerView is the analog for the pop up list.

But, UIPickerView seems to take up lots of real estate so for an iOS app 
deployed to the iPhone three UIPickerViews seem prohibitive.

What is the proper thing to do 

Display each UIPickerView when a UILabel (for example) is tapped?

Any suggestions or samples much appreciated.

-koko___

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

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


What is loaded when a static library is linked? (was: Xcode 4 auto-importing Objective C categories from static library)

2011-04-25 Thread Bradley S. O'Hearne
The subject of this thread, and discussion of it both here and elsewhere, has 
suggested a closely related question: 

When a static library is linked in, what classes within the static library are 
loaded, only the referenced classes, or all of them? One quick note -- 
regarding the -all_load linker option, if you have categories in your static 
library, you don't have a choice (on iOS) about using the -all_load option:

Technical Q&A QA1490
http://developer.apple.com/library/mac/#qa/qa1490/_index.html

...otherwise you'll get a runtime error. 

I was of the understanding that only referenced (read: imported) classes in the 
static library get loaded. There are indications in Xcode 4, and several on the 
Apple developer forums that are saying otherwise, rather than linking loads all 
classes in the library regardless of imports. 

The answer to this question has pretty big ramifications in the design of 
static libraries, and the use of third party static libraries, because if using 
a static library by default inherits the loading of the entire library, that is 
definitely going to make me think twice about using any third party library, as 
it could have notable memory impact.

If anyone can shed some light on this, that would be great.

Brad

On Apr 23, 2011, at 3:57 PM, Bradley S. O'Hearne wrote:

> Thanks for the response, Stephen. I was under the impression that category 
> modification was limited to the types within which they are imported. Thanks 
> for expanding my knowledge of categories!
> 
> Cheers, 
> 
> Brad
> 
> On Apr 23, 2011, at 3:22 PM, Stephen J. Butler wrote:
> 
>> On Sat, Apr 23, 2011 at 3:36 PM, Bradley S. O'Hearne
>>  wrote:
>>> Since transitioning to Xcode 4, I have discovered a very curious shift in 
>>> the way Objective C categories are handled in static libraries. In general, 
>>> if you create an Objective C category, you have to import that category 
>>> into an implementation (.m) class in order for that category's additions to 
>>> be visible and used. That worked great in Xcode 3, as you can control what 
>>> categories methods appear wherever by merits of using the import (or not). 
>>> However, in Xcode 4, all categories defined in a static library used in a 
>>> dependent project are by definition visible, even if not imported.
>> 
>> It's always been this way at runtime. When a category is loaded it
>> changes the behavior of all instances of a class that it modifies, no
>> ifs/ands/buts. It's loaded by the DYLD, and that has no concept of
>> your imports/includes. From the Obj-C docs:
>> 
>> ""Category methods can do anything that methods defined in the class
>> proper can do. At runtime, there’s no difference. The methods the
>> category adds to the class are inherited by all the class’s
>> subclasses, just like other methods.""
>> 
>> Now the tools, on the other hand, were less smart in Xcode3 and below.
>> Autocomplete, IB message browser, etc only knew about the
>> messages/properties visible to the immediate code block (via import,
>> include, etc). That Apple has fixed this in Xcode 4 to better match
>> reality is a GOOD THING.
> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/brado%40bighillsoftware.com
> 
> This email sent to br...@bighillsoftware.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: magic trackpad

2011-04-25 Thread Raleigh Ledet
The view does not need to be key. It only needs to be in the key/main window 
and the mouse cursor needs to be over the view.

I don't know why you are worried about mouse events. If you are performing a 
gesture, then you will not get ouse events and the cursor will not move until 
you complete the gesture. It sounds like you aren't actually performing any 
known gestures. (Actually it sounds like you are trying to do a 1 finger 
gesture a'la iOS.) Are you trying to perform the gestures in the manner 
explained in the system preference pane?

-raleigh

On Apr 25, 2011, at 9:54 AM, Charlie Dickman wrote:

> Raleigh,
> 
> I actually don't want touches but since I wasn't getting anything I put them 
> in; I'll drop them.
> 
> I understand I can't get gestures in the background - I'm not trying to.
> 
> I will check to be sure that the view is key - thanks.
> 
> I'm still confused about the mouse cursor responding to finger gestures. It 
> seems that a gesture would easily carry the mouse cursor out of the targeted 
> view. Or are you referring to the text cursor? I have no text cursor in my 
> targeted view.
> 
> I also don't understand why Safari does not respond to gestures.
> 
> 
> On Apr 25, 2011, at 12:46 PM, Raleigh Ledet wrote:
> 
>> Charlie,
>> 
>> You have to explicitly opt into touches, but not the other gestures. Though, 
>> I wouldn't opt into touches unless you really really need to go that route.
>> 
>> The other gestures are targeted gestures. They are sent to the the view 
>> under the cursor and then follow the responder chain from there. Also, the 
>> view needs to be in a main or key window. You can't get gestures while in 
>> the background.
>> 
>> -raleigh
>> 
>> 
>> On Apr 25, 2011, at 9:42 AM, Charlie Dickman wrote:
>> 
>>> Raleigh,
>>> 
>>> I have all gestures enabled in trackpad prefs. and I am trying, at this 
>>> point, to respond to everything using
>>> 
>>> 
>>> - (void) beginGestureWithEvent: (NSEvent *) beginGestureEvent;
>>> - (void) endGestureWithEvent: (NSEvent *) endGestureEvent;
>>> - (void) magnifyWithEvent: (NSEvent *) magnifyEvent;
>>> - (void) rotateWithEvent: (NSEvent *) rotateEvent;  
>>> - (void) swipeWithEvent: (NSEvent *) swipeEvent;
>>> - (void) touchesBeganWithEvent: (NSEvent *) touchesBeganEvent;
>>> - (void) touchesMovedWithEvent: (NSEvent *) touchesMovedEvent;
>>> - (void) touchesCancelledWithEvent: (NSEvent *) touchesCancelledEvent;
>>> - (void) touchesEndedWithEvent: (NSEvent *) touchesEndedEvent;
>>> 
>>> Thanks for your interest
>>> 
>>> On Apr 25, 2011, at 12:20 PM, Raleigh Ledet wrote:
>>> 
 Charlie,
 
 First off, which gestures do you have enabled in your trackpad prefs?
 Second, which gestures are your trying to respond to? Swipe, Magnify, 
 Rotate, All of the above? Or are you trying to track each touch manually 
 yourself?
 
 -raleigh
 
 On Apr 22, 2011, at 3:42 PM, Charlie Dickman wrote:
 
> I have instrumented a view in my application to respond to trackpad 
> gestures. I am programming on a Mac Pro using a magic trackpad for 
> gestures. The program gets no messages from gestures made on the 
> trackpad. The mouse responds to trackpad finger moves and trackpad clicks.
> 
> Is there a way to separate the trackpad messages from the mouse messages? 
> Do mouse events have an attribute that distinguishes the trackpad from 
> the mouse? What am I missing or can the trackpad only emulate the mouse?
> 
> Charlie Dickman
> 3tothe...@comcast.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/ledet%40apple.com
> 
> This email sent to le...@apple.com
 
>>> 
>>> Charlie Dickman
>>> 3tothe...@comcast.net
>>> 
>>> 
>>> 
>> 
> 
> Charlie Dickman
> 3tothe...@comcast.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: magic trackpad

2011-04-25 Thread Raleigh Ledet
Charlie,

You have to explicitly opt into touches, but not the other gestures. Though, I 
wouldn't opt into touches unless you really really need to go that route.

The other gestures are targeted gestures. They are sent to the the view under 
the cursor and then follow the responder chain from there. Also, the view needs 
to be in a main or key window. You can't get gestures while in the background.

-raleigh


On Apr 25, 2011, at 9:42 AM, Charlie Dickman wrote:

> Raleigh,
> 
> I have all gestures enabled in trackpad prefs. and I am trying, at this 
> point, to respond to everything using
> 
> 
> - (void) beginGestureWithEvent: (NSEvent *) beginGestureEvent;
> - (void) endGestureWithEvent: (NSEvent *) endGestureEvent;
> - (void) magnifyWithEvent: (NSEvent *) magnifyEvent;
> - (void) rotateWithEvent: (NSEvent *) rotateEvent;
> - (void) swipeWithEvent: (NSEvent *) swipeEvent;
> - (void) touchesBeganWithEvent: (NSEvent *) touchesBeganEvent;
> - (void) touchesMovedWithEvent: (NSEvent *) touchesMovedEvent;
> - (void) touchesCancelledWithEvent: (NSEvent *) touchesCancelledEvent;
> - (void) touchesEndedWithEvent: (NSEvent *) touchesEndedEvent;
>   
> Thanks for your interest
> 
> On Apr 25, 2011, at 12:20 PM, Raleigh Ledet wrote:
> 
>> Charlie,
>> 
>> First off, which gestures do you have enabled in your trackpad prefs?
>> Second, which gestures are your trying to respond to? Swipe, Magnify, 
>> Rotate, All of the above? Or are you trying to track each touch manually 
>> yourself?
>> 
>> -raleigh
>> 
>> On Apr 22, 2011, at 3:42 PM, Charlie Dickman wrote:
>> 
>>> I have instrumented a view in my application to respond to trackpad 
>>> gestures. I am programming on a Mac Pro using a magic trackpad for 
>>> gestures. The program gets no messages from gestures made on the trackpad. 
>>> The mouse responds to trackpad finger moves and trackpad clicks.
>>> 
>>> Is there a way to separate the trackpad messages from the mouse messages? 
>>> Do mouse events have an attribute that distinguishes the trackpad from the 
>>> mouse? What am I missing or can the trackpad only emulate the mouse?
>>> 
>>> Charlie Dickman
>>> 3tothe...@comcast.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/ledet%40apple.com
>>> 
>>> This email sent to le...@apple.com
>> 
> 
> Charlie Dickman
> 3tothe...@comcast.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: @class create a new instance?

2011-04-25 Thread Rodrigo Zanatta Silva
Ok, my friend is wrong.  I thought that.

2011/4/25 Patrick Mau 

> Hallo Rodrigo
>
> The "@class" statement is a forward declaration to tell the compiler that
> the class exists.
> It provides no additional information to the compiler, meaning that code
> completion will not work.
>
> You probably should consider protocols, it's hard to judge from your
> sample.
>
> Patrick
>
> On 25.Apr.2011, at 17:02, Rodrigo Zanatta Silva wrote:
>
> > HI, someone said to me that *@class* directive create a new instance of
> the
> > class automatic. I tried to find information about this, but didn't
> found.
> >
> > For me, @class is only to solve cyclic includes. There are any side
> effect
> > using it? The object variable is the same in this 2 example below, or
> there
> > are some difference? The instance *instanceMyClass* will be the same of
> the
> > class that send the pointer, right? And I will not lose any memory right?
> >
> > Example 1
> > //in sample.h
> > #include "myClass.h"
> >
> > myClass *instanceMyClass;
> >
> > //in sample.m
> > #include "sample.h"
> > -(id) initWithMyClass :(myClass *) linkMyClass {
> >instanceMyClass = linkMyClass;
> > }
> >
> > Example 2
> > //in sample.h
> > @class myClass;
> >
> > myClass *instanceMyClass;
> >
> > //in sample.m
> > #include "sample.h"
> > #include "myClass.h"
> >
> > -(id) initWithMyClass :(myClass *) linkMyClass {
> >instanceMyClass = linkMyClass;
> > }
>
>
___

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

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

2011-04-25 Thread Keith Duncan

On 25 Apr 2011, at 16:00, Bing Li wrote:

> Dear Marcus,
> 
> Could you tell me which features are not available when using BSD sockets on
> iOS? Although I would like to use CFNetwork APIs, I cannot find enough
> materials to learn how to use them. The guide from apple.com is too limited
> to be useful. Could you provide me with other resources about CFNetwork
> APIs.

If I recall correctly, using the socket() API directly won't bring the WWAN 
radio online, you need to use CoreFoundation API or higher for this to happen.

The CFNetwork adds very little on top of BSD sockets, the biggest feature being 
CFRunLoop integration, where the system will create and manage a select() (or 
equivalent) loop for you.

Take a look at CFSocket.h to get started.

Keith

___

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

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)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: @class create a new instance?

2011-04-25 Thread Kyle Sluder
On Mon, Apr 25, 2011 at 8:02 AM, Rodrigo Zanatta Silva
 wrote:
> HI, someone said to me that *@class* directive create a new instance of the
> class automatic. I tried to find information about this, but didn't found.

They were wrong.

> For me, @class is only to solve cyclic includes. There are any side effect
> using it? The object variable is the same in this 2 example below, or there
> are some difference? The instance *instanceMyClass* will be the same of the
> class that send the pointer, right? And I will not lose any memory right?

You are correct. It's called a forward declaration, and is used to
resolve cyclic includes or reference class names in header files when
the actual definition isn't necessary.

Say you have MyClass.h:

// MyClass.h

@interface MyClass : NSObject {
  OtherClass *ivar;
}
- (OtherClass *)myIvar;
@end

The compiler doesn't actually need to know the definition of
OtherClass; it just needs to know that OtherClass refers to a class.
So instead of #import "OtherClass.h", you could use @class OtherClass
at the top of MyClass.h; this makes compiling MyClass.h much faster.

--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: BSD TCP Programming on iPad

2011-04-25 Thread John Pannell
You might also want to look into the GameKit APIs present in iOS... by going 
lower level, you'd likely be re-inventing the functionality these APIs provide 
already.  There is extensive documentation on GameKit and its use within the 
Apple docs.  I might also recommend the following books:

http://www.amazon.com/Beginning-iPhone-Games-Development-Cabrera/dp/1430225998

... chapters 13, 14, 15, and 16 cover networking topics, including GameKit and 
some lower level stuff.

http://www.amazon.com/More-iPhone-Development-Tackling-Beginning/dp/143022505X

... chapters 8 and 9 cover GameKit and Bonjour

http://www.amazon.com/Advanced-Mac-Programming-Core-Unix/dp/0974078514

... chapters 13, 14, 19, and 20 are relevant.  They dig into the lower level 
APIs, should you still be interested in going there.

Hope this helps!

John


John Pannell
http://www.positivespinmedia.com


On Apr 25, 2011, at 9:00 AM, Bing Li wrote:

> Dear Marcus,
> 
> Could you tell me which features are not available when using BSD sockets on
> iOS? Although I would like to use CFNetwork APIs, I cannot find enough
> materials to learn how to use them. The guide from apple.com is too limited
> to be useful. Could you provide me with other resources about CFNetwork
> APIs.
> 
> Thanks so much!
> LB
> 
> On Mon, Apr 25, 2011 at 2:05 PM, Marcus Karlsson  wrote:
> 
>> Dear all,
>>> 
>>> I am planning to program with BSD TCP on iPad. The motivation to do that
>>> is that a P2P model is expected. I think the network techniques, such as
>>> Web Services and Push Notification, supported by Cocoa do not meet the
>>> requirements.
>>> 
>>> My experiences on iPad are not sufficient. I am not sure if the above
>>> opinion is correct?
>>> 
>> 
>> It sounds correct. However, it's recommended that you don't use BSD sockets
>> directly on iOS since certain networking features won't be available. If you
>> want to work on the socket level you should instead use the CFNetwork APIs.
>> 
>> Marcus
>> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/john%40positivespinmedia.com
> 
> This email sent to j...@positivespinmedia.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: BSD TCP Programming on iPad

2011-04-25 Thread John Joyce
Have you looked at the sample code?
https://developer.apple.com/library/ios/#samplecode/SimpleNetworkStreams/Listings/Read_Me_About_SimpleNetworkStreams_txt.html%23//apple_ref/doc/uid/DTS40008979-Read_Me_About_SimpleNetworkStreams_txt-DontLinkElementID_8


On Apr 25, 2011, at 10:00 AM, Bing Li wrote:

> Dear Marcus,
> 
> Could you tell me which features are not available when using BSD sockets on
> iOS? Although I would like to use CFNetwork APIs, I cannot find enough
> materials to learn how to use them. The guide from apple.com is too limited
> to be useful. Could you provide me with other resources about CFNetwork
> APIs.
> 
> Thanks so much!
> LB
> 
> On Mon, Apr 25, 2011 at 2:05 PM, Marcus Karlsson  wrote:
> 
>> Dear all,
>>> 
>>> I am planning to program with BSD TCP on iPad. The motivation to do that
>>> is that a P2P model is expected. I think the network techniques, such as
>>> Web Services and Push Notification, supported by Cocoa do not meet the
>>> requirements.
>>> 
>>> My experiences on iPad are not sufficient. I am not sure if the above
>>> opinion is correct?
>>> 
>> 
>> It sounds correct. However, it's recommended that you don't use BSD sockets
>> directly on iOS since certain networking features won't be available. If you
>> want to work on the socket level you should instead use the CFNetwork APIs.
>> 
>> Marcus
>> 
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/cocoa-dev/jjoyce%40apple.com
> 
> This email sent to jjo...@apple.com

___

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

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

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

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


@class create a new instance?

2011-04-25 Thread Rodrigo Zanatta Silva
HI, someone said to me that *@class* directive create a new instance of the
class automatic. I tried to find information about this, but didn't found.

For me, @class is only to solve cyclic includes. There are any side effect
using it? The object variable is the same in this 2 example below, or there
are some difference? The instance *instanceMyClass* will be the same of the
class that send the pointer, right? And I will not lose any memory right?

Example 1
//in sample.h
#include "myClass.h"

myClass *instanceMyClass;

//in sample.m
#include "sample.h"
-(id) initWithMyClass :(myClass *) linkMyClass {
instanceMyClass = linkMyClass;
}

Example 2
//in sample.h
@class myClass;

myClass *instanceMyClass;

//in sample.m
#include "sample.h"
#include "myClass.h"

-(id) initWithMyClass :(myClass *) linkMyClass {
instanceMyClass = linkMyClass;
}
___

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

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

2011-04-25 Thread Bing Li
Dear Marcus,

Could you tell me which features are not available when using BSD sockets on
iOS? Although I would like to use CFNetwork APIs, I cannot find enough
materials to learn how to use them. The guide from apple.com is too limited
to be useful. Could you provide me with other resources about CFNetwork
APIs.

Thanks so much!
LB

On Mon, Apr 25, 2011 at 2:05 PM, Marcus Karlsson  wrote:

> Dear all,
>>
>> I am planning to program with BSD TCP on iPad. The motivation to do that
>> is that a P2P model is expected. I think the network techniques, such as
>> Web Services and Push Notification, supported by Cocoa do not meet the
>> requirements.
>>
>> My experiences on iPad are not sufficient. I am not sure if the above
>> opinion is correct?
>>
>
> It sounds correct. However, it's recommended that you don't use BSD sockets
> directly on iOS since certain networking features won't be available. If you
> want to work on the socket level you should instead use the CFNetwork APIs.
>
> Marcus
>
___

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

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

2011-04-25 Thread Thomas Davie

On 25 Apr 2011, at 12:55, Rick C. wrote:

> Hello,
> 
> I'm thinking the answer is no but just to double-check is there any way to 
> get another button into an NSOpenPanel?  I only see the possibility for the 
> default and cancel buttons unless I'm overlooking something.  Thanks!

See -setAccessoryView:

Thanks

Bob___

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

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


NSOpenPanel

2011-04-25 Thread Rick C.
Hello,

I'm thinking the answer is no but just to double-check is there any way to get 
another button into an NSOpenPanel?  I only see the possibility for the default 
and cancel buttons unless I'm overlooking something.  Thanks!

rc___

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

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

2011-04-25 Thread Graham Cox

On 24/04/2011, at 6:01 AM, Ken Ferry wrote:

> That works, but if the stock NSColorWell drawing and behavior is already what 
> you want, you can use normal NSColorWell objects as subviews.  Your uber view 
> might be in charge of positioning them.
> 
> But definitely, if you don't need to put this in a table, no reason to deal 
> with cells here.
> 
> -Ken


Can NSColorWells work well at a non-standard size? The overlap issue means that 
they'd have to change size while they were actually being dragged when one 
colour stop "collided" with another. I could be wrong but I think NSColorWell 
uses a fixed inset for its border edge which ends up proportionally far too 
large when the well as a whole is made smaller. This is one reason I ended up 
making my own well-like elements. This was originally written back in the 10.4 
days so things may have changed.

I also have had a peek at my code and recall how I allow my fake "wells" to 
interoperate with the standard ones. It's super-simple. I hold an offscreen 
NSColorWell subclass in my gradient control object, and when it gets a 
deactivate message, it simply passes that on to the control, which deactivates 
the fake wells. Similarly, when I click on a fake well, it tells my offscreen 
well to activate, thus turning off any other NSColorWell instances in the app.

--Graham


___

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

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

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

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


Re: BSD TCP Programming on iPad

2011-04-25 Thread Marcus Karlsson

Dear all,

I am planning to program with BSD TCP on iPad. The motivation to do that
is that a P2P model is expected. I think the network techniques, such as
Web Services and Push Notification, supported by Cocoa do not meet the
requirements.

My experiences on iPad are not sufficient. I am not sure if the above
opinion is correct?


It sounds correct. However, it's recommended that you don't use BSD sockets 
directly on iOS since certain networking features won't be available. If 
you want to work on the socket level you should instead use the CFNetwork 
APIs.


Marcus
___

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

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


magic trackpad

2011-04-25 Thread Charlie Dickman
I have instrumented a view in my application to respond to trackpad gestures. I 
am programming on a Mac Pro using a magic trackpad for gestures. The program 
gets no messages from gestures made on the trackpad. The mouse responds to 
trackpad finger moves and trackpad clicks.

Is there a way to separate the trackpad messages from the mouse messages? Do 
mouse events have an attribute that distinguishes the trackpad from the mouse? 
What am I missing or can the trackpad only emulate the mouse?

Charlie Dickman
3tothe...@comcast.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