customizing cursor nssearchfield

2013-02-26 Thread Rick C.
Hi, This seems it should be easy enough, but could anyone give me pointers on how to do this? Seems I should be subclassing NSTextView and using drawInsertionPointInRect:color:turnedOn: but how would I do this? I don't really want to do major customization maybe just a touch thicker or a touc

Re: archiving report

2013-02-26 Thread Ben Kennedy
On 26 Feb 2013, at 4:20 pm, Graham Cox wrote: > I would hesitate to suggest it, but if you are routinely storing NSNull (or > @"$null") in arrays, it might point to a flaw in your own design. As someone pointed out earlier, this bug makes NSKeyedArchiver unusable for any data model that contain

Re: Issue of NSStatusBar

2013-02-26 Thread anni saini
I got the solution, just need to check for NSStatusBarWindow className as follows: if([awindow isVisible] && ![aWindow aboutWin] && ![aWindow loginWindow] &&  ![[aWindow className] isEqual:@"NSStatusBarWindow"]) Thanks. From: Kyle Sluder To: Anil Saini Cc:

Re: archiving report

2013-02-26 Thread Gerriet M. Denkmann
On 27 Feb 2013, at 02:17, Kyle Sluder wrote: > On Tue, Feb 26, 2013, at 11:06 AM, Gerriet M. Denkmann wrote: >> You can create and archive (with NSKeyedArchiver) illegal strings. >> unichar u = kUCHighSurrogateRangeStart; >> NSString *s = [ NSString stringWithCharacters: &u length: 1]; > > You

Re: archiving report

2013-02-26 Thread Gerriet M. Denkmann
On 27 Feb 2013, at 07:20, Graham Cox wrote: > > On 27/02/2013, at 5:56 AM, Gerriet M. Denkmann wrote: > >> I have filed the $null bug. Got back as duplicate with a very low id-number. >> Meaning: this bug is known to Apple since several years. Still no fix. > > > Frustrating for sure, but

How to move UIImageView in order to always keep image's head forward?

2013-02-26 Thread Jingwei Xu
I have posted this question in StackOverflow, I am hurry to the solution, so I post question here again. Assume I have an UIImageView in ViewController's view, and this UIImageView contains an image. For example, that is a car image, and car's head directs to the north in default. Then, I want to

Re: NSButton in NSToolbarItem does not use "small size"

2013-02-26 Thread Michael Starke
On 27.02.2013, at 01:06, Graham Cox wrote: > > On 27/02/2013, at 2:28 AM, Michael Starke > wrote: > >> As I'm no experienced developer I'm somewhat lost how to address the >> situation. >> Is there a way to compare an NSToolbarItem with a NSButton created in IB to >> a one created programm

Re: NSScrollView and autolayout

2013-02-26 Thread Chuck Soper
Excellent, informative response. Thanks. Do you know if your documentView returns YES for hasAmbiguousLayout? My user interface appears to work fine. The only problem is that [scrollView.documentView hasAmbiguousLayout] returns YES. Given that my UI appears to work as expected, can I just ignore

Re: archiving report

2013-02-26 Thread Graham Cox
On 27/02/2013, at 5:56 AM, Gerriet M. Denkmann wrote: > I have filed the $null bug. Got back as duplicate with a very low id-number. > Meaning: this bug is known to Apple since several years. Still no fix. Frustrating for sure, but in this particular case, I wonder whether there even is a fi

Re: archiving report

2013-02-26 Thread gweston
 Alex Zavatone writes: If we spend the time to enter bugs that don't get fixed, it ends up being a waste of our time. We have no control over if Apple choses to fix our bugs or not. Do we waste time working around a bug, then waste time reporting it? I've got capitalization on an NSString fa

Re: NSButton in NSToolbarItem does not use "small size"

2013-02-26 Thread Graham Cox
On 27/02/2013, at 2:28 AM, Michael Starke wrote: > As I'm no experienced developer I'm somewhat lost how to address the > situation. > Is there a way to compare an NSToolbarItem with a NSButton created in IB to a > one created programmatically? Well, I have to ask the obvious question: why

Re: NSScrollView and autolayout

2013-02-26 Thread Kyle Sluder
On Tue, Feb 26, 2013, at 02:32 PM, Chuck Soper wrote: > Does NSScrollView own its documentView, and controls the value that > documentView returns for setTranslatesAutoresizingMaskIntoConstraints:? It's actually NSClipView that controls this, but yes. > > I've created an NSView subclass that I'm

Re: NSTrackingInVisibleRect not working when view is resized

2013-02-26 Thread Steve Mills
On Feb 26, 2013, at 16:12:02, Kyle Sluder wrote: > So when are you installing the tracking area? -updateTrackingAreas seems > like the appropriate time for the view to install its own tracking area. In my initWithFrame method, just like one of Apple's examples: http://developer.apple.com/librar

Re: archiving report

2013-02-26 Thread Alex Zavatone
Nice tip and it's great to hear of your issues getting fixed. I feel what is important about this is that we keep an open copy of the issues we find (I know this was mentioned here before) and use open radar so that we can profit from each other's experience/grief when we run into bugs and repo

NSScrollView and autolayout

2013-02-26 Thread Chuck Soper
Does NSScrollView own its documentView, and controls the value that documentView returns for setTranslatesAutoresizingMaskIntoConstraints:? I've created an NSView subclass that I'm using for a documentView within an NSScrollView. I'm calling [self setTranslatesAutoresizingMaskIntoConstraints:NO] d

Re: NSTrackingInVisibleRect not working when view is resized

2013-02-26 Thread Kyle Sluder
On Tue, Feb 26, 2013, at 01:45 PM, Steve Mills wrote: > I don't *have* an updateTrackingAreas method because I'm using > NSTrackingInVisibleRect, which is documented to always use the > visibleRect of the view. So when are you installing the tracking area? -updateTrackingAreas seems like the appro

Re: NSTrackingInVisibleRect not working when view is resized

2013-02-26 Thread Steve Mills
On Feb 26, 2013, at 15:32:48, Kyle Sluder wrote: > I'm not certain of the answer to this question, but what does your > -updateTrackingAreas look like? If you follow Apple's erroneous example > and recreate your tracking are every time this method is called, you > *will* drop -mouseExited: event

Re: archiving report

2013-02-26 Thread William Sumner
On Feb 26, 2013, at 12:06 PM, "Gerriet M. Denkmann" wrote: > > When Apple helps me by fixing bugs, I will helping Apple by reporting them. > Apple knows since years that NSKeyedUnarchiver is broken and does nothing. Regardless of what they ultimately fix, filing bug reports is the best way to

Re: NSTrackingInVisibleRect not working when view is resized

2013-02-26 Thread Kyle Sluder
On Tue, Feb 26, 2013, at 01:32 PM, Kyle Sluder wrote: > I will repeat my request from your last NSTrackingArea query: > (This isn't meant to be snark, BTW. It just makes debugging a lot easier.) --Kyle Sluder ___ Cocoa-dev mailing list (Cocoa-dev@list

Re: NSTrackingInVisibleRect not working when view is resized

2013-02-26 Thread Kyle Sluder
I will repeat my request from your last NSTrackingArea query: I'm not certain of the answer to this question, but what does your -updateTrackingAreas look like? If you follow Apple's erroneous example and recreate your tracking are every time this method is called, you *will* drop -mouseExited: ev

Re: archiving report

2013-02-26 Thread Alex Kac
Sometimes I feel the same way; that said I've had over a dozen reported bugs fixed by Apple on iOS over the last 4-5 years. On OS X, very few. So I know they do care about it, but I also find sometimes that I get a better result if I report the bug via RADAR and THEN also post about it on the Dev F

Re: archiving report

2013-02-26 Thread Alex Zavatone
If we spend the time to enter bugs that don't get fixed, it ends up being a waste of our time. We have no control over if Apple choses to fix our bugs or not. Do we waste time working around a bug, then waste time reporting it? I've got capitalization on an NSString failing at the moment w

NSTrackingInVisibleRect not working when view is resized

2013-02-26 Thread Steve Mills
I have an NSControl subclass that has installed an NSTrackingAread for (NSTrackingInVisibleRect | NSTrackingMouseMoved | NSTrackingMouseEnteredAndExited | NSTrackingCursorUpdate | NSTrackingActiveInKeyWindow). This control can resize itself while tracking the mouse in its mouseDown method. If,

Re: archiving report

2013-02-26 Thread Kyle Sluder
On Tue, Feb 26, 2013, at 11:06 AM, Gerriet M. Denkmann wrote: > You can create and archive (with NSKeyedArchiver) illegal strings. > unichar u = kUCHighSurrogateRangeStart; > NSString *s = [ NSString stringWithCharacters: &u length: 1]; You might be able to do it now, but you certainly can't rely

Re: archiving report

2013-02-26 Thread Gerriet M. Denkmann
On 27 Feb 2013, at 01:04, Kyle Sluder wrote: > On Feb 26, 2013, at 9:47 AM, "Gerriet M. Denkmann" > wrote: > >> My investigations regarding archiving on OS X: >> >> 1. NSArchiver stores all strings in Utf-8. >> This is inefficient for strings which contain mainly non-european >> character

Re: archiving report

2013-02-26 Thread Gerriet M. Denkmann
On 27 Feb 2013, at 01:00, Gwynne Raskind wrote: > On Feb 26, 2013, at 12:47 PM, Gerriet M. Denkmann > wrote: >> My investigations regarding archiving on OS X: >> >> 1. NSArchiver stores all strings in Utf-8. >> This is inefficient for strings which contain mainly non-european >> charact

[Solved] NSButton in NSToolbarItem does not use "small size"

2013-02-26 Thread Michael Starke
Well then. After experimenting with different cells and buttons, I came up with the following findings: If one uses a NSPopupButton in a NSToolBarItem the internal call (_handleSendControlSize:toCellOfView:) dispatches a setControlSize to the cell of the NSPopupButton. On the other hand, if one

Re: archiving report

2013-02-26 Thread Sean McBride
On Wed, 27 Feb 2013 00:47:35 +0700, Gerriet M. Denkmann said: >2. NSKeyedArchiver seems to be ok. One problem I know of with NSKeyedArchiver: It has methods like encodeInt32:forKey: but no unsigned variants . (Good thing I filed the bug, I'm sure Apple will get right on it, eh Gwynne? :) So

Re: archiving report

2013-02-26 Thread Kyle Sluder
On Feb 26, 2013, at 10:04 AM, Kyle Sluder wrote: > On Feb 26, 2013, at 9:47 AM, "Gerriet M. Denkmann" > wrote: > >> But it does create unnecessary data. E.g. in the case of an array >> containing identical objects, like: >> NSArray *a = @[ @"a", @"a", , @"a"]; >> With 1 000 000 item

Re: archiving report

2013-02-26 Thread Kyle Sluder
On Feb 26, 2013, at 9:47 AM, "Gerriet M. Denkmann" wrote: > My investigations regarding archiving on OS X: > > 1. NSArchiver stores all strings in Utf-8. >This is inefficient for strings which contain mainly non-european > characters (e.g. Chinese or Thai) as one character will use 3 bytes

Re: archiving report

2013-02-26 Thread Gwynne Raskind
On Feb 26, 2013, at 12:47 PM, Gerriet M. Denkmann wrote: > My investigations regarding archiving on OS X: > > 1. NSArchiver stores all strings in Utf-8. > This is inefficient for strings which contain mainly non-european > characters (e.g. Chinese or Thai) as one character will use 3 bytes

archiving report

2013-02-26 Thread Gerriet M. Denkmann
My investigations regarding archiving on OS X: 1. NSArchiver stores all strings in Utf-8. This is inefficient for strings which contain mainly non-european characters (e.g. Chinese or Thai) as one character will use 3 bytes (Utf-16 would use only 2). Corollary: It cannot store st

Re: Issue of NSStatusBar

2013-02-26 Thread Kyle Sluder
On Feb 26, 2013, at 9:16 AM, Anil Saini wrote: > Hi, > > I was facing issue of NSStatusBar getting closed by the [window close]. > > In our application, we have used [NSStatusBar SystemStatusBar] to display > menu. In a particular scenario, I need to close all the windows of my > application

Issue of NSStatusBar

2013-02-26 Thread Anil Saini
Hi, I was facing issue of NSStatusBar getting closed by the [window close]. In our application, we have used [NSStatusBar SystemStatusBar] to display menu. In a particular scenario, I need to close all the windows of my application except About and Login, so I wrote following function: - (void)

Re: NSButton in NSToolbarItem does not use "small size"

2013-02-26 Thread Keary Suska
On Feb 26, 2013, at 8:28 AM, Michael Starke wrote: > Sorry for digging this up again. > > As I'm no experienced developer I'm somewhat lost how to address the > situation. > Is there a way to compare an NSToolbarItem with a NSButton created in IB to a > one created programmatically? > > If so,

Re: Programmatic Core Data Migration

2013-02-26 Thread tshanno
On Feb 25, 2013, at 6:28 PM, Michael Swan wrote: > Tom, > I've never built a data model programmatically but I'm guessing it works like > building a nib in code where it happens on each launch. This means that when > you move to version 2 of your data model you will have to build model 1 and

Re: NSButton in NSToolbarItem does not use "small size"

2013-02-26 Thread Michael Starke
Sorry for digging this up again. As I'm no experienced developer I'm somewhat lost how to address the situation. Is there a way to compare an NSToolbarItem with a NSButton created in IB to a one created programmatically? If so, this might shine some light as to what is really going on. While try

Identifying monitor configurations

2013-02-26 Thread Rick Mann
I'd like for my app to be able to restore the location of its windows based on the display configuration. For example, if you have a MacBook Pro and a Cinema Display to its left, and you put a window on one of those displays, I want to remember that window's geometry for that config. If you the