On Sep 7, 2009, at 1:56 PM, Ashley Perrien wrote:
I'm very new to networking via cocoa and need to develop a small
port scanner application. The core of it is very simple, is address
1.2.3.4 listening on port X. I've done a bit of looking on NSStream,
pipes, tasks and such but hopefully wha
On Oct 12, 2009, at 1:47 PM, André Berg wrote:
[...] My class internally doesn't use any threads at all (well apart
from an NSTask ivar and readInBackgroundAndNotify). The only
scenario I can think of that would be dangerous is if in the calling
code (the code from the user of my class) the
On Nov 30, 2009, at 11:27 AM, Brad Gibbs wrote:
Hi,
I'm doing bit-packing via a C function. Logging the bits of the C
function shows the expected result. If I create a string with a hex
value format, I get the correct hex string, but, if I try to put the
bytes into an NSData object with
On Jun 24, 2009, at 9:15 PM, Jeff Laing wrote:
1. If your objects use (scarce) resources that are not themselves
subject to GC (file handles, network connections, whatever), you'd be
[snip]
2. If you expect objects to be returned to the free memory pool "the
instant that those objects aren't r
On Jun 25, 2009, at 7:37 AM, Michael Ash wrote:
That may be the theory, Apple's ObjC collector does *not* trigger on
allocation errors (at least not reliably or sufficiently, and as such
it is possible to outrun the collector by creating a large number of
objects in a tight loop.
Well, as far
On Jun 25, 2009, at 12:11 PM, Kyle Sluder wrote:
[...] .NET users often call Dispose()
explicitly, because it is useful in situations other than inside using
blocks.
Though, to be clear (lest the tendency to want to put down the other
be allowed to go too far)...
The requirement in .NET th
On Jun 28, 2009, at 4:12 PM, Michael Ash wrote:
On Sun, Jun 28, 2009 at 1:17 PM, Quincey
Morris wrote:
I think the answer is in Bill's "entirely", above.
Without CFMakeCollectable, the final CFRetain will trigger the
calling of (a
hypothetical) CFDispose with the traditional timing (i.e.
i
On Jul 19, 2009, at 11:51 PM, Kyle Sluder wrote:
On Jul 19, 2009, at 11:36 PM, KK wrote:
Does the iPhone have NSURLConnection? If so, you can just point
that to
www.whatismyip.com or a similar site, and just parse the information.
This is ridiculous. Send an HTTP request to an unreliable
On Aug 29, 2009, at 10:36 AM, Quincey Morris wrote:
On Aug 29, 2009, at 05:36, Jonathan del Strother wrote:
After upgrading to snow leopard & Xcode 3.2, I've starting getting
this warning on NSLogs -
NSLog(@"Hello"); // 'Format not a string literal and no format
arguments'
NSLog(@"Hello
From: ben syverson <[EMAIL PROTECTED]>
This is going to sound bitchy, but it's hard for me to have any
sympathy for vague complaints about the docs or the usability of
Cocoa.
That does sound bitchy. I mean, it's fair enough to say that people
ought to be providing specific feedback and const
On May 19, 2008, at 1:19 AM, ben syverson wrote:
On May 19, 2008, at 12:03 AM, Peter Duniho wrote:
From: ben syverson <[EMAIL PROTECTED]>
This is going to sound bitchy, but it's hard for me to have any
sympathy for vague complaints about the docs or the usability of
Cocoa.
That
Date: Mon, 19 May 2008 02:35:12 -0400
From: Erik Buck <[EMAIL PROTECTED]>
[...] It comes up
once in a blue moon, but not with the reliability I've seen here, nor
is there nearly the kind of practiced, organized defense seen here
(which again suggests a certain regularity to the complaints).
Tha
On May 19, 2008, at 3:26 AM, Jean-Daniel Dupas wrote:
That'd be great for the Mac, but not so great for the Cocoa
evangelists. It's hard to understand the neglect Java has seen on
the Mac, except as a way to try to steer more people towards Cocoa.
Cocoa is a framework, Java a language. App
Date: Mon, 19 May 2008 19:50:57 +0800
From: "Michael Ash" <[EMAIL PROTECTED]>
[...] the existence or even the volume of
these complains is not evidence of anything other than that this
platform actually attracts programmers who aren't using it just
because it's hard.
The platform attracts progr
Date: Mon, 19 May 2008 09:32:01 -0400
From: Jeff LaMarche <[EMAIL PROTECTED]>
Subject: Re: Cocoa et al as HCI usability problem
[...] In many ways, Cocoa/Obj-C is an oddity, and certainly the
approaches
that Microsoft, Sun, and Apple have taken with their development tools
is different. Micros
Date: Mon, 19 May 2008 11:42:39 -0500
From: Alex Kac <[EMAIL PROTECTED]>
Subject: Re: Cocoa et al as HCI usability problem
[...]
I agree with much of what Peter wrote in his post, though not his
conclusion that Cocoa can't be fun.
I hesitate to even mention this, as I've written tons already an
On May 19, 2008, at 10:48 AM, Greg Titus wrote:
You've translated the Objective-C syntax into C# syntax, but the
point of the question is to think about what
prepareWithInvocationTarget() does. How would you write that method
in C#?
Well, it was a poorly stated question then. His primary
On May 19, 2008, at 11:21 AM, Greg Titus wrote:
[...]
I've worked in Java quite a bit in the past, and I disagree, but
more to the point: I've never done significant work in C# before,
so if that's an environment you are familiar with and you are
willing, I'd very much like to see what
p
Date: Mon, 19 May 2008 20:31:02 +0200
From: Andreas Mayer <[EMAIL PROTECTED]>
This is (part of) a method that handles an AppleScript command send to
the application.
One possible argument is the color to be used for display:
- (id)handleDisplayCommand:(NSScriptCommand *)command
{
NSDicti
On May 19, 2008, at 2:05 PM, Greg Titus wrote:
On May 19, 2008, at 12:08 PM, Peter Duniho wrote:
[...]
However, _with_ reflection we can do much of the same kinds of
things that Obj-C does, without knowing in advance the classes
that might use the NSUndoManager class.
One advantage I see
On May 19, 2008, at 2:20 PM, Jean-Daniel Dupas wrote:
And as we are here, note also that Key-Value-Coding uses dynamic
properties of the language.
Yes, it does.
OK, implementing valueForKey: and setValue:forKey: is probably easy
using introspection.
Likewise reflection. And in .NET, the
Date: Mon, 19 May 2008 15:51:07 -0400
From: Andy Lee <[EMAIL PROTECTED]>
* Objective-C allows you to create categories, effectively modifying
a class's interface at runtime.
C# provides "partial" class implementations for when you want to
split functionality across multiple module files (on
Date: Tue, 20 May 2008 04:26:08 +0200
From: Andreas Mayer <[EMAIL PROTECTED]>
Am 19.05.2008 um 22:36 Uhr schrieb Peter Duniho:
But not the sort of compelling "we really need the language to be
this way otherwise it just doesn't work" example I was hoping for.
There is no
Date: Mon, 19 May 2008 19:18:30 -0400
From: Andy Lee <[EMAIL PROTECTED]>
[...] When you are accessing only the public API for a class, C#'s
extension methods provide the same sort of syntax, but via static
methods that the compiler handles so as to make them look like they
are part of the origin
Date: Tue, 20 May 2008 01:34:32 -0700
From: G?rard Iglesias <[EMAIL PROTECTED]>
[...]
It is a question of intellectual curiosity I believe, maybe you are
too old and tired to take new risk and have more fun ?
Yup, that must be it. I'm too old to "get" Objective-C. After all,
it's technolo
Date: Wed, 21 May 2008 08:33:40 +0800
From: "Michael Ash" <[EMAIL PROTECTED]>
On Tue, May 20, 2008 at 4:07 PM, Peter Duniho <[EMAIL PROTECTED]>
wrote:
But personally, it makes me nervous to have a language that allows
the
implementation of a class to change accor
On May 21, 2008, at 12:01 AM, j o a r wrote:
On May 20, 2008, at 9:52 PM, Peter Duniho wrote:
The goal is not for every language to mimic C++/C#/Java.
I never said that was the goal.
Different languages serves different purposes and there is no
single best language.
I agree. So
On May 21, 2008, at 1:42 AM, Hamish Allan wrote:
I'm getting lost as to whether your main objection is about Apple not
providing anything other than Objective-C / Cocoa to develop apps on
the Mac, or whether it's just that you think their documentation could
be improved.
Sorry, that's fair. I
Date: Wed, 21 May 2008 15:14:24 -0400
From: Jeff LaMarche <[EMAIL PROTECTED]>
Pete - you complain that people should treat newcomers better, yet
here you are characterizing what many of us have said in a blatantly
antagonistic way. Riff-raff? We "like" that it's keeping you out?
Nobody said any s
On May 21, 2008, at 12:27 PM, Sherm Pendley wrote:
On Wed, May 21, 2008 at 1:30 PM, Peter Duniho <[EMAIL PROTECTED]>
wrote:
My _main_ objection is how newcomers to Mac development are
treated. Please, when someone new to the current Mac development
environment brings up one or m
Date: Wed, 21 May 2008 16:33:29 -0700
From: William Turner <[EMAIL PROTECTED]>
- too much "cocoa is wonderful" vs. not enough dry detail
So several people have alleged. Looking at the documentation, I'm not
finding anything that seems to qualify as hype. Could you provide some
links?
For wh
Date: Tue, 27 May 2008 05:27:15 -0400
From: Andy Lee <[EMAIL PROTECTED]>
[...]
But if the docs were fixed (admittedly, that's "fixed" in my own
sense of the word :) ) so that each method had a dedicated page,
I think we should not confuse the physical organization of the docs
with how the cont
On Tue, May 27, 2008 at 6:35 PM, Peter Duniho <[EMAIL PROTECTED]>
wrote:
As I said, no one ever suffered from having too many code samples.
Again, I disagree. We are seeing an ever-increasing number of people
on this list who don't care about learning Cocoa, they just want to
pie
Date: Tue, 27 May 2008 14:57:09 -0400
From: Andy Lee <[EMAIL PROTECTED]>
Also, when we *do* ask to see people's code (which also happens), it's
not because the code is the best way to express their intentions.
It's because their code is not *fulfilling* their intentions. Not at
all the same as c
On May 27, 2008, at 2:04 PM, Hamish Allan wrote:
[...]
That's because you don't really believe in conceptual documentation.
Please. Whatever else you do or say, do NOT presume to tell me
what I do or
do not believe in. Your statement is false and offensively arrogant.
How about this, t
Date: Tue, 27 May 2008 16:48:23 -0400
From: Andy Lee <[EMAIL PROTECTED]>
On May 27, 2008, at 4:15 PM, Peter Duniho wrote:
Date: Tue, 27 May 2008 14:57:09 -0400
From: Andy Lee <[EMAIL PROTECTED]>
Also, when we *do* ask to see people's code (which also happens),
it's
n
Date: Sat, 7 Jun 2008 15:31:43 +0100
From: "Hamish Allan" <[EMAIL PROTECTED]>
On Sat, Jun 7, 2008 at 2:18 PM, Michael Ash <[EMAIL PROTECTED]>
wrote:
The business about scanning the stack is essentially an
implementation detail; the promise that is being made is that objects
which you're stil
Date: Sat, 07 Jun 2008 12:38:14 -0700
From: Bill Bumgarner <[EMAIL PROTECTED]>
This comes up time and time again -- Why did Apple choose Objective-C
vs. Language X?
That is off topic for cocoa-dev and, thus, not a useful direction for
taking this particular conversation.
I agree. In spite of
Date: Sat, 07 Jun 2008 14:08:46 -0700
From: Bill Bumgarner <[EMAIL PROTECTED]>
On Jun 7, 2008, at 1:54 PM, Denis Bohm wrote:
That is handled by the Java example above (via the "Object...
args"). A method with any number of arguments can be passed to
registerUndoWithTarget. So you could do some
Date: Sat, 07 Jun 2008 14:43:26 -0700
From: Bill Bumgarner <[EMAIL PROTECTED]>
Subject: Re: Java and Objective-C
[...]
More subtly, consider what would happen if an accessor method were
inlined by the JIT or compiler. Such an action would effectively
make it impossible to do KVO against said ac
Date: Sat, 7 Jun 2008 23:24:22 +0100
From: "Hamish Allan" <[EMAIL PROTECTED]>
Whenever you write documentation in a natural language, there is scope
for ambiguity. This particular technical specification is only
mentioned in a single sentence:
"The root set is comprised of all objects reachable
Date: Sat, 07 Jun 2008 17:16:13 -0700
From: Bill Bumgarner <[EMAIL PROTECTED]>
On Jun 7, 2008, at 4:16 PM, Peter Duniho wrote:
As I pointed out in my other replies, implementing something like
NSUndoManager is trivial in C#. It would only be slightly more so
in Java, and only because
Date: Mon, 9 Jun 2008 01:03:16 -0400
From: John Engelhart <[EMAIL PROTECTED]>
On Jun 7, 2008, at 10:10 PM, Michael Ash wrote:
If you don't like undefined behavior, then C-based languages are a
poor choice. If you don't like nondeterministic object lifetimes,
then
garbage collection is a poor
Date: Mon, 11 Aug 2008 12:09:05 +
From: Trygve Inda <[EMAIL PROTECTED]>
I am seeing a deadlock I think... It works in the debugger, but
hangs when
running alone. The killThread is called as part of the
applicationWillTerminate delegate method.
My thought is that somehow after blocking to
Date: Mon, 11 Aug 2008 12:29:55 -0600
From: Scott Ribe <[EMAIL PROTECTED]>
...but it would surprise if you have to take the lock
just to inspect the condition (per the "threadMustExit" method).
That part is correct, as it's the entire point behind conditions,
atomically
check a condition and
Date: Mon, 11 Aug 2008 21:15:27 +
From: Trygve Inda <[EMAIL PROTECTED]>
The real issue here is that I need to use
[self performSelectorOnMainThread:@selector(doUnsafeStuff)
withObject:nil waitUntilDone:YES];
Which blocks until the method completes, so I need a way to end the
thr
Date: Sat, 23 Aug 2008 12:05:44 -0700
From: "Adam R. Maxwell" <[EMAIL PROTECTED]>
[...]
- (BOOL)isEqual:(id)other
{
if ([other isKindOfClass:[self class]] == NO) return NO;
return ([ivar1 isEqual:(Test *)other->ivar1] && [ivar2 isEqual:
(Test *)other->ivar2]);
}
- (unsigned)hash { return [
Date: Sat, 23 Aug 2008 17:52:21 -0700
From: "Adam R. Maxwell" <[EMAIL PROTECTED]>
Well, if your hash values collide, they collide regardless of the
hash table. As long as you've got a well-distributed hash function,
any collisions generated by the hash table implementation should be
well-distri
On Feb 2, 2009, at 6:02 PM, Seth Willits wrote:
Before opening the file, either determine, guess, or be told what
the encoding is. With that encoding, convert your delimiter string
into raw bytes, then do byte-for-byte comparison on the file to find
occurrences of that delimiter.
Is there
On Feb 2, 2009, at 6:56 PM, Kenneth Bruno II wrote:
On Feb 2, 2009, at 9:29 PM, Peter Duniho wrote:
Is there not a Cocoa class that handles character encoding and line-
based reading from files, streams, etc.? And an equivalent one for
writing?
That seems like an odd omission for a
On Feb 2, 2009, at 7:50 PM, Joar Wingfors wrote:
How do you know what delimiter string to use? Another thing that
you'd have to determine, guess or be told, right? In general I would
guess that it in this case almost always would be impossible and /
or inappropriate to attempt to determine
On Feb 1, 2009, at 8:37 PM, Michael Ash wrote:
Thanks to both you and Rob for repeating the experiment. Interesting
that it's so variable. On my computer it would occasionally require
several million to crash, but most of the time it explodes within the
first few hundred thousand.
I've been te
On Feb 6, 2009, at 6:51 PM, Kevin Walzer wrote:
[...] I'm not sure what is causing these errors. Line 11 is set up
like this:
-(int)switchIcon (ClientData cd, Tcl_ip *ip, int objc, Tcl_Obj
*objv[]);
The error is because your method prototype syntax is completely wrong.
You should probabl
Mike already gave a bunch of good advice, so I'll just try to
usefully expand on that (but I also have one "sort-of" disagreement
I'll mention :) )...
Date: Mon, 24 Nov 2008 01:06:17 +0100
From: WT <[EMAIL PROTECTED]>
[...]
2. continuously running the simulation engine, at a rate that can
Date: Mon, 24 Nov 2008 11:35:42 +0100
From: WT <[EMAIL PROTECTED]>
Hi Peter,
thanks for answering my post.
Happy to. :)
[...]
While it may wind up making sense to put the simulation engine in a
separate thread, I would recommend _not_ trying to adjust the
simulation rate to account for th
On Mar 16, 2009, at 6:18 PM, Chris Idou wrote:
Is there any accepted, or preferred or standard way of enforcing a
trial software period for a program on Mac, so that people can't
just delete their preferences or something and start the trial
again? Or does every developer hack their own lit
On Mar 22, 2009, at 5:22 AM, Uli Kusterer wrote:
On 22.03.2009, at 12:22, Michael Ash wrote:
Just a general request for the list here: could we not add "[solved]"
to the topic when the problem is solved? It breaks threading and
causes confusion. Just stick it into the original thread. The act o
On Apr 14, 2009, at 1:32 PM, Eric E. Dolecki wrote:
My apologies - what I meant to type was that I AM doing this:
int tmp = (arc4random()%10)+1;
while (tmp == activeTarget) {
tmp = (arc4random()%10)+1;
}
activeTarget = tmp;
So, you are generating a random number between 1 and 10, inclus
On Apr 15, 2009, at 11:53 AM, Greg Robertson wrote:
I have put together some code from various sites such as this one:
http://blog.coriolis.ch/2009/02/20/relative-date-to-now/
Basically I would like to display records for a week duration but I am
unsure how to handle daylight savings time. Is t
On Apr 30, 2009, at 6:47 PM, Ali Ozer wrote:
[...]
What I don't get is... why is there NSMutableString and NSString?
#1. It seems weird to me that a string object can't be modified
once it's
created. Why is this?
Immutable objects are useful for various reasons:
- Knowing that they can'
On May 21, 2009, at 11:33 AM, Morales Vivó Óscar wrote:
I have an cocoa controller object with a property that is actually
read from another, C++ object. It works fine when updating or
reading the value, but sometimes other C++ parts of the program will
change the value of the property and
On May 21, 2009, at 5:43 PM, Morales Vivó Óscar wrote:
On May 21, 2009, at 16:34 , Peter Duniho wrote:
On May 21, 2009, at 11:33 AM, Morales Vivó Óscar wrote:
I have an cocoa controller object with a property that is
actually read from another, C++ object. It works fine when
updating or
62 matches
Mail list logo