to delete that
rather unpleasant hack from my code.
Ben Haller
McGill University
On 2010-11-27, at 3:43 PM, Leonardo wrote:
Ben, thank you so much! I have successfully done it.
I post the code here for anyone to use it. I love this list.
- (NSData*)UnzipFile:(NSString*)sourcePath
be a new call, along the lines of
-dataFromWaitingUntilExit or some such, that does all this for you, since this
is so commonly what people want to do.
Ben Haller
McGill University
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do
; once I (finally) figured out the right magic
incantations to get things to work reliably with NSPipe, I now recycle that
code everywhere I need an NSTask :-.
Ben Haller
McGill University
On 2010-11-27, at 11:48 AM, Dave DeLong wrote:
The way I get around this is to use an NSFileHandle
would be
to use the correct (right associative) parsing, though, as it seems unlikely
that a whole lot of code specifically depends upon this bug in NSExpression, so
for most clients there is probably no need to propagate the buggy behavior...
Ben Haller
McGill University
On 2010-11-21, at 1:07
it is not considered a bug
according to the docs, so I'm not inclined to pursue it further; even
if I got a reproducing case and filed a bug, it sounds like it would
get marked not a bug, so it hardly seems worth the effort.
Thanks anyway!
Ben Haller
McGill University
On 23-Jun-10, at 9:35 AM, Alastair Houghton wrote:
On 23 Jun 2010, at 11:14, Ben Haller wrote:
3. I added [[pipe fileHandleForWriting] closeFile] and [[pipe
fileHandleForReading] closeFile] calls to close the files
associated with the pipes when my tasks completed. This change
fixed
On 22-Jun-10, at 12:28 PM, Michael Ash wrote:
On Tue, Jun 22, 2010 at 9:25 AM, Ben Haller
bhcocoa...@sticksoftware.com wrote:
It's a little weird because this method gets called sometimes on a
view
that is not yet installed in a window, so I just make a window then
and
there. (This is run
?
Thanks!
Ben Haller
McGill University
___
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
On 23-Jun-10, at 6:34 AM, Jean-Daniel Dupas wrote:
Le 23 juin 2010 à 12:14, Ben Haller a écrit :
So I have a workaround for the problem, but I want to understand
*why* it works. Shouldn't NSPipe close its associated files when
it deallocs? Why should it be necessary to call -closeFile
On 23-Jun-10, at 6:22 AM, Uli Kusterer wrote:
Am Jun 23, 2010 um 12:14 PM schrieb Ben Haller:
So I have a workaround for the problem, but I want to understand
*why* it works. Shouldn't NSPipe close its associated files when
it deallocs? Why should it be necessary to call -closeFile
On 23-Jun-10, at 6:59 AM, jonat...@mugginsoft.com wrote:
On 23 Jun 2010, at 11:47, Ben Haller wrote:
On 23-Jun-10, at 6:22 AM, Uli Kusterer wrote:
Am Jun 23, 2010 um 12:14 PM schrieb Ben Haller:
So I have a workaround for the problem, but I want to understand
*why* it works. Shouldn't
should be
impossible, according to the spec? I'm very inexperienced with
OpenGL, though, so I may have made some rookie mistake in the code
above. (Feel free to critique my code in other respects too, I'd like
to learn.)
Thanks!
Ben Haller
McGill University
On 24-May-10, at 12:30 AM, Ben Haller wrote:
On 24-May-10, at 12:12 AM, Ken Thomases wrote:
I think you can also get away with using LSBackgroundOnly or
LSUIElement and then, when you want it to be a foreground GUI app,
use TransformProcessType() to make it one.
This seems pretty
to
suppress whatever piece of code is saying to itself my gosh, it just
made a view, it must be a GUI app! I had been under the impression
that avoiding calling NSApplicationMain() was sufficient to keep this
from happening, but apparently not.
Thanks in advance...
Ben Haller
McGill
off-list. I'll give it a go and report back once I've got
results.
Thanks!
Ben Haller
McGill University
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact
put this scheme in several
months ago now), but it was quite substantial.
Ben Haller
McGill University
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators
but it's just as easy to write correct code.
Ah, interesting. Learn a new thing every day. The compiler didn't
even warn.
Ben Haller
McGill University
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests
the protocol conformance,
which isn't really any better than having to remember to declare the
method in the first place...
Ben Haller
McGill University
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests
On 17-Apr-10, at 7:01 AM, Ken Thomases wrote:
On Apr 16, 2010, at 4:05 PM, Ben Haller wrote:
So I'm keeping an unused pool of these objects, and when I'm done
with an object I throw it into the pool, and when I need a new one
I grab one from the pool. I do these operations with inline
the isA pointer in all instances of a particular class is
the same.
As I mentioned in my post to Graham just now, doesn't your
implementation assume that NSObject's only ivar is the isa pointer,
though? Is that guaranteed somewhere, as Graham asserted? If it is,
then that's fine...
Ben
been an interesting
discussion and has improved my code!
Ben Haller
McGill University
___
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
,
and every ivar access would go through an indirection; it sounds very
confusing and messy. Not to say there might not be cases where it
would be the correct design; but for my situation, I think I'm happier
with my current design. Thanks for the suggestion, though!
Ben Haller
McGill University
this question is appropriate for cocoa-dev rather than the
objc-language list, but my apologies if I have posted to the wrong
forum...)
Ben Haller
McGill University
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests
that the scheme described does appear to work
correctly on 10.5, at least.
Ben Haller
McGill University
___
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
the
wrong way, then I'm guessing either they are so in love with MVC
they have lost their sense of reality, or they still haven't
understood what I'm trying to explain... :)
Or perhaps, once you post your solution, someone will point out a
problem with it that you haven't foreseen?
Ben Haller
though. Haven't tried it myself
any time recently.
Ben Haller
Stick Software
___
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
it always
just do an immediate, synchronous collection before the call to +alloc
returns? I'd love to have a better understanding of what's going on
under the hood here...
Ben Haller
Stick Software
___
Cocoa-dev mailing list (Cocoa-dev
.
Anyway, even if that's not the OP meant, that's what I'd like to
ask. :-
Ben Haller
Stick Software
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact
On 1-Dec-09, at 3:21 PM, Kyle Sluder wrote:
On Mon, Nov 30, 2009 at 1:33 PM, Ben Haller wrote:
This is interesting to me, since I am in fact using @public and -
with
some ivars to allow faster use of one of my classes. (Yes, I've
confirmed
that this is significant in Sampler
involved are worth it. I just want to know
the best way to do it, given these recent changes to Objective-C. Any
advice?
Ben Haller
Stick Software
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator
On 30-Nov-09, at 5:52 PM, Mike Abdullah wrote:
On 30 Nov 2009, at 21:33, Ben Haller wrote:
What I want is essentially a struct with methods; I need super-fast
access to ivars for clients of the class in some places in my
code. But I also want functionality provided by the class itself
whether anybody has anything else to
say about this code. Thanks!
Ben Haller
Stick Software
___
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
somewhere, but I was eventually
convinced (browbeaten into submission?) by the list that this is all
as it ought to be...
Ben Haller
Stick Software
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator
On 20-Nov-09, at 6:57 AM, Andy Lee wrote:
On Nov 19, 2009, at 1:04 PM, Ben Haller wrote:
This led me to suspect the custom NSView subclass that I am using
as a content view, and indeed, if I use that custom subclass as the
content view in Andy's code, it breaks the tooltip there too
to its final size.
It would be nice to have a better fix, though...
Ben Haller
Stick Software
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators
On 16-Nov-09, at 12:11 PM, Ben Haller wrote:
I'm having difficulty setting tooltips on some views in code. This
should be a simple matter of calling setToolTip: on the views in
question, as far as I can tell from the docs, but that is not
working for me. I surfed the various lists
On 18-Nov-09, at 8:40 AM, Eric Gorr wrote:
On Nov 18, 2009, at 7:42 AM, Ben Haller wrote:
Given the deafening silence on this, I'm putting in a Radar on the
problem (7404209) and moving on. :-
Have you tried reproducing the problem with a test application?
I think the reason
];
[playOneLifeStageButton
setAction:@selector(playOneLifeStage:)];
[contentView addSubview:playOneLifeStageButton];
The tooltip doesn't show up for that button, either.
Thanks!
Ben Haller
Stick Software
___
Cocoa-dev mailing list (Cocoa-dev
active
processors as I have cores, or does NSProcessInfo have a bug (in
which case, yes, I will file it :-)? And if it's an NSProcessInfo
bug, what's a non-buggy way to find out my processor count?
Thanks...
Ben Haller
Stick Software
___
Cocoa
the following...
[0:512] sysctl hw.physicalcpu hw.logicalcpu
hw.physicalcpu: 8
hw.logicalcpu: 8
This seems to be it. Interesting. I get:
darwin:~ bhaller $ sysctl hw.physicalcpu hw.logicalcpu
hw.physicalcpu: 8
hw.logicalcpu: 16
New to me. :- Thanks!
Ben Haller
Stick Software
On 1-Nov-09, at 11:37 PM, Graham Cox wrote:
On 02/11/2009, at 1:04 PM, Ben Haller wrote:
I think I will have to construct a test case to see if I can
reproduce this in a simple, isolated way. If that test case
reproduces the problem, then I will post it somewhere and follow up
On 1-Nov-09, at 11:44 PM, Kyle Sluder wrote:
On Sun, Nov 1, 2009 at 9:42 AM, Ben Haller bhcocoa...@sticksoftware.com
wrote:
- (void)tableView:(NSTableView *)aTableView setObjectValue:
(id)anObject
forTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
You might want to double
On 2-Nov-09, at 1:43 AM, Kyle Sluder wrote:
On Sun, Nov 1, 2009 at 9:42 AM, Ben Haller
bhcocoa...@sticksoftware.com wrote:\
The only unusual thing about this tableview is that I set it up in
code
instead of in IB, so I assume the root of the problem is in my
programmatic
setup code
On 1-Nov-09, at 9:04 PM, Ben Haller wrote:
On 1-Nov-09, at 6:01 PM, Graham Cox wrote:
On 02/11/2009, at 4:42 AM, Ben Haller wrote:
But where? I've been hunting for a -setEditable:YES method
somewhere that I need to call, but I haven't found it...
Have you tried -setEditable:YES
On 2-Nov-09, at 9:26 AM, Graham Cox wrote:
On 02/11/2009, at 10:46 PM, Ben Haller wrote:
There are a variable number of them per window, of a variable size
and layout, depending upon data. (There are a variable number of
objects being observed by the user, each of which gets a tableview
the root of the problem is in my
programmatic setup code. But where? I've been hunting for a -
setEditable:YES method somewhere that I need to call, but I haven't
found it...
Any ideas? Thanks!
Ben Haller
Stick Software
___
Cocoa-dev mailing
On 1-Nov-09, at 12:42 PM, Ben Haller wrote:
Hi all. I've got an NSTableView that I'd like to be editable.
Even if I return YES from -tableView:shouldSelectRow: and YES from
tableView:shouldEditTableColumn:row:, however, editing does not
actually commence. The row selects, and I've
on my tableview. I double-click on a cell,
and nothing whatsoever happens.
Ben Haller
Stick Software
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators
On 1-Nov-09, at 6:01 PM, Graham Cox wrote:
On 02/11/2009, at 4:42 AM, Ben Haller wrote:
But where? I've been hunting for a -setEditable:YES method
somewhere that I need to call, but I haven't found it...
Hi Ben,
Have you tried -setEditable:YES on the textfield cell you're using
don't know if there's a good reason for that behavior or not. :-
Apart from that issue, it worked quite nicely.
Thanks for the tip, Sean.
Ben Haller
Stick Software
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin
, thank you for your help. Let's move on.
Ben Haller
Stick Software
___
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
On 21-Oct-09, at 12:57 AM, Graham Cox wrote:
On 21/10/2009, at 3:43 PM, Ben Haller wrote:
There must be a good, clean way to do this. Anyone?
Well, the expected way is to have different types for your
documents. You can still map them all to the same class, and
discriminate
On 21-Oct-09, at 6:55 PM, Ben Haller wrote:
OK, I've switched over to an NSDocumentController and using
different types for my different models. That turned out to be a
forced move, because NSApplication's delegate method -
applicationOpenUntitledFile: does not get called when the user
On 20-Oct-09, at 6:54 AM, Uli Kusterer wrote:
On 19.10.2009, at 23:58, Ben Haller wrote:
On 19-Oct-09, at 5:27 PM, Dave Keck wrote:
Would NSView's -getRectsBeingDrawn:count: help?
Well, I'm already using it in my own code where appropriate. (Or
actually I'm using -needsToDrawRect
On 20-Oct-09, at 6:59 AM, Uli Kusterer wrote:
On 20.10.2009, at 03:02, Ben Haller wrote:
As for NSTableView, it does appear to be doing minimal drawing. So
I guess all the string-drawing overhead I see in Sampler is just
from the single column that is updating, which is unfortunate since
On 20-Oct-09, at 8:15 AM, Graham Cox wrote:
On 20/10/2009, at 11:03 PM, Ben Haller wrote:
AFAIK even -[NSAttributedString drawWithRect:options:] doesn't let
you draw a string centered or right-aligned in the rect, which
seems like a big oversight. I've just logged 7318495
to do this. Anyone?
Ben Haller
Stick Software
___
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
this is a Cocoa or a CG question really, but
since I'm using nothing but Cocoa calls at present, I figured I'd try
this list first...
Thanks!
Ben Haller
Stick Software
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin
areas for efficiency, for some reason;
but that seems unlikely...)
Ben Haller
Stick Software
___
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
. Works great. Thanks to the posters, though; CALayer
and related concepts are quite new to me, so it is good to develop
some mental context surrounding them!
Ben Haller
Stick Software
On 19-Oct-09, at 6:24 PM, Dalmazio Brisinda wrote:
Kyle's explanation #1 was spot on for my application. I
On 19-Oct-09, at 5:58 PM, Greg Guerin wrote:
Ben Haller wrote:
1. Superview that does no drawing and is not opaque
A. Subview #1: a tableview that is opaque
B. Subview #2: a graph view that is opaque
C. Subview #3: another graph view that is opaque
Obvious
On 19-Oct-09, at 6:53 PM, Andy Lee wrote:
On Monday, October 19, 2009, at 05:58PM, Ben Haller bhcocoa...@sticksoftware.com
wrote:
I think the problem is deeper (based upon what flashes under Quartz
Debug): I think the dirty rects are actually getting consolidated
such
that NSTableView
that's what you're referring to. AppKiDo (which I
still love :-) doesn't find any APIs with coalesce in their name
that are drawing-related. Can you give me a pointer?
Thanks!
Ben Haller
Stick Software
___
Cocoa-dev mailing list (Cocoa-dev
On Oct 17, 2009, at 7:46 PM, Ben Haller wrote:
Copied the TrueType font from Instruments into my project, added
the necessary key to my Info.plist, set the font using [NSFont
fontWithName:...], and hey presto, there the font is in my app.
Only... it doesn't look as nice. It's less
I'm surprised there's a difference. Anybody know what's going
on? I am now considering taking little screenshots of each digit and
rolling my own pseudo-font using image blits. Please save me from
that fate.
Ben Haller
Stick Software
On 16-Oct-09, at 3:04 PM, Alastair Houghton wrote:
On 16 Oct 2009, at 03:54, Andrew Farmer wrote:
On 15 Oct 2009, at 13:34, Ben Haller wrote:
Hi all. I need a good Obj-C framework for sending email. I used
to use the Message.framework associated with Apple's Mail, but
they killed
to supply crash logs. :-
Thanks!
Ben Haller
Stick Software
___
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
On 15-Oct-09, at 4:57 PM, Bryan Matteson wrote:
Perhaps EDMessage?
http://www.mulle-kybernetik.com/software/EDFrameworks/
EDMessage looks good, thanks!
Ben Haller
Stick Software
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do
?
Sorry for the long email. Comments?
Ben Haller
Stick Software
___
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
repeated representation would use an
unacceptable amount of memory. So I don't think it applies to my
problem.
Thanks though!
Ben Haller
Stick Software
On 15-Oct-09, at 7:14 PM, Oftenwrong Soong wrote:
Hi Ben,
Have you considered the so-called Flyweight design pattern
of
something like NSMutableArray. Ought to be possible, right? So how
do I manage this write barrier business to make it work properly?
Ben Haller
Stick Software
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin
want; why is
auto_zone_root_write_barrier() getting into the middle of my
assignment loop in the first place?
Ben Haller
Stick Software
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments
, I've been away
from coding for about six years now, guess I've gotten a little rusty.
In any case, this change does not fix the problem; same crash, on
the assignment line.
Ben Haller
Stick Software
___
Cocoa-dev mailing list (Cocoa-dev
me to switch my
collection class over to strong references. That's progress. Thanks
to everybody for their help!
Ben Haller
Stick Software
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator
On 12-Oct-09, at 8:14 PM, Charles Srstka wrote:
On Oct 11, 2009, at 9:46 PM, Ben Haller wrote:
Most of the bugs I had to fix were related to either using long
instead of int, or needing a -finalize method.
You should actually probably be using NSInteger instead of either of
those
than a little inconvenient.
Thanks for any advice!
Ben Haller
Stick Software
___
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
a flag specifically for GC I'd rather use that...
Thanks!
Ben Haller
Stick Software
___
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
On 11-Oct-09, at 3:52 PM, Kyle Sluder wrote:
On Oct 11, 2009, at 12:44 PM, Ben Haller
bhcocoa...@sticksoftware.com wrote:
OK, makes sense. My only question: what's the best way to switch
at compile time based on whether GC is enabled for the build? I.e.
what do I #if or #ifdef? I
On 11-Oct-09, at 4:11 PM, Kyle Sluder wrote:
On Oct 11, 2009, at 1:06 PM, Ben Haller
bhcocoa...@sticksoftware.com wrote:
Yes, but my code also needs to compile as GC-unsupported against
the 10.4 SDK, where any GC-specific calls that I might need to make
will not compile. Am I missing
On 11-Oct-09, at 5:28 PM, Clark Cox wrote:
On Sun, Oct 11, 2009 at 1:55 PM, Ben Haller
bhcocoa...@sticksoftware.com wrote:
Well, I imagine I'm going to need to use *something* GC-specific --
strong/weak declarations,
Not likely.
finalize methods, whatever.
Implementing finalize methods
zero and I have to set up a way for the
windowcontroller to tell the app delegate that it's no longer needed.
There must be a better pattern; I imagine I'm just not used to
thinking in garbage-collection terms yet. So what's the right way to
do this?
Thanks...
Ben Haller
Stick Software
81 matches
Mail list logo