• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: -[CKConnection connect]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: -[CKConnection connect]


  • Subject: Re: -[CKConnection connect]
  • From: Mike Abdullah <email@hidden>
  • Date: Tue, 30 Dec 2008 19:25:04 +0000

My apologies everyone, somehow sent this to completely the wrong mailing list. It should have been to the ConnectionKit list, not cocoa- dev at all.

Mike.

On 30 Dec 2008, at 15:38, I. Savant wrote:

On Tue, Dec 30, 2008 at 9:51 AM, Mike Abdullah
<email@hidden> wrote:
What is the desired intent of the -connect method? If you call it while
already connected, should it:


A) Restart the connection -- In which case I need to update the header
docs
B) Do nothing -- In which case I need to make relatively
small adjustments to the code

Don't know ... what is CKConnection? It's not a part of the Cocoa frameworks, but a google search shows it's part of the third-party open source "Connection Kit". In those cases, I think you might have better luck contacting them directly or using forums if they supply them (in this case, they do not).

 Personally I would expect an SDK to set an NSError pointer and
return "NO" if the connection is already established (the error
clearly indicating this specific case and the application simply not
presenting the useless error to the user, or better yet, the
application being improved so that it doesn't stupidly call -connect
when it's already connected ...).*

 Or, a different error with the "NO" response if the connection
attempt fails, etc. The developer using the SDK should be 100%
responsible for dealing with the individual well-defined situations,
rather than blindly calling a method to start an action that they
should know is unnecessary. Why waste the overhead (especially on
mobile devices)?

 That's just my opinion, though; I have no idea how Connection Kit
actually responds to extraneous calls to -connect.

--
I.S.


* Yes, I prefer the -(BOOL)doSomethingUsefulWithThis:(id)object error:(NSError **)error design model versus the use of NSException. The latter has its advantages but I feel the former is cleaner and therefore satisfies my OCD quite nicely.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >-[CKConnection connect] (From: Mike Abdullah <email@hidden>)

  • Prev by Date: AW: NSColorWell shows no color
  • Next by Date: Re: respondsToSelector - #import OR compiler warnings?
  • Previous by thread: Re: -[CKConnection connect]
  • Next by thread: Odd EXEC_BAD_ACCESS after executing URLRequest
  • Index(es):
    • Date
    • Thread