Re: Best practice with NSProgressIndicator

2017-07-28 Thread Andreas Mayer
> Am 28.07.2017 um 17:57 schrieb Mark Allan : > > Setting the max value to 100 and only updating 100 times (i.e. as a > percentage) seems too infrequent because the loop can iterate more than a > million times. Just keep track of the time of the last update and do it every 0.1 seconds or so.

Re: AutoSave for Windows

2016-11-22 Thread Andreas Mayer
> Am 22.11.2016 um 07:34 schrieb Gerriet M. Denkmann : > > But now some obnoxious NSPersistentUIRestorer takes over: The docs say window restoration uses the window's identifier. Is that one set properly for both windows? You can find it in Xcode's identity inspector. __

Re: Problem with CAAnimation in a screensaver

2016-09-28 Thread Andreas Mayer
> Am 29.09.2016 um 01:01 schrieb Gabriel Zachmann : > > Any ideas why that is? The docs have example code on how to pause and resume an animation: https://developer.apple.com/library/content/documentation/Cocoa/Conceptual/CoreAnimation_guide/AdvancedAnimationTricks/AdvancedAnimationTricks.html

Re: Best way to make a little piece of data persistent?

2016-09-28 Thread Andreas Mayer
> Am 29.09.2016 um 00:45 schrieb Gabriel Zachmann : > > I need to make a few small pieces of data (an integer, a string, ...) > persistent across different invocations of my screen saver. > > That is, when the screen saver is about to quit, I need to save it, > when it gets invoked the next time

Swift 3 - Notification leaks

2016-06-18 Thread Andreas Mayer
I have just migrated a project to Swift 3 which worked surprisingly well for the number of changes necessary. After checking out the new memory graph (cool!) I noticed that I am leaking notifications. Example: NSConcreteNotification 0x102c28600 {name = NSApplicationDidBecomeActiveNotif

Re: How to Truncate lines in NSScrollView/NSClipView/NSTextView Combo

2016-04-24 Thread Andreas Mayer
> Am 24.04.2016 um 17:15 schrieb Dave : > > I have an NSTextView inside an NSScrollView. At present the Text Lines is > wrapped if they are longer than the Scroll View, I'd them to truncate. I had > thought I’d seen some properties somewhere for doing this but I can’t find > them in IB. NSPar

Window Resizing

2016-04-17 Thread Andreas Mayer
Hi all, I've got a borderless window which users should be able to partially move above the top of the screen frame. By default, windows stop moving/resizing upwards just below the menu bar. Is there some way to change that? I tried overriding -constrainFrameRect:toScreen: but that doesn't hel

Re: Getting key data out of the keychain

2016-01-01 Thread Andreas Mayer
Hello Marco, > Am 31.12.2015 um 19:23 schrieb Marco S Hyman : > > After much play, head scratching, and code that managed to add a bogus entry > to the keychain that couldn’t be deleted (time machine to the rescue) I came > up with one way to add an entry to the keychain and retrieve the entry:

Getting key data out of the keychain

2015-12-31 Thread Andreas Mayer
I want to encrypt something inside my OS X application: So I thought I'd store the key inside the keychain. After a *lot* of reading and tinkering I finally managed to create a new AES key and get it back out again (as a SecKeyRef). Now I want to use it with CCCrypt() That expects raw key data

Re: Finder-like user interface?

2015-12-30 Thread Andreas Mayer
> Am 27.12.2015 um 23:45 schrieb SevenBits : > > NSCollectionView appears to suffice, and I’ve used it before, but it simply > isn’t performant as it doesn’t reuse cells, NSCollectionView does reuse cells when you use the new API available in 10.11. I find it quite performant. Would be even b

Re: Unknown segue relationship: Prototype

2015-12-14 Thread Andreas Mayer
> Am 14.12.2015 um 10:48 schrieb Rick Mann : > > Googling, this appeared to be a problem with Xcode 6b, but persists in 7.1 > beta versions. I'm not sure if it's still a problem. Is there any way around > it? > > > http://stackoverflow.com/questions/25123365/unknown-segue-relationship-p

Re: Swift - internal class conforming to public protocol

2015-11-25 Thread Andreas Mayer
> Am 25.11.2015 um 08:56 schrieb Quincey Morris > : > >> That's explained in "Using Swift with Cocoa and Objective-C": >> >> "The compiler does not automatically insert the @objc attribute for >> declarations marked with the private access-level modifier.” > > That can’t be the full explanati

Re: Swift - internal class conforming to public protocol

2015-11-25 Thread Andreas Mayer
> Am 25.11.2015 um 08:13 schrieb Marco S Hyman : > > As I read that adopting a public protocol requires the methods that implement > the protocol to be public (but only those methods). That's not how I read it. And it does not to work that way either. This compiles fine: public protocol Publi

Re: Swift - internal class conforming to public protocol

2015-11-24 Thread Andreas Mayer
> if I define an internal class which implements a public protocol, who is able > to call the methods in that protocol? Anyone (it’s a public protocol), only > classes in the same framework or source file (the class is internal)? If you declare it internal it's internal. Adopting a public prot

Re: Swift - internal class conforming to public protocol

2015-11-24 Thread Andreas Mayer
> Am 24.11.2015 um 15:10 schrieb Roland King : > > in this class, centralManagerDidUpdateState() is an internal function however > the compiler is happy that the class satisfies CBCentralManagerDelegate even > though that protocol is public and centralManagerDidUpdateState() is also > public.

Re: Full Screen and weird grey bar

2015-11-15 Thread Andreas Mayer
> Am 13.11.2015 um 14:00 schrieb Andreas Mayer : > > It must be something I'm doing; when I try it in split screen, only my half > will show the grey bar. :-/ > > Any idea what the problem could be? Well, it was my fault and in hindsight I guess it should have been o

Full Screen and weird grey bar

2015-11-13 Thread Andreas Mayer
Hello, I just implemented fullscreen behavior for one of my applications. Moving the mouse to the top of the screen will show the menu bar with the window's title bar below, just like expected. But then the title bar is immediately overlaid by a blank grey bar: http://harmless.de/images/other/

Re: Can an use introspection to determine if its a production app from the App Store?

2014-10-31 Thread Andreas Mayer
> Am 31.10.2014 um 12:40 schrieb Charles Jenkins : > > optionals and named arguments could be deprecated and Swift would then be an > easier and better language to use. Even though it doesn't look like it, I really hope you were joking ... Andreas _

Re: Crash while resizing window

2014-09-28 Thread Andreas Mayer
Am 29.09.2014 um 02:22 schrieb Graham Cox : > A common cause of CG assertions on transforms is a 'Nan' or 'inf' value > ending up in the transform (these may not be discovered until some funciton > is called that uses the transform). I just checked. The only parameter that's changing while rot

Re: Crash while resizing window

2014-09-28 Thread Andreas Mayer
Am 24.09.2014 um 18:57 schrieb Alex Zavatone : > Stupid question, but is "r" ins or your variables? When the assertion is > thrown, what is r? The debugger doesn't know anything about 'r'. > There is a report on this on forums.codeblocks.org. Google for cgregion.c. > There is a suggestion

Crash while resizing window

2014-09-24 Thread Andreas Mayer
Hi there. I get an assertion failure while programmatically resizing a window: Assertion failed: (r->shape != NULL), function assert_check_region, file Regions/CGRegion.c, line 28. Anyone has any idea what might be wrong and what I can do about it? I'll explain in more detail what I am do

Re: GIF frame duration

2014-03-25 Thread Andreas Mayer
CGImageSource and kCGImagePropertyGIFUnclampedDelayTime is what I want. Thanks again. Andreas ___ 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-

Re: GIF frame duration

2014-03-25 Thread Andreas Mayer
Am 25.03.2014 um 18:24 schrieb Greg Parker : > NSImage is not describing the contents of the file. NSImage is describing the > contents of the image as AppKit will present it. That seems reasonable. I guess I'd have to complain about how AppKit will present animated GIFs then. ;) > You may g

Re: GIF frame duration

2014-03-25 Thread Andreas Mayer
Am 25.03.2014 um 17:25 schrieb Kevin Meaney : > If AppKit is using CoreGraphics for reading/writing GIF files then you might > have hit the same issue I did. Hm. Not sure. First, I'm not trying to write GIFs. And I don't see any problems with delay times forced to multiples of 0.5s. 0.27s, for

Re: GIF frame duration

2014-03-25 Thread Andreas Mayer
Am 25.03.2014 um 17:12 schrieb D. Felipe Torres : > That is normal and documented behaviour for GIFs. > > Here are some links about it: Yes, I've already read those pages. I don't care at what speed the browsers play animated GIFs. I'm using a system framework to find out the values stored in

Re: GIF frame duration

2014-03-25 Thread Andreas Mayer
Am 25.03.2014 um 16:58 schrieb Andreas Mayer : > Now what I'm seeing is AppKit reporting a frame delay of 0.1 s for any value > below 0.6 s. That's supposed to read 0.06 s, of course. > Safari and Quicklook seem to use a threshold setting of 0.2 s. An

GIF frame duration

2014-03-25 Thread Andreas Mayer
I'm working with GIF animations. To find out the delay between frames, there's NSBitmap's -valueForProperty: with a value of NSImageCurrentFrameDuration. I.e. [bitmap valueForProperty:NSImageCurrentFrameDuration] should report the delay time for the current frame. Now what I'm seeing is AppKit

Re: CALayer autoresizing difficulties

2013-07-31 Thread Andreas Mayer
Am 31.07.2013 um 07:39 schrieb livinginlosange...@mac.com: > [_playLayer setAutoresizingMask:kCALayerMinXMargin | kCALayerMaxXMargin | > kCALayerMinYMargin | kCALayerMaxYMargin]; > According to this code, the CALayer should be centered, and as the NSView's > bounds change, the CALayer's frame

Re: Leak when "drawing too fast"

2013-07-30 Thread Andreas Mayer
Am 26.07.2013 um 12:41 schrieb Uli Kusterer : >> Since I can use Core Animation, that is obviously the better solution. It >> also makes my application look less power hungry - because now it is the >> WindowServer doing the drawing and eating cpu. ;) > > Not sure I follow your reasoning here.

Re: Leak when "drawing too fast"

2013-07-30 Thread Andreas Mayer
Am 26.07.2013 um 12:41 schrieb Uli Kusterer : > No no no! Don’t do both at the same time! The display link callback is called > exactly when you’re supposed to draw! Hm. So i remove drawRect: and call that in the callback instead? > If you call setNeedsDisplay: there, you’ll be waiting until

Re: Leak when "drawing too fast"

2013-07-25 Thread Andreas Mayer
Am 25.07.2013 um 19:36 schrieb Uli Kusterer : > Have you considered using a display link callback instead of a timer? Yes. Moving to the display link callback was when I noticed the issue in the first place. Calling -setNeedsDisplay: in the display link callback is too fast. It gives smooth a

Re: Leak when "drawing too fast"

2013-07-25 Thread Andreas Mayer
A followup: Am 10.07.2013 um 02:10 schrieb Uli Kusterer : > I don’t think the timers leak. Instead, I think they probably just queue up > on the event loop because their fire interval is greater than that at which > you add new timers by calling setNeedsDisplay. Could that be it? You are right

Leak when "drawing too fast"

2013-07-08 Thread Andreas Mayer
This is on OS X 10.8.4. I'm trying to animate something and draw as smoothly as possible. While trying to utilize a display link callback I noticed a memory leak in my application. After some experimentation I found out that this is not directly linked to the callback but instead also happens w

Re: Access Contacts (Address Book) Question

2012-09-17 Thread Andreas Mayer
Am 17.09.2012 um 09:48 schrieb Manfred Schwind : > Furthermore I am not entirely sure, but I think when this contacts questions > was asked for Pages I saw a description WHY Pages want to access the > contacts. But I could not find any API to set such a description. So my > second question is

Re: Apple Aperture-like look & feel

2012-08-20 Thread Andreas Mayer
Am 17.08.2012 um 21:27 schrieb Nick : > Did Apple developers > paint every dialog element manually? Are there some classes already > available that would allow to "theme up" an app like this? They are probably using lots of subclasses for the various controls. Since Apple wrote the original draw

Re: Adding localization on Xcode 4.4

2012-08-20 Thread Andreas Mayer
Am 17.08.2012 um 18:59 schrieb Kelly Keenan : > You should add new localizations to your project the same way that you add a > new target by selecting the Project, going to the Info tab for the Project > (not the target), and adding a new Localization. Adding a new localization > is really a

Re: PubSub Framework Alternative

2012-08-15 Thread Andreas Mayer
Am 12.08.2012 um 20:53 schrieb Seth Willits : > The problem I'm having right now is if I add a feed, remove that feed, then > add a new feed with the same URL, grabbing the entries throws assertions. Hm. I don't seem to have this problem. I guess I'd need to make sure that the old feed is act

Re: Mountain Lion problems with orderFrontColorPanel:

2012-08-02 Thread Andreas Mayer
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. In a previously compiled application as well as in a newly compiled (on ML) one. I'm not using orderFrontColorPanel: though. It's invoked by

Re: guidelines for icon design, that works well with Apple standard highlighting scheme

2012-08-02 Thread Andreas Mayer
Am 02.08.2012 um 10:58 schrieb Motti Shneor : > I remember reading once, in an apple document, about "the right way" to make > an icon, that will enjoy apple-highlighting, by keeping some rules on the > icon images. Template Images? https://developer.apple.com/library/mac/documentation/Cocoa

Re: Segmented Control Appearance

2012-03-28 Thread Andreas Mayer
Am 29.03.2012 um 02:52 schrieb David Delmonte: > Terminating app due to uncaught exception 'NSInvalidArgumentException', > reason: '-[_UIAppearance setTitleTextAttributes:]: unrecognized selector sent > to instance 0x7c957d20' > > > I would appreciate any help in understanding what I'm doing

Re: Question about UIImage, scaling, and UIGraphicsBeginImageContextWithOptions

2012-03-27 Thread Andreas Mayer
Am 27.03.2012 um 20:13 schrieb David Duncan: > Primarily because people abuse the resolution field, and as such it cannot be > trusted for this particular function. In a perfect world, we would only ever > see 72 (1x) or 144 (2x) in the resolution field, but instead the value tends > to be pra

Re: Question about UIImage, scaling, and UIGraphicsBeginImageContextWithOptions

2012-03-27 Thread Andreas Mayer
Am 27.03.2012 um 19:29 schrieb David Duncan: > Simplest solution is to save the scale along side the image itself That's what I just implemented. But I still think PNG images should retain the scale factor. Why saving that information elsewhere when the format explicitly supports this? Andr

Re: Question about UIImage, scaling, and UIGraphicsBeginImageContextWithOptions

2012-03-27 Thread Andreas Mayer
Am 27.03.2012 um 19:19 schrieb Ray: > Edit: I just checked and they say they do this for compatibility reasons. > It's around the 9'40'' mark, session 134 - Optimize your iPhone App for the > Retina Display (WWDC 2010, I assume you have access)... I'll check this out, thanks. Andreas ___

Re: Question about UIImage, scaling, and UIGraphicsBeginImageContextWithOptions

2012-03-27 Thread Andreas Mayer
Am 27.03.2012 um 17:31 schrieb Ray: >> So I would expect PNG images to retain their scale value when saved and >> loaded. >> >> If this does not work, there seems to be a bug somewhere. >> Ray, did you try to explicitly set the image's scale value before creating >> the PNG representation? >

Re: Question about UIImage, scaling, and UIGraphicsBeginImageContextWithOptions

2012-03-27 Thread Andreas Mayer
Am 27.03.2012 um 13:47 schrieb Marco Tabini: > When you save to a file format that supports metadata, like JPEG, some of the > metadata is stored there, while other is derived from the file name. So, for > example, if you were to save a PNG file to disk with an @2x suffix, upon > loading it wi

Re: Here's a new idea... or maybe a really old one revisited

2012-03-22 Thread Andreas Mayer
Am 23.03.2012 um 01:09 schrieb William Squires: > Marge takes over, and Xcode - having learned Marge's preferences for source > code formatting, reformats the .h and .m files from Bart's project so it's > nice and tidy according to Marge. That's nice. Only I don't want it to reformat the files

Re: advice for creating these controls

2012-03-22 Thread Andreas Mayer
Am 22.03.2012 um 16:22 schrieb Alex Zavatone: > UISegmentedControl *segmentedControl = [[UISegmentedControl alloc] > initWithItems: > > [NSArray arrayWithObjects: >

Re: advice for creating these controls

2012-03-22 Thread Andreas Mayer
Am 22.03.2012 um 15:14 schrieb Rick C.: > Just looking for an opinion what's the best way to create controls like this: > > http://cl.ly/191V3Z1C0m2k2U0V443x > > I initially assumed subclassing NSSegmentedControl, but then I was thinking > maybe I can just subclass NSButton and put them togeth

Re: Changing the appearance of buttons

2011-11-09 Thread Andreas Mayer
Am 08.11.2011 um 22:40 schrieb Tom Jeffries: > Mac. You will have to use your own subclass of NSButton. > If I need to create a new class, is there some example > source code available? http://www.harmless.de/cocoa-code.php#rollover Andreas __

Re: localization nib vs. xib in release build

2011-11-04 Thread Andreas Mayer
Am 04.11.2011 um 00:31 schrieb Alexander Reichstadt: > What's unexpected are two things: > - my app still launches in English > - the English.lproj contains the nib file I localized as e.g. MainMenu.nib, > the German.lproj however still contains a MainMenu.xib Make sure there is no MainMenu.nib

Re: Retain/Release and Properties clarification

2011-10-03 Thread Andreas Mayer
Am 03.10.2011 um 16:14 schrieb John Tsombakos: > audioPlayer = [self getSoundFile:"soundfile.wav"]; > ... > > in getSoundFile routine: > AVAudioPlayer *snd; > ... > snd = [[[AVAudioPlayer alloc] initWithContentsOfURL:url error:&error] The question was already answered, but I wanted to point out

Re: Questions about -orderFrontTablePanel:

2011-09-26 Thread Andreas Mayer
Am 22.09.2011 um 11:39 schrieb Ulf Dunkel: > The documentation only says: "Brings forward a panel allowing the user to > manipulate text tables in the text view.", but it also immediately inserts a > default table in the currently selected text view, if any. A search brings up the Text Layout

Re: Lion breaks the ability to "click-through" transparent window areas when the window is resizable.

2011-09-09 Thread Andreas Mayer
Am 10.09.2011 um 06:21 schrieb Ken Thomases: > So, it is apparently intentional that setIgnoresMouseEvents:NO will make a > transparent window non-transparent to mouse events. I recognize that this > seems to be a change in Lion vs. Snow Leopard, but the Lion behavior seems to > restore intend

Re: Lion breaks the ability to "click-through" transparent window areas when the window is resizable.

2011-09-09 Thread Andreas Mayer
Follow-Up: While doing some additional testing before writing a bug report, I noticed that Apple's "RoundTransparentWindow" sample code did work as expected! Turns out that setIgnoresMouseEvents:NO will do the actual breaking. Thus: Bug ID# 10104405 Summary: Sending setIgnoresMouseEvents:NO

Re: Lion breaks the ability to "click-through" transparent window areas when the window is resizable.

2011-09-09 Thread Andreas Mayer
Am 09.09.2011 um 11:52 schrieb Bill Cheeseman: > My clickthrough application still works on 10.7.1. Making a window completely ignore mouse clicks still works. But try this: Make Applidude active and click in one of the corners, outside the gray area. You are still able to move the window. T

Re: Lion breaks the ability to "click-through" transparent window areas when the window is resizable.

2011-09-08 Thread Andreas Mayer
Am 05.08.2011 um 22:01 schrieb R R Hornback: I just found this message while searching for a solution to the same problem. > With OS X Lion, even when the window background is transparent, the window > still receives the mouse events. > > I have determined that this is related to whether or no

[ANN] AMRollOverButton for Lion

2011-09-08 Thread Andreas Mayer
Hi there! AMRollOverButton is a custom NSButton subclass with lots of configuration options and built in roll over effect. Since Xcode 4.x does not support IB plugins, I redesigned the class(es) so that you can easily save your button design and load it at runtime. For more information, see th

Re: Introductions to OOP? [was: Re: Large over 100K pixel high ruler scroll view]

2011-09-02 Thread Andreas Mayer
Am 02.09.2011 um 19:04 schrieb Jens Alfke: > I’d like to be able to point people to a good introduction, either online or > in a book, but unfortunately I don’t know of any. Can anyone recommend > something? How about Apple's documentation? Object-Oriented Programming with Objective-C http://

NSSplitView and autosave

2011-08-30 Thread Andreas Mayer
NSSplitView's autosave is not working in an existing project of mine. I created a small test project and there autosave works as intended. When I create the same test window in a nib of my existing project, it doesn't. The subview frames' data is correctly saved in the prefs file. But when the a

Re: Transparency of textured controls

2011-08-26 Thread Andreas Mayer
Am 23.08.2011 um 12:58 schrieb Leo: >>> Actually, I finally realized what the real issue is: Apple for some reason >>> didn't "refresh" NSSegmentedControl Rounded style to match the new >>> appearance of NSTabView controls on Lion. >> I guess that's intentional. The 'Capsule' style does look li

Re: Transparency of textured controls

2011-08-21 Thread Andreas Mayer
Am 19.08.2011 um 21:36 schrieb Leo: > Actually, I finally realized what the real issue is: Apple for some reason > didn't "refresh" NSSegmentedControl Rounded style to match the new appearance > of NSTabView controls on Lion. I guess that's intentional. The 'Capsule' style does look like the N

Re: Transparency of textured controls

2011-08-19 Thread Andreas Mayer
Am 13.08.2011 um 18:41 schrieb Leo: > For some reason, the textured controls are now transparent (e.g., Textured > Rounded and Textured Square of NSSegmentedControl etc.) From the AppKit Release Notes: -- Button Appearance Changes (New since early 2011 seed) As part of an ongoing refr

Re: Xcode 3.2.6 on Lion ?

2011-07-23 Thread Andreas Mayer
Am 23.07.2011 um 03:39 schrieb Rick C.: > I have just installed the App Store version of Xcode 4.1 and I noticed I had > no options when installing about choosing directory or anything. Locate the 'Xcode Install' package. Show package contents. Inside the Resources folder you will find Xcode.m

Re: Getting CGColor components

2011-06-12 Thread Andreas Mayer
Am 12.06.2011 um 01:12 schrieb Development: > According to all the examples I have found the following code should give me > the RGB components of any UIColor.CGColor I pass to it CGColorGetComponents() will only give you RGB components if the color actually *is* a RGB color. You should c

Re: Stack of NSWindow sheets

2011-04-28 Thread Andreas Mayer
Am 28.04.2011 um 04:31 schrieb Lee Ann Rucker: > It would be nice if there was some sort of built-in combining stack, > especially for the info-only dialogs, the way starting multiple file copies > in the Finder gives you one window with multiple sections instead of multiple > windows. Why no

Re: Display a "Red frame" on the screen

2011-04-08 Thread Andreas Mayer
Am 08.04.2011 um 19:24 schrieb eveningnick eveningnick: > I was thinking about the window. But then it has to be something with > a big hole inside. This hole ought to be transparent for mouse clicks > (so if there's something below my "window", that 'something' has to be > clickable and focused,

ANN: HelpViewer code for iOS

2011-04-06 Thread Andreas Mayer
Hi there. I just posted my first code snippet for iOS. It's a scroll view, that displays HTML pages from the app bundle. As the name implies, this was meant to provide a means of showing help pages. http://www.harmless.de/cocoa-code.php#helpviewer It's free, so have fun. :) Andreas__

Re: Are the progress spinner images publically available?

2011-04-01 Thread Andreas Mayer
Am 01.04.2011 um 18:38 schrieb James Bucanek: > So I'm going with plan B, which is create a custom CALayer that draws a > single spinner "wheel" image and then rotate it using a key-frame animation. It's old, but you want to take a look regardless: http://www.harmless.de/cocoa-code.php#progre

Re: Default keyword selector type

2010-11-14 Thread Andreas Mayer
Am 13.11.2010 um 14:50 schrieb Michael Hall: > Your links busted, The link is fine. Andreas ___ 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

Re: Is NSStreamEvent a bitfield or not?

2010-11-02 Thread Andreas Mayer
Am 01.11.2010 um 23:01 schrieb Sean McBride: > I'm just playing with NSStream for the first time, Me too. :) > If these things can be bitwised ORed, why is all the code out there > 'switch'ing? I'm confused. Good question. My test application seems to work fine with switch statements. Maybe

Re: Transparant button click

2010-08-28 Thread Andreas Mayer
Am 28.08.2010 um 10:30 schrieb Graham Cox: > This NSImage method is the only one built-in that offers this kind of > hit-test functionality (10.6 only). You could build your button around it. > But for earlier OS versions you have to do the hit-test yourself. This > involves testing the point

Re: Using an NSToolbar in a sheet

2010-08-01 Thread Andreas Mayer
Am 02.08.2010 um 00:20 Uhr schrieb Dave Fernandes: Is this just a bug, or is it completely unsupported? Can anyone give me a workaround for this? I don't think toolbars on sheets are supported. As you said yourself, the user might get confused if there a two toolbars in a single window.

Re: draw NSAttributedstring with transparency

2010-07-23 Thread Andreas Mayer
Am 23.07.2010 um 12:53 Uhr schrieb Bernard Knaepen: I am currently using the drawAtPoint method but I would like to specify a global opacity (transparency) to draw the string. Is there a way to do this or should I scan the whole string and make the changes to each character color individua

Re: Download images and modify bundle?

2010-07-02 Thread Andreas Mayer
Am 02.07.2010 um 10:01 Uhr schrieb sebi: When I download an image and want to keep it for further reference, I assume I have to store it in the documents directory and not in the app bundle, because otherwise I would invalidate the signature and the app wont run anymore. Is this correct?

Re: Case sensitive fileName

2010-03-17 Thread Andreas Mayer
Am 17.03.2010 um 17:46 Uhr schrieb Kevin Wojniak: NSLog(@"displayNameAtPath: %@", [[NSFileManager defaultManager] displayNameAtPath:path]); Note that -displayNameAtPath: will give you the localized name if one should exist. (For example you'll get 'Programme' for the 'Applications' folde

Re: Best approach for a bunch of new UI controls

2010-03-15 Thread Andreas Mayer
Am 14.03.2010 um 17:51 Uhr schrieb Igor Mozolevsky: Picture a warehouse [...] It is not clear to me why you think that you need graphical representations for your objects. Wouldn't simple lists of text work at least as good? But if I really wanted to have those controls, I'd probably buil

Re: Best approach for a bunch of new UI controls

2010-03-14 Thread Andreas Mayer
Am 14.03.2010 um 04:14 Uhr schrieb Igor Mozolevsky: I've got a few *nix libs to flesh out with some Cocoa UI goodness and would welcome suggestions for a good way to do a bunch of controls: Instead of describing the proposed look of your controls, you should tell us what their *purpose* is

Re: NSWindow - makeKeyAndOrderFront problem

2010-03-01 Thread Andreas Mayer
Am 02.03.2010 um 00:27 Uhr schrieb Matthew Lindfield Seager: If I've told a video player to start playing files on open I would generally expect the player to bring itself to the front after specifically dropping a media file onto it. Well, yes. But that's not what we are talking about. We ar

Re: NSWindow - makeKeyAndOrderFront problem

2010-02-28 Thread Andreas Mayer
Am 28.02.2010 um 21:20 Uhr schrieb Alexander Bokovikov: What do you have in mind? Is it incorrect to create such behavior? I think it is. My app is a player. Dropping file into it I'd expect its activation. Why? Without activation all visual controls are not reachable unless you'll cli

Re: NSWindow - makeKeyAndOrderFront problem

2010-02-28 Thread Andreas Mayer
Am 28.02.2010 um 15:46 Uhr schrieb Alexander Bokovikov: I drop a file into my app's window. And the question is how to "switch the global system focus" to my app? Hm. You don't? Just dragging should not switch the focus to another application. Of course you *can* steal the focus using NSAp

Re: Removing quit button from dock menu

2010-02-23 Thread Andreas Mayer
Am 23.02.2010 um 16:13 Uhr schrieb Alex Kac: I think its better to let the user’s themselves admonish the developer. I think it's better - for developer and users - to tell new developers up front if something they are about to do is wrong. On the other hand, I realize there are (too man

Re: Deprecated APIs

2010-02-23 Thread Andreas Mayer
Am 23.02.2010 um 14:41 Uhr schrieb charisse napeÿf1as: But is it still safe to use depracated APIs? Did you read the document I pointed you to? I quote: "Note: Deprecation does not mean the immediate deletion of an interface from a framework or library. It is simply a way to flag in

Re: Deprecated APIs

2010-02-23 Thread Andreas Mayer
Am 23.02.2010 um 11:09 Uhr schrieb charisse napeÿf1as: I am not sure if this problem has already been submitted but how do I define two APIs, one that is supported from Leopard down and another that is only supported in Snow Leopard if I only have one binary for all OSes? See http://d

Re: NSTextField: Change Text Color at Insertion Point?

2010-02-08 Thread Andreas Mayer
Am 08.02.2010 um 17:22 Uhr schrieb Alexander Heinz: My question is this: let's say my user has already typed some text in black (or whatever color) and now wants to change the "active color" of the text at the insertion point, such that any text he or she types appears in the new color.

Re: Centering a window on the *current* screen, not the *main* screen

2010-01-26 Thread Andreas Mayer
Am 26.01.2010 um 11:34 Uhr schrieb Graham Cox: Traditionally, this has been at a position leaving one third of the space above and two thirds below, though I'm not sure if that's still currently the exact placing. Yup, that's what the Human Interface Guidelines say: http://developer.app

Re: How to hide dock item and application menu?

2010-01-26 Thread Andreas Mayer
Am 25.01.2010 um 23:24 Uhr schrieb Jens Alfke: This is not useful to me as my req is to provide the option to user to hide/ unhide dock and menu item. You can't change that while your app is running. You have to modify your own Info.plist and then relaunch. Well, you can transform a bac

Re: Imitating Behavior of a Sheet Window

2010-01-24 Thread Andreas Mayer
Am 24.01.2010 um 14:04 Uhr schrieb Oleg Krupnov: BTW, to my surprise, it appears that the standard sheets are NOT child windows. That's because sheets are older than child windows. Sheets are available since 10.0, child windows since 10.2. Andreas ___

Re: Knowing mouse pressed time?

2009-12-31 Thread Andreas Mayer
Am 31.12.2009 um 00:09 Uhr schrieb Ken Thomases: There is no mouse-up event. He wants to present a menu if there's been X time since the mouse-down even when _no other events have arrived since then_. There's no getting around using a timer of some sort. That's a case for -performSelec

Re: releasing an object

2009-10-10 Thread Andreas Mayer
Am 10.10.2009 um 17:43 Uhr schrieb Nick Rogers: selectedPTVolume = [[Volume alloc] initWithDictionary:data]; [selectedPTVolume retain]; Read the memory management rules again. By calling alloc the retain count of the created object is one. There is no need to send it an additional retain

Re: Updating application info plist

2009-10-10 Thread Andreas Mayer
Am 10.10.2009 um 01:05 Uhr schrieb Rob Keniger: To do this, surely they must be rewriting the LSUIElement key in the app's own Info.plist while the app is running, right? Or is there another way to do this? I did this once, because there was no other way to switch between UIElement and n

Re: Two digit dates with NSDateFormatter

2009-10-08 Thread Andreas Mayer
Am 08.10.2009 um 15:07 Uhr schrieb Matthew Lindfield Seager: Am I missing something obvious? Is this a bug? No idea. This works for me: - (IBAction)convertTextToDate:(id)sender { NSDateFormatter *formatter = [[NSDateFormatter alloc] init]; [formatter setLocale:[NSLocale curre

Re: pulldown in custom NSCell

2009-08-28 Thread Andreas Mayer
Am 21.08.2009 um 12:48 Uhr schrieb Georg Seifert: What I found is that the Cell, in its drawwithFrame method, adds subview to the TableView and this subview handles all the drawing and handling. Is this appropriate or is there a better solution. In case you don't need a fully fledged Table

Re: NSTableView -setDataCell confusion

2009-06-30 Thread Andreas Mayer
Am 30.06.2009 um 01:09 Uhr schrieb Raleigh Ledet: a) Give up on the animation. Then you can use the same cell for the entire column. Each row will return the correct value that the progress indicator should draw. Be sure to invalidate the row/column as the value changes to redraw the cell

Re: NSTableView -setDataCell confusion

2009-06-30 Thread Andreas Mayer
Am 27.06.2009 um 22:18 Uhr schrieb Chase Meadors: I'm using AMIndeterminateProgressIndicatorCell (at least the drawing code) to imitate a progress indicator in the table view. To get it to use the custom cell, I've been calling [myTableColumn setDataCell:[[MyCustomClass alloc] init]]; How

Re: UITableView "port" to Mac?

2009-04-02 Thread Andreas Mayer
Am 02.04.2009 um 08:46 Uhr schrieb Seth Pellegrino: NSCollectionView seems a little like what I'd want, but the API on UITableView is much cleaner and easier to use (and I'm only really interested in a single column rather than a grid). I've also looked at stepwise's method for using views

Re: Method Sequence on Application Loads

2009-03-09 Thread Andreas Mayer
Am 09.03.2009 um 06:49 Uhr schrieb Kenneth Ramey: What method do I need to hook for this? You typically start processing in your application delegate's - applicationDidFinishLaunching: method. Andreas ___ Cocoa-dev mailing list (Cocoa-dev@lists

Re: where to store this kind of data

2009-03-04 Thread Andreas Mayer
Am 03.03.2009 um 23:17 Uhr schrieb Benjamin Dobson: Store it in ~/Library/Application Support/YourAppName/ And make sure not to hard code the path. See the NSSearchPathForDirectoriesInDomains() function and NSString's - stringByAppendingPathComponent:. Andreas ___

Re: Moving oneself to /Applications (or ~/Applications)

2009-02-21 Thread Andreas Mayer
Am 21.02.2009 um 22:23 Uhr schrieb Alex Kac: Of course if you go with the OP's idea - then its almost like an installer pkg, but in a D&D install method. I still don't like it. And if every application did that, each one would do it slightly differently which is *not* a Mac like experience

Re: Moving oneself to /Applications (or ~/Applications)

2009-02-21 Thread Andreas Mayer
Am 21.02.2009 um 17:33 Uhr schrieb Alex Kac: If an app offered to help - just once - I don't see that as an intrusion, but a more Mac-like feature. Its not intrusive. I disagree. It's not an applications job to tell me where to put it. If, for some reason, it *must* be put in /Applications,

Re: Need recommendations for best way to build a custom view

2009-02-19 Thread Andreas Mayer
Am 19.02.2009 um 22:17 Uhr schrieb Ken Tozier: I tried writing my own table class from scratch that allows for not just cells but entire views to act in the role of cells in traditional NSTables. This worked to an extent, but one requirement, that projects can each have a different number

  1   2   >