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: 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: 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: 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: 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: 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: NSOperation Issues

2014-04-06 Thread Joar Wingfors
On 6 apr 2014, at 17:40, Varun Chandramohan wrote: > My only worry was that the code I wrote for root daemon was > using CoreFoundation and later replaced with Foundation APIs as they lot > easier to code and maintain. I saw few people warning against that as > there might be some bugs in Found

Re: Breaking on nil context

2013-02-12 Thread Joar Wingfors
Try breaking on CGPostError(). Joar On 11 feb 2013, at 23:20, Graham Cox wrote: > I'm getting this logged at times: > > : CGContextSetStrokeColorWithColor: invalid context 0x0 > > > This is despite NSAssert-ing every function I pass a context to for nil. What > can I set a breakpoint on to

Re: Where are temporary documents stored until saved?

2012-12-30 Thread Joar Wingfors
You can turn this off for your debug runs using: Product > Edit Scheme... > Run > Options > Persistent State: Launch app without state restoration Joar On 30 dec 2012, at 02:56, Rick Mann wrote: > Wow, Googling for this is hard. > > I've got a problem that prevents me from closing a

Re: Operations Beachball

2012-12-05 Thread Joar Wingfors
What happens if you remove the "isCancelled" checks? How do you create your operation queue? What is the max concurrent operation count of the queue? If NSOperationQueueDefaultMaxConcurrentOperationCount, what happens if you set it to (processorCount) instead? When you take a CPU sample of the pr

Re: NSMapTable thread safety (with with ARC and weak objects)

2012-11-19 Thread Joar Wingfors
On 19 nov 2012, at 04:05, James Montgomerie wrote: > On 16 Nov 2012, at 22:36, Quincey Morris > wrote: > >> On Nov 16, 2012, at 09:53 , James Montgomerie wrote: >>> Let's assume I'm using ARC. If I create an NSMapTable with "[NSMapTable >>> strongToWeakObjectsMapTable]", is it safe to put

Re: NSXMLParser thread safe?

2012-06-01 Thread Joar Wingfors
On 1 jun 2012, at 18:15, Kyle Sluder wrote: > That would make it unsafe to access the same NSXMLParser instance from two > different NSOperations. Not necessarily. It all depends on the context of where the operations are executing. Joar ___ Co

Re: Missing header files/folders?

2012-03-22 Thread Joar Wingfors
Hi Eric, When using the command line invocation that I mentioned the developer folder inside of the Xcode app bundle would still end up being selected. I just wanted to call out that you don't have to provide the full path, as that's now more of an implementation detail. Joar On 22 mar 2012,

Re: Missing header files/folders?

2012-03-21 Thread Joar Wingfors
Hi all, On 21 mar 2012, at 12:04, Eric Wing wrote: > xcode-select actually ships with the OS, not Xcode. However, Xcode 4.3 > no longer automatically sets this path so it the path is left in an > uninitialized or prior Xcode state. xcode-select is certainly still a key component of our tools p

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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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: 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 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: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 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: 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: 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: 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: 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: 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: 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: 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: Performance: Drawing hundreds of short text strings

2010-12-20 Thread Joar Wingfors
On 20 dec 2010, at 01.22, Mark Coniglio wrote: > My application needs to draw hundreds of short text strings into an NSView. > After reviewing the Cocoa documentation on drawing text, I am left unsure as > to how to do this with the highest level of efficiency. Don't optimize in the dark! Imp

Re: Icon Designer?

2010-11-28 Thread Joar Wingfors
On 27 nov 2010, at 23.22, Andrew McLaughlin wrote: > Thanks. But I need help with the aesthetic perspective, not on the file > building. Something like this perhaps: ...but we're now off-topic for this mailing list. j o a r _

Re: iOS - Help with nasty memory leak

2010-11-27 Thread Joar Wingfors
On 27 nov 2010, at 06.33, Philip Vallone wrote: > if ((self = [[MKPinAnnotationView alloc] > initWithAnnotation:annotation reuseIdentifier:reuseIdentifier])) { > [self > performSelector:NSSelectorFromString(@"setDraggable:") withObject:[NSNumber > numberWith

Re: Image,text and button cell in outline view

2010-11-24 Thread Joar Wingfors
On 24 nov 2010, at 16.08, Rajendran P wrote: >my requirement is simple I need a nscell to have image, text and button to > be used in an outline view .I had a look at the imageandtext cell example , > how to add an button to it ? any idea about how to convert image and text > cell > to

Re: Calling a class method with the runtime ObjC API

2010-11-18 Thread Joar Wingfors
On 18 nov 2010, at 13.18, vincent habchi wrote: > I supposed I couldn't do such a simple thing as [MyClass perform:selector] > because the perform: method is an instance one. Sure you can: [MyClass performSelector:theSelector]; Works like a charm. j o a r _

Re: [Q] Using NSInvocation vs. selector with NSTimer

2010-10-17 Thread Joar Wingfors
On 17 okt 2010, at 15.51, JongAm Park wrote: > Although I know that NSInvocation was added (from Leopard?), I didn't use it > much. NSInvocation predates Mac OS X... > Is there any benefit in using it? My guess is that an NSInvocation instance > is used repeatedly, but using the "selector"

Re: main window disappears on resize

2010-10-09 Thread Joar Wingfors
On 9 okt 2010, at 07.16, Shane wrote: >>> I have a document based application with a main window that, when I >>> try to resize the window, the window just completely disappears. The >>> application doesn't crash and I can open up another window by 'Project >>> --> New' in the main menu. And of c

Re: Style question

2010-08-30 Thread Joar Wingfors
On 30 aug 2010, at 08.29, Vincent Habchi wrote: > baz = [[[Foo alloc] init] autorelease]; I think that it's definitively preferable to autorelease on the same line. It keeps all memory management together, and it's much less likely that later rearrangements of the code in question will result

Re: Crashes in _Unwind_Resume

2010-08-25 Thread Joar Wingfors
On 25 aug 2010, at 10.39, Benjamin Rister wrote: > Do you have some experience that this is a compiler bug, or is it just a > guess because it involves exception machinery? I would expect that LLVM’s > exception handling is pretty well broken-in by now, considering the volume of > Obj-C and C+

Re: iOS Core Data property getting released unexpectedly

2010-08-20 Thread Joar Wingfors
On 20 aug 2010, at 18.50, Rick Mann wrote: > I have a Core Data entity with an associated class file and a bunch of > dynamic properties defined. One of them is: > > @property (nonatomic, copy) NSString* urlName; > > For some reason, every now and again when my code goes to access this

Re: Erratic Cocoa Behavior

2010-08-16 Thread Joar Wingfors
Is there anything suspicious logged to the console at this time? I would not be surprised to find that some exception is screwing up the drawing. j o a r On 16 aug 2010, at 14.07, k...@highrolls.net wrote: > Hello fritz - > > I will reply to the list. I did paste the URL and do not know why

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: 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: "-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: 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: 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: 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: 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: 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: 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 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: 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: 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: 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-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: 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: 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: 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: 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: __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: 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: 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: 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: 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-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: [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-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: 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: 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: 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: 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: 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: 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 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: 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: 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: 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: 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: 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: 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: 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 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: 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-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: 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: 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: 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: 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

  1   2   >