Re: Getting the best frame rate for NSView drawing

2012-03-30 Thread Uli Kusterer
ou let the OS decide the image format, the more likely it is they'll be performant. If you force a certain bit depth or memory layout, you will incur conversion penalties every time you draw. Cheers, -- Uli Kusterer "The Witnesses of TeachText

Re: view-based nstableview advice

2012-04-02 Thread Uli Kusterer
y use the same class for all your cells, but use different constructors to set up their internals differently based on different reuse identifiers. That's why the identifier is separate from the cell class. Cheers, -- Uli Kusterer "The Wit

Re: Xcode warns about missing protocol definition, even though @protocol is used

2012-04-16 Thread Uli Kusterer
;Foo'), but you can declare pointers to the former, because for a pointer it only has to know the size of an address, not the size of the struct at that address. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.masters-of-the-void.com __

Re: Is there a glue file between Carbon and Cocoa?

2012-04-17 Thread Uli Kusterer
your own Cocoa application once you've worked your way through Hillegass' book. The C++ parts will probably take longer to learn, but if you just want to understand what the original program did and write your own version in C/ObjC, you don't need as deep an understanding.

Re: Updating NSMenu while it's open

2012-04-19 Thread Uli Kusterer
oyance these days, it's nigh-impossible to select files from there when sorted by date, because a few files change constantly. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.masters-of-the-void.com ___ C

Re: Guidelines on using NSJSONSerialization

2012-04-24 Thread Uli Kusterer
right callbacks, and it's toll-free-bridged to NSArray. Of course, if you try to get an object out of it and it actually contains something else (like a struct pointer), it'll still crash. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." __

Re: NSDate value set in one method, vanishes when accessed from another

2012-04-24 Thread Uli Kusterer
he value's > gone! Why is it not persisted across methods in the same class itself? What > can I do for the value to be accessible across methods? Learn about memory management in Objective C, from this article: https://developer.appl

Re: NSDate value set in one method, vanishes when accessed from another

2012-04-24 Thread Uli Kusterer
the clock in San Francisco to be correct, it will suddenly be wrong for me in Munich. Now that's not necessarily wrong, if you intended to build a radio with a "San Francisco Local Time" clock, mind you. It just depends on what you are actually trying to do

Re: SMJobBless

2012-04-27 Thread Uli Kusterer
on Apple's objc-lang mailing list (http://lists.apple.com). You might want to chime in there. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not p

Re: Dissappearing string

2012-05-16 Thread Uli Kusterer
rning they might be accurate, in the afternoon right after lunch break start they may be double, and if someone urgently had to go to the pharmacy you might be off by two. There are better ways to spend your time. Cheers, -- Uli Kusterer "The Witnesses of Tea

Re: Dissappearing string

2012-05-16 Thread Uli Kusterer
On 16.05.2012, at 15:02, Uli Kusterer wrote: > - copy the string (which means the retain count stays 1, and the string gets > deallocated when you release it) Forgot to mention: When you *really* have an NSAttributedString (an immutable object), -copy can even be optimized out and be th

Re: iOS disk full?

2012-06-21 Thread Uli Kusterer
ow a certain limit (but isn't yet completely full), abort the recording and inform the user. Don't let it come to a point where you actually fill the disk. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." ___ Coco

Re: Why do we use -fobjc-arc instead of removing code with #define?

2012-06-25 Thread Uli Kusterer
Might be worth just keeping the same terminology. Cheers, -- Uli Kusterer "Die Zeugen des TeachText sind überall..." http://www.wiederholungstaeter-podcast.de ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin re

Re: Why do we use -fobjc-arc instead of removing code with #define?

2012-06-25 Thread Uli Kusterer
management bugs. So not only are you STILL writing manual-managed code, you've now also DOUBLED your QA load. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.masters-of-the-void.com ___ Cocoa-dev m

Re: Why do we use -fobjc-arc instead of removing code with #define?

2012-06-26 Thread Uli Kusterer
; be managed the same way. If it can be done, how is ARC enabled for a specific > class? Haven't yet had to use it, but Stack Overflow (http://stackoverflow.com/questions/8768176/how-to-add-arc-for-specific-file) says the flag is logically named "-fobjc-arc". Just specify tha

Re: Modal event processing

2012-07-06 Thread Uli Kusterer
on a secondary thread, queue up your little bits of work in an NSOperationQueue or other GCD-backed queue that runs on another thread. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." ___ Cocoa-dev mailing list (Cocoa-dev

Re: Write Finder plugin

2012-07-13 Thread Uli Kusterer
Info-plist, your service's item will automatically be activated. Only "old-style" services need to be activated explicitly. Others show up as soon as their context matches (e.g. the selected file has the UTI that your service expects as input). Cheers, -- Uli Kusterer "

Re: Looking for better solution than this old hack

2012-07-18 Thread Uli Kusterer
r notifications and redraw themselves accordingly. -> Have you tried switching "non-activating panel" on? It sounds like that is what you want. It can still have keyboard focus then, but just won't be the main window. Cheers, -- Uli Kusterer "The Witnesses of TeachText are ev

Re: do you init your instance variables in init method or outside the class?

2012-07-18 Thread Uli Kusterer
have an internal cache later, and when someone changes the array, you have to know about it so you can remove a deleted object from the cache etc. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.masters-of-the-void.com

Re: Looking for better solution than this old hack

2012-07-18 Thread Uli Kusterer
and scrollers are now monochrome, so you don't see this as often anymore. > 3. In a key window, controls are colored, if they have a non-gray color. This > includes list and text selections for example. Cheers, -- Uli Kusterer "The Witnesses of Teach

Re: Icon Overlay on Mac OSX

2012-07-18 Thread Uli Kusterer
downloaded file, you could probably do that. I think there might be a setIcon:forFile: (or something like that) method in NSFileManager or NSWorkspace for setting a custom icon on a file. Cheers, -- Uli Kusterer "The Witnesses of TeachText are every

Re: Icon Overlay on Mac OSX

2012-07-20 Thread Uli Kusterer
also open a file just like Finder would do. And you can ask NSFileManager for the list of files in a particular folder. So essentially you'd be building a (very limited and much simpler) mini-Finder that only does what is needed for your application. Cheers, -- Uli Kusterer "The Witne

Re: +bundleForClass: category question

2012-07-21 Thread Uli Kusterer
class next to the category and call -bundleForClass: on that. Very useful for code that is used on iOS (there are no frameworks) and on the Mac (in a framework). It'll always grab the bundle to which someone added that source file, and the assumption is whoever did that also copied along the resou

Re: Icon Overlay on Mac OSX

2012-08-02 Thread Uli Kusterer
file > attributes?) NSWorkspace has a setIcon: forPath: method (or something like that) for this purpose. I think it was added around 10.6, might even be older. Or maybe it was NSFileManager. I mentioned it previously in this thread, not gonna look it up a second time. Cheers, -- Uli Kusterer "The

Re: Mountain Lion problems with orderFrontColorPanel:

2012-08-06 Thread Uli Kusterer
On Aug 3, 2012, at 6:21 AM, Graham Cox wrote: > On 03/08/2012, at 2:14 PM, Andreas Mayer wrote: >> Am 03.08.2012 um 03:41 schrieb Graham Cox : >> >>> Has anyone else experienced issues with the Color Panel not showing in >>> Mountain Lion? >> >> Working fine here. > > Working fine here too...

Re: +underPageBackgroundColor

2012-08-08 Thread Uli Kusterer
, just define them in a .plist and build your table from that, then you don't need to implement named NSColor methods for them at all. Cheers, -- Uli Kusterer http://stacksmith.org ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Ple

Re: NSCopyObject is a disaster (was Re: Another NSOutlineView issue)

2012-08-13 Thread Uli Kusterer
ly (and more safely) you can just ignore the value in there (as you know it either hasn't been retained, or is NIL altogether) and change the ivar directly without going through any getter/setter: foo = [other->foo retain]; Now all is hunky-dory, with or without NSCopyObject. Cheers,

Re: NSCopyObject is a disaster (was Re: Another NSOutlineView issue)

2012-08-13 Thread Uli Kusterer
copyWithZone:(NSZone*) zone >{ >MyCell* copy = [super copyWithZone:zone]; >copy->someInternalPointer = [someInternalPointer copy]; >return copy; >} And it's correct even without ARC. Replace copy with retain for those non-ARC cases w

Re: Apple Aperture-like look & feel

2012-08-20 Thread Uli Kusterer
ottom ends of the menu (about 4-8 px) are drawn in grey by the system. In 32-bit you can use Carbon to change that, but in 64-bit that's not officially available. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de _

Re: Apple Aperture-like look & feel

2012-08-20 Thread Uli Kusterer
On Aug 20, 2012, at 7:03 PM, Uli Kusterer wrote: > essentially subclass all the controls and override drawRect: (and mouseDown: > where needed) to get our custom graphics in there. One note: Many controls on the Mac are NSCell-based NSControls, in which case you generally want to overri

Re: Apple Aperture-like look & feel

2012-08-20 Thread Uli Kusterer
ly having heard that Nokia closed one Trolltech office in Australia and sold the rest to another company: http://www.guardian.co.uk/technology/2012/aug/09/nokia-sells-qt-software-business so I'm not sure whether I'd invest in that. You'll have to decide for yourself. -- Uli Kusterer

Re: Set icon for files and folder

2012-08-21 Thread Uli Kusterer
d. I need to have original icon when I move the file. Is there way to > do it? Look in the list archives, this was discussed a few weeks ago on this list. I think "Dropbox" was mentioned as an example that does this. The short answer is "there is no good way to do it&q

Re: Finder Info

2012-08-25 Thread Uli Kusterer
u should *always* use -fileSystemRepresentation when you need a C-string representation of a path. Otherwise you might get decomposed characters that don't match the actual way the characters are stored on disk, and will create a second file with an almost-indistinguishable name. Cheers, -- Uli Kusterer "

Re: NSView -backingAlignedRect:

2012-08-26 Thread Uli Kusterer
and it nudges them depending on how many pixels your current context uses per point, to give you a sharp line (at the loss of a bit of precision, but only a little, and only when actually needed). Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http:/

Re: Have to specify (id)sender to action methods in OS X but not in iOS?

2012-08-29 Thread Uli Kusterer
he called function can not declare it and be fine, it will just be ignored. (This isn't guaranteed by ANSI, so is not strictly correct code, but it does work on the Mac, iPhone and iPad and is documented to do so). Cheers, -- Uli Kusterer "The Witnesses of TeachText are

Re: Have to specify (id)sender to action methods in OS X but not in iOS?

2012-08-29 Thread Uli Kusterer
On Aug 29, 2012, at 5:54 PM, Uli Kusterer wrote: > On Aug 25, 2012, at 1:58 AM, Fritz Anderson wrote: >> UIKit was a fresh start in the past five-plus years. With a generation of >> experience, Apple apparently didn't think it was always useful to pass >> sender point

Re: Collision between Cocoa classes for AU and VST plugins

2012-09-07 Thread Uli Kusterer
ase class return the proper AU or VST subclass depending on a parameter passed in, while leaving the rest of the code identical. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de ___ Coc

Re: View based outline view and custom NSTableCellViews

2012-09-07 Thread Uli Kusterer
cted object in your table view). I know this stuff is similar, you'll just have to learn more about these two things to know how to tell them apart. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.masters-of-the-void.com On 06.09.2012, at 21:01,

Re: Advice for rotating content in a window so it doesn't get clipped

2012-09-07 Thread Uli Kusterer
e difference between the two is how much you have to make the window larger to see all of that view. Do that for every view you're rotating, done. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.lookandfeelcast.com __

Re: Collision between Cocoa classes for AU and VST plugins

2012-09-07 Thread Uli Kusterer
ally a variant of the shared code method above. 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

Re: Best practice when opening a Master-Detail app with no data in it yet

2012-09-19 Thread Uli Kusterer
nd hard about. If the user is only expected to add a bunch of items at startup, it's OK if it's hidden, but if it's something the user regularly does, it should probably rather be in a toolbar. Cheers, -- Uli Kusterer "The Witnesses of TeachText

Re: Best practice when opening a Master-Detail app with no data in it yet

2012-09-20 Thread Uli Kusterer
rientations, even if it's in a popover triggered by a button in the toolbar. Of course, then you'll have to adjust the instructions depending on orientation. -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.masters-of-the-void.com _

Re: Autosave in place - common use case that makes me hate it

2012-09-21 Thread Uli Kusterer
g list. Feel free to discuss this at the Mac-GUI-Dev mailing list: http://tech.groups.yahoo.com/group/mac-gui-dev/ Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de ___ Cocoa-dev mailing list (Coco

Re: Size limit on .icns files containing 1024x1024 version in 10.5?

2012-10-08 Thread Uli Kusterer
e I'm not using that just gets carried along and causes the incompatibility? Just guessing here. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de ___ Cocoa-dev mailing list (Cocoa-dev@l

Re: dropping alias file on NSPathControl with App Sandbox

2012-10-10 Thread Uli Kusterer
cess's window by another process that has permissions, or even a separate window that just moves with your process's window like the accessory view in an NSOpenPanel, just the other way round. Cheers, -- Uli Kusterer "The Witnesses of TeachText are every

Re: a way to clear inactive RAM

2012-11-06 Thread Uli Kusterer
? There is no practical benefit to "clearing free RAM". It will actually make things slower. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.masters-of-the-void.com ___ Cocoa-dev mailing list (Co

Re: a way to clear inactive RAM

2012-11-06 Thread Uli Kusterer
problem that Safari, when left open, leaks like a sieve ... ? Those two things are orthogonal. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.masters-of-the-void.com ___ Cocoa-dev mailing list (Cocoa-dev@li

Re: Manual reference counting and doubly-linked lists

2012-11-15 Thread Uli Kusterer
ect in collection ) and the fast enumeration stuff, which lets the NSArray be smart about iterating over your list of objects based on its own knowledge of what algorithm it is using. PS - Objective C is actually not that young ... it's from 1983. Cheers, -- Uli Kusterer "The

Re: blocks and id

2012-12-14 Thread Uli Kusterer
the actual object, it will respond to the selector and still work as expected. Asking for an object's class using isKindOfClass: is a definite code smell. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.masters-of-the-void.com _

Re: blocks and id

2012-12-14 Thread Uli Kusterer
On 15.12.2012, at 01:38, Uli Kusterer wrote: > On 12.12.2012, at 10:03, Andreas Grosam wrote: >> How can I check at runtime whether an object (id) is actually a block, and >> not another kind of object? > > Not a good idea. What are you really trying to do? Here's

Re: Build script

2012-12-14 Thread Uli Kusterer
e the FTP or curl command line tools to upload. We even have bash scripts in .command files that you can just double-click to get a certain kind of build in a reliable way. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de ___

Re: How to enable the close window button while showing a modal sheet?

2013-01-10 Thread Uli Kusterer
meone finds out, I'd love to know how I can do that. I have a custom window where I'd want to achieve standard behaviour by making my (fake) zoom and minimize boxes work while a sheet is up. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.

Re: Service with NSURLConnection

2013-01-11 Thread Uli Kusterer
ut it would keep the main thread from returning until you actually have data. Of course, in any way, both approaches would probably cause the app from which your service was invoked to beachball until you return. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http:/

Re: UIActivityIndicatorView

2013-01-15 Thread Uli Kusterer
eration. Or if you have to, use a separate thread, but that's hard to get right, and easy to get wrong in a way that causes random hard-to-find crashes. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de

Re: Best guess at expressing a string as a variable

2013-01-23 Thread Uli Kusterer
t find a section that is obviously only "letters and marks" or two separate "letters" and "marks" sections. Anyway, I think building your own custom character set from a string including the characters you *know* are valid identifier

Re: How to avoid warning?

2013-01-23 Thread Uli Kusterer
consider it having been declared. So @protocol AvoidCompilerWarning - (id) initWithManager: (Foo*)manager; @end is, for the purposes of this particular discussion, equivalent to Jens's fictional class interface, but doesn't imply that such a class might exist to a (human) reader. Chee

Re: How to avoid warning?

2013-01-23 Thread Uli Kusterer
nager: if the manager class is called UKBarManager. "Manager" alone is too generic a word, and someone might have declared it in ObjC++ and taking a C++ object and then you're screwed. Cheers, -- Uli Kusterer "The Witnesses of

Re: Getting file type from Save dlog

2013-01-25 Thread Uli Kusterer
I'm going from memory, but I don't think you need to do your own accessory view. Just call setFileTypes: with the desired types on the NSOpenPanel instance and you should get a popup by default, I think ... ? You can then get the fileType from that object back or so. Cheers, -- Ul

Re: Detecting a native Cocoa app ?

2013-02-07 Thread Uli Kusterer
cular* circumstance beforehand and avoid doing the crashing action in that case. Simplistic notions like that are exactly why input managers/haxies have such a bad reputation among application developers (and users, even, these days). Cheers, -- Uli Kusterer "The Witnesses of TeachTex

Re: QR code reader/generator SDK

2013-02-07 Thread Uli Kusterer
Just a short reminder: That code is LGPL, so don't just compile it into your application, only link against it as a dylib/framework, and be sure to include the requisite license files. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de

Re: Detecting a native Cocoa app ?

2013-02-07 Thread Uli Kusterer
On 07.02.2013, at 16:14, dvlc...@gmail.com wrote: > it's not my plugin which crashes, it's the app itself. *rolls on the floor laughing* Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de ___

Re: Pointer was being free was not allocated

2013-02-13 Thread Uli Kusterer
reliably warned about your mistake. (Of course, if you're using ARC instead of manual retain/release, the above can also happen, but are much harder to track down because you're only indirectly causing the compiler to insert the "wrong" retain/release calls, they're not

Re: Pointer was being free was not allocated

2013-02-14 Thread Uli Kusterer
Also, Xcode's built-in "Analyze" menu item might catch some of those. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de On Feb 13, 2013, at 10:36 PM, Sean McBride wrote: > On Wed, 13 Feb 2013 19:50:29 +0800, anni saini said

Re: faster deep copies?

2013-02-14 Thread Uli Kusterer
works. Downsides: This will make immutable copies of mutable objects (if you called -mutableCopy where available, you might do the reverse), and you need to be careful that you don't miss adding -deepCopy to a class. Cheers, -- Uli Kusterer "The Witnesses of TeachText are ever

Re: faster deep copies?

2013-02-14 Thread Uli Kusterer
n NSValue +valueWithUnretainedPointer: or whatever as the key, I just quickly typed this untested code into the e-mail) Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de On Feb 14, 2013, at 3:57 AM, Ken Thomases wrote: > Your question prompted me to try

Re: Multiple methods named...

2013-02-16 Thread Uli Kusterer
.com/instancetype/) In anyway, "rootObject" is a bad name (you can see it's an object from the context, much better to be more concrete and call it rootWiper or whatever. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.masters-of-the-void.com

Re: Custom control with 4 vertical sliders

2013-02-16 Thread Uli Kusterer
Have you tried creating 4 NSSliders next to each other, using an NSSliderCell subclass that overrides - (void)drawBarInside:(NSRect)aRect flipped:(BOOL)flipped; to draw nothing? You can set the custom class of a cell in the XIB, so you won't even have to touch NSSlider. Cheers, -- Uli Kus

Re: [OT] Sync vs ASync Server Comms

2013-02-22 Thread Uli Kusterer
dding them to a queue, and then periodically (but on the main thread) performing a tiny fraction of the work by executing the next tiny fraction of a task from the queue. In between these tiny operations, the user can keep working, and barely notices the tiny interruptions. Cheers, -- Uli Kuster

Re: A plugin for a sandboxed app - where to can I successfully store a temp file?

2013-02-22 Thread Uli Kusterer
y a log message there that tells you it blocked an operation that isn't permitted. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de On Feb 22, 2013, at 11:52 AM, Nick wrote: >> You’re not consulting/logging the error message for

Re: [OT] Sync vs ASync Server Comms

2013-02-22 Thread Uli Kusterer
another thread. Similar with certain libraries. By using async APIs, they take care of this for you and call you back on the main thread. It's simply letting Apple write the difficult code (and all their users find the bugs for you) instead of noticing them a year after you've shipped. Che

Re: iOS books, etc for experienced OSX programmers

2013-02-23 Thread Uli Kusterer
Yeah, that'd be my bet as well. It's a fairly new technology. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de On 22.02.2013, at 15:37, Koen van der Drift wrote: > One thing I'm not sure about yet is the use of 'storyb

Re: [OT] Sync vs ASync Server Comms

2013-02-25 Thread Uli Kusterer
Generally, using 4 exclamation marks in a sentence (or three question marks, come to think of it) is considered "yelling". Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de On Feb 22, 2013, at 8:32 AM, Dave wrote: > Of cou

Re: Documents not opening from Finder

2013-02-28 Thread Uli Kusterer
Opening internally sends Apple Events. Have you checked whether the"open document" Apple event is sent and whether it looks any different? My guess is they won't use that for the open panel, but maybe they do and something's broken there? Cheers, -- Uli Kusterer "The W

Re: Quicklook and changing previewed image from table

2013-02-28 Thread Uli Kusterer
Am I misunderstanding you? You want a selection change to refresh the QuickLook panel, so shouldn't you be doing the call in a tableViewSelectionDidChange: delegate method/NSNotification handler? -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.masters-

Re: More IB constraints woes

2013-03-03 Thread Uli Kusterer
hould be fine. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.masters-of-the-void.com On 03.03.2013, at 01:03, Rick Mann wrote: > Thanks. In the past, resizing the window by dragging only resized the window; > holding Command enforced th

Re: move large data structure to Core Data?

2013-03-03 Thread Uli Kusterer
zations that NSArray uses to speed up search for a particular value etc., but you want the convenience of an ObjC API that CFArray doesn't quite offer. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." On 03.03.2013, at 05:23, James Maxwell wrote: > Hello

Re: how to implement iphoto like animation while doing drag and drop on custom listview

2013-03-07 Thread Uli Kusterer
You mean you want the clips to "move aside" when you drag a clip between them? Well, make each clip out of something that can be animated using Core Animation (usually a view or a layer). Then just change the clips' frames and Core Animation will do the moving for you. Cheers,

Re: Binding to NSUserDefaults

2013-03-18 Thread Uli Kusterer
Odd, my experience has been exactly the opposite. Unless I bind to NSUserDefaultsController, I don't get notified when other parts of my app change a default. So I guess the answer is: "It always breaks on Uli's work Mac" :-) Cheers, -- Uli Kusterer "The Witnesses of

Re: Custom insertion point

2013-04-04 Thread Uli Kusterer
ery section of Apple here, so they may not know the answer either. If you need someone to look at it, I recommend you use a DTS incident to get the answer. If you have a Mac Developer account (what you need to submit an application to the Mac app store), you probably got two of those. Che

Re: Providing a Service without activating an app

2013-04-04 Thread Uli Kusterer
to .service. It has the same NSServices key in its plist as a regular application implementing services would have, an app delegate, a main xib that instantiates it, etc. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de On Apr 2, 2013, a

Re: customizing cursor nssearchfield

2013-04-04 Thread Uli Kusterer
han one would expect, but each subclass implements about one method, so it's a bunch of really simple subclasses. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de On Feb 27, 2013, at 8:08 AM, Rick C. wrote: > Hi, > > This seem

Re: Animating row height changes for view-based table view

2013-04-07 Thread Uli Kusterer
he cell's top, subtract the difference from the scroll from #2. (This means that the top will always be visible if you un-collapse the view, even if the row is taller than the visible area) 4) Schedule an animated scroll to be at the same time as the animation that enlarges the cell. 5)

Re: Understanding NSTask

2013-04-09 Thread Uli Kusterer
utes SSH as a subprocess. Then why is this blocking the > main thread? *shakes magic 8-ball* Outlook Hazy (I.e. post some code -- likely you're doing something synchronous that should be asynchronous, like waiting for output or writing input) Cheers, -- Uli Kusterer "The Wit

Re: Is there a pattern for creating an object with global scope?

2013-04-13 Thread Uli Kusterer
en calls (that's what 'static' means in that context), but nobody but +sharedMyClass will be able to directly access it. Of course, since all methods called on the object will be instance methods, not class methods, they will also have access to the object in 'self&#x

Re: Followup - Re: Is there a pattern for creating an object with global scope?

2013-04-14 Thread Uli Kusterer
ieve in overriding -init, -retain, -release and -retainCount to keep people from creating a second instance of this object, but that's more defensive coding than necessary. I just mention it because it's the moral equivalent to Steve's making the constructor private. Cheers, -- Ul

Re: makeKeyAndOrderFront (not working)

2013-04-14 Thread Uli Kusterer
ive, or whatever the terminology was. Makes it the front process and swaps in its menu bar (which of course won't happen for your UIElement). Well, I'd try that, it may or may not work. Hope these clues help you in figuring it out. Cheers, -- Uli Kusterer "The Witnesses of TeachText are e

Re: makeKeyAndOrderFront (not working)

2013-04-15 Thread Uli Kusterer
On 14.04.2013, at 20:20, Pax <45rpmli...@googlemail.com> wrote: > [[NSApplication sharedApplication] activateIgnoringOtherApps : YES]; > > Thanks for the suggestion. If it breaks something else I'll be sure you let > you know. Cool, it'd be appreciated!

Re: Followup - Re: Is there a pattern for creating an object with global scope?

2013-04-15 Thread Uli Kusterer
m changes. 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. Contac

Re: UITableCellView width decreases when scrolling

2013-04-15 Thread Uli Kusterer
aw > the strings that way. Keep in mind that drawing text yourself breaks accessibility (VoiceOver can't see the text anymore). Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de ___ Cocoa-

Re: Showing a drawer on a sheet

2013-04-19 Thread Uli Kusterer
find them, but everyone else gets a fairly simple confirmation dialog. 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 a

Re: My App crash on 10.7.5, but works on 10.8

2013-04-19 Thread Uli Kusterer
llView,NSViewController, NSWindow, and NSWindowController. In > addition, in OS X v10.7 no classes in the AV Foundation framework support > weak references. So NSWindowController didn't support weak references until 10.8. That chapter has instructions what to do instead. Cheers, --

Re: Can scroll direction be changed programmatically?

2013-05-09 Thread Uli Kusterer
so listen to CGDisplayConfigurationChanged callback in the app that filters the events to see when an external screen is plugged in. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.masters-of-the-void.com

Re: Displaying "Trebuchet MS" font

2013-05-13 Thread Uli Kusterer
counter that respond to that selector. 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

Re: Restoring saved fileWrapper items problem

2013-05-13 Thread Uli Kusterer
gets called in both windowControllerDidLoadNib and readXXX. Loading the images directly and then keeping them in the views violates Model-View-Controller. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.zathras.de ___

Re: Displaying "Trebuchet MS" font

2013-05-13 Thread Uli Kusterer
r own. Sorry. Please speak for yourself only. Thanks. He asked a valid technical question, we shortly pointed out it's a bad idea, I even provided a suggestion how he might make something work, let's move on. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywher

Re: Restricted FontPanel

2013-05-27 Thread Uli Kusterer
ever algorithm you plan to apply. 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 th

Re: Building an MVC based App for Mac OS X - NOT for iOS

2013-05-28 Thread Uli Kusterer
using the responder chain when it is frontmost. 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

Re: NSMatrix used as menu item's view appears wrong

2013-05-28 Thread Uli Kusterer
"selects" an item number beyond your NSMatrix, and scrolls it into view, thus scrolling your matrix off-screen. Could that be it? I admit I would expect a little "continuation" arrow at the bottom of your menu in that case, though. Cheers, -- Uli Kusterer "The Witn

Re: Building an MVC based App for Mac OS X - NOT for iOS

2013-05-28 Thread Uli Kusterer
lly if a document can consist of several windows. Cheers, -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.masters-of-the-void.com ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admi

Re: Building an MVC based App for Mac OS X - NOT for iOS

2013-05-28 Thread Uli Kusterer
y intended purpose. My recommendation for reading about Mac programming is this book: <http://www.amazon.com/Cocoa-Programming-Mac-4th-Edition/dp/0321774086> It is very good, and walks you through creating a Mac application, explaining things along the way. Cheers, -- Uli K

<    1   2   3   4   5   6   7   8   9   >