Join me in Pearltrees

2011-02-22 Thread praveenmatanam
___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/

Re: [NSBitmapImageRep getBitmapDataPlanes] copying data?

2011-02-22 Thread Jonathan Taylor
On 21 Feb 2011, at 23:49, Ken Thomases wrote: > What makes you think the data copy is "extra"? > > If you read that AppKit release note, you'll see that NSImage may not be > decoding the file contents right off the bat. For example, it mentions that > "[i]f you initialize a NSImage from a JPEG

unloading an launch agent with in the same process

2011-02-22 Thread Rajendran P
Hi All , I have a ui based application which is launched by launch agent .The user is provided with an option to exit/ quit from the same applicaion . what is the best way to unload the application ? P.Rajendran or Raju (for further details contact me )

Re: unloading an launch agent with in the same process

2011-02-22 Thread Arun
Make sure it is launched only once. This can be set as a value in the launch agent plist. -Arun On Tue, Feb 22, 2011 at 4:36 PM, Rajendran P wrote: > > > Hi All , > I have a ui based application which is launched by launch agent .The > user is provided with an option to exit/ quit from

Re: unloading an launch agent with in the same process

2011-02-22 Thread Jerry Krinock
On 2011 Feb 22, at 03:14, Arun wrote: > Make sure it is launched only once. This can be set as a value in the launch > agent plist. If you can't use Arun's idea, then you'll need to unload it by invoking launchctl as an NSTask, because I've never been able to find an API to do this. P.S. For

Accessing a managedObject property from within an accessor of another property

2011-02-22 Thread Brad Stone
I've been trying for days to determine why I get EXC_BAD_ACCESS when I try to access a managedObject property from within an accessor of another property? this code in main.m [[self note] setValue:@"HELLO WORLD" forKey:@"category"]; NSNumber *tmpVal = [NSNumber numberWithBool:![[[self note] valu

Fwd: Accessing a managedObject property from within an accessor of another property

2011-02-22 Thread Brad Stone
FYI - my managedObject is defined as such: @interface Note : NSManagedObject { } @property (nonatomic, retain) NSNumber * uid; @property (nonatomic, retain) NSString * category; @property (nonatomic, retain) NSNumber * isEncrypted; @interface Note (CoreDataGeneratedPrimitiveAccessors) - (NSS

Re: Accessing a managedObject property from within an accessor of another property

2011-02-22 Thread Uli Kusterer
On 22.02.2011, at 16:13, Brad Stone wrote: > FYI - my managedObject is defined as such: > > @interface Note : NSManagedObject > { > } That's probably not your problem, but just to eliminate it as a cause: You should prefix your class names. Apple has been known to create internal private cla

Re: Accessing a managedObject property from within an accessor of another property

2011-02-22 Thread Brad Stone
Yes, all my other classes are prefixed with "SR" since this one. I haven't gotten back to fixing this. On Feb 22, 2011, at 10:22 AM, Uli Kusterer wrote: > On 22.02.2011, at 16:13, Brad Stone wrote: >> FYI - my managedObject is defined as such: >> >> @interface Note : NSManagedObject >> { >>

Problem opening file

2011-02-22 Thread Carlos Eduardo Mello
Hi there, I have a configuration file which is used by an internal library in my app's data model engine. The engine was written in c++ and needs this file for loading the app's documents correctly. Theis file never changes and shouldn't have to be seen or open by the user. Its contents

Re: Problem opening file

2011-02-22 Thread Sherm Pendley
On Tue, Feb 22, 2011 at 10:47 AM, Carlos Eduardo Mello wrote: > > I have a configuration file which is used by an internal library in my app's > data model engine. The engine was written in c++ and needs this file for > loading the app's documents correctly. Theis file never changes and > shouldn'

Re: Problem opening file

2011-02-22 Thread Scott Ribe
On Feb 22, 2011, at 9:14 AM, Sherm Pendley wrote: >> I imagine I have to deal >> with application bundle api, but the thing is I can't add any cocoa code to >> this library, as it needs remain cross-platform. > > Does this library allow you to specify the full path to its config > file, instead o

Re: How to detect when an NSTextView has finished being loaded into a window?

2011-02-22 Thread Keith Blount
Many thanks for the reply. Yes, you're right - the text view could get deallocated in -viewDidMoveToWindow which is indeed a recipe for disaster and was causing the issues. (I should have realised that in the first place, but by the time the page layout set-up got moved to a method responding to

Re: Accessing a managedObject property from within an accessor of another property

2011-02-22 Thread Quincey Morris
On Feb 22, 2011, at 06:19, Brad Stone wrote: > I've been trying for days to determine why I get EXC_BAD_ACCESS when I try to > access a managedObject property from within an accessor of another property? > > this code in main.m > [[self note] setValue:@"HELLO WORLD" forKey:@"category"]; > NSNumb

Reliable way to determine bitness of the kernel

2011-02-22 Thread eveningnick eveningnick
hello i have a kext (or, rather, 2 kexts - one built with -arch i386, another one with -arch x86_64). They should work on both OS X 10.5 and 10.6. i have an installing script, which looks like if [ `uname -a | grep x86_64 | wc -l` ge 1 ]; then cp -R "64bit.kext" "/Library/Extensions/" else cp

Re: Accessing a managedObject property from within an accessor of another property

2011-02-22 Thread Brad Stone
Quincey, Thanks for relying. It's good to have another developer to talk this thru with. 1) customer accessors for isEncrypted didn't work (I have a set exactly like category) 2) I'm using garbage collection 3) I tried [note isEncrypted] same error 4) i tried using a local ivar i..e Note *thisN

Re: Reliable way to determine bitness of the kernel

2011-02-22 Thread Wim Lewis
On 22 Feb 2011, at 10:09 AM, eveningnick eveningnick wrote: > i have a kext (or, rather, 2 kexts - one built with -arch i386, another one > with -arch x86_64). They should work on both OS X 10.5 and 10.6. > i have an installing script, which looks like > if [ `uname -a | grep x86_64 | wc -l` ge 1

Re: Reliable way to determine bitness of the kernel

2011-02-22 Thread Dave Zarzycki
We support "fat" binaries. Please use them to avoid this problem entirely. You just need to reconfigure your kext project to build both architectures at the same. A simple example from the command line: /tmp $ cat test.c #include int main(void) { printf("sizeof(void *) == %zu\n

Re: Accessing a managedObject property from within an accessor of another property

2011-02-22 Thread Quincey Morris
On Feb 22, 2011, at 10:10, Brad Stone wrote: > 2) I'm using garbage collection Then my money's on a memory management error with the [self note] object. Can you show the code for [self note] and/or show the strong reference that keeps it alive? ___

iOS: Calling up numeric keypad

2011-02-22 Thread Jon Sigman
I have a UITextField that should accept only numerics. Is there a way to set the textfield so that when the user touches it, the numeric keypad comes up instead of the alpha keypad? iOS 4.2.1 ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.

Re: Accessing a managedObject property from within an accessor of another property

2011-02-22 Thread Quincey Morris
On Feb 22, 2011, at 10:10, Brad Stone wrote: > 2) I'm using garbage collection Also, it's worth checking that you really have garbage collection turned on. It's easy mistake to turn it on in the project build settings and not realize that the target settings turn it off. The symptoms you've bee

Re: Reliable way to determine bitness of the kernel

2011-02-22 Thread eveningnick eveningnick
thanks for detailed description of the solution ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/U

Re: Accessing a managedObject property from within an accessor of another property

2011-02-22 Thread Felix Franz
On Feb 22, 2011, at 3:19 PM, Brad Stone wrote: > I've been trying for days to determine why I get EXC_BAD_ACCESS when I try to > access a managedObject property from within an accessor of another property? Could you post the stack trace? Just for debugging purposed: What happens if you define

Re: Accessing a managedObject property from within an accessor of another property

2011-02-22 Thread Brad Stone
The category gets changed properly: (gdb) po [self note] uid:319991742678124 category:HELLO WORLD isEncrypted:0 (gdb) po thisNote Then, after I try to set isEncrypted to [NSNumber numberWithBool:YES] I get this after I po thisNote. I'm assuming since I can successfully change the string in

Re: iOS: Calling up numeric keypad

2011-02-22 Thread Laurent Daudelin
I'm surprised nobody replied to this yet. Open the interface file in Interface Builder. Set the keyboard for that UITextField to use the numeric keyboard. Then, each time the user touches the textfield, the numeric keyboard will show up. -Laurent. -- Laurent Daudelin AIM/iChat/Skype:LaurentDau

Re: Problem opening file

2011-02-22 Thread Carlos Eduardo Mello
On Feb 22, 2011, at 1:46 PM, Scott Ribe wrote: On Feb 22, 2011, at 9:14 AM, Sherm Pendley wrote: I imagine I have to deal with application bundle api, but the thing is I can't add any cocoa code to this library, as it needs remain cross-platform. Does this library allow you to specify the

Re: iOS: Calling up numeric keypad

2011-02-22 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 2/22/11 12:56 PM, Laurent Daudelin wrote: > I'm surprised nobody replied to this yet. Open the interface file in > Interface Builder. Set the keyboard for that UITextField to use the > numeric keyboard. Then, each time the user touches the textfield

Re: Accessing a managedObject property from within an accessor of another property

2011-02-22 Thread Quincey Morris
On Feb 22, 2011, at 12:21, Brad Stone wrote: > I'm assuming since I can successfully change the string in category my > reference to [self note] is OK. This is an absolutely false assumption. If, as I'm hypothesizing, [self note] is returning a zombie object (or it becomes a zombie object after

Trouble retrieving selection from NSArrayController

2011-02-22 Thread Ayers, Joseph
I have an app that has a NSTableView populated with and array of Tapes from CoreData. Tapes is declared as: @interface Tapes : NSManagedObject { NSString * TapeName; NSDate * TapeDate; NSString * Notes; NSSet* VideoClip; } The TableView is bound to an NSArrayController (tap

Re: Trouble retrieving selection from NSArrayController

2011-02-22 Thread Mike Abdullah
On 22 Feb 2011, at 21:30, Ayers, Joseph wrote: > I have an app that has a NSTableView populated with and array of Tapes from > CoreData. Tapes is declared as: > @interface Tapes : NSManagedObject > { >NSString * TapeName; >NSDate * TapeDate; >NSString * Notes; >NSSet* Vid

Re: Trouble retrieving selection from NSArrayController

2011-02-22 Thread Quincey Morris
On Feb 22, 2011, at 13:30, Ayers, Joseph wrote: > @interface Tapes : NSManagedObject > { >NSString * TapeName; >NSDate * TapeDate; >NSString * Notes; >NSSet* VideoClip; > } Incidentally, what are those instance variables doing in the managed object subclass? They seem *ext

Re: Trouble retrieving selection from NSArrayController

2011-02-22 Thread Ayers, Joseph
Here's the interface I understood from Scott Stevensons book that in 32bit mode you had to declare the instance variables. // // Tapes.h // Roboplasm // // Created by Joseph Ayers on 10/11/10. // Copyright 2010 Northeastern University. All rights reserved. // #import #import "VideoCli

Re: iOS: Calling up numeric keypad

2011-02-22 Thread Jon Sigman
That's awesome. I never knew you could do that. Works great! Thanks Conrad and Laurent! From: Conrad Shultz To: Laurent Daudelin Cc: Jon Sigman ; cocoa-dev@lists.apple.com Sent: Tue, February 22, 2011 1:06:40 PM Subject: Re: iOS: Calling up numeric keypad --

Re: Trouble retrieving selection from NSArrayController

2011-02-22 Thread Quincey Morris
On Feb 22, 2011, at 15:04, Ayers, Joseph wrote: > I understood from Scott Stevensons book that in 32bit mode you had to declare > the instance variables. Nope, not for Core Data (not unless you need instance variables *of your own* to implement custom properties or for some other reason). Core

NSTextView truncating right side when printed...

2011-02-22 Thread Bruce Cresanta
Hello, I'm trying to print an NSTextView of HTML code.The right side is truncated on the actual printout.Suggestions to correct this are appreciated. Thanks, Bruce ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post adm

Re: NSTextView truncating right side when printed...

2011-02-22 Thread Graham Cox
On 23/02/2011, at 11:24 AM, Bruce Cresanta wrote: > I'm trying to print an NSTextView of HTML code.The right side is > truncated on the actual printout.Suggestions to correct this are > appreciated. What do you want it to do to be 'correct'? What have you tried? It's typical for HTML

Re: NSTextView truncating right side when printed...

2011-02-22 Thread Bruce Cresanta
I've tried word wrap, but I haven't tried character wrap yet.I thought it might have to do with layout in IB, but that is false because of the underlying text system/pdf.I don't understand your comment about tiling. Bruce On Feb 22, 2011, at 4:44 PM, Graham Cox wrote: > > On 23/02/2011

Re: Accessing a managedObject property from within an accessor of another property

2011-02-22 Thread Brad Stone
In my Note entity: self = (Note *)0x20027bda0 In my .h file have this property defined: @property (nonatomic, retain) NSNumber * isFlagged; and this in .m @dynamic isFlagged; and no custom accessors New code in my Note entity: - (void)setIsEncrypted:(NSNumber *)value { // see po #1 which

Re: Accessing a managedObject property from within an accessor of another property

2011-02-22 Thread Brad Stone
SCENARIO 1: The thread is: 0 - [SRMainWindowController toggleLock:] //self = (SRMainWindowController *) 0x20009d440 1-[NSToolbarButton sendAction:to:] - (IBAction)toggleLock:(id)sender { NSError *fetchError = nil; NSArray *fetchResults; NSFetchRequest *fetchRequest = [[

CoreData migration opens ~ file by mistake

2011-02-22 Thread Jim Thomason
I'm finally trying to do my first CoreData migration using the "new" style 10.5 built-in migration tools. I'd abandoned my ad-hoc Tiger one a while back and finally needed to migrate. I'm building on Snow Leopard, and bugs and glitches aside (such as the workaround for migration for Leopard deploy

Re: Accessing a managedObject property from within an accessor of another property

2011-02-22 Thread Quincey Morris
That's a lot of information you posted. :) Unfortunately, *based on the posted information* there's nothing obviously wrong except that you've shot yourself in the foot using the debugger. Let's look, for example, at what one of the backtraces is telling you. You triggered this by typing 'po s

[Job Posting] Princeton Satellite Systems

2011-02-22 Thread Michael Paluszek
Princeton Satellite Systems is seeking a software engineer to help develop innovative applications on Mac OS X and on IOS. You'll work on a small team with experienced aerospace engineers to maintain and upgrade our existing applications and develop new software based on cutting-edge research an

A TableView Binding question

2011-02-22 Thread Motti Shneor
Hello everyone. I have a TableView, connected to an ArrayController, configured to work against a CoreData Entity - the normal way, similar to what you find in the template bindings when you drag an Entity from the data-modelling tool into a View in Interface-Builder. Let's say the Entity is

System Configuration Framework & Notifications

2011-02-22 Thread Roberto Mauro
I'm trying to receive notifications through System configuration framework when Location changes. I was able to get the current Set applied but I can't even grasp on notification subject even looking at some code posted by apple. Seems there are very few informations out there and the referenc

Spotcolors in Cocoa

2011-02-22 Thread Kristof Vanhaesebrouck
Hi all, I'm working on an application which has to generate PDF's with spot colors. I have been experimenting with Cocoa and NSColor but can't seem to find how to create a spot color in Cocoa. Does anyone know how to do this? Looking for Web-to-Print Solutions? Visit our website :   http://www.v

Re: A TableView Binding question

2011-02-22 Thread Quincey Morris
On Feb 21, 2011, at 23:58, Motti Shneor wrote: > I can't get this to work --- because I don't know what to write in the > binding of the TableColumn. It seems there is no way to say "Just the entity" > within IB's window. > > I select the table column. > I Bind to: ArrayController > I set the C

Looking for help scanning entire drives

2011-02-22 Thread Laurent Daudelin
I need to write an application that will scan entire drives and compare files between the 2 drives. I have already something working but in situations where there are a lot of files (hundreds of thousands), the memory consumption becomes a problem, leading to slow performance when virtual memory

Re: A TableView Binding question

2011-02-22 Thread Kyle Sluder
On Mon, Feb 21, 2011 at 11:58 PM, Motti Shneor wrote: > Now, I need one of the table-columns, to be bound NOT to a specific attribute > of the entity (like firstName or salary) but rather to the entity (managed > object) itself. > > Of course the "Entity" is not something presentable on the colu