vered in Erik's mystical Cocoa Patterns book :)
Thanks,
--
Seth Willits
___
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)l
rested in *any* change to the child.
--
Seth Willits
___
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/Unsubsc
. The observer calls the utility method on the child passing itself
as an observer.
I like it.
It's still a little "clunky" (on the child-side) but less-so than
other ideas I had, and feels more proper than the ones I've been
On May 6, 2009, at 10:36 PM, Seth Willits wrote:
Which is why I said one method was to override setValue:forKey: in
the child to trigger a single observable key (isModified). But I
still don't like the solution much.
And actually now that I think about it, in a different project I
ver object with the general idea of Graham's. I'm going to have
to fiddle a bit.
--
Seth Willits
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the mo
On May 7, 2009, at 12:25 PM, Seth Willits wrote:
Graham's idea notifies the parent of any change in the child without
having to use an "isModified" key, which is a bit cleaner. I think
an even better solution would be to merge Mike Ash's dedicated KV
observer object w
pendentKey:. You'd just call it
with the keys firstName and lastName forDependentKey:fullName.
The KVO programming guide goes into the real differences between the
two, but in the simplest case, that's all it is and they're pretty
equivalent.
--
Seth Willits
_
one point different, and there's also an offset for
all text, which seems to simply be {5, 0}. The text container inset is
{0, 0} so I'm not sure what's causing the offset, nor do I know why
the line height is different.
Does anyone know? I'd really like the two t
retains
it, and you can release the layout manager because the text storage
object retains it."
--
Seth Willits
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Conta
On May 10, 2009, at 5:48 PM, Kyle Sluder wrote:
On Sun, May 10, 2009 at 8:30 PM, Seth Willits
wrote:
"You can release the text container because the layout manager
retains it,
and you can release the layout manager because the text storage
object
retains it."
It's fine
s enabled.
Does the binding have "Conditionally Sets Enabled" checked? Uncheck it
if it does.
--
Seth Willits
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
, 400)];
// [textView frame] is {100, 100, 500, 400}
What gives?
--
Seth Willits
___
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
text insertion
point "cursor"?
Moving the mouse cursor is generally a bad idea and I can't imagine
that's what you want to do. Moving the insertion point in a text view
simply requires calling setSelectedRange:
--
Seth Willits
_
instances and what has to be escaped depends on the destination.
--
Seth Willits
___
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
tController's "selection" controller key, (no model key), and
use the value transformer NSIsNotNil. Anytime the selection is not
nil, the control is enabled… right? It's super simple, but it doesn't
work, and I don't see why not.
http://www.sethwillits.com
. fopen, like pretty much every other
function/method, takes an unescaped string. Your problem lies
elsewhere, such as in not passing the right value to fopen. You
mentioned you're getting that path in an NSString. You should be
passing fopen the result of [string fileSystemRepres
nge...];
the_change
[blah didChange...];
You shouldn't be calling willChange and then trigger 5 million lines
of code and hope somewhere along the lines it calls didChange. And you
shouldn't call didChange without calling willChange.
What'
Interesting. I had forgotten that + textContainer: is the designated
initializer.
I think I'll file a bug report on this. Maybe I'll get an answer.
Thanks.
--
Seth Willits
On May 21, 2009, at 4:20 AM, Andy Lee wrote:
I get the same result using initWithFrame:, but if
transformer "NSIsNoSelectionMarker"
I wish Apple would beef up the default set of value transformers. I've
had to write a few "obvious" ones.
Thanks guys,
--
Seth Willits
___
Cocoa-dev mailing list (Cocoa-dev@list
It occurred to me... just use the "content" controller key instead of
"selection" with NSIsNotNil. It works like a charm.
*slaps forehead*
Anything wrong with this that I'm not seeing?
--
Seth Willits
___
Cocoa-de
:exclusive];
[[NSColorPanel sharedColorPanel] setTarget:nil];
[[NSColorPanel sharedColorPanel] setAction:nil];
}
... which should hopefully fix the problem. It doesn't. changeColor:
is *STILL* called.
What the heck do I have to do to make it NOT s
responder, not a designated delegate.
So... my bad.
I really don't like the design of NSColorPanel and NSFontPanel. It's
not like I can come up with an undeniably better architecture, but the
existing ones sure do have some major annoyances whenever I ne
] in a class method two weeks
ago, and it was causing a crash. I forget the circumstances, but when
I caught that I was using [self class] and changed it to self,
everything worked fine. So I don't know what the difference is, but
there apparently is a difference.
--
Seth Wi
which I had never seen before.
I know this isn't exactly a very detailed description, but if they
were equivalent, then changing [self class] to self shouldn't have
fixed it, but it did. Pretty weird.
*shrug*
--
Seth Willits
___
http://www.sethwillits.com/temp/TextViewGlyphBug.mov
I have a custom text storage object, and I assume that's at the core
of this issue, but I'm not sure what's going on. Any ideas?
--
Seth Willits
___
Cocoa-dev mailing
good.
Thanks,
--
Seth Willits
On May 27, 2009, at 6:27 PM, Aki Inoue wrote:
Looks like the glyph info stored in NSLayoutManager is out of sync.
Are you calling -edited:range:changeInLength: from your
implementation of attribute modifying methods ?
Aki
On 2009/05/27, at 18:19, Seth
tObj minSize].height)];
[textObj setMaxSize:NSMakeSize(200.0, [textObj maxSize].height)];
return textObj;
}
--
Seth Willits
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments
ew];
}
You can of course get more involved, but this as a minimum should
work. The only thing happening here is what you want: to override the
higlight color.
--
Seth Willits
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not
ents' data. It's not
particularly hard since at the very least, all you do is just keep an
array of expanded items.
--
Seth Willits
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator
ndation/Classes/NSString_Class/Reference/NSString.html#/
/apple_ref/doc/uid/2154-rangeOfString_options_range_
--
Seth Willits
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to th
ing*. You have to understand all the codesigning nonsense
before the sample will even run. It's actually not too difficult. I'm sorting
through XPC right now making sure I'm doing it right, but it's all working.
--
Seth Willits
___
riendly
> format so that I can see it as a normal dictionary in the plist utility?
NSPropertyListSerialization
https://developer.apple.com/library/mac/documentation/cocoa/reference/foundation/Classes/NSPropertyListSerialization_Class/Reference/
ons/name.of.Tool.plist ,
> and any random combination thereof.
>
> The only way to get the new version was to log out, log in.
Stopping the job with launchctl would work.
--
Seth Willits
___
Cocoa-dev mailing list (Cocoa-dev@lists.a
one of you clever chaps run into this before and come up with a solution?
I very much do not want to use a blocking animation. Is this one of those cases
where auto layout can do some magic?
--
Seth Willits
___
Cocoa-dev mailing list (Cocoa-dev
For what it's worth, I remember a 1x1 rect in NSTextView drawing being very
common, though I never did figure out exactly why. I suspect it's pumped as a
way to trigger something internal.
--
Seth Willits
___
Cocoa-dev mailing list
> Does iOS offer a setting to do this, or do I need to implement a throttling
> mechanism within the callback routine itself?
The latter.
--
Seth Willits
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin reque
ree and it would reconnect the responder chain correctly.
--
Seth Willits
___
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-admin
f
those may have several subVC and on and on. When different views are shown and
hidden, the parent VC simply calls an addChild/removeChild and it's hooked up
in the right spot. It's not significantly different, but it is convenient.
gl,
--
Seth Willits
___
t's debatable whether it's better to
ensure that your KVO callback fires off UI/other-main-thread-only-code instead
of relying on the the KVO callback to always be called on main thread.
--
Seth Willits
___
Cocoa-dev mailing list (Cocoa-
nt that would apply universally. I would be hesitant to get
used to such a constant. Many APIs have their own constants for default
options. (Search for DefaultOptions, OptionsDefault, NoOptions, and
OptionsNone.)
--
Seth Willits
___
Cocoa-dev mail
On Oct 17, 2013, at 11:55 AM, Sixten Otto wrote:
> On Thu, Oct 17, 2013 at 11:22 AM, Seth Willits wrote:
>> I would be hesitant to get used to such a constant.
>
> I'll bite: why?
As each API is potentially different from others, it's best to use the
constants provid
bably mostly work, but it's not always guaranteed to be
bulletproof because those keys could also be influenced by private methods.
--
Seth Willits
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests o
using KVC, and I do recall
having at least one bug where a modification wasn't using KVC and wasn't
triggering the code I was expecting it to.
I gag a little whenever I remember that's how it works, but at this point it
ain't broke so I'm not going to tempt fate b
rnative
non-trivial for my setValue:forKeyPath: override case.)
--
Seth Willits
___
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
On Oct 21, 2013, at 12:28 PM, Ken Thomases wrote:
> Seems like a cycle to me. … Have the documents hold weak references to the
> database.
Agreed.
What reason is there for the documents to have a strong reference to the
database?
--
Seth W
I can codesign this module using my own credentials? I have
>>> little experience of dealing with these issues, most of the time I just
>>> hope it works and it does, but now it doesn’t I’m in a very tight spot. -
>>> I can’t easily downgrade to the older Xcode and I
while the document window is populated
>> with data.
>
> This sounds like a violation of file coordination and NSDocument
> file-activity rules. You really ought to load your document contents in the
> initializer.
*initializer*?
--
Seth Willits
___
d. For a lot of images that’s unacceptable, so the best thing
to do is still to create a bunch of bitmap representations at the necessary
sizes and use the correct one at draw-time. For example, create an .iconset
with your bitmaps which then gets turned into an .icns by Xcode for you.
-
ector, but the outline view is not
> creating a cell view of that class. Huh? The consequence is that I can’t get
> a value into the text field of the cell view.
Did you set up the cell's identifier?
--
Seth Willits
___
Cocoa-dev mai
" forType: NSPasteboardTypeString] == YES) {
> NSLog(@"setString worked");
> return YES;
> }
> return NO;
> }
You’re putting it in the dragging pasteboard instead of the general pasteboard.
--
Seth Willits
___
fix it to be block scoped.
No it’s not and no you don’t.
int x = 3;
void (^block)(void) = ^{ NSLog(@"%d", x); };
x = 5;
block();
The result is 3 not 5.
--
Seth Willits
___
Cocoa-dev mailing list (Coc
tests indicate that it simply uses the same .icns resource indicated by
> CFBundleIconFile in Info.plist. But I’ve seen other non-Apple apps do it, so
> apparently it can be done.
Uhh… setImage: ?
--
Seth Willits
___
Cocoa-d
are you sure you can’t cache
individual objects’ images? (And this just gets into trying to replicate
layers, really, though, and with or without layers you’d have a memory usage
concern to analyze.)
--
Seth Willits
___
Cocoa-dev mailing list (
better or not, but it’s something
that comes to mind.
(CATiledLayer still sounds like a good idea to me as well.)
--
Seth Willits
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to t
Yes. You can specify the bit rate and profile to use when writing.
--
Seth Willits
___
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-d
On Dec 10, 2013, at 2:47 AM, Kevin Meaney wrote:
> I'm probably teaching my grandmother to suck eggs by suggesting this. Have
> you looked at using CGLayers?
They're extremely heavy. You definitely don't want them around if performance
is a considerati
n traverse, inspect, and manipulate them in the
same way you would your model hierarchy (with the addition of some helpful
methods of your own). You can also add any arbitrary k/v pairs to a layer,
which gives you convenient property/reference storage. It's certainly not
trivial, but when y
Are you *only* trying to do audio, or are you trying to render GL as well?
--
Seth Willits
On Dec 13, 2013, at 1:57 PM, Alex Hall wrote:
> Hello list,
> I am attempting to use OpenAL to move a sound source around. To do so
> smoothly, though, will require a loop, so I can u
.
"update the position in small increments many times per second" —
What does "many" mean to you? What level of accuracy do you need? How should
this interact with the main thread, etc?
--
Seth Willits
___
Cocoa-dev mailing
it];
... and it's not animating. I have narrowed it down to the delegate being
non-nil, even if the delegate implements none of the delegate methods. If I
don't set it, it works fine. This was working fine for yeeears and now in
10.9 it's behaving differently.
What could
ayout relationships, I set it as the delegate for a few layers because
of the access it already has to needed info.
It's easy enough to work around this case though.
--
Seth Willits
On Dec 18, 2013, at 11:13 AM, David Duncan wrote:
> What is the identify of your delegate?
>
> On Dec
ion in the tool's build settings. I think that will do
it. If you look in the archive you'll see that there's an extra copy because it
stuck in the installation path (within the archive) which messes everything up.
--
Seth Willits
__
Look inside the archive itself at the file hierarchy and what is in there.
Inside of the Products directory, the only thing in the subtree should be your
app (nested within the install path folders).
--
Seth Willits
___
Cocoa-dev mailing list (Coc
ly, but they explicitly said it was actually implemented since 10.6. So
you can safely use it as the docs mention. If you're not using the latest
SDK(s) with the API change in it, then you'll simply need to declare the method
yourself in a category and it'll wo
t how you're doing it, and just get it done. When you start the second one
you'll have a better idea of what to do differently.
Hope that helps,
Also: http://www.idevgames.com/forums You'll probably get much more help there
than here.
--
Seth Willits
_
n the view returned by the delegate method, if
that view has one. That's it. It's the same as assigning
tableCellView.objectValue in that delegate method yourself.
--
Seth Willits
On Jan 7, 2014, at 4:17 PM, Peter wrote:
> Great! Yes, this helps immensely. Thank you very much!
>
ings all the time… weird.
>
> Do you have any ideas?
Stick a breakpoint on it.
--
Seth Willits
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moder
ntation layers so it animates nicely.
So simply: Each time layer A's presentation layer moves, I need to redraw layer
B.
Ideas? I'm fumbling my way through one and it feels awkward.
--
Seth Willits
___
Cocoa-dev mailing list (Cocoa-dev@l
ayer continuously update so the line spins. If you have
the time and can demonstrate the approach you've described I'd be very
grateful. I've been at this for hours.
Still trying…
--
Seth Willits
___
Cocoa-dev mailing list (Cocoa-d
many times for whatever the duration of the animation is. So for efficiency's
sake, noteNodePositionsChanged should only be called if a box's position
actually did change. Ideally, we wouldn't need to call noteNodePositionsChanged
manually at all.
Hopefully that hel
}
return;
}
}
[super observeValueForKeyPath:keyPath ofObject:object change:change
context:context];
}
@end
--
Seth Willits
___
Cocoa-dev mailing list
I've (accidentally) experienced it picking a nib
automatically on OS X, but it was always picking the wrong nib.
--
Seth Willits
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments t
On Mar 25, 2014, at 12:50 AM, Uli Kusterer wrote:
> On 25 Mar 2014, at 02:36, Seth Willits wrote:
>> 2. Either call initWithNibName:bundle: or override nibName. Don't rely on
>> NSVC being smart and appropriately grabbing a file with the desired name.
>> Offhand, I
operty on your model, you can easily listen to either
the tableview or the array controller's selection changing, and set the
property yourself. You're not required or expected to binding everything just
because you can in some manner.
--
Seth Willits
ed by binding to the combatant's selectedWeapon (via the first
controller's selection.selectedWeapon path)
--
Seth Willits
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Conta
ou want the both
ends to be able to change the value.
--
Seth Willits
___
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.a
lowing down all dispatch_sync calls,
then wouldn't you expect it to be slower there too? It seems to me you need a
better theory as to why the change you made worked. But really, we're flying
blind here.
--
Seth Willits
___
Cocoa-dev ma
in it if you really want to just shut it up ASAP.
--
Seth Willits
___
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.app
Apparently I skipped an important sentence. ;-)
I'm stumped then. Maybe it's bad live-issues data? It's been known to happen…
often.
--
Seth Willits
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin r
Any ideas on how to get a Cancel button which is both the default button and
responds to escape? Both require setting the button's key equivalent and there
can only be one.
--
Seth Willits
--
Seth Willits
___
Cocoa-dev mailing list (
il (because it's the designated initializer). You ask
for the wc's window at some point, it realizes it doesn't have one, sees
windowNibName, loads from the nib, and calls windowDidLoad. Baddabing badda
boom.
--
Seth Willits
On Jun 7, 2014, at 12:24 PM, William Squires
all of the
intricate discussion about thread safety and how singletons are the spawn of
satan, go search the archives and Google.
--
Seth Willits
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator c
, data
sources, and actions) to objects that exist outside of the nib. When you
connect to "File's Owner", you're connecting from an object in IB to that
object that already exists before nib is loaded. When you connect from "File's
Owner" to an object in the ni
On Jun 8, 2014, at 12:23 PM, Seth Willits wrote:
> Whether a window will appear or not has nothing to do with File's Owner. Your
> window is probably marked as "Release When Closed" in IB. It's shown once the
> first time, but after closing it it's deal
On Jun 8, 2014, at 6:50 PM, Todd Heberlein wrote:
> http://www.toddheberlein.com/blog/2014/6/8/opengl-and-crawling-ants
Use mipmaps, and if that's still not high enough quality, anisotropic filtering.
--
Seth Willits
___
Cocoa-dev mail
On May 19, 2014, at 1:30 PM, Seth Willits wrote:
> Any ideas on how to get a Cancel button which is both the default button and
> responds to escape? Both require setting the button's key equivalent and
> there can only be one.
Desired Behavior:
Delete - First bu
e=256 "The autosaved document “(null)” could
not be reopened. " UserInfo=0x608000470540 {NSLocalizedDescription=The
autosaved document “(null)” could not be reopened. }
-
I'm a bit puzzled. Guidance?
--
Seth Willits
___
Cocoa-de
pidly broken
in this kind of case, and I just can't believe that's true.
The only real option I see is to not use UTIs at all.
--
Seth Willits
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin request
's several hours of investigatory work. I went down many rabbit holes
during that, but I'm pretty sure that I understand this and have boiled it down
to the root cause and truth. If I'm wrong, please correct me. (I'd like to be
wrong!)
--
Seth Willits
_
gt; hey, we're getting new cool translucent stuff! :)
A 7 year-old ticket is extremely disappointing. I will file another.
--
Seth Willits
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moder
On Jun 10, 2014, at 8:22 PM, Uli Kusterer wrote:
> On 10 Jun 2014, at 21:21, Seth Willits wrote:
>> - (NSString *)typeForContentsOfURL:(NSURL *)url error:(NSError **)outError;
>> {
>> if ([url.pathExtension.lowercaseString isEqual:@"sql"]) {
>&
ecordings)
http://www.sethwillits.com/temp/SlowTextSystemDemo.mov
--
Seth Willits
___
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)
On Jun 11, 2014, at 5:02 PM, ChanMaxthon wrote:
> I believe this involves Cocoa Bindings.
There are no bindings.
--
Seth Willits
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments
s laying out the text.
--
Seth Willits
___
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/Upd
On Jun 11, 2014, at 5:49 PM, ChanMaxthon wrote:
> Is editing involved? If not I would render it into HTML and let WebKit render
> it.
This is not helpful at all.
--
Seth Willits
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
out, the text view is fitted to what's been laid out. When background layout
is enabled, I'm not actually sure how it figure out how big to make the text
view, particularly so quickly.
--
Seth Willits
___
Cocoa-dev mailing list (Co
ure why it doesn't like that property
> when using IB.
That's not fixing it, it's just avoiding the problem. "Fast" has it enabled.
It's on by default in every text view.
--
Seth Willits
___
Cocoa-dev mailing list (Coc
es about 30 seconds, but in the "Slow" project
when locked up, it'll spin for ages and "never" finish. It's stuck in
_insertionPointHelperForGlyphAtIndex called by
boundingRectForGlyphRange:inTextContainer:, the latter of which has a perfectly
reasonable and small glyph range req
ht button… As a matter of fact, looking at the implementation of
those NSWindow methods shows they're identical to each other… which makes
absolutely no sense. So obviously that doesn't do what one would expect.
This is leaving me little choice but to do something very specialized and u
On Aug 16, 2014, at 7:53 PM, Seth Willits wrote:
> This is leaving me little choice but to do something very specialized and
> ugly.
Well… the simplest solution is to just disable the key equivalent myself
instead of using NSWindow's methods. I don't like it, but it does
501 - 600 of 601 matches
Mail list logo