> NSString* newValue = [formatter stringFromNumber:fv ];
> [formatter release];
>
> return [NSString stringWithFormat:@"[EMAIL PROTECTED]@", newValue, @"%"];
> }
>
> Is this the best way to do this? It works just fine, but I was wondering if
= FSEventsCopyUUIDForDevice(device);
CFStringRef uuidStr = CFUUIDCreateString(uuid);
CFRelease(uuid);// CF copy rule
return ((NSString*)uuidStr);
--
James Bucanek
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do n
can't manage).
Any endian issues with zlib?
zlib compresses bytes, not words, so there are no inherent
endian issues when using zlib. Your actual data is another
matter; You'll have the same endian issues you would
storing/moving uncompressed data betw
ed/allocated or if you must have a non-object
data blob that you need to pass around by value (e.g. NSRect).
Dictionaries are good for dynamic structures, where you don't
necessarily know or care about what kind or how many values it contains.
--
James Bucanek
__
to translate
the tracking rects to the coordinate system of the parent window
and attach the tracking rects to the parent window instead. The
parent window then receives the various mouseMoved: events and
passes them back to the child window for handling. A little
klud
64 __spin_lock
7464 __spin_lock
I'm *assuming* that this is the worker thread exiting. But since
there's no symbolic information associated with my application I
can't figure out what thread this belongs to, what selector it
will/did execute, or why the heck it
stead. But that method
doesn't take a docType parameter.
This application has several flavors of File > New that each
create a different document type. What's the 10.4/10.5
equivalent method for creating a new document of a specific type?
robably because it's resignKeyWindow: not windowDidResignKey:
--
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-ad
namically changes
its EUID to the user you need to affect, or be a pre-configured
SUID->user (probably the easiest solution) that always runs as
that particular user. Your process could launch the helper then
communicate what changes you need to make via inter-process messaging.
--
J
Georg Seifert <mailto:georg.seif...@gmx.de> wrote (Monday,
September 21, 2009 2:50 AM +0200):
Is there a way to enable and disable file sharing from code.
Almost all background services are universally controlled by
launchd. See man launchctl, launchd, et al.
--
James B
mily *definitely*
needs a run loop as it queues a deferred message to a run loop's
input source.
--
James Bucanek
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact th
of functions are optimized internally and
probably don't use enumerator objects or fast enumeration. But
that's just a guess. The rule is, as always, don't worry about
it unless it's a problem, then profile it, find the bottleneck,
and work around it.
--
James Bucanek
_
cessing the data) I was able
to improve the performance of my application by 350%.
--
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 coc
the 1st and the 3rd options, because the 2nd option will not be
easily applicable withouth refactoring the current code a lot.
- Align the data to be written in memory to page boundaries
(man valloc).
- Write data in multiples of page size blocks (man getpagesize)
- Turn off caching (see
nd I'm wondering
why this even came up.
There is no such thing as a "private" method in Objective-C. The
@private, @protected, @public keywords only work on instance
variables. So if the super class implements -close, there should
never be anything stopping your subclass from
parts where you call [super close] will be broken.
The OP did override -close in their subclass and were attempting
to call [super close] from the subclass' -close method. The OP
stated that they couldn't simply use [super close] because
-close was "private," which didn
Shawn Erickson <mailto:[EMAIL PROTECTED]> wrote (Tuesday, August
5, 2008 12:38 PM -0700):
On Tue, Aug 5, 2008 at 12:18 PM, James Bucanek <[EMAIL PROTECTED]> wrote:
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> wrote (Tuesday,
August 5, 2008 5:41 AM +0100):
My super
nted by the
superclass, I would suggest something like
try
{
[(id)super close]; // call superclass' -close, if implemented
...
}
catch
{
if (method not implemented exception)
// code that gets called if superclass doesn't
implement -c
Charles Steinman <mailto:[EMAIL PROTECTED]> wrote (Tuesday,
August 5, 2008 4:20 PM -0700):
--- On Tue, 8/5/08, James Bucanek <[EMAIL PROTECTED]> wrote:
In your original code, you had
SEL closeSelector = @selector(close);
if ([SuperSocket
instancesRespondToSelector:c
if (method not implemented exception)
superMightImplemtnClose = NO;
// code that gets called if superclass doesn't
implement -close
...
}
}
else
{
// code that gets called if superclass doesn't implement -close
...
}
--
James Bucanek
___
Ken Thomases <mailto:[EMAIL PROTECTED]> wrote (Tuesday, August
5, 2008 9:34 PM -0500):
On Aug 5, 2008, at 10:20 PM, James Bucanek wrote:
First rule of optimization: Don't!
Get the code working and profile it. Then if, and only if, it's a
significant performance bottlene
dtionLock lockWhenCondition:OPERATION_FINISHED];
[operation->condtionLock unlock];
(note that I usually encapsulate this in a
-(void)waitUntilFinished method)
James
--
James Bucanek
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do no
tell
that's not even getting instantiated. Everything else is done
with bindings.
Anyone have a clue as to why this won't fly on Leopard?
--
James Bucanek
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or
force, comparison of objects.
It's easy to demonstrate all of this by setting a breakpoint in
the -hash and -isEqual: methods of the objects added to a collection.
For ZIP code membership, an NSIndexSet makes a lot more sense.
--
James Bucanek
___
list are filesystem geniuses, but some have
publicly admitted that they can't keep up with Cocoa-dev -- for
which I sympathize.
--
James Bucanek
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or
);
return value; // <-- set breakpoint here
}
Now you can set a breakpoint or log every access to that
property. You shouldn't have any problem verifying if the
correct messages are being sent (or not), by whom, and then work
backwards from there.
--
James Bucanek
__
e correct or must NSOperations be retained in
scope explicitly until the operation is finished?
It's OK for GC, but if you're using retained memory you're
missing an autorelease.
Fix your init, and you'll probably be OK.
--
James Bucanek
frameworks/dylibs is that their code is only loaded
once, and is then repeatedly mapped into the address space of
multiple processes. So watching to see when the file is opened
might not tell you if a process has loaded it, and it almost
certainly won't tell you what process did
28 matches
Mail list logo