Re: Programatically creating NSMenu?

2009-04-08 Thread Uli Kusterer
For practical uses, the approach generally recommended (and least likely to break with system updates), is to create a minimal NIB as the main NIB (one that only contains the application menu, and nothing else) and then modify that in code. Cheers, -- Uli Kusterer "The Witnesses of

Re: Exit an Application

2009-04-13 Thread Uli Kusterer
retically a tad more dangerous similar call with NSApp in it are really the only option. (Well, theoretically you could send yourself a "quit" Apple Event, but that's only of academical interest...) Cheers, -- Uli Kusterer "The Witnesses of TeachText are e

Re: NSSliderCell, lockFocus question

2009-04-13 Thread Uli Kusterer
go about things) would be to just use an NSImage. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderat

Re: Best way to get a non-repeating random number?

2009-04-13 Thread Uli Kusterer
just return a random number. You'll still get a shuffled list with each item only once. OTOH, in other cases, you might actually have to do the looping thing and just keep asking for a new random number until you get one that isn't the previous number. Cheers, -- Uli Kusterer "

Re: Best way to get a non-repeating random number?

2009-04-13 Thread Uli Kusterer
On 14.04.2009, at 02:17, WT wrote: On Apr 14, 2009, at 1:57 AM, Uli Kusterer wrote: No you won't. It's a *random* number generator. The seed simply means you get a different sequence of random numbers. However, random really means RANDOM. I.e. it's perfectly possible to get th

Re: Best way to get a non-repeating random number?

2009-04-13 Thread Uli Kusterer
ones look correct but aren't. Have any examples or a link to an article? Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do n

Re: stopping an application

2009-04-13 Thread Uli Kusterer
special characters. E.g. imagine the path contained a space, or a quote character, all of which are valid. Heck, you can even have return characters in filenames, though they're not as easy to get these days. Cheers, -- Uli Kusterer "The Witnesses of TeachText are e

Re: NSSliderCell, lockFocus question

2009-04-14 Thread Uli Kusterer
n code path that may be less efficient on one or the other platform. One more caveat: Drawing into a graphics buffer prevents OS X from doing sub-pixel anti-aliasing. So, by adding this (unnecessary) buffer, you might make your drawing look different than if you drew into the system

Re: Best way to get a non-repeating random number?

2009-04-14 Thread Uli Kusterer
On 14.04.2009, at 03:02, Michael Ash wrote: On Mon, Apr 13, 2009 at 8:46 PM, Uli Kusterer wrote: On 14.04.2009, at 02:36, Michael Ash wrote: Note that writing a proper shuffling algorithm is harder than it sounds. More properly, it's easy, but figuring out whether you got the correc

Re: Does waitUntilExit really mean that?

2009-04-14 Thread Uli Kusterer
hit an edge case, or is there some fundamental problem that's likely to bite others? Did you file a bug with Apple about this? Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de ___ Co

Re: Time since Login?

2009-04-22 Thread Uli Kusterer
you do in response to them can change their value again, but you might find a heuristic that works. We used them for some fun in one of our about screens, so I can't tell you whether they're suitable for what you're doing, but it looked OK. Cheers, -- Uli Kusterer "

Re: Drag and drop display image and file path?

2009-04-22 Thread Uli Kusterer
x27;s unlikely to be an NSImage. AFAIK NSTIFFPboardType is an NSData containing raw TIFF data, so you'll probably have to create an NSImage from that or something like that. Mind you, that's from memory, I might be misremembering this pasteboard flavour. Cheers, -- Uli Kusterer &q

Re: how to get the save File path from NSPrintpanel

2009-04-22 Thread Uli Kusterer
hics context to draw into. You just do the same as when printing to paper. If you want to do your own custom PDF export, add that to the "Save as..." menu item and use PDFKit or similar to set up a PDF the way you want and draw to it. Cheers, -- Uli Kusterer "The Witnesses o

Re: Dividing NSView to subviews

2009-04-25 Thread Uli Kusterer
g the image between pixels instead of on pixels. A coordinate like 1.0 goes along the edge of the destination pixel, so each pixel in your image will be drawn half on one pixel and half on the other. You'll have to offset your coordinate to cause it to be right *on* the pixel. Chee

Re: Dividing NSView to subviews

2009-04-25 Thread Uli Kusterer
to a great article on that topic: http://wincent.com/a/about/wincent/weblog/archives/2007/01/offbyone.php Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de ___ Cocoa-dev mailing list

Re: C string constant->NSString constant without defining twice?

2009-04-29 Thread Uli Kusterer
e action on a switched-out user as well. This is Unix, we have remote logins. Don't make assumptions just because you're lazy. Friends don't let friends hardcode absolute paths. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everyw

Re: Why is NSString->FSRef so hard?

2009-05-04 Thread Uli Kusterer
CoreServices File Manager calls (fka Carbon File Manager), and when you call displayNameAtPath:. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de ___ Cocoa-dev mailing list (Cocoa-dev@lists.a

Re: Why is NSString->FSRef so hard?

2009-05-04 Thread Uli Kusterer
, it's easy to see how people could get confused. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin reque

Re: Drawing Across NSTableView Columns

2009-05-04 Thread Uli Kusterer
make your user interface. I wrote about this concept (though not about lines in table views in particular) here: http://zathras.de/blog-spacing-boxes-and-other-layout-things.htm Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere...&qu

Re: How to make NSSplitView not dragable

2009-05-04 Thread Uli Kusterer
. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the mod

Re: Writable dir for non-admin user outside user's dir

2009-05-04 Thread Uli Kusterer
g the others. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the li

Re: Repositioning the Field Editor

2009-05-04 Thread Uli Kusterer
ou're working with. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to t

Re: Cocoa Drawing

2009-05-04 Thread Uli Kusterer
with the right button/mid button down on Mac?? rightMouseDragged: and otherMouseDragged:. They're just a couple lines down in NSResponder's header. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de _

Re: A tree data structure?

2009-05-06 Thread Uli Kusterer
On 06.05.2009, at 10:24, Andreas Grosam wrote: Luckily, I don't need such a beast. ;) I just need a graph, a hierarchical data container - no search tree. An NSDictionary with an NSArray under the key @"children" should do the trick. Cheers, -- Uli Kusterer &q

Re: AppleEvents and modal dialogs

2009-05-08 Thread Uli Kusterer
onDidFinishLaunching:, or even after each invocation to runAppModalLoopForWindow (but before it returns). Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de ___ Cocoa-dev mailing list (Cocoa-dev@li

Re: [Q] Correct way to identify an application, Launch Services, & Spaces

2009-05-09 Thread Uli Kusterer
in the string 'myapp 2008' either. Maybe forgot InfoPList.strings ? Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) P

Re: Hex to NSString or NSData

2009-05-10 Thread Uli Kusterer
an GCC. And before you think that won't affect you, remember that Apple are working on the clang compiler front-end and the llvm backend, which might one day become a new compiler completely independent from GCC. Thank you though -- I wasn't even aware that GCC had this exten

Re: Resolution Independent View?

2009-05-12 Thread Uli Kusterer
around the corner. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Co

Re: Disabling menu items

2009-05-16 Thread Uli Kusterer
nted to do something sensible, at least unless you run the risk of data loss. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Plea

Re: System Preference like App

2009-05-16 Thread Uli Kusterer
stuff under the title bar, NSBundle for loading the various plugins and also for loading NIBs from a file. NSMatrix and an NSButtonCell without a border for the main page. Have fun exploring! :-) Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.

Re: System Preference like App

2009-05-16 Thread Uli Kusterer
On 16.05.2009, at 10:01, listsapple wrote: I don't know if Cocoa has the equivalent of Carbon's HIWindowSetContentBorderThickness(), but if it has, that might be a simpler alternative to a toolbar. May require OS X 10.5 though. There's an equivalent NSWindow method.

Re: Calling delegates explicitly

2009-05-16 Thread Uli Kusterer
seems ... ? Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact th

Re: System Preference like App

2009-05-24 Thread Uli Kusterer
icons you need to use another class (i.e. another kind of cell). Re-read my earlier messages to you, I already provided you with the solution. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de __

Re: disowning a bundle?

2008-02-25 Thread Uli Kusterer
escription: Binary data UKNibOwner.m Description: Binary data Haven't had a Leopard-only project that uses NSViewController yet, but supposedly that works similarly. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere...&qu

Re: Custom View drawn twice?

2008-03-03 Thread Uli Kusterer
Am 29.02.2008 um 20:55 schrieb Ben Lachman: [self displayIfNeededIgnoringOpacity]; Is there a particular reason why you're calling this method? Won't plain old -displayIfNeeded do the job? Cheers, -- Uli Kusterer "The Witnesses of TeachText are ever

[ANN] UKCrashReporter 0.3

2008-03-03 Thread Uli Kusterer
ode.htm#UKCrashReporter> Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the l

Re: Change NSCursor globally

2017-02-20 Thread Uli Kusterer
On 15 Feb 2017, at 11:24, Colas B wrote: > thanks for your answer. > I want to do the former: when the user enables a mode in the application, the > cursor changes, exactly in the way you described (the shape changes). The > user should be able to use this custom cursor over a PDFView, a UIScrol

Re: why use extern "C"

2017-03-12 Thread Uli Kusterer
nly using C++, but when you want to make C++ functions available to C code, you need to tell your C++ compiler not to mangle the function names so C will be able to call them. This is what 'extern "C"' does. It turns off name mangling for the functions between the "{"

Re: Unicode filenames with Apple File System and UIManagedDocument

2017-03-12 Thread Uli Kusterer
red in the lost beginning of this thread. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de > On 8 Mar 2017, at 22:35, Peter Edberg wrote: > > >> On Mar 8, 2017, at 12:00 PM, cocoa-dev-requ...@lists.apple.com wrote: >>

Detecting if current user owns the screen (screen lock/FUS)

2017-04-21 Thread Uli Kusterer
my device, a polling API would be fine. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact

Re: [OT] Question about writing documentation

2017-04-22 Thread Uli Kusterer
Xcode project on OmniGraffle and it would actually generate a diagram from the source files. That might have been back in the Project Builder days though, so might have been discontinued with one of the two dozen ObjC syntax and Xcode file format changes. Cheers, -- Uli Kusterer "

Re: Detecting if current user owns the screen (screen lock/FUS)

2017-04-26 Thread Uli Kusterer
ConsoleUser. > > Note that when the login window is displayed, the current user name is > "loginwindow". > > I've never checked which uid or user name was returned when the screen > is locked. > > > On Fri, Apr 21, 2017 at 9:57 AM, Uli Kusterer >

Re: Is "-init" really needed?

2017-08-08 Thread Uli Kusterer
and I'm seeing it used more and more in ARC code these days. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin req

Re: Is "-init" really needed?

2017-08-08 Thread Uli Kusterer
rt for marking designated initializers fairly recently. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moder

Re: Using Storyboard References as objects

2017-10-04 Thread Uli Kusterer
ller's view and stick it in your container view, or remove it and put another one in, as appropriate. I would be curious if there is a better way for this though. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de

Re: Problem using NSTimer in privileged helper tool

2017-10-22 Thread Uli Kusterer
ze the timer's userInfo property with that value. It is not the value that gets passed to -updateTheDelegateForRunID:. So my guess is what you really need is an intermediate "timer fired" adapter method: -(void) updateTheDelegateForRunIDTimerFired: (NSTimer*)sender { [self update

Re: Can anyone suggest an open source license for Nursery framework?

2017-10-28 Thread Uli Kusterer
a-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 your Subscription: > https://lists.apple.com/m

Re: Can anyone suggest an open source license for Nursery framework?

2017-10-28 Thread Uli Kusterer
org/faq/#can-i-apply-a-creative-commons-license-to-software Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

Re: NSDrawer

2018-07-13 Thread Uli Kusterer
le.com > > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/cocoa-dev/witness.of.teachtext%40gmx.net > > This email sent to witness.of.teacht...@gmx.net Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathra

Re: NSComboBox

2018-07-28 Thread Uli Kusterer
keys etc.? In fact, all menus on OS X have supported that for quite a while now. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please

Re: is there a way to determine if an NSButton is toggleable ?

2018-08-22 Thread Uli Kusterer
omentaryPushIn ? You want to look at the showsStateBy bit field. See: http://orangejuiceliberationfront.com/building-a-custom-nsbutton/ Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de ___ Cocoa-d

Re: Carbon -> Cocoa

2018-08-22 Thread Uli Kusterer
d many older C++ frameworks actually behave more like ObjC's -validateMenuItem: than modern Carbon did, so in one case I was very happy an app's codebase hadn't been brought up to speed with Carbon best practices, because I could just hollow out TCL classes and back them with ObjC obj

Re: Carbon -> Cocoa

2018-08-22 Thread Uli Kusterer
for a friend about a year ago, but that was just getting the basics to work and solving the hard issues (like adding certain modifications he needed to standard views to Cocoa, in a Cocoa way), and hasn't shipped yet. Cheers, -- Uli Kusterer "The Witnesses

Re: Carbon -> Cocoa

2018-08-22 Thread Uli Kusterer
o. I recall hearing from someone at Apple that they basically ported GCD to Linux for the Swift Linux release ... have you looked whether that code might give any clues about what may be happening on macOS? Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere

Re: Typing with multiple selections in NSTextView

2018-10-03 Thread Uli Kusterer
;. That might make some of the oddities in the feature set a little more obvious: Extracting columnar data. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de ___ Cocoa-dev mailing list (Cocoa-dev@

Re: Bothersome "NSView-Encapsulated-Layout-Height" constraint?

2018-10-04 Thread Uli Kusterer
e views you return it defaults to YES on newly-created views)? This constraint is used by the layout system to apply heights you specify elsewhere. I *think* it is one for non-AutoLayout views. If I'm misremembering, check for any other views that arrange their subviews, like NSStackViews. Cheers

Re: XPC Question

2018-10-22 Thread Uli Kusterer
communication, I'd suggest creating your own mechanism on top of queues of message objects and keyed, or better secure, archiving. You can always model things after XPC, with the same method names etc. Cheers, -- Uli Kusterer "The Witnesses of TeachText are

Re: Sharing Files Between My Apps via iCloud

2018-10-23 Thread Uli Kusterer
ished downloading. Their content is probably just information needed to show the progress in Finder, if anything at all. Or it is partial file data, maybe with space already reserved for the final size. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras

Re: Sharing Files Between My Apps via iCloud

2018-10-26 Thread Uli Kusterer
t seems much more complex than those systems, and I’m not > confident that I can make it work reliably, so I’ve decided not to pursue it > at this time. > > — Mike > > >> On Oct 23, 2018, at 00:03 , Uli Kusterer >> wrote: >> >> AFAIK the .icloud files are

Re: RunLoop in Helper Tool

2013-09-16 Thread Uli Kusterer
get autoreleased on the main thread without any other pool in place. All things to keep in mind. Cheers, -- Uli Kusterer “The Witnesses of TeachText are everywhere...” http://zathras.de ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Pleas

Re: Confusion about Image I/O export?

2013-09-16 Thread Uli Kusterer
th. Or for the web, you know what size it can be at most, stuff like that. Cheers, -- Uli Kusterer “The Witnesses of TeachText are everywhere...” http://zathras.de ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post adm

Re: CGImageRef as a property of a cocoa object

2013-09-25 Thread Uli Kusterer
you’re providing your own retain/release callbacks. Anyway, pretty much everything these days is a CFType, so using the dedicated retains/releases in favor of CFRetain/CFRelease (or Cocoa’s -retain/-release) is not necessary. Cheers, -- Uli Kusterer “The Witnesses of Teac

Re: CGImageRef as a property of a cocoa object

2013-09-27 Thread Uli Kusterer
Err… not “inefficient”. I meant “bad style”. On 26 Sep 2013, at 02:14, Uli Kusterer wrote: > On 22 Sep 2013, at 22:44, Kyle Sluder wrote: >> You're both wrong. CGImageRelease is documented to be functionally >> equivalent to CFRelease, except for the non-NULL requiremen

Re: Runloops and Window Dragging

2013-10-03 Thread Uli Kusterer
oach if it makes sense for you. Also, do you really need a separate window? Otherwise, using a CALayer and its backgroundFilters property or so. Would a CIFilter work for your use case? Cheers, -- Uli Kusterer “The Witnesses of TeachText are everywhere...” http://zathras.de ___

Re: Cocoa class extension best practice

2013-10-16 Thread Uli Kusterer
_extra ivar in NSMenu used to be something else and now points to another object that contains additional ivars that have been added since NSMenu was introduced. They can't make it larger under the old 32-bit Mac runtime, after all. -- Uli Kusterer "The Witnesses of TeachText are everywh

Re: Question about matrix of possibilities

2013-10-16 Thread Uli Kusterer
e code to mix colors and do away with the images, bad example, but you get the gist). -- Uli Kusterer "The Witnesses of TeachText are everywhere..." ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin request

Re: C functions

2013-10-18 Thread Uli Kusterer
name) even without knowing its calling conventions beforehand. As long as you know the signature the moment you're calling it and have the proper values, that'll work (this is what you'd do if you wanted to make e.g. CoreFoundation APIs accessible to a scripting language) Cheers,

Re: C functions

2013-10-18 Thread Uli Kusterer
On Oct 18, 2013, at 6:15 PM, Uli Kusterer wrote: > On Oct 18, 2013, at 4:48 AM, Shane Stanley wrote: >> is there any way to build a call to a C function on the fly? I mean >> something like pass a string to a method, and have it call the function of >> that name? > >

Re: Setting key equivalent for menus depending on window

2013-10-19 Thread Uli Kusterer
easier, and you’re not hard-coding any shortcuts. Though that doesn’t solve the issue of properly restoring the items after you’ve hidden them. Cheers, -- Uli Kusterer “The Witnesses of TeachText are everywhere...” http://zathras.de ___ Cocoa-dev ma

Re: C functions

2013-10-19 Thread Uli Kusterer
at a .framework or other bundled library, it’ll pick out the right executable for you. Cheers, -- Uli Kusterer “The Witnesses of TeachText are everywhere...” http://zathras.de ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not p

Re: C functions

2013-10-19 Thread Uli Kusterer
On 19 Oct 2013, at 01:17, Shane Stanley wrote: > On 19 Oct 2013, at 3:15 AM, Uli Kusterer wrote: > >> this is what you'd do if you wanted to make e.g. CoreFoundation APIs >> accessible to a scripting language > > That's along the lines of what I had in min

Re: Setting key equivalent for menus depending on window

2013-10-19 Thread Uli Kusterer
t; make sure nothing else in the responder chain handles them. Drat. Good point. Cheers, -- Uli Kusterer “The Witnesses of TeachText are everywhere...” http://zathras.de ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: How to change highlight colour on NSTableView row

2013-10-23 Thread Uli Kusterer
this approach, and haven't heard any reports from users that the selection color was wrong. -- Uli Kusterer "The Witnesses of TeachText are everywhere..." On 21 Oct 2013, at 17:19, Darren Wheatley wrote: > Hi, > > I have a custom subclass of NSTableView in my app. >

Re: Getting mouse clicks when the main loop is busy

2013-11-10 Thread Uli Kusterer
ler Macs, but will be just as slow on 12-core Mac pros. Cheers, -- Uli Kusterer “The Witnesses of TeachText are everywhere...” http://zathras.de ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator co

Re: Getting mouse clicks when the main loop is busy

2013-11-10 Thread Uli Kusterer
On 10 Nov 2013, at 13:21, Uli Kusterer wrote: > Once that is done, kick off a thread that post-processes the NSData and And by that I don’t necessarily mean NSThread. NSOperationQueue or whatever makes sense and knows more than you about how many cores the machine has etc. Cheers, --

Re: Value of self changes

2013-11-15 Thread Uli Kusterer
hem ever retained it. Implement -copyWithZone: correctly so it copies all those values and ivars, and the problem will go away. Cheers, -- Uli Kusterer “The Witnesses of TeachText are everywhere...” http://zathras.de ___ Cocoa-dev mailing list (Cocoa-

Re: Value of self changes

2013-11-15 Thread Uli Kusterer
s encapsulation. If they come up with a way to e.g. make it faster for you, without you doing any extra work, just by relying on guarantees you've already given them, they are allowed to do so. -- Uli Kusterer "The Witnesses of TeachText are everywhere..." _

Re: Toggle framework in Cocoa

2013-12-10 Thread Uli Kusterer
On 10 Dec 2013, at 14:31, Appa Rao Mulpuri wrote: > Do we have toggle framework in Cocoa? I searched in the internet and found > http://www.togglz.org/, which is written in Java. I am curious, we have > equivalent in Cocoa as well. What does it do? -- Uli Kusterer "Th

Re: Toggle framework in Cocoa

2013-12-10 Thread Uli Kusterer
nd only have it in debug builds. Or if you really insist on shipping half-finished code to end users unnecessarily and just turning it off at runtime, use [NSUserDefaults boolForKey: @"MYTransientFeatureWhatever"], as that defaults to NO when it is not set. -- Uli Kusterer "Th

Re: NSButton state not persisting

2013-12-11 Thread Uli Kusterer
n your subclass. Then sometimes you seem to get parts of your object initialized twice, when in fact you’re seeing a copy of your object being talked to. Mind you, NSPreferencePane doesn’t implement NSCopying, so I doubt this is the case here, at least not directly. Cheers, -- Uli Kusterer “T

Re: Preferences caching?

2013-12-11 Thread Uli Kusterer
on’ solution for this edge case). In your case, I could see you sending them a shell script with a .command extension that does a defaults delete call to nuke your prefs domain. They can simply double-click that, and you can have it do a ‘clear’ and then display a friendly message like

Re: Threaded drawing

2013-12-12 Thread Uli Kusterer
seen how people circumvent that with sync code and CoreData. People first use Apple's code, getting a leg up and a release out the door and money in their coffers, and can then afford to fund their own version. -- Uli Kusterer "The Witnesses of TeachText are everywhere..." ___

Re: Threaded drawing - JPEG

2013-12-12 Thread Uli Kusterer
small DCTs at the start that can give you a vague, blurry version of the image, then draw more DCTs on top to add in the detail (I'm criminally simplifying here). So the preview calls can actually just draw the blurry version into a smaller destination and stop there, and don't have to

Re: help with logic error

2013-12-12 Thread Uli Kusterer
able as enum _NSRulerOrientation or the like either, to tell the Analyzer that there are only two possible values for this variable. Alternately, you could add an NSCAssert() that simply croaks if the orientation is anything but these two values.

Re: Best solution for game loop on OSX?

2013-12-17 Thread Uli Kusterer
lay links are a good choice here. They’re intended to avoid tearing when doing screen display, and depending on your screen and power saver settings may not get called as often as you’d want for sound. Cheers, -- Uli Kusterer “The Witnesses of TeachText are every

Re: CALayer's delegate prevents implicit animation?

2013-12-22 Thread Uli Kusterer
sign Apple doesn’t expect you to do this. To be safe (not to mention avoid the obvious code smell of making a view a controller), use a separate object as the delegate. Cheers, -- Uli Kusterer “The Witnesses of TeachText are everywhere...” http://zathras.de _

Re: HTML emails from Objective C

2013-12-22 Thread Uli Kusterer
ing:… to fill in some placeholders? There are also some templating engines for things like this that handle things like filling in values more robustly and handle repeating sections etc. Cheers, -- Uli Kusterer “The Witnesses of TeachText are everywhere.

Re: Creating NSButton in Code does not set controlTint to currentControlTint

2013-12-26 Thread Uli Kusterer
show the tint, it’s not surprising that your button looks different. 3) As others mentioned, buttons are usually set to “default”. To find out what that corresponds to, look at NSColor’s currentControlTint method. Cheers, -- Uli Kusterer “The Witnesses of TeachText are everywhere...” http://z

Re: Creating NSButton in Code does not set controlTint to currentControlTint

2013-12-28 Thread Uli Kusterer
On 27 Dec 2013, at 04:08, Peter Teeson wrote: > On 2013-12-26, at 7:01 PM, Uli Kusterer wrote: >> On 26 Dec 2013, at 18:49, Peter Teeson wrote: >>> _Cancel = [[NSButton alloc]init]; >>> [_Cancel setFrame:theButtonFrame]; >>> [_Cancel setNeedsDisp

Re: Creating NSButton in Code does not set controlTint to currentControlTint

2013-12-28 Thread Uli Kusterer
On 28 Dec 2013, at 14:39, Uli Kusterer wrote: > The only things in 10.0 that used the tint were Rounded (highlight/default > buttons) and Circle bezel buttons (only to highlight), menu selections, tab > controls, popup buttons, segmented controls, progress bars and scroll bars. &

Re: Creating NSButton in Code does not set controlTint to currentControlTint

2013-12-28 Thread Uli Kusterer
On 28 Dec 2013, at 14:39, Uli Kusterer wrote: >> To repeat… I expected the above code to produce a button which when pressed >> displays the Blue Aqua tint. It doesn't! Why not? >> Why does it show the Aqua tint if I set up the exact same button using IB >> and le

Re: Should copy + paste change characters?

2013-12-28 Thread Uli Kusterer
be able to trust "copy" to put the >>> copied text unmodified to the rich pasteboards? >> >> In what app or with what code does this happen? I'm not seeing it with >> TextEdit on Mac OS X 10.6. > > On 10.9.1 (I don't have 10.6) I do see it with

Re: Keep sibling view in Responder Chain

2013-12-28 Thread Uli Kusterer
he responder chain somewhere farther up. Cheers, -- Uli Kusterer “The Witnesses of TeachText are everywhere...” http://zathras.de ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the li

Re: Keep sibling view in Responder Chain

2013-12-28 Thread Uli Kusterer
of the Responder Chain. >> >> That’s what I usually do. Alternately, if I have a view controller for the >> source view, I use setNextResponder: to insert the view controller in the >> responder chain somewhere farther up. >> >> Cheers, >> -- Uli Kuster

Re: ioscomponents.com - reloaded!

2014-01-06 Thread Uli Kusterer
On 06 Jan 2014, at 17:24, dangerwillrobinsondan...@gmail.com wrote: > Your layout is pretty broken on iOS 7 in Safari on a Retina Display iPad. Don’t even need that. On Safari/Mac, just make your window narrower and watch it get progressively worse. Cheers, -- Uli Kusterer “The Witnesses

Re: File association using file magic

2014-01-24 Thread Uli Kusterer
ly wrong files someone just tried dragging on your app icon. -- Uli Kusterer "The Witnesses of TeachText are everywhere..." ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator co

Re: Xcode 5 & Obj-C++

2014-01-29 Thread Uli Kusterer
d about ObjC++ on NSBrief a while ago: http://nsbrief.com/113-uli-kusterer/ It’s a very comprehensive summary of all the tricks and techniques I commonly use, plus an introduction into how the whole thing behaves. > I understand that the file extension needs to be .mm to mix Obj-C and C++. > B

Re: Xcode 5 & Obj-C++

2014-01-29 Thread Uli Kusterer
re people use a piece of code, the more likely it is one of them found a bug got it fixed. Tested code is always better than new, “fast” code. Cheers, -- Uli Kusterer “The Witnesses of TeachText are everywhere...” http://zathras.de ___ Cocoa-dev mail

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Uli Kusterer
not assembly) is often better for performance. Well, I'd rather use a barely-OO language like C++ than go down to procedural with C++ and get all those buffer overruns back ... -- Uli Kusterer "The Witnesses of TeachText are everywhere..." _

Re: Xcode 5 & Obj-C++

2014-01-30 Thread Uli Kusterer
ac-64-bit), not even that anymore. -- Uli Kusterer "The Witnesses of TeachText are everywhere..." ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderato

<    3   4   5   6   7   8   9   >