Re: Localization and Regions

2011-11-07 Thread Gerriet M. Denkmann
On 8 Nov 2011, at 13:45, Gary L. Wade wrote: > That's how it's always worked. I just did show the font panel in TextEdit and looked at Arial: 10.5 shows Bold, Italic. etc. (English) 10.6 and 10.7 show Fett, Kursiv etc. (German). So this NSFont behaviour (which I guess is used in the font pane

Re: Localization and Regions

2011-11-07 Thread Gerriet M. Denkmann
On 8 Nov 2011, at 13:45, Gary L. Wade wrote: > That's how it's always worked. One can argue that Apple should ask the user, > when moving a more-specific locale (en-GB) away from a less-specific locale > (en), if the less-specific locale should "stick around" and be moved up into > the intuiti

Re: Localization and Regions

2011-11-07 Thread Gary L. Wade
That's how it's always worked. One can argue that Apple should ask the user, when moving a more-specific locale (en-GB) away from a less-specific locale (en), if the less-specific locale should "stick around" and be moved up into the intuitive order following the more-specific locale. Naturally,

Localization and Regions

2011-11-07 Thread Gerriet M. Denkmann
Assuming that I have the following language preferences (System Preferences → Language and Text → Language): British English, Deutsch Français English what is a program supposed to do if it has: en.lproj de.lproj but NOT en_GB.lproj ? I guess (but did not find an authoritative answer) that it s

Re: Any success with SMLoginItemSetEnabled?

2011-11-07 Thread Mark Munz
While you should file a bug, expect it to be duped and don't hold your breath on when they'll fix it. To date, Apple has not fixed *any* of the (fairly well) known sandbox issues, including this one. Verify that it is a sandbox issue and not a registration issue. If it is the latter, you're kind st

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-07 Thread Greg Parker
On Nov 7, 2011, at 5:11 PM, Don Quixote de la Mancha wrote: > This is for the iOS. Do iOS devices have hardware-acellerated video? > My profiling with Instruments suggests that they don't because of the > amount of time that the iOS spends doing block fills on behalf of my > App. They do. However

Re: Private Method?

2011-11-07 Thread Graham Cox
On 08/11/2011, at 12:16 PM, Don Quixote de la Mancha wrote: > no method would be private. True, but Public/Private is really more of a way to organise your code for its use by other humans. The compiler can enforce it to a degree, but the real reason for having private methods is to hide them

Re: Private Method?

2011-11-07 Thread Fritz Anderson
On 7 Nov 2011, at 7:16 PM, Don Quixote de la Mancha wrote: > I don't really know, but it seems to me that there just *has* to be a > way to enumerate all of the elements in those selector tables. If > there is, then no method would be private. It took me a minute, but now I really know: class_co

Re: Private Method?

2011-11-07 Thread David Duncan
On Nov 7, 2011, at 5:16 PM, Don Quixote de la Mancha wrote: > I don't really know, but it seems to me that there just *has* to be a > way to enumerate all of the elements in those selector tables. If > there is, then no method would be private. There is, and there is no true definition of a pri

Re: Private Method?

2011-11-07 Thread Don Quixote de la Mancha
While the method isn't publicly visible to other compilation units, there will be an entry for its selector in the table of selectors that is possessed by each class. A simple-minded way to do Objective-C method dispatch would be to have an an array, list or tree of structures, with one struct el

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-07 Thread Don Quixote de la Mancha
On Mon, Nov 7, 2011 at 3:59 PM, Jens Alfke wrote: > On Nov 4, 2011, at 6:40 PM, Don Quixote de la Mancha wrote: > I store the grid as an array-of-arrays rather than a two dimensional > array.  That is, I have an array of pointers which has the same number > of elements as there are rows. > > What’

Re: Private Method?

2011-11-07 Thread Jens Alfke
On Nov 6, 2011, at 2:10 PM, Bryan Harrison wrote: > I'm reviewing some sample code and am looking at a class with a method > declared in @implementation which isn't mentioned in any @interface. > > Is this a private method, something else entirely, or merely sloppy coding? That’s considered

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-07 Thread Jens Alfke
On Nov 4, 2011, at 6:40 PM, Don Quixote de la Mancha wrote: > I store the grid as an array-of-arrays rather than a two dimensional > array. That is, I have an array of pointers which has the same number > of elements as there are rows. Each row is array of unsigned longs, > with the number of e

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-07 Thread Wade Tregaskis
> Also I'm pretty sure the iOS memory allocator is multithreaded, and > that Apple's code would be good about checking for runtime failures. > If it does not, then that is a bug in the iOS. That's my opinion too, but there are plenty of people within Apple who are vehemently against it. So while

Re: Printing multiple images each on a separate page using single NSPrintOperation

2011-11-07 Thread Martin Wierschin
> Now when I have multiple pages to print, I would like to print all of them > using a single NSPrintOperation. So basically, I would like to insert > NSImage/NSImageView of each page as a separate page into a single NSView and > use this NSView to print finally using NSPrintOperation. That app

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-07 Thread Don Quixote de la Mancha
On Mon, Nov 7, 2011 at 7:59 AM, Greg Parker wrote: > This is not a safe pattern in a multi-threaded application. You may be > checking for failed allocations and responding correctly, but to a close > approximation no code anywhere else does so. For example, objc_msgSend > sometimes needs to al

Re: Private Method?

2011-11-07 Thread Graham Cox
Useful to know, thanks. (Seems a certain amount of updated documentation is passing me by. I like to think I'm pretty diligent about keeping up with stuff as it's released, but I hadn't spotted this one. I'm not sure if it's something I'm doing wrong, or if there could be a better way to flag u

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-07 Thread Wade Tregaskis
>> If calloc() ever returns NULL while attempting to allocate the new >> grid, I back out all of the successful allocations by passing each >> array pointer to free(). Then I display an alert to the user to >> advise them that there is not enough memory for their desired grid >> size, and suggest

Re: Custom About Box with background shape

2011-11-07 Thread Lee Ann Rucker
Sounds like your window is initially visible before it's had its alpha set; try turning off "visible at launch" in the nib. On Nov 7, 2011, at 12:04 PM, Chris Paveglio wrote: > I have a custom about box, and it's sort of like Adobe apps, where it's not a > traditional window but a graphic/image

Custom About Box with background shape

2011-11-07 Thread Chris Paveglio
I have a custom about box, and it's sort of like Adobe apps, where it's not a traditional window but a graphic/image I made that is a shape like a hexagon with a drop shadow. It works fine and I can call it and I disable the window background by setting the window alpha to 0.999. One little tiny

Re: ObjectController preventing WindowController from releasing

2011-11-07 Thread Ken Thomases
On Nov 7, 2011, at 11:16 AM, Jonathan Taylor wrote: > Thanks very much for your reply! You're welcome. >> What would you sensibly bind to the File's Owner itself, rather than one of >> its properties? In other words, what is bound to or through the object >> controller? > > OK, I am not abso

Re: Private Method?

2011-11-07 Thread Wim Lewis
On 6 Nov 2011, at 2:10 PM, Bryan Harrison wrote: > I'm a total tyro and hope nobody minds if I fire off the occasional > incredibly elementary question. > > I'm reviewing some sample code and am looking at a class with a method > declared in @implementation which isn't mentioned in any @inte

Re: Private Method?

2011-11-07 Thread Jean-Daniel Dupas
Le 7 nov. 2011 à 16:19, Kyle Sluder a écrit : > On Nov 7, 2011, at 4:10 AM, Jean-Daniel Dupas wrote: > >> >> Le 7 nov. 2011 à 08:49, Joar Wingfors a écrit : >> >>> >>> In OjbC you don't need to provide declarations for a method "foo" if all >>> callers of foo can "see" the definition of foo

Re: ObjectController preventing WindowController from releasing

2011-11-07 Thread Jonathan Taylor
Hi Ken, Thanks very much for your reply! >> I have a window and window controller which in the absence of an object >> controller work fine, and both are deallocated when the window is closed. If >> I add an ObjectController to the NIB and bind its "Content Object" to >> "File's Owner.self" th

Re: ObjectController preventing WindowController from releasing

2011-11-07 Thread Ken Thomases
On Nov 7, 2011, at 10:09 AM, Jonathan Taylor wrote: > I have a window and window controller which in the absence of an object > controller work fine, and both are deallocated when the window is closed. If > I add an ObjectController to the NIB and bind its "Content Object" to "File's > Owner.se

UITextField and UIGestureRecognizers

2011-11-07 Thread Olivier Palliere
Hi Guys, Working on an iPad app, I'm running into an annoying issue you may have seen already. I have a UITextField on a view. I want the user to be able to edit it by single tapping on it, but I want to display a popover to chose from a list when the user does a long press on the UITextfield.

ObjectController preventing WindowController from releasing

2011-11-07 Thread Jonathan Taylor
Sorry. Re-sending under what I think is a more correct title. I only realised after I hit send! Begin forwarded message: > From: Jonathan Taylor > Date: 7 November 2011 16:08:13 GMT > To: cocoa-dev > Subject: ObjectController preventing window from closing > > Hi all, > > This is probably a

ObjectController preventing window from closing

2011-11-07 Thread Jonathan Taylor
Hi all, This is probably a very basic question, but I am out of ideas and hoping someone can offer some help. I should say that I'm afraid I'm somewhat out of my depth with ObjectControllers: I added some seemingly simple bindings at the recommendation of a poster on here, and I thought I under

Re: Allocating too much memory kills my App rather than returning NULL

2011-11-07 Thread Greg Parker
On Nov 4, 2011, at 6:40 PM, Don Quixote de la Mancha wrote: > My code checks that calloc() returns valid pointers for each > allocation attempted when creating a new grid. If all the allocations > succeed, I copy the data in the old grid into the center of the new > one, then free() each array in

Re: How to highlight the current line in NSTextView?

2011-11-07 Thread Ross Carter
On Nov 6, 2011, at 12:46 PM, Keary Suska wrote: > you should then be able to use > lineFragmentUsedRectForGlyphAtIndex:effectiveRange: and passing its return > value to -setSelectedRange:. I don't think you want to change the selected range. You just want to draw a background color.

Re: Private Method?

2011-11-07 Thread Kyle Sluder
On Nov 7, 2011, at 4:10 AM, Jean-Daniel Dupas wrote: > > Le 7 nov. 2011 à 08:49, Joar Wingfors a écrit : > >> >> In OjbC you don't need to provide declarations for a method "foo" if all >> callers of foo can "see" the definition of foo (ie. if they are themselves >> defined *after* foo). The

Re: Any success with SMLoginItemSetEnabled?

2011-11-07 Thread Kyle Sluder
On Nov 5, 2011, at 3:19 PM, Manfred Schwind wrote: > Hi, > > has anybody successfully used SMLoginItemSetEnabled? > It always returns false for me, whatever I try. >From the rest of your message it sounds like you're trying to use this >function from within a sandbox. It is a known bug (by dev

Re: Private Method?

2011-11-07 Thread Jean-Daniel Dupas
Le 7 nov. 2011 à 08:49, Joar Wingfors a écrit : > > On 6 nov 2011, at 14:10, Bryan Harrison wrote: > >> I'm a total tyro and hope nobody minds if I fire off the occasional >> incredibly elementary question. >> >> I'm reviewing some sample code and am looking at a class with a method >> dec

What is the right way to move a UIDocument to a new URL?

2011-11-07 Thread Roland King
I'm a little lost in all the UIDocument and NSFileCoordinator code .. I have some UIDocuments and they are named, as is the default /Documents/.. I understand why that's the recommendation as you can get the name of a document without having to download or open it. Now I'm implementing renam