Strategy for acting on changes in child objects?

2009-05-06 Thread Seth Willits
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

Re: Strategy for acting on changes in child objects?

2009-05-06 Thread Seth Willits
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

Re: Strategy for acting on changes in child objects?

2009-05-06 Thread Seth Willits
. 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

Re: Strategy for acting on changes in child objects?

2009-05-06 Thread Seth Willits
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

Re: Strategy for acting on changes in child objects?

2009-05-07 Thread Seth Willits
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

Re: Strategy for acting on changes in child objects?

2009-05-07 Thread Seth Willits
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

Re: Strategy for acting on changes in child objects?

2009-05-07 Thread Seth Willits
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 _

Attr Str drawing vs Layout Manager drawing

2009-05-10 Thread 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

Re: Attr Str drawing vs Layout Manager drawing

2009-05-10 Thread Seth Willits
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

Re: Attr Str drawing vs Layout Manager drawing

2009-05-10 Thread Seth Willits
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

Re: Menu item with 'title' bound is always enabled. Bug?

2009-05-20 Thread Seth Willits
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.

NSTextView - Having to call setFrame twice to work?

2009-05-20 Thread Seth Willits
, 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

Re: Setting the cursor position to particular point

2009-05-20 Thread Seth Willits
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 _

Re: Escaping white space in an NSString

2009-05-20 Thread 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

Binding 'Enabled' to NSObjectController.selection NSIsNotNil fails?

2009-05-20 Thread Seth Willits
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

Re: Escaping white space in an NSString

2009-05-21 Thread Seth Willits
. 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

Re: Question about notifying KVO observers of changes to a property.

2009-05-21 Thread Seth Willits
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'

Re: NSTextView - Having to call setFrame twice to work?

2009-05-22 Thread Seth Willits
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

Re: Binding 'Enabled' to NSObjectController.selection NSIsNotNil fails?

2009-05-22 Thread Seth Willits
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

Re: Binding 'Enabled' to NSObjectController.selection NSIsNotNil fails?

2009-05-22 Thread Seth Willits
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

NSColorPanel flat out lies

2009-05-26 Thread Seth Willits
: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

Re: NSColorPanel flat out lies

2009-05-26 Thread Seth Willits
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

Re: Abstract class with single subclass

2009-05-27 Thread Seth Willits
] 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

Re: Abstract class with single subclass

2009-05-27 Thread Seth Willits
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 ___

Wacky Text View Glyph Rending Bug

2009-05-27 Thread 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

Re: Wacky Text View Glyph Rending Bug

2009-05-27 Thread Seth Willits
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

Resizable Text Cell in NSTableView

2008-02-25 Thread Seth Willits
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

Re: - outlineView:willDisplayCell:forTableColumn:item: and selected item

2008-02-27 Thread Seth Willits
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

Re: [NSOutlineView] How to know an item is expanded if its parent item is not?

2008-03-01 Thread Seth Willits
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

Re: NSString and string contains

2008-03-02 Thread Seth Willits
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

Re: Helper tool

2013-09-13 Thread Seth Willits
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 ___

Re: NSFileWrapper and plist

2013-09-13 Thread 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/

Re: Helper tool

2013-09-15 Thread Seth Willits
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

NSView, Animator, and Autoresizing

2013-09-26 Thread Seth Willits
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

Re: Very small rect in drawRect:

2013-09-28 Thread Seth Willits
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

Re: Throttling iOS 7 event callbacks

2013-10-03 Thread Seth Willits
> 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

Re: Responder chain query

2013-10-08 Thread Seth Willits
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

Re: Responder chain query

2013-10-09 Thread Seth Willits
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 ___

Re: dispatch queues and KVO?

2013-10-15 Thread 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-

Re: "No options" constant

2013-10-17 Thread Seth Willits
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

Re: "No options" constant

2013-10-17 Thread Seth Willits
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

Re: NSDocument and KVO compliance

2013-10-18 Thread Seth Willits
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

Re: NSDocument and KVO compliance

2013-10-20 Thread Seth Willits
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

Re: NSDocument and KVO compliance

2013-10-21 Thread Seth Willits
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

Re: Deadlock during NSCache flush

2013-10-21 Thread Seth Willits
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

Re: Codesigning 3rd party framework

2013-11-05 Thread Seth Willits
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

Re: Getting mouse clicks when the main loop is busy

2013-11-10 Thread Seth Willits
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 ___

Re: toolbar icons and images

2013-11-11 Thread 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. -

Re: NSTableCellView for view-based outline view

2013-11-20 Thread Seth Willits
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

Re: NSTableView drag & drop string

2013-11-20 Thread Seth Willits
" 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 ___

Re: Threaded drawing

2013-12-06 Thread 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

Re: OS X : Different icon for Status Item

2013-12-07 Thread Seth Willits
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

Re: Threaded drawing

2013-12-09 Thread Seth Willits
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 (

Re: Threaded drawing

2013-12-09 Thread Seth Willits
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

Re: Video bit rate

2013-12-09 Thread Seth Willits
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

Re: Threaded drawing

2013-12-10 Thread Seth Willits
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

Re: Threaded drawing

2013-12-10 Thread Seth Willits
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

Re: Best solution for game loop on OSX?

2013-12-16 Thread Seth Willits
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

Re: Best solution for game loop on OSX?

2013-12-16 Thread Seth Willits
. "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

CALayer's delegate prevents implicit animation?

2013-12-18 Thread Seth Willits
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

Re: CALayer's delegate prevents implicit animation?

2013-12-18 Thread Seth Willits
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

Re: Adding helper app to sandboxed Cocoa app

2013-12-18 Thread Seth Willits
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 __

Re: Adding helper app to sandboxed Cocoa app

2013-12-18 Thread 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

Re: NSArray firstObject?

2013-12-22 Thread Seth Willits
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

Re: Best Practices for Code Organization

2013-12-27 Thread Seth Willits
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 _

Re: Set up an editable view based NSTableView programmatically - how to?

2014-01-07 Thread 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! >

Re: CGCMSUtilsGetICCProfileDescription is obsolote

2014-01-27 Thread Seth Willits
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

Layer needs display if presentation layer moves?

2014-01-28 Thread Seth Willits
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

Re: Layer needs display if presentation layer moves?

2014-01-28 Thread Seth Willits
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

Re: Layer needs display if presentation layer moves?

2014-01-29 Thread Seth Willits
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

VCs in the Responder Chain - Again, but with a good solution?

2014-02-11 Thread Seth Willits
} return; } } [super observeValueForKeyPath:keyPath ofObject:object change:change context:context]; } @end -- Seth Willits ___ Cocoa-dev mailing list

Re: Creating NSViewController with -init.

2014-03-24 Thread Seth Willits
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

Re: Creating NSViewController with -init.

2014-03-25 Thread Seth Willits
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

Re: what do I need the NSArrayController for?

2014-04-02 Thread Seth Willits
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

Re: what do I need the NSArrayController for?

2014-04-02 Thread 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

Re: what do I need the NSArrayController for?

2014-04-03 Thread Seth Willits
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

Re: GCD killed my performance

2014-04-25 Thread Seth Willits
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

Re: Creating selector for nonexistent method

2014-04-29 Thread Seth Willits
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

Re: Creating selector for nonexistent method

2014-04-29 Thread Seth Willits
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

NSAlert - Default Cancel also respond to Escape?

2014-05-19 Thread Seth Willits
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 (

Re: Another dumb question about NSWindowController(s)

2014-06-07 Thread Seth Willits
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

Re: Best practices with singletons

2014-06-08 Thread Seth Willits
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

Re: File's owner in nib file

2014-06-08 Thread Seth Willits
, 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

Re: File's owner in nib file

2014-06-08 Thread Seth Willits
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

Re: OpenGL and crawling ants

2014-06-08 Thread Seth Willits
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

Re: NSAlert - Default Cancel also respond to Escape? [Solution]

2014-06-08 Thread Seth Willits
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

Other app blocks mine from opening my documents

2014-06-09 Thread Seth Willits
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

Re: Other app blocks mine from opening my documents

2014-06-10 Thread Seth Willits
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

Another app's UTI can break your app

2014-06-10 Thread Seth Willits
'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 _

Re: Another app's UTI can break your app

2014-06-10 Thread 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

Re: Another app's UTI can break your app

2014-06-11 Thread Seth Willits
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"]) { >&

Text System Locks Up - Can't Find Reason

2014-06-11 Thread Seth Willits
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)

Re: Text System Locks Up - Can't Find Reason

2014-06-11 Thread Seth Willits
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

Re: Text System Locks Up - Can't Find Reason

2014-06-11 Thread Seth Willits
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

Re: Text System Locks Up - Can't Find Reason

2014-06-11 Thread Seth Willits
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)

Re: Text System Locks Up - Can't Find Reason

2014-06-11 Thread Seth Willits
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

Re: Text System Locks Up - Can't Find Reason

2014-06-12 Thread Seth Willits
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

Re: Text System Locks Up - Can't Find Reason

2014-06-12 Thread Seth Willits
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

Preventing textfield in table from clicking default button

2014-08-16 Thread Seth Willits
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

Re: Preventing textfield in table from clicking default button

2014-08-16 Thread Seth Willits
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

<    1   2   3   4   5   6   7   >