ndow controller in the app delegate strong, in which it
doesn't automatically 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 t
ince I want my screensaver to still
run on 10.4, this is more 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 comm
the arch or the SDK,
but if there's 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 t
On 11-Oct-09, at 3:52 PM, Kyle Sluder wrote:
On Oct 11, 2009, at 12:44 PM, Ben Haller
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 could do it based on the ar
On 11-Oct-09, at 4:11 PM, Kyle Sluder wrote:
On Oct 11, 2009, at 1:06 PM, Ben Haller
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 something?
Do you really
On 11-Oct-09, at 5:28 PM, Clark Cox wrote:
On Sun, Oct 11, 2009 at 1:55 PM, Ben Haller
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 are actually quite rare
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
I
will be happy 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-ad
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
Is that
possible? For example, can I malloc the instances of AKIndividual
myself out of the malloc zone to exclude them from GC, or is that a
Bad Idea?
Sorry for the long email. Comments?
Ben Haller
Stick Software
___
Cocoa-de
hen a simple 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
ally is: a poor man's (but a speedy man's!) re-implementation 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 mail
ten in the
first place. Dangling pointers is exactly what I 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.app
ell-defined. Well, 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
nderstanding of weak/strong/dangling, and led 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)
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 t
hat Instruments was itself a Cocoa
app, so 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. Pleas
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
; or something?
I'm not sure whether 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 mailin
ngs over merged 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 mode
sadly. 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 appl
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" > 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 no longer has th
cumentation/Performance/Conceptual/Drawing/Articles/CocoaDrawingTips.html
and I don't think 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?
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 -
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 73184
isplay:error:] returns).
There must be a good, clean way 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 a
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 in the
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 whe
On 21-Oct-09, at 7:23 PM, Quincey Morris wrote:
On Oct 21, 2009, at 15:55, 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 deleg
-- of how to correctly
create the document in the first place, i.e. how to get the user-
chosen data in to the document object without duplicating code that
belongs in NSDocumentController?
Ben Haller
Stick Software
___
Cocoa-dev mailing list (Cocoa
o need to be snippy. I've posted
hundreds of replies to this list and other cocoa-related lists helping
people out myself, although that was many years ago now, since I took
a multi-year break from coding recently. I'm sure there are old-
timers around who remember me.
So, thank you
fact getting called to draw only once, but was flashing twice.
I 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
_
ut 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. 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 H
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
editing doesn't even begin 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 t
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'
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 the
On 1-Nov-09, at 11:44 PM, Kyle Sluder wrote:
On Sun, Nov 1, 2009 at 9:42 AM, Ben Haller > wrote:
- (void)tableView:(NSTableView *)aTableView setObjectValue:
(id)anObject
forTableColumn:(NSTableColumn *)aTableColumn row:(NSInteger)rowIndex
You might want to double-check that you didn
On 2-Nov-09, at 1:43 AM, Kyle Sluder wrote:
On Sun, Nov 1, 2009 at 9:42 AM, Ben Haller
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. But where? I've been huntin
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:
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
t I'm missing, such that I have twice as many "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
On 8-Sep-09, at 11:19 PM, Bill Bumgarner wrote:
On Sep 8, 2009, at 6:45 PM, Ben Haller wrote:
My idea — perhaps being too clever for my own good — was that as
long as the about window was open, the window would be referenced
by the window list, and so the window and its controller would
.
Try 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 Halle
dPressed.tiff" toggles:NO];
[playOneLifeStageButton setToolTip:@"Step forward one
phase"];
[playOneLifeStageButton
setAction:@selector(playOneLifeStage:)];
[contentView addSubview:playOneLifeStageButton];
The tooltip doesn't show up fo
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 list
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
have a workaround, at least; I can simply postpone all of my -
setToolTip: calls until after I have set my window to its final size.
It would be nice to have a better fix, though...
Ben Haller
Stick Software
___
Cocoa-dev mailing list (Cocoa-de
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 ther
sign flaw) here 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 reques
way seems preferable (no pun
intended :->). Am I missing a way to make this code nicer, or will I
have to add a glue method like this every time I add a defaults key?
Apart from that, I'm curious whether anybody has anything else to
say about this code. Thanks!
Ben Haller
Sti
So, thoughts? Am I insane? Is the above scheme safe? Is there a
better way? Thanks for any feedback!
(I think 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
_
e 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 mod
ee of speedup was (I 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.
Co
to be supported by gcc & clang
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.a
rmance,
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 or moderator
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 op
where, as Graham asserted? If it is,
then that's fine...
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 coco
've done this myself, in fact. Fun stuff. :->
Thanks everyone for the posts, it has been an interesting
discussion and has improved my code!
Ben Haller
McGill University
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do
s 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
Mc
app to be able to run as a GUI app, too. Basically I just want 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
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.
C
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
stent with complete execution of all previously issued
OpenGL commands." So doesn't that mean that this result 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
On 22-Jun-10, at 12:28 PM, Michael Ash wrote:
On Tue, Jun 22, 2010 at 9:25 AM, Ben Haller
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 in a headless command
;m misunderstanding something; can
anybody clarify this for me?
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 moderat
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 -clos
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
nyhow, it looks like 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 an
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 the
ting cluster, and time on the cluster is at a
premium, so the headaches 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 (C
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
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; i
the changes in representation.
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
ached, can't 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
___
Coc
unds from Dave's post
above like it might not work on 10.6 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
I'm doing things 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
fault 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
ronous
reads to service the pipe as output gets stuffed into it. There should be lots
of examples of this on this list, now that you know what to look for.
What would be great would be a new call, along the lines of
-dataFromWaitingUntilExit or some such, that does all this for you, since this
t explored; 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
27;d love to know that so I know whether it's safe 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 lo
84 matches
Mail list logo