Re: unused window initializer in document-based cocoa app

2009-10-07 Thread Kyle Sluder
On Sun, Oct 4, 2009 at 3:23 AM, Eimantas Vaičiūnas wrote: >- (id)init { > self = [super initWithWindowNibName:@"BlankDoc"]; > > if (self != nil) { >NSRect windowFrame = NSMakeRect(100.0f, 800.0f, 500.0f, 500.0f); >self.window = [[BlankWindow alloc] initWithContentRect:windowFrame You're

Re: Active Read/Write of NSTask

2009-10-07 Thread Kyle Sluder
On Tue, Oct 6, 2009 at 4:30 PM, Kevin Ferguson wrote: > Any ideas on how to accomplish what I'm after? You might want to brush up on your UNIX a bit. You can't tell when the process on the other end of the pipe blocks, nor should you need to. You just start sending data down your end of the pip

Re: Session log-out on Snow Leopard

2009-10-07 Thread Kyle Sluder
On Tue, Oct 6, 2009 at 5:02 AM, Etienne Henri wrote: >  In Mac OS X 10.6, it is no longer possible to send a kill the loginwindow > process (even though its owner is the current user). This non-standard > behavior is odd, and brings a limitation to software that needs to terminate > the user sessi

Re: 64bit Method Swizzling

2009-10-07 Thread Kyle Sluder
On Wed, Oct 7, 2009 at 9:02 PM, Russell Gray wrote: > I am collaborating on  getting a 64bit working version of Safari Adblock via > SIMBL. and we have it working. kind of. sometimes. Code injection things like this aren't supported. --Kyle Sluder

Re: Core Data KVO with To-Many Relationships

2009-10-07 Thread Ben Trumbull
Since my previous post, I have been able to get the functionality I was hoping for with the following code in my "Department" subclass. I would greatly appreciate some feedback as to whether this is an appropriate way to implement the functionality or if there is a more efficient or cleaner way.

Re: CoreData async fetch request

2009-10-07 Thread Ben Trumbull
On Oct 7, 2009, at 10:12 PM, David Melgar wrote: Hello, I didn't mean to state threads as a requirement when I said "async", I just meant some way to get partial results, such as a call to a delegate I referenced in the previous note. And I'm certainly not seeking complexity of threads if

NWPickerField a new iPhone control to share.

2009-10-07 Thread Scott Andrew
I have made a new iPhone control I would like to share. it is NWPickerField a new read only combo box like control for the iPhone. Check out: http://newwavedigitalmedia.com/?p=79 Scott Andrew ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) P

NSOpenPanel Performance the Second Time

2009-10-07 Thread Thomas Wetmore
I use the following function to show an open panel and get the path to a file. I have inserted three NSLog calls. This first time I call this function the panel opens immediately and the three log messages follow each other immediately. The second and every later time I call this function,

Re: app delegate +initialize

2009-10-07 Thread John Baldwin
Thanks everyone. Looked back and found the documentation that I thought recommended this technique. Sure enough, I missed something. John On Wednesday Oct 7 10:00 PM, at 10:00 PM, Rob Keniger wrote: Both the responses to this have been spot on, but I'd just add that what you can do is cre

Re: Session log-out on Snow Leopard

2009-10-07 Thread Stephen J. Butler
On Tue, Oct 6, 2009 at 7:02 AM, Etienne Henri wrote: >  Since Mac OS X 10.0, killing the loginwindow process had been the way to > terminate a session. As far as I know, all other methods allow the user to > cancel (or at least postpone) the log-out which is unacceptable in my case. >  Does anyone

Re: IB creating NULL outlet...

2009-10-07 Thread Kevin Cathey
> It shows the correct outlet name, but nothing to indicate the outlet is > hooked up to this View. In the connections display (right-click on your blue-cube), if an outlet is connected, it will have a gray rounded rectangle clearly marking the outlet as connected. On the right hand side it will

Re: Citrix Scan for Macintosh

2009-10-07 Thread Graham Cox
On 06/10/2009, at 7:28 PM, phi...@free.fr wrote: Hi, is anyone familiar with the Citrix Access Gateway Scan for Macintosh? If so, why can't it detect the connecting Mac's MAC address? Can MAC address detection be added to the Scan using one of the Citrix SDKs? Many thanks. This is

Re: IB creating NULL outlet...

2009-10-07 Thread Graham Cox
On 06/10/2009, at 10:06 AM, Jeff Diamond wrote: When I run the application, the IBOutlet comes up zero, so apparently the hook up failed. I'm wondering if I'm missing something very basic here. Are you certain you aren't instantiating a second controller object in your code? That would c

Re: Base64 encoding and deprecated stringWithCString: length:

2009-10-07 Thread Clark Cox
On Mon, Oct 5, 2009 at 8:28 AM, Nala Gnirut wrote: > Hi all, > I'm trying to use in a new Cocoa project base64 code sample from here: > > http://snipurl.com/sc6wd > > Part of the code adopts deprecated + (id)stringWithCString:(const char > *)cString length:(NSUInteger)length > > so I'm replacing >

Re: app delegate +initialize

2009-10-07 Thread Rob Keniger
On 08/10/2009, at 1:39 PM, John Baldwin wrote: > Inside the xib is a window which is set to visible at launch. The error > happens in the window controller for this window, which is expecting the user > defaults to be initialized by the AppController instance. > > So I'm expecting the AppContr

Re: I think there's a problem in the documentation for NSComboBox

2009-10-07 Thread Scott Anguish
OK, here is the deal, right from the horses mouse (see how I did that??? eh eh?) most informal methods moved to formal methods. this changed the availability because they used to be categories on NSObject, and they aren’t anymore. developers didn’t like this. we (devpubs) did’t like this. the n

Active Read/Write of NSTask

2009-10-07 Thread Kevin Ferguson
Greetings, I am working on an application that will allow the user to run a command-line binary from within my program. This is a simple binary written in C. To accomplish this, I am using NSTask to execute the binary. I then output the result of the task to a text view in my program. All of

NSLocale currentLocale for Root User

2009-10-07 Thread Edward Chan
Hi, What is the expected value for [[NSLocale currentLocale] objectForKey:NSLocaleLanguageCode] when running as root? In my French installed version (actually selected French for install, did not change user pref) of 10.5.8, I get back ³fr², however, in my French installed version of 10.6, I get

Re: Core Data KVO with To-Many Relationships

2009-10-07 Thread John McIntosh
Since my previous post, I have been able to get the functionality I was hoping for with the following code in my "Department" subclass. I would greatly appreciate some feedback as to whether this is an appropriate way to implement the functionality or if there is a more efficient or cleaner way.

Catching Global Mouse Events Java

2009-10-07 Thread mike cann
Hi Guys, I have been forwarded here from the JNA list by a very helpful Timothy Wall for advice and hints from you guys. Im attempting to capture low-level events in OSX (for now mouse events) and then pass them to Java. I have a very simple version of this working in C (XCode) using the Carbon

Request NSEventTypeFourFingerSwipe

2009-10-07 Thread Andreas Hegenberg
Hi! In NSEvent.h those multitouch masks are defined: NSEventMaskGesture = 1 << NSEventTypeGesture, NSEventMaskMagnify = 1 << NSEventTypeMagnify, NSEventMaskSwipe= 1U << NSEventTypeSwipe, NSEventMaskRotate = 1 << v, NSEventMaskBeginGesture = 1 << NS

Session log-out on Snow Leopard

2009-10-07 Thread Etienne Henri
Hi all, In Mac OS X 10.6, it is no longer possible to send a kill the loginwindow process (even though its owner is the current user). This non-standard behavior is odd, and brings a limitation to software that needs to terminate the user session. Since Mac OS X 10.0, killing the loginwindow p

Citrix Scan for Macintosh

2009-10-07 Thread phiroc
Hi, is anyone familiar with the Citrix Access Gateway Scan for Macintosh? If so, why can't it detect the connecting Mac's MAC address? Can MAC address detection be added to the Scan using one of the Citrix SDKs? Many thanks. p ___ Cocoa-dev mailing

Re: NSNotificationCenter problem using new blocks style API calls

2009-10-07 Thread Jeremy Gordon
Yup, something basic. From the documentation: "You must retain the returned value as long as you want the registration to exist in the notification center." Once I held on to the return value from addObserverForName to protect it from garbage collection, everything worked as expected. No

NSNotificationCenter problem using new blocks style API calls

2009-10-07 Thread Jeremy Gordon
Hi, I'm experiencing a problem with NSNotificationCenter when trying to use the new blocks style interface. If I register an observer to call me back the traditional way via a selector, then all is well. If I register an observer and pass it a block of code, the code in my block is neve

IB creating NULL outlet...

2009-10-07 Thread Jeff Diamond
This is related to my previous thread. I have a situation in which an IBOutlet I've defined is getting a value of 0, leaving me unable to communicate with a GUI object. I'm using XCode 3.1. Here's a summary of the scenario in IB: I have dragged an NSObject (blue cube) to my MainMenu.xib fol

Problems calling a method from an IB-created instance...

2009-10-07 Thread Jeff Diamond
This concept is so fundamental, but I've seen no specific docs about it, and I haven't succeeded with this after almost 2 years of trying an reading every tutorial and mail list on the web. As near as I understand it, what Cocoa calls "outlets" are nothing more than dynamic instance pointers s

Core Data KVO with To-Many Relationships

2009-10-07 Thread John McIntosh
Hi all. I am working on a Core Data application which contains an entity that needs to be notified of changes in entities that it has a relationship to. Let's talk about this in terms of Apple's example with Departments and Employees. As described here (http://developer.apple.com/mac/library/DOCUME

Objective Lua

2009-10-07 Thread Petite Abeille
Q: I think you're mad. A: Well, yes. http://www.cowlark.com/objective-lua/ Courtesy David Given Production. -- PA. http://alt.textdrive.com/nanoki/ ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator

Base64 encoding and deprecated stringWithCString: length:

2009-10-07 Thread Nala Gnirut
Hi all, I'm trying to use in a new Cocoa project base64 code sample from here: http://snipurl.com/sc6wd Part of the code adopts deprecated + (id)stringWithCString:(const char *)cString length:(NSUInteger)length so I'm replacing long base64Length = BIO_get_mem_data(mem, &base64Pointer); NSSt

unused window initializer in document-based cocoa app

2009-10-07 Thread Eimantas Vaičiūnas
Hi all! I'm creating a document-based app with custom drawn windows. I've created a custom window controller and overrode the makeWindowControllers method in my document subclass like so: - (void)makeWindowControllers {   windowController = [[BlankWindowController alloc] init];   [self addWindow

Re: app delegate +initialize

2009-10-07 Thread Graham Cox
On 08/10/2009, at 2:39 PM, John Baldwin wrote: The AppController has a +initialize method which initializes my user defaults. It's better to initialise your defaults in your app delegate's - applicationWillFinishLaunching: method, since it is called at a completely invariant time during t

Re: [iPhone] WebView and problem with rotation

2009-10-07 Thread Bob Barnes
Bartosz, It's a little difficult to know for sure without seeing your code, but your comment that "I change a size of webview" makes me a bit suspicious that you're not letting autoresizing do the work for you. I have an app that uses a webview to display a pdf and it resizes properly

Re: app delegate +initialize

2009-10-07 Thread Henry McGilton (Boulevardier)
On Oct 7, 2009, at 8:39 PM, John Baldwin wrote: Perhaps that's what's tripping me up: bogus expectations. Here's what I have set up. In the xib file, the File's Owner delegate is set to an AppController instance (an object in the xib). The AppController has a +initialize method which ini

64bit Method Swizzling

2009-10-07 Thread Russell Gray
Hi all, I am collaborating on getting a 64bit working version of Safari Adblock via SIMBL. and we have it working. kind of. sometimes. the Method Swizzling is where we are getting caught out. we have the following code, which should work - however it doesn't. //Ad swiz

Re: app delegate +initialize

2009-10-07 Thread John Baldwin
Perhaps that's what's tripping me up: bogus expectations. Here's what I have set up. In the xib file, the File's Owner delegate is set to an AppController instance (an object in the xib). The AppController has a +initialize method which initializes my user defaults. Inside the xib is a

Re: Autorelease pool

2009-10-07 Thread Wim Lewis
On Oct 7, 2009, at 2:53 PM, Michael Süssner wrote: After my test program has passed successfully the drain method of the autorelease buffer is called and "sometimes" I get the following error: Program received signal: “EXC_BAD_ACCESS”. sharedlibrary apply-load-rules all How can I track wh

Re: View Hierarchies for apps like Quartz Composer

2009-10-07 Thread Gordon Apple
(Crud -- Forgot to change the title again. Sorry about that. -- GA) IMHO, you are trying to do this the hard way. I did one similar to that, using views, many years ago using MacApp. (Presented it at MadaCon in Phoenix.) I wouldn't do it that way again. Just draw everything in one view

Re: Cocoa-dev Digest, Vol 6, Issue 1443

2009-10-07 Thread Gordon Apple
IMHO, you are trying to do this the hard way. I did one similar to that, using views, many years ago using MacApp. (Presented it at MadaCon in Phoenix.) I wouldn't do it that way again. Just draw everything in one view. Define a draw-shape object with lists of inputs and outputs (could be ob

Re: feeble anti-aliasing

2009-10-07 Thread Greg Guerin
Colin Howarth wrote: I posted a couple of little screen shots (which compressed nicely to 16k and 30k or so) to the quartz-dev list. I got an automated reply that they're awaiting moderator approval (for having gone over 20k). Probably, if and when the images are posted, someone will say,

Re: View Hierarchies for apps like Quartz Composer

2009-10-07 Thread Graham Cox
On 08/10/2009, at 11:03 AM, Darren Minifie wrote: Hi Everyone I've recently tried implementing a tool that functioned similar to Quartz Composer (the tool was for an entirely different purpose, and I did not know about Quartz Composer at the time). Basically, the user is presented with

Re: CoreData async fetch request

2009-10-07 Thread Ben Trumbull
On Oct 6, 2009, at 8:29 PM, David Melgar wrote: Hello, Thanks for the response. Seems that its straying somewhat from my original question. Sure, your original question is that you have a serious performance issue, and you'd like to hide it from the user by adding threads. I'm proposin

Re: Reacting to UIBarButtonItem

2009-10-07 Thread Anthony Smith
Yes, user interaction enabled is set in IB for the nav bar. On Oct 7, 2009, at 9:04 PM, Luke the Hiesterman wrote: Make sure that your navBar's userInteractionEnabled property is set to YES. Luke On Oct 7, 2009, at 5:58 PM, Anthony Smith wrote: Hm, both seem to be fine. - (void)viewDidLo

Re: Reacting to UIBarButtonItem

2009-10-07 Thread Luke the Hiesterman
Make sure that your navBar's userInteractionEnabled property is set to YES. Luke On Oct 7, 2009, at 5:58 PM, Anthony Smith wrote: Hm, both seem to be fine. - (void)viewDidLoad { [super viewDidLoad]; if (doneButton != nil) { NSLog(@"NOT NIL");

Re: debugging cursors

2009-10-07 Thread David M. Cotter
okay what i *really* need to do is override the OS *ever* setting the cursor to arrow eg: [[NSCursor arrowCursor] set]; i want to override that. i need to tell the OS to knock it off. worst case i need a notify that the OS changed the cursor out from under me. On Oct 7, 2009, at 5:50

Re: Problem using filewrappers under snow leopard

2009-10-07 Thread Graham Cox
On 08/10/2009, at 3:33 AM, Eagle Offshore wrote: Oops, I misspoke. I am doing it "right" AFAICS. Here's the whole method - (NSFileWrapper *)fileWrapperOfType:(NSString *)aType error: (NSError**)errPtr { int i, count = [_songs count]; NSMutableDictionary * fileWrappers = [NSMutabl

debugging cursors

2009-10-07 Thread David M. Cotter
how do i tell the OS to stop setting my cursor to the beachball whilst stopped in the debugger? i'm debugging my cursor setting stuff and that makes it impossible ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requ

Re: Reacting to UIBarButtonItem

2009-10-07 Thread Luke the Hiesterman
I'd verify that doneButton != nil. If you created this in a nib, you might have forgotten to wire it up. Luke On Oct 7, 2009, at 5:40 PM, Anthony Smith wrote: Here's what I'm doing. - (void)displayShuffleView:(id)sender { // Whatever here } - (void)viewDidLoad { [super view

Re: Reacting to UIBarButtonItem

2009-10-07 Thread Anthony Smith
Here's what I'm doing. - (void)displayShuffleView:(id)sender { // Whatever here } - (void)viewDidLoad { [super viewDidLoad]; [doneButton setTarget:self]; [doneButton setAction:@selector(displayShuffleView:)]; } I'm not sure what's up. self is a UIViewCon

Re: UITabBar & UIActionSheet

2009-10-07 Thread Henry McGilton (Boulevardier)
On Oct 7, 2009, at 4:35 PM, Luke the Hiesterman wrote: If you subclass UITabBar you can get the touches yourself and respond appropriately. Luke You can also set a delegate for the Tab Bar Controller and implement the - (void)tabBarController:(UITabBarController *)tabBarController didSe

Re: Reacting to UIBarButtonItem

2009-10-07 Thread Luke the Hiesterman
Target and action is the way to go. There must be an error in doing so, probably a typo in setting the action selector. Remember that colons are part of selector names Luke On Oct 7, 2009, at 5:25 PM, Anthony Smith wrote: I have a settings pane similar to Weather's settings pane. I have

Reacting to UIBarButtonItem

2009-10-07 Thread Anthony Smith
I have a settings pane similar to Weather's settings pane. I have a Done button on the right hand side which needs to trigger a flip animation to get back to the main view. I'm having trouble getting the UIBarButtonItem to trigger. I've tried setting the target and action properties of UIBa

Re: Understanding CFMakeCollectable (was: EXC_BAD_ACCESS when -fobjc-gc)

2009-10-07 Thread Clark Cox
On Wed, Oct 7, 2009 at 3:09 PM, Dave Carrigan wrote: > > For new code, the typical pattern is > > CFTypeRef obj = CFMakeCollectable(CFCreateType(…));             // no-op in > non-gc; releases and makes eligible for collection in gc > // ... > if ([NSGarbageCollector defaultCollector] == NULL) CFR

View Hierarchies for apps like Quartz Composer

2009-10-07 Thread Darren Minifie
Hi Everyone I've recently tried implementing a tool that functioned similar to Quartz Composer (the tool was for an entirely different purpose, and I did not know about Quartz Composer at the time). Basically, the user is presented with a canvas. On the canvas, the user can place squares that rep

Re: Understanding CFMakeCollectable (was: EXC_BAD_ACCESS when -fobjc-gc)

2009-10-07 Thread Clark Cox
On Wed, Oct 7, 2009 at 2:48 PM, Gabriel Zachmann wrote: > Thanks for your response. > >> No. CFRetain & CFRelease continue to work the same regardless of GC. That >> is, the reference count field still exists, but Obj-C objects in GC start >> life with a 0 retain count and -retain/-release/-retain

[MEET] CocoaHeads-NYC tomorrow night, Thu 10/8

2009-10-07 Thread Andy Lee
Alex McAuley will give a talk entitled "The Wonders of kqueue." What can I say, the guy really likes kqueue. As usual: (1) Please feel free to bring questions, code, and works in progress. We have a projector and we like to see code and try to help. (2) We'll have burgers and beer afterwards.

Re: Cocoaheads Lake Forest (92630) meeting 9/8/2009 at 7 pm on Google Toolkit for Mac

2009-10-07 Thread Scott Ellsworth
On Wed, Oct 7, 2009 at 11:54 AM, James Gregurich wrote: > is the group meeting tonight? I haven't seen a notice go out. I had it scheduled for Oct. 14th - second tuesday. Does this work for you? Scott > > On Sep 8, 2009, at 8:54 PM, Scott Ellsworth wrote: > >> CocoaHeads Lake Forest will be me

Re: feeble anti-aliasing

2009-10-07 Thread Colin Howarth
On 8 Oct, 2009, at 01:19, Greg Guerin wrote: Colin Howarth wrote: I don't know enough about what Quartz is doing. For instance, does it calculate the coverage of a pixel (i.e. the fraction covered) as a float and then use that times 255 for pixel values (for black on white) giving 256 steps

Re: EXC_BAD_ACCESS when -fobjc-gc is on (Was: Memory corruption ...)

2009-10-07 Thread Gabriel Zachmann
No, in GC a retain/release/autorelease always translates to a no-op. An "id" or "SomeObject*" translates to a strong reference unless specifically marked as weak. So in the GC world, there is no difference between @property(retain) and @property(assign), is there? "If the object is in the g

Re: UITabBar & UIActionSheet

2009-10-07 Thread Luke the Hiesterman
If you subclass UITabBar you can get the touches yourself and respond appropriately. Luke On Oct 7, 2009, at 4:03 PM, Mark Bateman wrote: Hi, I have an app that uses a TabBarController and on certain of the tabbar items I want the user to be presented with a UIActionsheet even if the us

Re: Alert prompts for BetterAuthorizationSample

2009-10-07 Thread Jerry Krinock
On 2009 Oct 07, at 12:25, Todd Heberlein wrote: On Oct 7, 2009, at 12:05 PM, Olivier Palliere wrote: If you remove your rights..., re-installing your helper will recreate the rights with the new value. Ka-ching! Thanks a million! I was at my wit's end. BUT THEN on 2009 Oct 07, at 13:18

Re: feeble anti-aliasing

2009-10-07 Thread Greg Guerin
Colin Howarth wrote: I don't know enough about what Quartz is doing. For instance, does it calculate the coverage of a pixel (i.e. the fraction covered) as a float and then use that times 255 for pixel values (for black on white) giving 256 steps. Or does it quantize down to 16 steps, for e

UITabBar & UIActionSheet

2009-10-07 Thread Mark Bateman
Hi, I have an app that uses a TabBarController and on certain of the tabbar items I want the user to be presented with a UIActionsheet even if the user presses the the same tab bar item that is currently selected. I have tried the viewwillappear method and that works only if i select an

Re: Autorelease pool

2009-10-07 Thread Uli Kusterer
On 08.10.2009, at 00:12, Dave Carrigan wrote: Read and re-read the memory management rules until you start dreaming about them. Then you will start on the path to enlightenment :-) Wax on ... wax off. Wax on ... wax off. ... ... sorry, wrong kind of enlightenment. -- Uli Kusterer Sole

[MEETING] CocoaHeads Munich tonight!

2009-10-07 Thread Uli Kusterer
Hi, CocoaHeads Munich, Germany will be meeting again tonight, Thursday 8 Oct. at 20:00 at the Park Cafe. Hope to see many of you there. -- Uli Kusterer "The Witnesses of TeachText are everywhere..." http://www.masters-of-the-void.com ___ Cocoa-

Re: EXC_BAD_ACCESS when -fobjc-gc is on (Was: Memory corruption ...)

2009-10-07 Thread Stephen J. Butler
On Wed, Oct 7, 2009 at 3:47 PM, Gabriel Zachmann wrote: > In the doc of CALayer.contents it says > >   @property(retain) id contents > > Does a retained property always translate to a strong reference in a GC > environment? No, in GC a retain/release/autorelease always translates to a no-op. An "

Re: EXC_BAD_ACCESS when -fobjc-gc is on (Was: Memory corruption ...)

2009-10-07 Thread Gabriel Zachmann
Well, I did some more experimenting. Now I've got 2 issues ... First of all, I guess I should apologize, because my minimal example was not quite "minimal". There was one other layer, which I have removed now. Now the code sort of works in the GC world, *except* the memory footprint keeps g

Re: Autorelease pool

2009-10-07 Thread Dave Carrigan
On Oct 7, 2009, at 2:53 PM, Michael Süssner wrote: NSArray *vPolyArray = [NSArray arrayWithObjects: [[PolygonShape alloc] initWithNumberOfSides:4 minimumNumberOfSides:3 maximumNumberOfSides:7], [[PolygonShape alloc] initWithNumberOfSides:6 minimumNumberOfSides:5 maximu

Re: Understanding CFMakeCollectable (was: EXC_BAD_ACCESS when -fobjc-gc)

2009-10-07 Thread Dave Carrigan
On Oct 7, 2009, at 2:48 PM, Gabriel Zachmann wrote: So in other words, the purpose of CFMakeCollectable() is to decrease the ref-count to 0 in the GC world, and only there, is that correct? Not quite; it decreases the ref-count by 1 in a gc environment. Every CFRetain must be matched by a

Re: Autorelease pool

2009-10-07 Thread Shawn Erickson
On Wed, Oct 7, 2009 at 2:53 PM, Michael Süssner wrote: > I habe created a small shell programm using Cocoa Foundation class for test > purposes. > > After my test program has passed successfully the drain method of the > autorelease buffer is called and "sometimes" I get the following error: > Pro

Re: Understanding CFMakeCollectable (was: EXC_BAD_ACCESS when -fobjc-gc)

2009-10-07 Thread Michael Ash
On Wed, Oct 7, 2009 at 5:48 PM, Gabriel Zachmann wrote: > Thanks for your response. > >> No. CFRetain & CFRelease continue to work the same regardless of GC. That >> is, the reference count field still exists, but Obj-C objects in GC start >> life with a 0 retain count and -retain/-release/-retain

Re: Understanding CFMakeCollectable (was: EXC_BAD_ACCESS when -fobjc-gc)

2009-10-07 Thread Shawn Erickson
On Wed, Oct 7, 2009 at 2:48 PM, Gabriel Zachmann wrote: > Thanks for your response. > > No. CFRetain & CFRelease continue to work the same regardless of GC. That >> is, the reference count field still exists, but Obj-C objects in GC start >> life with a 0 retain count and -retain/-release/-retain

Re: Autorelease pool

2009-10-07 Thread Nick Zitzmann
On Oct 7, 2009, at 3:53 PM, Michael Süssner wrote: How can I track which object has already been release: You can't. Read up on the memory management rules; you've made a few mistakes in your code (assuming you're not using GC).

Window maxSize different from setMaxSize ???

2009-10-07 Thread Bill Cheeseman
Can somebody explain this to me? It's on Snow Leopard 10.6.1: In my window controller's -windowDidLoad method (or -awakeFromNib): [[self window] setMaxSize:NSMakeSize(800, 800)]; [[self window] maxSize]; // --> {800, 856} -- Bill Cheeseman b...@cheeseman.name _

Autorelease pool

2009-10-07 Thread Michael Süssner
I habe created a small shell programm using Cocoa Foundation class for test purposes. After my test program has passed successfully the drain method of the autorelease buffer is called and "sometimes" I get the following error: Program received signal: “EXC_BAD_ACCESS”. sharedlibrary apply-

Understanding CFMakeCollectable (was: EXC_BAD_ACCESS when -fobjc-gc)

2009-10-07 Thread Gabriel Zachmann
Thanks for your response. No. CFRetain & CFRelease continue to work the same regardless of GC. That is, the reference count field still exists, but Obj-C objects in GC start life with a 0 retain count and -retain/-release/- retainCount/-autorelease are no-op'd. CF objects still start life

Re: feeble anti-aliasing

2009-10-07 Thread Colin Howarth
On 7 Oct, 2009, at 23:13, Dave Keck wrote: Try applying a 0.25 or 0.5 pixel shadow that's the same color as whatever you're drawing. (This technique has worked very well for me in the past for getting a smoother look.) I'll give it a go. In fact eventually I'll end up calculating what the va

Re: feeble anti-aliasing

2009-10-07 Thread Dave Keck
Try applying a 0.25 or 0.5 pixel shadow that's the same color as whatever you're drawing. (This technique has worked very well for me in the past for getting a smoother look.) Also, I've found that offsetting my drawing code by fractions of pixels can help, but usually in the opposite case where I

Using Security framework to write self-limiting app without modifying /etc/authorization?

2009-10-07 Thread Piers Uso Walter
I am trying to write a self-limiting application (i.e. an application that asks for authorization before performing certain functions). I have reviewed the Security framework which seems to be intended for requirements like this, but fail to understand how this would work in my specific cas

Re: feeble anti-aliasing

2009-10-07 Thread Ken Ferry
On Wed, Oct 7, 2009 at 1:45 PM, Colin Howarth wrote: > On 7 Oct, 2009, at 22:19, Alastair Houghton wrote: > >> On 7 Oct 2009, at 21:11, Colin Howarth wrote: >> >> I'm surprised that the output on screen doesn't look better. >>> >> >> Usually Quartz does an extremely good job... >> > > I know. Th

Re: EXC_BAD_ACCESS when -fobjc-gc is on (Was: Memory corruption ...)

2009-10-07 Thread David Duncan
On Oct 7, 2009, at 1:47 PM, Gabriel Zachmann wrote: I did that and there is one sentence that I don't understand at all: "CFMakeCollectable calls CFRelease, but has two supplementary features: [...]; second, it’s a no-op in a reference counted environment." Shouldn't that be "a no-op in a

Re: [Xgrid] GridMandelbrot Sample gone?

2009-10-07 Thread Stefan Wolfrum
Okay, here's the answer (thanks to Knut Lorenzen, author of the excellent (german) book "Mac OS X 10.6 Snow Leopard"): Apparently, starting with Snow Leopard Apple no longer puts the developer examples on the Snow Leopard Installation discs. :-( However, they (including the GridMandelbrot sample) a

Re: EXC_BAD_ACCESS when -fobjc-gc is on (Was: Memory corruption ...)

2009-10-07 Thread Gabriel Zachmann
Thanks for the quick response. I am still a bit confused ... and, besides, I still get a core dump ;-( I think this is your problem right here. In a GC environment CALayer isn't going to retain its content, it stores a strong reference instead. First of all, how can I know that? (I'm asking s

Re: feeble anti-aliasing

2009-10-07 Thread Colin Howarth
On 7 Oct, 2009, at 22:19, Alastair Houghton wrote: On 7 Oct 2009, at 21:11, Colin Howarth wrote: I'm surprised that the output on screen doesn't look better. Usually Quartz does an extremely good job... I know. That's why I'm confused. Are there any other settings I can adjust with regard

Re: feeble anti-aliasing

2009-10-07 Thread Alastair Houghton
On 7 Oct 2009, at 21:11, Colin Howarth wrote: I'm surprised that the output on screen doesn't look better. Usually Quartz does an extremely good job... Are there any other settings I can adjust with regard to the anti- aliasing? (Not talking about flatness of Bezier curves here). Is this p

re: Alert prompts for BetterAuthorizationService

2009-10-07 Thread Mr. George Warner
On Wed, 07 Oct 2009 11:51:37 -0700, Todd Heberlein > wrote: > In Apple's BetterAuthorizationSample application pressing the > "LowNumberedPorts" button brings up a window to authorize yourself. It > includes the following text to explain why you are authorizing yourself: > "You must be autho

feeble anti-aliasing

2009-10-07 Thread Colin Howarth
Hi, I'm doing some simple drawing (black Bezier curves and lines on a white background) to a custom view which inherits directly from NSView. In - (LensView*)initWithFrame:(NSRect)frameRect I have: [self translateOriginToPoint:NSMakePoint( 20.0, (frameRect.size.height / 2) ) ]; [self sc

Re: Alert prompts for BetterAuthorizationService

2009-10-07 Thread Todd Heberlein
On Oct 7, 2009, at 12:05 PM, Olivier Palliere wrote: If you already installed your tool once and didn't change the kind of rights that it is using, then it is most likely in the /etc/ authorization file. If you remove your rights from there, re-installing your helper will recreate the rig

Re: NSAlert - multiple key equivalents for buttons?

2009-10-07 Thread David Reitter
On Oct 7, 2009, at 3:12 PM, Kyle Sluder wrote: FWIW, the alerts are run with beginModalSessionForWindow and runModalSession. So I don't understand why you're so intent on using NSAlert if you're not using its -beginSheetModalForWindow:… convenience method? Oh, I use it. But because of the

Re: Strange Core Data problem after upgrade

2009-10-07 Thread Kyle Sluder
On Wed, Oct 7, 2009 at 12:13 PM, Rui Pacheco wrote: > Should override -initWithEntity:insertIntoManagedObjectContext: ? I would not recommend doing so. I was merely asking because it seemed like that might be what you are doing, and if it was I would advise against it. Also, please keep discuss

Re: NSAlert - multiple key equivalents for buttons?

2009-10-07 Thread Kyle Sluder
On Wed, Oct 7, 2009 at 12:01 PM, David Reitter wrote: > I meant NSObject's -copy.  Confused it with Java's clone method. NSWindow doesn't conform to NSCopying anyway, so -copy will just raise an exception because there is no suitable implementation of -copyWithZone:. > FWIW, the alerts are run w

Re: Alert prompts for BetterAuthorizationService

2009-10-07 Thread Olivier Palliere
Hi Todd, If you already installed your tool once and didn't change the kind of rights that it is using, then it is most likely in the /etc/ authorization file. If you remove your rights from there, re-installing your helper will recreate the rights with the new value. Olivier./. Molowa.c

Re: NSAlert - multiple key equivalents for buttons?

2009-10-07 Thread David Reitter
On Oct 7, 2009, at 2:48 PM, Kyle Sluder wrote: On Wed, Oct 7, 2009 at 11:19 AM, David Reitter > wrote: window = (MyNSAlert*) [window clone]; What is this -clone method? I meant NSObject's -copy. Confused it with Java's clone method. That way I could get NSAlert to do all the layout and pr

Alert prompts for BetterAuthorizationService

2009-10-07 Thread Todd Heberlein
In Apple's BetterAuthorizationSample application pressing the "LowNumberedPorts" button brings up a window to authorize yourself. It includes the following text to explain why you are authorizing yourself: "You must be authorized to open low-numbered TCP ports. Type your password to allow B

Re: NSAlert - multiple key equivalents for buttons?

2009-10-07 Thread Kyle Sluder
On Wed, Oct 7, 2009 at 11:19 AM, David Reitter wrote: > window = (MyNSAlert*)  [window clone]; What is this -clone method? > That way I could get NSAlert to do all the layout and prepare the window, > but then take over and roll my own? No, because even granting the existence of this -clone met

Re: [iPhone] Application running for the very first time...

2009-10-07 Thread Steve Christensen
On Oct 7, 2009, at 10:47 AM, Marco S Hyman wrote: On Oct 7, 2009, at 10:33 AM, Steve Christensen wrote: In that case if ([[NSUserDefaults standardUserDefaults] boolForKey:@"PIFirstRun"] == YES){ [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"PIFirstRun"];

Re: EXC_BAD_ACCESS when -fobjc-gc is on (Was: Memory corruption ...)

2009-10-07 Thread Stephen J. Butler
On Wed, Oct 7, 2009 at 1:13 PM, Gabriel Zachmann wrote: > - (CALayer *) makeImageLayer: (NSString *) img_name inRect: (NSSize) size > { >// [snip] >    CGImageRef cgImage = CGImageSourceCreateImageAtIndex( sourceRef, 0, NULL > ); >// [snip] >    imgLayer.contents = (id) cgImage; >// [s

Re: Constructive Criticism

2009-10-07 Thread Bill Bumgarner
On Oct 7, 2009, at 9:53 AM, Derek Chesterfield wrote: Just an aside, but does either syntax got optimised by the compiler (GCC or LLVM). Obviously it can't in all cases, but this seems an obvious case where it could be replaced by an assignment. Message sends can never be optimized away by

Re: NSAlert - multiple key equivalents for buttons?

2009-10-07 Thread David Reitter
On Oct 7, 2009, at 2:09 PM, Jens Alfke wrote: I think the best way is to create your own alert panel in a nib and run it modally. That way you have total control — you can set your own window delegate to handle key events, for example. I had a similar solution beforehand but gave up on it b

EXC_BAD_ACCESS when -fobjc-gc is on (Was: Memory corruption ...)

2009-10-07 Thread Gabriel Zachmann
I think I have constructed a minimal example which shows at least one instance of the memory corruption under 10.6 I am struggling with at the moment. It is a stand-alone Cocoa app with just an NSView and one CALayer and an animation on it, that gets replaced every few seconds. The relevan

  1   2   >