Re: Crash on SIGILL

2014-11-22 Thread Joar Wingfors
Another really good thing to do is to run the static analyzer in Xcode, and pay attention to whatever warnings it emits. Joar > On 21 nov 2014, at 19:05, Laurent Daudelin wrote: > > Thank you, all, I’m going to turn on GuardMalloc, Zombies and the likes. > > -Laurent. > -- > Laurent Daudel

Re: Debugging memory leak in NSURLSession with ARC

2015-01-01 Thread Joar Wingfors
> On 1 jan 2015, at 18:26, Graham Cox wrote: > > >> On 2 Jan 2015, at 12:48 pm, Quincey Morris >> wrote: >> >> That usually means the block and the ‘self’ it captured mutually refer >> to each other. I’m betting this is what’s wrong in your case. >> >> > > > Quincey, thanks for you

Re: Debugging memory leak in NSURLSession with ARC

2015-01-01 Thread Joar Wingfors
> On 1 jan 2015, at 18:22, Roland King wrote: > > +1 for all of this. I wouldn't call leaks an utter waste of time, but it > really does only find pure retain cycles (which it then annotates very > nicely) and not memory which is really is pinned by a real reference which is > more often the

Re: Xcode 5.1 is crashing in 10.8.5

2015-02-10 Thread Joar Wingfors
Please file a bug report and attach the nib file in question. Please also attach the crash reports. Joar > On 9 feb 2015, at 20:13, Appa Rao Mulpuri wrote: > > Hi List, > > Xib created with Xcode 6.1.1 was not opening(Xcode is crashing) in

Re: How to copy one project product to another project Resources on build (relative path)

2015-03-01 Thread Joar Wingfors
Select the reference to project B in project A. Open the File inspector. Change the "Location" pop-up from "Absolute" to "Relative to Project". Joar > On 1 mar 2015, at 19:27, Juanjo Conti wrote: > > Hi! > > I have a project, let' call it A which contains another one, let's call it > B. >

Re: Regarding these Olivia messages. Can we do something about the list security?

2015-07-29 Thread Joar Wingfors
> On 29 Jul 2015, at 16:52, Jens Alfke wrote: > > >> On Jul 29, 2015, at 4:32 PM, Roland King wrote: >> >> That's what I think to and the filth spread to the xcode list, or spread >> from the xcode list. I wrote to the admins on both lists and asked them to >> remove this scum feeder from a

Re: IKSlideshow reloadData should reload, yes?

2009-08-31 Thread Joar Wingfors
Hello Adam, If you don't get any other replies here, please make sure to file a bug report: Include a sample project if possible. Thanks, j o a r On 31 aug 2009, at 14.50, Adam Knight wrote: I'm using IKSlideshow to display images that I

Re: Symbolic Links in Snow Leopard

2009-09-06 Thread Joar Wingfors
On 6 sep 2009, at 14.26, Jens Alfke wrote: NSLog(@"path = %@", [@"/etc" stringByStandardizingPath]); results in path = /etc when the result ought to be "/private/etc". This is the documented behavior: "Remove an initial component of “/private” from the path if the result

Re: Turn on zombies in user environment?

2009-09-07 Thread Joar Wingfors
On 6 sep 2009, at 22.48, Kyle Sluder wrote: You'll need to make sure you have the unstripped release binary (not a debug version) of the same app version for this backtrace to be useful. If you don't, you will have to send the user a new binary. For tracking down this type of issue, I wou

Re: Turn on zombies in user environment?

2009-09-07 Thread Joar Wingfors
On 7 sep 2009, at 00.34, Graham Cox wrote: However, in following your advice I'm not getting the app launched - I just get "$: Command not found.". I just use the default shell in Terminal and I don't use it much myself so I'm not sure what the problem is. I'm on Snow but the user is on 10

Re: Turn on zombies in user environment?

2009-09-07 Thread Joar Wingfors
On 7 sep 2009, at 05.03, Graham Cox wrote: You're not supposed to type either the "$", or the "(gdb)". They're just there to indicate that you're supposed to type this at a prompt, and what type of prompt you're at. Which was what I thought, but doing that produces much the same result:

Re: How can we draw a horizontal line with embossing effect?

2009-09-10 Thread Joar Wingfors
On 10 sep 2009, at 02.15, Arun wrote: How can we draw a horizontal line with embossing effect? The attached picture describes more clearly. I'd probably use NSShadow. j o a r ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do no

Re: Circular references

2009-09-13 Thread Joar Wingfors
On 13 sep 2009, at 15.00, DKJ wrote: I've got a MyViewController and a bunch of MySubview objects that are subviews of its view. I want MyViewController to keep track of certain things, such as the last MySubview that was clicked. So MySubview has to know about MyViewController to tell it

Re: NSString vs. encoding

2009-09-16 Thread Joar Wingfors
On 16 sep 2009, at 13.13, Johan Kool wrote: I have been trying many combinations of encodings/decodings, but without the intended result. I do know what NSString wants, but that's not what I have. I have stringA as shown, and I have to somehow morph it into something usable. Basically I ne

Re: NSString vs. encoding

2009-09-16 Thread Joar Wingfors
On 16 sep 2009, at 21.38, Johan Kool wrote: I am parsing the output of a command line utility (mtree). Is mtree using strvis perhaps? Google seems to suggest that, but I'm not sure if that's true, or still true. If you're using an open source utility, it should be possible for you to fig

Re: bitmap caching issue (was: settings to build for 10.5 on 10.6?)

2009-09-20 Thread Joar Wingfors
On 20 sep 2009, at 16.26, Rob Keniger wrote: Now that you've pointed that out, neither am I! I should always remember to check the header, the docs don't mention this detail. Should I file a bug against the docs? Absolutely - You're not supposed to have to go to the header files to lear

Re: How to implement IB-like Inspector Palette?

2009-09-25 Thread Joar Wingfors
On 25 sep 2009, at 18.56, Rick Mann wrote: What is the control at the top of the IB Inspector panel? Is it just buttons arranged next to each other? It's probably either a NSSegmentedControl, a NSMatrix with NSButtonCells, or plain NSButtons. The content below the tabs at the top could

Re: CPU utilization in Snow Leopard

2009-09-26 Thread Joar Wingfors
On 25 sep 2009, at 23.14, Shashanka L wrote: I am working with Snow Leopard 10.6.1. And I have observed the difference in CPU usage (high compared to Leopard) for my application. I am using mainly the Quicktime, sqlite3 calls. Also found some memory leaks in Foundation class methods. Have

Re: CPU utilization in Snow Leopard

2009-10-20 Thread Joar Wingfors
On 19 okt 2009, at 23.37, Graham Cox wrote: Since there's no autorelease pool inside your do...while loop, of course it isn't going to get autoreleased then. Autorelease isn't magic, someone has to tell it when it can release - that's you. Put your pool inside the loop so it is created and

Re: Questions about Nib Object Retention

2009-10-20 Thread Joar Wingfors
On 20 okt 2009, at 20.40, an0 wrote: Who owns the unarchived top-level objects' initial positive retain count? The "Files Owner" is responsible for the top level objects. It better have outlets to them so that it can manage and dispose of them appropriately. It sounds like you're asking

Re: info gc-roots interpretation

2009-10-21 Thread Joar Wingfors
On 21 okt 2009, at 02.18, Quincey Morris wrote: When I set this ivar to nil. the results are: (gdb) info gc-roots 0x2004f9340 Number of roots: 1 Root: 0 Kind: bytes rc: 1 Address: 0x000200543b40 Offset: 0x0008 1 Kind: object rc: 0 Address: 0x0002004f9340 Cla

Re: info gc-roots interpretation

2009-10-21 Thread Joar Wingfors
On 21 okt 2009, at 09.44, Nick Rogers wrote: Here timer is an ivar in Volume of type NSTimer*. Is setting timer in the above method causing the problem? Timers retain (RC) / strongly reference (GC) their targets. In general you should keep a reference to the timer so that you can invalida

Re: CPU sampling and +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:]

2009-11-13 Thread Joar Wingfors
On 13 nov 2009, at 04.36, Paulo Andrade wrote: > I'm guessing that when using a NSURLConnection the framework spawns a new > thread and creates a runloop for it, That sounds about right. I could also see that the framework might choose to keep this thread around after you've finished using it

Re: CPU sampling and +[NSURLConnection(NSURLConnectionReallyInternal) _resourceLoadLoop:]

2009-11-14 Thread Joar Wingfors
On 14 nov 2009, at 03.20, Michael Ash wrote: > On Fri, Nov 13, 2009 at 1:28 PM, Paulo Andrade wrote: >> Hello, >> >> I'm using the CPU sampler template. >> >> Here (http://1wzi.sl.pt) is a sample of a very simple run to prove my point. >> >> Here's how I collected it: >> - Start the app and l

Re: NSFileManager thread safety?

2009-11-16 Thread Joar Wingfors
On 16 nov 2009, at 04.07, Gregory Weston wrote: > Given Dave Keck's correct comment that threading shouldn't even come up in > the situation you describe, I should point out that according to the docs the > result of sending init to an NSFileManager object in 10.5 is undefined. If > you're tes

Re: NSString componentsJoinedByString--strange output

2009-11-22 Thread Joar Wingfors
On 22 nov 2009, at 19.28, Kevin Walzer wrote: > NSString *filestring = [files componentsJoinedByString:@"\t"]; > NSLog(@"%s", filestring); You're not using the correct formatting character for objects. Change it to: NSLog(@"%@", filestring); j o a r _

Re: NSTimer never being deallocated

2010-03-13 Thread Joar Wingfors
On 13 mar 2010, at 08.57, Dave Keck wrote: > Recycled objects can appear as leaks, making it hard to distinguish > between a bug and normal behavior. I don't think that's true (it doesn't fit with the algorithm used for identifying leaks), but if it is, please file a bug report:

Re: NSTimer never being deallocated

2010-03-13 Thread Joar Wingfors
On 13 mar 2010, at 07.36, Tobias Jordan wrote: > I've always been having problems with Foundation's NSTimer Class when it > comes to Memory-Management. After activating the static analyzer in Xcode > (very useful!), it immediately reminds me of autoreleasing my instance of > NSTimer and I thou

Re: NSTimer never being deallocated

2010-03-13 Thread Joar Wingfors
On 13 mar 2010, at 09.08, Tobias Jordan wrote: > Yes, don't get me wrong, I trust the Apple docs, of course but I also know > it's possible they are doing something wrong. I don't remember all cases but > it always starts like this: I see something's not being freed, I try to free > it, it doe

Re: NSDocument and the dreaded "The location of the document XXX cannot be determined"

2010-04-02 Thread Joar Wingfors
On 1 apr 2010, at 13.50, Martin Wierschin wrote: > Any help on this would be much appreciated; I've spent way too long on this > silly thing already. Please file a bug report where you outline what you're trying to do: j o a r _

Re: Delayed Autorelease

2010-04-08 Thread Joar Wingfors
On 8 apr 2010, at 08.03, Patrick M. Rutkowski wrote: > I have a Foo object which has an NSMutableArray of Bar objects. The > Bar objects each have their own NSMutableArray of Baz objects. > > The weird thing is that the Foo and it's array of Bar's are all living > well and good, but the Bar's ar

Re: Delayed Autorelease

2010-04-08 Thread Joar Wingfors
On 8 apr 2010, at 08.37, Patrick M. Rutkowski wrote: > Another mistake was self.array being initialized as > self.array = [[NSMutableArray alloc] init] > > when it should have been > self.array = [NSMutableArray array] > > I'm still somewhat new to this :-) > > I totally get what's going on, I

Re: How to find all clipping siblings for a view?

2010-04-16 Thread Joar Wingfors
On 15 apr 2010, at 13.06, Alexander Bokovikov wrote: > This is because my view uses QuickDraw to redraw itself, but those functions > draw on screen directly (AFAIU) and don't take into account other views, > located above current view. > > Could anybody show the right way to go? The right

Re: "-arch i386" -- Still useful?

2010-05-06 Thread Joar Wingfors
On 6 maj 2010, at 13.33, Jay O'Conor wrote: > I'm writing this on one of those 32-bit only Intel MacBook Pros, so we're > definitely out here. I wouldn't abandon 32-bit Intel systems quite yet, > unless you have a compelling need. In a case like this is probably a good idea to follow Apple's

Re: baseURL problem with +fileURLWithPath:

2010-05-18 Thread Joar Wingfors
On 18 maj 2010, at 04.52, Robert Monaghan wrote: > This is pretty trivial.. I have a string that is coming from an FCP XML file. > The string looks like this: > file:/localhost/Users/bob/Movies/ARRI/ELAP/shot_1_2/Imagery/Proxies/DMAG001_1_2_TAKE_005_RAWPROXY720P.mov > > I then pass the string t

Re: List of all supported apps for file type

2010-05-23 Thread Joar Wingfors
The API:s to use for things like this would be NSWorkspace, and Launch Services. In that order of preference. j o a r On 23 maj 2010, at 15.57, Trygve Inda wrote: > I know I have seen this code before but in the last 30 minutes of digging, I > can't find it. > > How can I get a list of bundle

Re: How does Apple want us to deal with custom elements in Xcode 4, with IBPlugins having been killed?

2011-08-15 Thread Joar Wingfors
On 15 aug 2011, at 19:20, Richard Somers wrote: >> I wonder what the FinalCutPro and the rest of those apps guys do with all >> their custom UI. > > I have often wondered about that question myself. If you look inside the > Xcode bundle you will find a single nib file (MainMenu.nib). So it wou

Re: Persistant reference to file that is not a path?

2011-08-25 Thread Joar Wingfors
On 25 aug 2011, at 21:15, Ron Fleckner wrote: > Oh I see now that file reference URLs and bookmarks are 10.6 only. I'm > making a tool for musicians, most of whom aren't too well off and so I target > 10.5. Might just have to stick with paths. Thanks anyway. Prior to Mac OS X 10.6 you can

Re: nonatomic vs atomic assign/retain

2011-09-06 Thread Joar Wingfors
On 6 sep 2011, at 08:49, Thomas Davie wrote: > There are two schools of thought on atomic/nonatomic, and both apply equally > to Mac/iOS: > > 1) Atomicity provides a little bit of safety, and shouldn't be shrugged off > for no reason. Because of that, only optimise the atomic set/get when you

Re: Garbage Collection: memory limits, crash when using "lots" of memory, why?

2011-09-22 Thread Joar Wingfors
On 22 sep 2011, at 21:04, Don Quixote de la Mancha wrote: > Exceeding the available memory of the garbage collector should not crash, > instead your allocations should fail. When memory allocations fail, apps crash. Like it or not, that's just the way it is. Not sure what the alternative woul

Re: Missing header files/folders?

2011-10-06 Thread Joar Wingfors
On 6 okt 2011, at 22:38, Jens Alfke wrote: > On Oct 6, 2011, at 9:09 PM, Shane Stanley wrote: > >> I've just bought a new Mac, and after migrating and updating I notice that >> inside the frameworks in /System/Library/Frameworks/, the Headers link and >> Headers folder that appear on my old Ma

Re: CoreRecipes in Xcode4 ?

2011-10-11 Thread Joar Wingfors
On 11 okt 2011, at 22:12, Don Quixote de la Mancha wrote: > Previous versions of Xcode supported installing multiple versions of > Xcode. I found this useful for having old deployment targets that > weren't supported in newer Xcodes, and to be able to open old project > files without getting the

Re: Is NSDateFormatter thread-safe?

2011-10-31 Thread Joar Wingfors
Hi Jens, NSDateFormatter is listed as thread-unsafe in the documentation, so you need to review how you're using your instances.

Re: Private Method?

2011-11-06 Thread Joar Wingfors
On 6 nov 2011, at 23:39, Graham Cox wrote: >> If the former, how does this technique compare with the trick of putting an… >> >> @interface someClass () >> - (type) somePrivateMethod; >> @end >> >> …in the implementation? > > I could be wrong, but I'm not sure that syntax is legal. The round b

Re: Private Method?

2011-11-06 Thread Joar Wingfors
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 > declared in @implementation which isn't mentioned in any @interf

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

2011-11-08 Thread Joar Wingfors
On 8 nov 2011, at 09:14, Wade Tregaskis wrote: >>> Before I started writing iOS code I did embedded systems development >>> and Mac OS X device drivers. In both of those environments, Failure >>> Is Not An Option. While you can certainly run out of memory or >>> encounter other errors, one just

Re: Validating dictionary strings file

2011-11-20 Thread Joar Wingfors
On 20 nov 2011, at 22:49, Gideon King wrote: > Thanks for the suggestions guys - I have found the issues by a binary search > process (there were some quotes in the wrong places). I'll keep those ideas > in my bag of tricks for if I encounter something similar again. Please file a bug report.

Re: why does this method return an id?

2011-12-13 Thread Joar Wingfors
On 12 dec 2011, at 22:39, Matt Neuburg wrote: > Also, if that's the right answer (i.e. if it's all about subclassing), then I > don't get why *every* convenience constructor isn't typed as an id. The general rule across Cocoa is that initializers and factory methods return id typed objects (i

Re: NSString looses Umlaute

2011-12-22 Thread Joar Wingfors
On 21 dec 2011, at 16:45, Alexander Reichstadt wrote: > NSString eats the Umlaute. How do I tell NSString to not do that? If you provide the correct encoding when creating a NSString from an external representation, all will be well. If you don't, then you'll end up with the type of issues th

Re: Make Custom Struct Key-Value Coding Compliant

2012-02-12 Thread Joar Wingfors
On 12 feb 2012, at 01:04, Richard Somers wrote: >> Hmm. The Foundation Release Notes for 10.5 indicate that KVC supports >> arbitrary structs (see section titled "Support for Arbitrary Types in KVC >> and KVO") > > Yes I have read that several times. It seems to be at odds with the Core Data

Re: Accessing array in thread safe way

2012-03-07 Thread Joar Wingfors
No. Please see: Joar On 6 mar 2012, at 11:51, Jan E. Schotsman wrote: > Hello, > > I have an array of progress values (number objects) for subprojects

Re: Finding object array index when iterating through array

2012-03-07 Thread Joar Wingfors
If you use a block-iterator, the index is passed as a parameter to the iterator block. Joar On 6 mar 2012, at 12:42, Prime Coderama wrote: > I have an array and I am iterating through it using this technique: > >> for (id object in array) { >>// do something with object >> } > > Is there

Re: NSURLDownload mysteriously pausing

2011-02-18 Thread Joar Wingfors
On 16 feb 2011, at 11.00, Sidney San Martín wrote: > Below is the main class of a test application with a main class called > downloaderAppDelegate. The issue's reproducible for me by dropping it into a > new Xcode Cocoa application project. I've not been able to reproduce that issue (with th

Re: Compiling screensaver for 10.5

2011-03-31 Thread Joar Wingfors
Hello Gabriel, Some questions and comments: What kind of hardware does your Mac OS X 10.5 user have (i386 / ppc)? Which version of Xcode are you using? Note that 3.2.6 dropped PPC support. Check your binary to verify that it contains the architectures that you expect: $ file /path/to/ArtSaver.s

Re: Localized.strings is being ignored

2011-04-12 Thread Joar Wingfors
Xcode should warn you about such errors, should it not? Please file a bug report / enhancement request via the Apple Bug Reporter: Thanks! j o a r On 12 apr 2011, at 09.32, Dave DeLong wrote: > The best way to discover these sorts of errors i

Re: Can't create temporary file

2011-05-19 Thread Joar Wingfors
On 19 maj 2011, at 16.48, Quincey Morris wrote: >> It seems Cocoa is lacking in file-creation APIs (none URL-based, none return >> an error object). > > How about: > > [[NSData data] writeToURL: myURL options: 0 error: &error]; Or: [[NSFileManager defaultManager] createFileAtP

Re: Writing extremely large RTF or .doc files

2011-06-18 Thread Joar Wingfors
On 17 jun 2011, at 23.08, Ken Tozier wrote: > There's nothing particularly kludgy about using HTML to create styled text > documents. The entire internet is based on it. Kind of depends on where this document would be used though. On the Internet? Amazing. On the desktop? Weird! > Once the

Re: getting last accessed date

2011-07-07 Thread Joar Wingfors
Hello Rick, The access date on a file is updated very frequently. I think that stat:ing the file is enough, and that happens all the time. If what you're looking for is the last *opened* date of the file, I think that your best bet is the kMDItemLastUsedDate spotlight metadata attribute. j o a

Re: Does anyone else dislike Xcode 4?

2011-07-25 Thread Joar Wingfors
On 25 jul 2011, at 11:16, Laurent Daudelin wrote: > Well, one thing I just discovered in Xcode 4 and is already annoying me > highly is that the app somehow uses CoreAnimation so that now, even though > I'm running on battery, it forces the OS to use the Radeon video chipset > instead of the i

Re: Dialog Command Keys

2011-07-26 Thread Joar Wingfors
On 26 jul 2011, at 08:09, Bill Appleton wrote: > There ARE cut, copy, and paste items in this menu, but they DONT have any > command key bindings, maybe that is the problem? i didn't create this menu > in the first place Yes, that is at least part of the problem. If the items in your main menu

Re: Dialog Command Keys

2011-07-26 Thread Joar Wingfors
On 26 jul 2011, at 09:03, Bill Appleton wrote: > The items in the main menu DO have the standard key bindings, they are > disabled when the modal dialogs come up > The items in the right-click menu do NOT have the key bindings but they are > enabled, i didn't make these menus > The dialogs are

Re: Dialog Command Keys

2011-07-26 Thread Joar Wingfors
On 26 jul 2011, at 09:32, Bill Appleton wrote: > >> OK, great. In that case it's weird that your cut/copy/paste items are not > >> enabled while a text field in your dialog has focus. You have focus set in > >> one of your text fields / views, right? > > I just tried enabling the edit menu it

Re: Dialog Command Keys

2011-07-26 Thread Joar Wingfors
On 26 jul 2011, at 09:43, Raleigh Ledet wrote: >> Well, when the dialog field has selected text and i type command-x my menu >> item's action handler is NOT invoked, because there is a modal dialog up I >> guess. > > Wait! Are you saying that you modified the default target/action setup of the

Re: Dialog Command Keys

2011-07-26 Thread Joar Wingfors
On 26 jul 2011, at 10:30, Bill Appleton wrote: > i set the target and the action on my menu items -- this is so that i can get > my handler called when someone selects a menu item > i will re-read the event handler docs with regard to menu items (no keyboard > issues) and see if that helps Yo

Re: unrecognized selector error when calling -stringValue on NSNumber

2009-12-06 Thread Joar Wingfors
On 6 dec 2009, at 15.58, Mazen M. Abdel-Rahman wrote: > 2009-12-06 16:51:24.525 Averroes[21013:a0f] -[NSCFString stringValue]: > unrecognized selector sent to instance 0x1001d8a70 > > Doesn't that mean that it thinks primaryLanguageNumber is a string? And why > would it see it as a string?

Re: NSUserDefaults Croaks on Dictionary Containing NSNumber as Key

2009-12-12 Thread Joar Wingfors
On 12 dec 2009, at 22.04, Jerry Krinock wrote: >> And although NSDictionary and CFDictionary objects allow their keys to be >> objects of any type, if the keys are not string objects, the collections are >> not property-list objects. > > Actually, there's a third bug, since that statement is i

Re: App Launches in Finder, Hangs While Launching in Debugger

2009-12-13 Thread Joar Wingfors
On 13 dec 2009, at 22.26, Joe Programmer wrote: > Two occurrences of the following massage are appearing in the console: > -[NSCFArray _getCString:maxLength:encoding:]: unrecognized selector sent to > instance 0x4016e0 That's almost certainly an indication of a memory management error in your

Re: App Launches in Finder, Hangs While Launching in Debugger

2009-12-13 Thread Joar Wingfors
On 13 dec 2009, at 23.44, Joe The Programmer wrote: > Is GC as easy to implement as toggling the GCC_ENABLE_OBJC_GC build setting > to either supported or required? For a trivial app it might be. For anything else, it would not be. GC and RC are fundamentally different memory management model

Re: App Launches in Finder, Hangs While Launching in Debugger

2009-12-14 Thread Joar Wingfors
On 13 dec 2009, at 23.06, Joar Wingfors wrote: >> Two occurrences of the following massage are appearing in the console: >> -[NSCFArray _getCString:maxLength:encoding:]: unrecognized selector sent to >> instance 0x4016e0 > > That's almost certainly an indication of

Re: Localization.strings in UTF16 vs UTF8

2009-12-15 Thread Joar Wingfors
On 15 dec 2009, at 07.47, Torsten Curdt wrote: > Anyone know of any reasonable explanation why for Cocoa localization > files need to be in UTF16? Hello Torsten, I think that this is simply a documentation bug. Cocoa expects, or at least expected, strings files in the product to be UTF16. For

Re: App works when launched from Xcode, not from Finder

2009-12-15 Thread Joar Wingfors
On 15 dec 2009, at 16.48, PCWiz wrote: > I have 2 frameworks set in a Copy Files build phase and both are being copied > as they should. So you intend for your frameworks to be copied into and used from the bundle of your app? If so, have you set their Installation Directory build setting to

Re: App works when launched from Xcode, not from Finder

2009-12-16 Thread Joar Wingfors
On 16 dec 2009, at 07.04, PCWiz wrote: > This is making absolutely 0 sense to me, and right now it seems like its a > screwup on Xcode's part. I can privately email the source if necessary (its a > commercial app, but right now I'm willing to do anything to get this fixed). That doesn't make

Re: launching Application from terminal

2009-12-16 Thread Joar Wingfors
On 16 dec 2009, at 10.06, Arun wrote: > Also the reason i am launching from Terminal is because i need to pass > command line parameters to My app Do you really "need" to pass command line parameters to your app? That's not the usual way to pass configurations to GUI applications on Mac OS X.

Re: Are views active or inactive?

2009-12-22 Thread Joar Wingfors
On 22 dec 2009, at 19.45, Rick Mann wrote: >>> Do NSViews have the notion of being "active" or "inactive?" My app >>> architecture requires that I be able to differentiate, at draw time, >>> between a (custom) view that is in the frontmost window (and technically, >>> has focus), and a similar

Re: Instance method from IB

2009-12-23 Thread Joar Wingfors
On 23 dec 2009, at 08.15, Wade Williams wrote: > 1) Subclass the NSButton and have it call selectTabViewItemAtIndex when > pressed In Cocoa you wouldn't subclass standard controls to implement specific action handling like this. It's not the Cocoa way. I also curious as to why you would even

Re: Releasing Objects

2009-12-24 Thread Joar Wingfors
On 24 dec 2009, at 15.16, Sherm Pendley wrote: > Just out of curiosity, is that really a short-circuit in the > message-passing machinery, or are all those selectors simply > registered to point to the same IMP function? A useless bit of > knowledge for us end-users, I know, but interesting just

Re: Updating tracking areas Rect

2009-12-28 Thread Joar Wingfors
On 28 dec 2009, at 07.55, Gustavo Pizano wrote: > NSInteger i = 0; > while ([[self trackingAreas] count]==0) { > [self removeTrackingArea:[[self trackingAreas] > objectAtIndex:i]]; > i++; > } That loop seems all kinds of wrong... ;-) How about:

Re: Updating tracking areas Rect

2009-12-28 Thread Joar Wingfors
On 28 dec 2009, at 18.41, Graham Cox wrote: > So, if -trackingAreas returns the actual array (rather than a copy), and > -removeTrackingArea: is basically a wrapper for -removeObject: on that same > array then the loop will fail with this exception. Since we don't know if > either of these thi

Re: Updating tracking areas Rect

2009-12-28 Thread Joar Wingfors
On 28 dec 2009, at 09.22, Gustavo Pizano wrote: > I cant use the last option because it may happen that I will have not just 2 > TA but N.. Perhaps you should still maintain your own array of tracking areas? I'm not sure if anyone else should ever add tracking areas to your view, but it might

Re: Drawing on top of QTCaptureView

2009-12-31 Thread Joar Wingfors
On 31 dec 2009, at 08.14, Bengt Nilsson wrote: > I need to draw a cross-hair on top of a QTCaptureView with a video preview > from a USB camera. > For this app, I am starting from the sample project QTRecorder. > I create the cross-hair line in the Interface Builder. > Problem is that the video

Re: Achieve the Blur background as in Dock menus.

2010-01-01 Thread Joar Wingfors
On 1 jan 2010, at 08.37, Gustavo Pizano wrote: > First Im using the method NSDrawNinePartImage to draw the box that appears > when click an item, this receives NSImages, so I thought that applying a > CIfilter to a CIImage then converting the CIImage into a NSImage and send to > the NSDrawN

Re: Setting NSWindow titlebar height

2010-01-03 Thread Joar Wingfors
On 3 jan 2010, at 11.41, PCWiz wrote: > I've removed the titlebar buttons and everything, however there is still that > space at the top where the titlebar usually is. Is there a way to remove that > space (in other words, a way to set the height of the title bar?). The only way I know would

Re: if statement causing 32 Byte leak?

2010-01-09 Thread Joar Wingfors
On 9 jan 2010, at 17.15, Mr. Gecko wrote: > if (connections==nil) { > connections = [[NSMutableArray new] retain]; > } > > It says that if (connections==nil) is leaking 32 bytes which I have no idea > how that could be possible. Yes I'm releasing connections after I'm done > using it.

Re: if statement causing 32 Byte leak?

2010-01-09 Thread Joar Wingfors
On 9 jan 2010, at 17.35, Mr. Gecko wrote: > Is array, string, and data all the same as new or are those autorelease? These classes all inherit from NSObject, so unless they override and change the behavior of "+new" (hint: They don't, that would be crazy) their behavior would have to be the s

Re: [self frame].size.width reporting incorrectly

2010-01-09 Thread Joar Wingfors
On 9 jan 2010, at 21.21, PCWiz wrote: > I'm using NSLog(@"%f", [self frame].size.width); from within my NSTextField > subclass to check the width of the text field (pretty standard stuff). But > for some reason, its reporting incorrectly. Are you sure that you're logging the width of the corr

Re: if statement causing 32 Byte leak?

2010-01-10 Thread Joar Wingfors
On 10 jan 2010, at 09.13, Glenn L. Austin wrote: > [pObj release]; // <-- This should assert in a debug context, since it > is already in the current autorelease pool. There is nothing wrong with releasing objects that have been added to autorelease pools per se, what could be considere

Re: if statement causing 32 Byte leak?

2010-01-10 Thread Joar Wingfors
On 10 jan 2010, at 15.26, Graham Cox wrote: > One of the hardest over-release bugs to find is when an autorelease pool pops > and the object has already gone - it might be a long way past where the real > problem is. Zombies definitely helps with this, but you still need a lot of > detective w

Re: if statement causing 32 Byte leak?

2010-01-11 Thread Joar Wingfors
...which, again, is why the approach that Instrument takes is such a good one. j o a r On Jan 11, 2010, at 9:02, Scott Ribe wrote: It has been my experience that some of the hardest bugs were stale references left in autorelease pools. However it has not often been my experience that the

Re: Application crashes

2010-01-19 Thread Joar Wingfors
Yogin, It seems very likely that the target for your timer (the object that would receive the delayed method call) has been deallocated. I would use zombies to figure out why that is. You can use them either from Xcode, or via Instruments. Google has more info. j o a r On 19 jan 2010, at 05.

Re: Make sheets open instantly

2010-01-19 Thread Joar Wingfors
For developers it's typically preferable to pass debug user default values as arguments to your executable from within Xcode. Select "Project > Edit Active Executable" in Xcode, and go to the Arguments tab. Hit the plus button to add a new argument: -NSWindowResizeTime 0.1 When you lau

Re: __weak references in non-GC

2010-02-01 Thread Joar Wingfors
On 1 feb 2010, at 06.08, Roland King wrote: > I understand that __weak references are zeroing in GC code but in memory > managed code I didn't think they did anything at all. Is the text I quoted > incorrect? Yes, __weak doesn't do anything for RC. j o a r _

Re: Crash in NSControl's sizeToFit

2010-02-01 Thread Joar Wingfors
You're not allowed to do *anything* on non-main threads unless the documentation *explicitly* says that it's OK. You should approach this subject with great caution and restraint. If you can't prove that something is safe, assume that it's not, and stay away from it. j o a r On 1 feb 2010, at

Re: NSFullUserName() always returns the user name at app launch?

2010-02-04 Thread Joar Wingfors
On 4 feb 2010, at 00.27, Laurent Daudelin wrote: > I'm using NSFullUserName() to get the user name of the currently logged user > and from my application, the user can open the Accounts preference pane to > edit it. Problem is, after the user changes his user name, another call to > NSFullUser

Re: NSOutlineView parentobject

2010-02-04 Thread Joar Wingfors
On 2 feb 2010, at 20.25, Banupriya K wrote: > I have an outlineview to display n number of groups(Example: Grp1, Grp2 etc), > each can have n number of items, same item can be present in many groups. It seems that you have missed this requirement from the outline view documentation:

Re: How to show a sheet right when the app starts?

2010-02-04 Thread Joar Wingfors
On 4 feb 2010, at 20.41, Nick Zitzmann wrote: >> I would basically >> like to display a sheet right after the main window is shown. I tried >> setting the main window delegate as the app controller, but I'm not exactly >> sure in what method call I should show the sheet. I tried to show the sheet

Re: always show warnings?

2010-02-07 Thread Joar Wingfors
On 7 feb 2010, at 23.49, Chunk 1978 wrote: > how can i maintain warnings in xcode? they disappear if i ignore them > and rebuild, but i'd like them to always appear if they haven't been > addressed. Xcode questions are better asked at the Xcode-Users mailing list. What version of Xcode are you

Re: always show warnings?

2010-02-08 Thread Joar Wingfors
On 8 feb 2010, at 00.02, Chunk 1978 wrote: > Xcode 3.1.2 on Mac OS 10.5.8 This problem was fixed with Xcode 3.2: "The Build Results window has been completely redesigned to support advanced filtering of build results and to keep a persistent list of errors and warnings across builds."

Re: always show warnings?

2010-02-09 Thread Joar Wingfors
On 8 feb 2010, at 00.05, Mario Emmenlauer wrote: > I'm not using XCode, however it sounds likely that the object files > are just not rebuilt? You say it happens at every build except the > first time? The compiler will only rebuild objects that are not up- > to-date, so you will see only the war

Re: xcode-debug style toolbar above editor area

2010-03-04 Thread Joar Wingfors
Hello Mazen, You're correct - NSToolbar can only be used at the top of a window. If you want to create something that is similar to a toolbar for anywhere else you will have to make your own arrangement of controls just like you originally suggested. j o a r On 3 mar 2010, at 12.41, Mazen M.

Re: NSAttributedString -size Crash

2009-05-31 Thread Joar Wingfors
On 31 maj 2009, at 15.36, Seth Willits wrote: For some reason that I have yet to discover, calling - [NSAttributedString size] is causing a crash. It's rare, but it's happening. I can't yet repeat it on my system. If [self title] were nil, I'd get an exception when creating the attribut

  1   2   >