Re: Interesting Problem Code worked in 10.4 but not in 10.5

2008-06-22 Thread Jens Alfke


On 22 Jun '08, at 4:08 PM, Clayton Leitch wrote:


#0  0x96cd5564 in NSDecimalCopy ()
#1  0x96d854f9 in NSDecimalSubtract ()
#2  0x96dadad8 in -[NSDecimalNumber  
decimalNumberBySubtracting:withBehavior:] ()

#3  0x96dada47 in -[NSDecimalNumber decimalNumberBySubtracting:] ()
#4  0x1b67 in -[MonthlyReport reportCurrentDifference]  
(self=0x261bb30, _cmd=0x1fe6) at /Users/leitchc/Documents/Coding  
Efforts/SoftCopyContract 2.0/MonthlyReport.m:30


Xcode has a debugger. Run the program with the debugger enabled, and  
you'll drop into it when it crashes. Look at the topmost stack frame  
that belongs to your app, see what statement it was in, and the values  
of variables. In particular, what is the parameter being passed to  
decimalNumberBySubtracting:? Use the "po" command on it to have gdb  
print its description.


This isn't rocket science. This is how you debug an application...

—Jens___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: [Q] How to add a program as a login item after installing?

2008-06-22 Thread JongAm Park

Hello.
Thanks for the detailed explanation.

I have been a long Mac user and a programmer, although I also have  
written programs for Windows, Solaris, HP-UX, Irix.
So, if I were a user, I would take the procedure you said. But our  
people at customer support dept., and upper manager don't think so.  
Also, this app, although it is an app, is somewhat special. So, it is  
not supposed to be launched by users manually. It is a kind of a  
helper program for the Final Cut Pro. Our people also though about  
using launchd option, but customer support people told me that it  
would be more difficult to explain things to users when something  
happened. So, it is the background why we considered the login item.


So, please forgive the decision of taking login item approach and  
installer approach.


I appreciate your concern.

Thank you.


On Jun 22, 2008, at 9:36 AM, Jens Alfke wrote:



On 21 Jun '08, at 11:21 PM, JongAm Park wrote:


Well, in my case, we wanted to avoid such workflow.
We want installing & running the special app to be transparent  
from users.


The best thing you can do to avoid extra workflow is to *not use an  
installer*. It's best if the user can simply download your app,  
copy it to their disk if necessary, and launch it. Mac OS X has all  
kinds of features designed to avoid the need for an installer in  
most cases.


I would find it much nicer to double-click the app and, on the  
first launch, be asked if I want to install a login item. This is  
simpler, friendlier and safer than an installer. Seeing an  
installer tells me that this application is going to potentially  
splatter things all over my disk, that could change the behavior of  
the system or other apps, and might be difficult to remove.


Also: When I download a new app I have not yet committed to using  
it full-time, so I don't want it setting itself as a login item. If  
I use the app for ten minutes and decide I don't like it, or it's  
not worth the price, I want to quit it and not see it again. It  
annoys me if it comes back the next time I log in. (This means  
that, even if I say No to installing the login item at the  
beginning, there should be a checkbox in the prefs that I can turn  
on later to make it a login item.)


—Jens


___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Interesting Problem Code worked in 10.4 but not in 10.5

2008-06-22 Thread Clayton Leitch
Possibly, but the code worked fine in 10.4.  Interestingly the  
complied application worked in 10.5 in deployment mode.  I made a few  
changes to the GUI and this error happened.  I changed everything back  
to the way it was and cleaned the compile and the error continued.

On Jun 22, 2008, at 8:19 PM, Jason Coco wrote:

Is it possible that your NSDecimalNumber is no longer a valid object  
reference?


On Jun 22, 2008, at 19:08 , Clayton Leitch wrote:


Well, thanks to the list I now have a back trace below:
#0  0x96cd5564 in NSDecimalCopy ()
#1  0x96d854f9 in NSDecimalSubtract ()
#2  0x96dadad8 in -[NSDecimalNumber  
decimalNumberBySubtracting:withBehavior:] ()

#3  0x96dada47 in -[NSDecimalNumber decimalNumberBySubtracting:] ()
[...]


___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: weird bug or feature?

2008-06-22 Thread Michael Ash
On Sun, Jun 22, 2008 at 11:41 AM, William Squires <[EMAIL PROTECTED]> wrote:
>  Okay, here's a strange UI glitch. I have an Xcode project in which I have a
> "to-do" list (the challenge in Chapter 6 of the new Hillegaas book). I've
> sprinkled NSLog() calls into my methods in AppController, so I can see
> what's going on. I build and run, then add a few items - all okay so far;
> they appear in the NSTableView. If I hover the mouse over the content region
> of the NSTableVIew, a spurious tableView:objectValueForColumn:row shows up
> in the console log (note that I'm not clicking on anything, just hovering
> the mouse over the NSTableView) about once every few seconds. Bug or
> feature? I would expect a delegate for mousing over, but not
> tableView:objectValueForColumn:row!

Whenever you wonder why one of your methods is being called, put a
breakpoint on it. The method names in the stack trace will usually
give you a good clue about what's going on.

Mike
___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: unexpected nil outlet

2008-06-22 Thread William Squires

On Jun 18, 2008, at 2:21 PM, Nathan wrote:

On Wed, Jun 18, 2008 at 4:41 AM, Michael Kaye <[EMAIL PROTECTED]>  
wrote:
wow, I'm another one just starting the same challenge...how many  
of us

newbies are there working through Hillegaas at the moment?


/me raises hand.

I'm currently stuck on challenge 1 in chapter 8 (pg 135):  Make the
application sort people based on the number of characters in their
names using only Interface Builder.

I can do it by cheating (not using Interface Builder), but for the
life of me I can't figure it out using only IB.

  Assuming you've followed the RaiseMan example up to that point,  
and have IB open, select the 1st column of the NSTableView (in  
MyDocument.nib - or .xib, depending on your Xcode version), and  
examine its properties with the inspector window.
  Make sure the sortKey is personName.length, and the selector is  
"compare:". If that doesn't work, delete the text for the sort key  
and try again. If it still doesn't work, then something isn't  
connected to the ArrayController properly. Otherwise, you should be  
able to get it to work with that key path.

  HTH!


~ Nathan
___

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/mailman/options/cocoa-dev/wsquires% 
40satx.rr.com


This email sent to [EMAIL PROTECTED]


___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Can a nib be confused about its owner?

2008-06-22 Thread Hamish Allan
On Mon, Jun 23, 2008 at 1:19 AM, John Murphy <[EMAIL PROTECTED]> wrote:

> Since the File's Owner "object" in a nib file is actually a proxy for an 
> object that is provided at runtime, what happens if the nib is expecting 
> NSApplication to be its File's Owner but you called for the nib to be loaded 
> from inside your code using an instance of NSWindowController. Who wins?

NSWindowController wins. Setting the class of file's owner in IB just
lets it know which outlets etc. should be exposed.

Hamish
___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Can a nib be confused about its owner?

2008-06-22 Thread John Murphy
Since the File's Owner "object" in a nib file is actually a proxy for an object 
that is provided at runtime, what happens if the nib is expecting NSApplication 
to be its File's Owner but you called for the nib to be loaded from inside your 
code using an instance of NSWindowController. Who wins?


  
___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Interesting Problem Code worked in 10.4 but not in 10.5

2008-06-22 Thread Jason Coco
Is it possible that your NSDecimalNumber is no longer a valid object  
reference?


On Jun 22, 2008, at 19:08 , Clayton Leitch wrote:


Well, thanks to the list I now have a back trace below:
#0  0x96cd5564 in NSDecimalCopy ()
#1  0x96d854f9 in NSDecimalSubtract ()
#2  0x96dadad8 in -[NSDecimalNumber  
decimalNumberBySubtracting:withBehavior:] ()

#3  0x96dada47 in -[NSDecimalNumber decimalNumberBySubtracting:] ()
[...]

___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Wherefore art thou, o NSTableView?

2008-06-22 Thread Graham Cox

The dataSource implements this, not the delegate.

You need:

- (void)	tableView:(NSTableView*) aTableView setObjectValue:anObject  
forTableColumn:(NSTableColumn*) aTableColumn row:(int) rowIndex;



hth,

Graham

On 23 Jun 2008, at 12:43 am, William Squires wrote:

 Okay, this one has me stumped. What delegate do I need to implement  
to handle user editing a cell in an NSTableView (i.e. after they  
edit it, and hit the  key to accept.) None of the delegate  
methods described in the docs seem to fit the bill, but maybe I'm  
just overlooking it? I've already implemented  
tableView:shouldEditTableColum:row to return YES.

 Or is this a case for connecting actions in IB?

___

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/mailman/options/cocoa-dev/graham.cox%40bigpond.com

This email sent to [EMAIL PROTECTED]


___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Interesting Problem Code worked in 10.4 but not in 10.5

2008-06-22 Thread Clayton Leitch

Well, thanks to the list I now have a back trace below:
#0  0x96cd5564 in NSDecimalCopy ()
#1  0x96d854f9 in NSDecimalSubtract ()
#2  0x96dadad8 in -[NSDecimalNumber  
decimalNumberBySubtracting:withBehavior:] ()

#3  0x96dada47 in -[NSDecimalNumber decimalNumberBySubtracting:] ()
#4  0x1b67 in -[MonthlyReport reportCurrentDifference]  
(self=0x261bb30, _cmd=0x1fe6) at /Users/leitchc/Documents/Coding  
Efforts/SoftCopyContract 2.0/MonthlyReport.m:30
#5  0x1ca3 in -[MonthlyReport reportPercentDifferenceMonth]  
(self=0x261bb30, _cmd=0x1e08) at /Users/leitchc/Documents/Coding  
Efforts/SoftCopyContract 2.0/MonthlyReport.m:48

#6  0x96cf5d2a in -[NSObject(NSKeyValueCoding) valueForKeyPath:] ()
#7  0x91eaa428 in -[NSArrayController _singleValueForKeyPath:] ()
#8  0x96cf5c90 in -[NSObject(NSKeyValueCoding) valueForKeyPath:] ()
#9  0x91e6dcd4 in -[NSBinder  
_valueForKeyPath:ofObject:mode:raisesForNotApplicableKeys:] ()
#10 0x91e6d8dc in -[NSBinder  
valueForBinding:resolveMarkersToPlaceholders:] ()

#11 0x91ea2efc in -[NSValueBinder _referenceBindingValue] ()
#12 0x91ea2cc7 in -[NSValueBinder  
_adjustObject:mode:observedController:observedKeyPath:context:editableState:adjustState 
:] ()
#13 0x91ea2950 in -[NSValueBinder  
_observeValueForKeyPath:ofObject:context:] ()
#14 0x91ea4031 in -[NSTextValueBinder  
_observeValueForKeyPath:ofObject:context:] ()

#15 0x96d250ce in NSKVONotify ()
#16 0x96cb57d5 in -[NSObject(NSKeyValueObservingPrivate)  
_notifyObserversForKeyPath:change:] ()
#17 0x91c8fe92 in -[NSController _notifyObserversForKeyPath:change:]  
()
#18 0x91ead898 in -[NSController  
observeValueForKeyPath:ofObject:change:context:] ()
#19 0x91ead3f1 in -[NSArrayController  
observeValueForKeyPath:ofObject:change:context:] ()

#20 0x96d250ce in NSKVONotify ()
#21 0x96ca1702 in -[NSObject(NSKeyValueObserverNotification)  
didChangeValueForKey:] ()

#22 0x96a78aa7 in -[NSManagedObject didChangeValueForKey:] ()
#23 0x96a7738e in _sharedIMPL_setvfk_core ()
#24 0x96a79bf3 in -[NSManagedObject setValue:forKey:] ()
#25 0x96d4ad61 in -[NSObject(NSKeyValueCoding) setValue:forKeyPath:]  
()
#26 0x920486bf in -[NSArrayController  
_setMultipleValue:forKeyPath:atIndex:] ()

#27 0x9204969e in -[NSArrayController _setSingleValue:forKeyPath:] ()
#28 0x96d4acc7 in -[NSObject(NSKeyValueCoding) setValue:forKeyPath:]  
()
#29 0x91f4499d in -[NSBinder  
_setValue:forKeyPath:ofObject:mode:validateImmediately:raisesForNotApplicableKeys:error 
:] ()

#30 0x91f4474e in -[NSBinder setValue:forBinding:error:] ()
#31 0x91f443e7 in -[NSValueBinder  
_applyObjectValue:forBinding:canRecoverFromErrors:handleErrors:typeOfAlert:discardEditingCallback:otherCallback:callbackContextInfo:didRunAlert 
:] ()
#32 0x91f44075 in -[NSValueBinder  
applyDisplayedValueHandleErrors:typeOfAlert:canRecoverFromErrors:discardEditingCallback:otherCallback:callbackContextInfo:didRunAlert 
:] ()
#33 0x91f46dca in -[NSValueBinder  
_applyDisplayedValueIfHasUncommittedChangesWithHandleErrors:typeOfAlert:discardEditingCallback:otherCallback:callbackContextInfo:didRunAlert 
:] ()
#34 0x91f43956 in -[NSValueBinder  
validateAndCommitValueInEditor:editingIsEnding:errorUserInterfaceHandled 
:] ()
#35 0x91f43713 in -[_NSBindingAdaptor  
_validateAndCommitValueInEditor:editingIsEnding:errorUserInterfaceHandled:bindingAdaptor 
:] ()
#36 0x91f4364b in -[_NSBindingAdaptor  
validateAndCommitValueInEditor:editingIsEnding:errorUserInterfaceHandled 
:] ()

#37 0x91e16599 in -[NSTextField textShouldEndEditing:] ()
#38 0x91e160d6 in -[NSTextView(NSSharing) resignFirstResponder] ()
#39 0x91d8c1f5 in -[NSWindow makeFirstResponder:] ()
#40 0x91e15d10 in -[NSTextView(NSPrivate) _giveUpFirstResponder:] ()
#41 0x91f11388 in -[NSTextView(NSKeyBindingCommands) insertTab:] ()
#42 0x91e15969 in -[NSResponder doCommandBySelector:] ()
#43 0x91e157f0 in -[NSTextView doCommandBySelector:] ()
#44 0x91e08911 in - 
[NSKeyBindingManager(NSKeyBindingManager_MultiClients)  
interpretEventAsCommand:forClient:] ()

#45 0x91e0751e in -[NSTSMInputContext interpretKeyEvents:] ()
#46 0x91e0703a in -[NSView interpretKeyEvents:] ()
#47 0x91e06f4a in -[NSTextView keyDown:] ()
#48 0x91d774c5 in -[NSWindow sendEvent:] ()
#49 0x91d43431 in -[NSApplication sendEvent:] ()
#50 0x91ca0e27 in -[NSApplication run] ()
#51 0x91c6e030 in NSApplicationMain ()
#52 0x1946 in start ()


___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Interesting Problem Code worked in 10.4 but not in 10.5

2008-06-22 Thread Jason Coco
There should be crash reports in ~/Library/Logs/CrashReporter – that  
should give you the register state, thread stack, and information on  
which thread crashed.


On Jun 22, 2008, at 18:38 , Clayton Leitch wrote:


Well, the only thing I get from the debugger is:
[Session started at 2008-06-22 18:35:23 -0400.]
Loading program into debugger…
GNU gdb 6.3.50-20050815 (Apple version gdb-956) (Wed Apr 30 05:08:47  
UTC 2008)

Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and  
you are
welcome to change it and/or distribute copies of it under certain  
conditions.

Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for  
details.

This GDB was configured as "i386-apple-darwin".Program loaded.
sharedlibrary apply-load-rules all
Attaching to program: `/Users/leitchc/Documents/Coding Efforts/ 
SoftCopyContract 2.0/build/Release/SoftCopyContract 2.0.app/Contents/ 
MacOS/SoftCopyContract 2.0', process 408.

Program received signal:  “EXC_BAD_ACCESS”.

I tried all sorts of different settings, because in the past I have  
gotten a stack.

On Jun 22, 2008, at 5:43 PM, Jean-Daniel Dupas wrote:


Launch it with the debugger and check the stack when it crash.
Without any hint about the stack, we cannot really help you, but  
just give you some guess.


Le 22 juin 08 à 23:26, Clayton Leitch a écrit :

See code below.  Get a error of “EXC_BAD_ACCESS” when I make  
entries in the GUI.  Code used to work with no problems.  It  
appears that it is doing an illegal substraction, which I think  
means the objects are not being initialized with a value of 0.  At  
least that is my guess.

#import "MonthlyReport.h"


@implementation MonthlyReport
+ (void)initialize
{
if (self == [MonthlyReport class])
{
		NSArray *keys = [NSArray arrayWithObjects:  
@"reportCumActualCost", @"reportActualCost",  
@"reportPredictedCost", @"reportCumPredictedCost",  
@"reportCumlativeInvoiceTotal", @"reportMonthlyInvoiceAmount", nil];
		[self setKeys:keys  
triggerChangeNotificationsForDependentKey:@"reportCumDifference"];
		[self setKeys:keys  
triggerChangeNotificationsForDependentKey 
:@"reportCurrentDifference"];
		[self setKeys:keys  
triggerChangeNotificationsForDependentKey 
:@"reportPercentDifferenceMonth"];
		[self setKeys:keys  
triggerChangeNotificationsForDependentKey 
:@"reportPercentDifferenceCum"];
		[self setKeys:keys  
triggerChangeNotificationsForDependentKey 
:@"reportInvoiceMonthlyDifference"];
		[self setKeys:keys  
triggerChangeNotificationsForDependentKey 
:@"reportInvoiceCumlativeDifference"];

}
}

//Calculate differences
- (NSDecimalNumber *)reportCurrentDifference;
{
	return [[self valueForKey:@"reportActualCost"]  
decimalNumberBySubtracting: [self  
valueForKey:@"reportPredictedCost"]];

}
- (NSDecimalNumber *)reportCumDifference;
{
	return [[self valueForKey:@"reportCumActualCost"]  
decimalNumberBySubtracting: [self  
valueForKey:@"reportCumPredictedCost"]];

}
- (NSDecimalNumber *)reportInvoiceMonthlyDifference;
{
	return [[self valueForKey:@"reportMonthlyInvoiceAmount"]  
decimalNumberBySubtracting:[self valueForKey:@"reportActualCost"]];

}
- (NSDecimalNumber *)reportInvoiceCumlativeDifference;
{
	return [[self valueForKey:@"reportCumlativeInvoiceTotal"]  
decimalNumberBySubtracting:[self  
valueForKey:@"reportCumActualCost"]];

}

//Calculate percents
- (NSDecimalNumber *)reportPercentDifferenceMonth;
{
	return [[[self valueForKey:@"reportCurrentDifference"]  
decimalNumberByDividingBy: [self  
valueForKey:@"reportPredictedCost"]]  
decimalNumberByMultiplyingByPowerOf10: (short)2];

}
- (NSDecimalNumber *)reportPercentDifferenceCum;
{
	return [[[self valueForKey:@"reportCumDifference"]  
decimalNumberByDividingBy: [self  
valueForKey:@"reportCumPredictedCost"]]  
decimalNumberByMultiplyingByPowerOf10: (short)2];

}



@end

___

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/mailman/options/cocoa-dev/devlists%40shadowlab.org

This email sent to [EMAIL PROTECTED]





___

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/mailman/options/cocoa-dev/jason.coco 
%40gmail.com


This email sent to [EMAIL PROTECTED]


___

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://li

Re: Interesting Problem Code worked in 10.4 but not in 10.5

2008-06-22 Thread Clayton Leitch

Well, the only thing I get from the debugger is:
[Session started at 2008-06-22 18:35:23 -0400.]
Loading program into debugger…
GNU gdb 6.3.50-20050815 (Apple version gdb-956) (Wed Apr 30 05:08:47  
UTC 2008)

Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and  
you are
welcome to change it and/or distribute copies of it under certain  
conditions.

Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for  
details.

This GDB was configured as "i386-apple-darwin".Program loaded.
sharedlibrary apply-load-rules all
Attaching to program: `/Users/leitchc/Documents/Coding Efforts/ 
SoftCopyContract 2.0/build/Release/SoftCopyContract 2.0.app/Contents/ 
MacOS/SoftCopyContract 2.0', process 408.

Program received signal:  “EXC_BAD_ACCESS”.

I tried all sorts of different settings, because in the past I have  
gotten a stack.

On Jun 22, 2008, at 5:43 PM, Jean-Daniel Dupas wrote:


Launch it with the debugger and check the stack when it crash.
Without any hint about the stack, we cannot really help you, but  
just give you some guess.


Le 22 juin 08 à 23:26, Clayton Leitch a écrit :

See code below.  Get a error of “EXC_BAD_ACCESS” when I make  
entries in the GUI.  Code used to work with no problems.  It  
appears that it is doing an illegal substraction, which I think  
means the objects are not being initialized with a value of 0.  At  
least that is my guess.

#import "MonthlyReport.h"


@implementation MonthlyReport
+ (void)initialize
{
if (self == [MonthlyReport class])
{
		NSArray *keys = [NSArray arrayWithObjects:  
@"reportCumActualCost", @"reportActualCost",  
@"reportPredictedCost", @"reportCumPredictedCost",  
@"reportCumlativeInvoiceTotal", @"reportMonthlyInvoiceAmount", nil];
		[self setKeys:keys  
triggerChangeNotificationsForDependentKey:@"reportCumDifference"];
		[self setKeys:keys  
triggerChangeNotificationsForDependentKey 
:@"reportCurrentDifference"];
		[self setKeys:keys  
triggerChangeNotificationsForDependentKey 
:@"reportPercentDifferenceMonth"];
		[self setKeys:keys  
triggerChangeNotificationsForDependentKey 
:@"reportPercentDifferenceCum"];
		[self setKeys:keys  
triggerChangeNotificationsForDependentKey 
:@"reportInvoiceMonthlyDifference"];
		[self setKeys:keys  
triggerChangeNotificationsForDependentKey 
:@"reportInvoiceCumlativeDifference"];

}
}

//Calculate differences
- (NSDecimalNumber *)reportCurrentDifference;
{
	return [[self valueForKey:@"reportActualCost"]  
decimalNumberBySubtracting: [self  
valueForKey:@"reportPredictedCost"]];

}
- (NSDecimalNumber *)reportCumDifference;
{
	return [[self valueForKey:@"reportCumActualCost"]  
decimalNumberBySubtracting: [self  
valueForKey:@"reportCumPredictedCost"]];

}
- (NSDecimalNumber *)reportInvoiceMonthlyDifference;
{
	return [[self valueForKey:@"reportMonthlyInvoiceAmount"]  
decimalNumberBySubtracting:[self valueForKey:@"reportActualCost"]];

}
- (NSDecimalNumber *)reportInvoiceCumlativeDifference;
{
	return [[self valueForKey:@"reportCumlativeInvoiceTotal"]  
decimalNumberBySubtracting:[self  
valueForKey:@"reportCumActualCost"]];

}

//Calculate percents
- (NSDecimalNumber *)reportPercentDifferenceMonth;
{
	return [[[self valueForKey:@"reportCurrentDifference"]  
decimalNumberByDividingBy: [self  
valueForKey:@"reportPredictedCost"]]  
decimalNumberByMultiplyingByPowerOf10: (short)2];

}
- (NSDecimalNumber *)reportPercentDifferenceCum;
{
	return [[[self valueForKey:@"reportCumDifference"]  
decimalNumberByDividingBy: [self  
valueForKey:@"reportCumPredictedCost"]]  
decimalNumberByMultiplyingByPowerOf10: (short)2];

}



@end

___

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/mailman/options/cocoa-dev/devlists%40shadowlab.org

This email sent to [EMAIL PROTECTED]





___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


NSFormatter/NSControl and valid object notification

2008-06-22 Thread Jason Stephenson
I am writing a Cocoa application as a GUI for a command line utility, 
and I decided to create a custom NSFormatter to ensure that the value 
entered in a NSTextField matches what the command line program expects 
for that parameter. (The format is actually rather complicated since it 
will accept domain names, dotted quads in CIDR notations, IP6 addresses, 
and address ranges that can be expressed with - and , in any of the 
quads, and a couple of extra special cases.)


So, I have the rudiments of the formatter working, but I haven't got far 
enough that scrapping it would be a heartbreak.


My AppControllerinstantiates a TargetFormatter (the name of my formatter 
object) in -awakeFromNib and then sets the instance as the formatter for 
my text field's cell. I have also made my AppController object the 
delegate for the text field, so that it handles the 
-control:didFailToFormatString:errorDescription:. When I get that 
message, I pop up an alert with the reason for the failure.


All is good so far, but now I want to make the run button's enabled 
state cue off of the validity of the content of my text field. That is I 
want the button disabled until there is valid content in the text field.


The main problem with this is that I don't want my formatter and my 
button to have to know anything about each other.


Now, I see that using the NSControl delegate, I can easily find out in 
AppController when the validation fails, but I don't see any messages 
that are sent if the validation succeeds.


I see that NSControl can ask its delegate if the object value it 
contains is valid or not, but implementing that would likely mean giving 
up on my formatter, thought the formatter really seemed like the "right 
thing" to do at the time (yesterday).


So, I guess at this point, my options are:

1. Adding a delegate to my NSFormatter that can be sent messages from 
the -getObjectValue:forString:errorDescription: method in my formatter.


2. Posting some sort of notification from the above that my 
AppController objects registers for.


3. Dropping the custom formatter and implementing the 
-control:isValidObject: method in my AppController.


Then, AppController, which knows about the button can set the button's 
state appropriately.


So, I am writing to the list to ask which path should I take and to find 
out if maybe there is some other delegate method or notification that I 
might have missed that the control or cell sends after calling 
-getObjectValue:forString:errorDescription: on the formatter.


(Actually, I believe that the latter must be possible. I can't be the 
only one who wants to control some other object's state based on the 
validity of the object in a NSFormatter subclass. However, if it is not 
possible, I won't be too surprised.)


Cheers,
Jason
___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Interesting Problem Code worked in 10.4 but not in 10.5

2008-06-22 Thread Jean-Daniel Dupas

Launch it with the debugger and check the stack when it crash.
Without any hint about the stack, we cannot really help you, but just  
give you some guess.


Le 22 juin 08 à 23:26, Clayton Leitch a écrit :

See code below.  Get a error of “EXC_BAD_ACCESS” when I make entries  
in the GUI.  Code used to work with no problems.  It appears that it  
is doing an illegal substraction, which I think means the objects  
are not being initialized with a value of 0.  At least that is my  
guess.

#import "MonthlyReport.h"


@implementation MonthlyReport
+ (void)initialize
{
if (self == [MonthlyReport class])
{
		NSArray *keys = [NSArray arrayWithObjects: @"reportCumActualCost",  
@"reportActualCost", @"reportPredictedCost",  
@"reportCumPredictedCost", @"reportCumlativeInvoiceTotal",  
@"reportMonthlyInvoiceAmount", nil];
		[self setKeys:keys  
triggerChangeNotificationsForDependentKey:@"reportCumDifference"];
		[self setKeys:keys  
triggerChangeNotificationsForDependentKey:@"reportCurrentDifference"];
		[self setKeys:keys  
triggerChangeNotificationsForDependentKey 
:@"reportPercentDifferenceMonth"];
		[self setKeys:keys  
triggerChangeNotificationsForDependentKey 
:@"reportPercentDifferenceCum"];
		[self setKeys:keys  
triggerChangeNotificationsForDependentKey 
:@"reportInvoiceMonthlyDifference"];
		[self setKeys:keys  
triggerChangeNotificationsForDependentKey 
:@"reportInvoiceCumlativeDifference"];

}
}

//Calculate differences
- (NSDecimalNumber *)reportCurrentDifference;
{
	return [[self valueForKey:@"reportActualCost"]  
decimalNumberBySubtracting: [self  
valueForKey:@"reportPredictedCost"]];

}
- (NSDecimalNumber *)reportCumDifference;
{
	return [[self valueForKey:@"reportCumActualCost"]  
decimalNumberBySubtracting: [self  
valueForKey:@"reportCumPredictedCost"]];

}
- (NSDecimalNumber *)reportInvoiceMonthlyDifference;
{
	return [[self valueForKey:@"reportMonthlyInvoiceAmount"]  
decimalNumberBySubtracting:[self valueForKey:@"reportActualCost"]];

}
- (NSDecimalNumber *)reportInvoiceCumlativeDifference;
{
	return [[self valueForKey:@"reportCumlativeInvoiceTotal"]  
decimalNumberBySubtracting:[self valueForKey:@"reportCumActualCost"]];

}

//Calculate percents
- (NSDecimalNumber *)reportPercentDifferenceMonth;
{
	return [[[self valueForKey:@"reportCurrentDifference"]  
decimalNumberByDividingBy: [self  
valueForKey:@"reportPredictedCost"]]  
decimalNumberByMultiplyingByPowerOf10: (short)2];

}
- (NSDecimalNumber *)reportPercentDifferenceCum;
{
	return [[[self valueForKey:@"reportCumDifference"]  
decimalNumberByDividingBy: [self  
valueForKey:@"reportCumPredictedCost"]]  
decimalNumberByMultiplyingByPowerOf10: (short)2];

}



@end

___

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/mailman/options/cocoa-dev/devlists%40shadowlab.org

This email sent to [EMAIL PROTECTED]





smime.p7s
Description: S/MIME cryptographic signature
___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Interesting Problem Code worked in 10.4 but not in 10.5

2008-06-22 Thread Clayton Leitch
See code below.  Get a error of “EXC_BAD_ACCESS” when I make entries  
in the GUI.  Code used to work with no problems.  It appears that it  
is doing an illegal substraction, which I think means the objects are  
not being initialized with a value of 0.  At least that is my guess.

#import "MonthlyReport.h"


@implementation MonthlyReport
+ (void)initialize
{
if (self == [MonthlyReport class])
{
		NSArray *keys = [NSArray arrayWithObjects: @"reportCumActualCost",  
@"reportActualCost", @"reportPredictedCost",  
@"reportCumPredictedCost", @"reportCumlativeInvoiceTotal",  
@"reportMonthlyInvoiceAmount", nil];
		[self setKeys:keys  
triggerChangeNotificationsForDependentKey:@"reportCumDifference"];
		[self setKeys:keys  
triggerChangeNotificationsForDependentKey:@"reportCurrentDifference"];
		[self setKeys:keys  
triggerChangeNotificationsForDependentKey 
:@"reportPercentDifferenceMonth"];
		[self setKeys:keys  
triggerChangeNotificationsForDependentKey 
:@"reportPercentDifferenceCum"];
		[self setKeys:keys  
triggerChangeNotificationsForDependentKey 
:@"reportInvoiceMonthlyDifference"];
		[self setKeys:keys  
triggerChangeNotificationsForDependentKey 
:@"reportInvoiceCumlativeDifference"];

}
}

//Calculate differences
- (NSDecimalNumber *)reportCurrentDifference;
{
	return [[self valueForKey:@"reportActualCost"]  
decimalNumberBySubtracting: [self valueForKey:@"reportPredictedCost"]];

}
- (NSDecimalNumber *)reportCumDifference;
{
	return [[self valueForKey:@"reportCumActualCost"]  
decimalNumberBySubtracting: [self  
valueForKey:@"reportCumPredictedCost"]];

}
- (NSDecimalNumber *)reportInvoiceMonthlyDifference;
{
	return [[self valueForKey:@"reportMonthlyInvoiceAmount"]  
decimalNumberBySubtracting:[self valueForKey:@"reportActualCost"]];

}
- (NSDecimalNumber *)reportInvoiceCumlativeDifference;
{
	return [[self valueForKey:@"reportCumlativeInvoiceTotal"]  
decimalNumberBySubtracting:[self valueForKey:@"reportCumActualCost"]];

}

//Calculate percents
- (NSDecimalNumber *)reportPercentDifferenceMonth;
{
	return [[[self valueForKey:@"reportCurrentDifference"]  
decimalNumberByDividingBy: [self valueForKey:@"reportPredictedCost"]]  
decimalNumberByMultiplyingByPowerOf10: (short)2];

}
- (NSDecimalNumber *)reportPercentDifferenceCum;
{
	return [[[self valueForKey:@"reportCumDifference"]  
decimalNumberByDividingBy: [self  
valueForKey:@"reportCumPredictedCost"]]  
decimalNumberByMultiplyingByPowerOf10: (short)2];

}



@end

___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Save animation to QuickTime movie?

2008-06-22 Thread Wayne Shao
Hi,

So if I have N images, do I need to create N-1 transition tracks using the API?

-- 
Wayne Shao



On Sat, Jun 21, 2008 at 2:48 PM, douglas a. welton
<[EMAIL PROTECTED]> wrote:
> I would suggest that you take a look at the sample code for CocoaMovieCreate
> and MakeEffectMovie.  If an off the shelf product can't help you (Have you
> tried using AppleScript with QT Player to accomplish your goal?), then these
> two examples should give you enough of the basics to get you through the
> process of creating your own application.
>
> regards,
>
> douglas
>
>
> On Jun 20, 2008, at 10:24 PM, Yung-Luen Lan wrote:
>
>> Hi Rick,
>>
>> Thanks, it's a good suggestion, but not my case.
>> The problem is, I have to batch convert thousands of slideshows.
>> The text information is not just subtitle, I have to highlight
>> different portion of text depend on time.
>> For example, text in parenthesis need to be highlighted:
>>
>> 00:13 (AA)AA  
>> 00:15 (AAA)A  
>> 00:16 ( B)BBB 
>>
>> I don't think iMove or QT text track could do this.
>>
>> Regards,
>> yllan
>>
>> On Sat, Jun 21, 2008 at 5:44 AM, Rick Sustek <[EMAIL PROTECTED]> wrote:
>>>
>>> Depending on exactly what you have in mind, you may be better served by
>>> not
>>> doing programming at all.
>>> For example, use iPhoto or iMovie, or a billion other products to produce
>>> the basic "slide show" image track into a QT mov file.
>>> Then add the text overlays via another step with another tool, such as
>>> titling within iMovie, or text tracks in QT Player Pro, or
>>>
>>> Just a suggestion!
>>> -Rick
>>>
>>>
>> ___
>> Do not post admin requests to the list. They will be ignored.
>> QuickTime-API mailing list  ([EMAIL PROTECTED])
>> Help/Unsubscribe/Update your Subscription:
>>
>> http://lists.apple.com/mailman/options/quicktime-api/douglas_welton%40earthlink.net
>>
>> This email sent to [EMAIL PROTECTED]
>
> ___
>
> 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/mailman/options/cocoa-dev/wshao99%40gmail.com
>
> This email sent to [EMAIL PROTECTED]
>
___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: A documentation dumdum

2008-06-22 Thread Quincey Morris


On Jun 22, 2008, at 09:46, William Squires wrote:

Okay, thanks. It seems to work if I just typecast it to NSString *,  
since the values are coming from an NSTextField as [textField  
stringValue] in my AppController.m when the action is triggered from  
the "Add" buttton.




Just typecasting isn't really the answer to your underlying worry  
here. After all, if your are passed an object that isn't a NSString,  
typecasting it won't help you.


If your implementation of tableView:setObjectValue:forTableColumn:row  
expects the value to be a string, it would be better to check if it  
isKindOfClass:[NSString class], and assign it to a NSString* local  
variable (no cast actually needed) if it is, or handle the error if  
it's not.



___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Application Main window not appearing on application launch (updated)

2008-06-22 Thread Keary Suska
6/21/08 2:17 PM, also sprach [EMAIL PROTECTED]:

> Core data document application:  I edited the MyDocument.nib file to
> add a few fields to one view and now when I start the application, the
> main window does not appear.  Also, the new menu fails to produce a
> window.  What caused this and how do I avoid it.  More information:
> The console tells me I have a key coding problem with an NSTextView.
> I went through all the NSTextViews and made sure they were correct.
> Problem still exists.  Text from console show below.
> 
> [Session started at 2008-06-21 16:15:30 -0400.]
> 2008-06-21 16:15:30.322 SoftCopyContract[1055:10b] [ 0x1ab8b0> valueForUndefinedKey:]: this class is not key value coding-
> compliant for the key value.
> 2008-06-21 16:15:30.419 SoftCopyContract[1055:10b] [ 0x282fee0> valueForUndefinedKey:]: this class is not key value coding-
> compliant for the key value.

Start with this: 


HTH,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Core Data : BlogDemo tutorial : I must have missed something, but I don't know what...

2008-06-22 Thread John Joyce
On Sat, Jun 21, 2008 at 5:12 PM, Jens Alfke <[EMAIL PROTECTED]> wrote:

>
> On 21 Jun '08, at 2:40 PM, John Joyce wrote:
>
>  2008-06-21 16:27:05.212 BlogDemo[1180] *** NSRunLoop ignoring exception
>> '[ valueForUndefinedKey:]: this class is not key
>> value coding-compliant for the key topic.' that raised during posting of
>> delayed perform with target 3c4ac0 and selector 'invokeWithTarget:'
>>
>
> This shows that an exception got raised, which is likely to screw up
> anything past that point. The message shows that something tried to access
> the value for key "topic" on a managed object that didn't support it.
>
> [Or is the key name really "topic." with a period? I'm not sure whether the
> period in the message is part of the key name. Try searching for "topic." in
> your code to see if you have a spurious period.]
>
> If that doesn't narrow it down enough, set a breakpoint at
> objc_exception_throw (using the breakpoints window) to find out exactly
> where the exception gets thrown.
>
> —Jens

I found the bug! Turns out, I forgot to put anything in the Entity Name
field in the Attributes Inspector for the NSArrayController for Topics. The
field was blank, but should have been "Topic".Wow. What a horrible little
bug to track down.
I hope the workflow of Core Data is much cleaner in Interface Builder 3
(when my MacBook returns from repairs...)
It certainly seems to me that in XCode 2.x, the Interface Builder workflow
for Core Data is not the best it could be for Core Data. The Data Modeler is
pretty nice. I found myself thinking Ruby on Rails' ActiveRecord needs
something that visual. Unfortunately for Core Data, all of the various
settings (that need to be correct and correspond to each other) are spread
out and within so many different views of the Inspector palette, it can be
hard to make sure you have everything correct.
Maybe it comes with experience, but something tells me there could be a more
concise way to view and work with these things in Core Data.
Ruby on Rails' ActiveRecord sometimes suffers a similar problem.
The code feels a bit like spaghetti code (think old BASIC from the 80's with
goto statements).
I do believe the programmer should and could easily be alerted that there is
no Entity Name set!
Obviously, the Entity Name is crucial to making Core Data controllers work.
(anyway, thanks Jens!)
___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: A documentation dumdum

2008-06-22 Thread William Squires
Okay, thanks. It seems to work if I just typecast it to NSString *,  
since the values are coming from an NSTextField as [textField  
stringValue] in my AppController.m when the action is triggered from  
the "Add" buttton.


On Jun 22, 2008, at 11:13 AM, Jeff LaMarche wrote:



On Jun 22, 2008, at 12:02 PM, William Squires wrote:

okay, looking up tableView:setObjectValue:forTableColumn:row shows  
that setObjectValue: takes an (id), but what is it really? An  
NSString pointer? I want to get an NSString that represents the  
new value the user typed in for the selected (and edited) cell in  
the NSTableView. Can I safely typecast this to (NSString *)? In  
which case, maybe the docs should say that this is an (NSString *)  
instead of (id)?


The documentation is correct. The Table View Programming Guide states:

The NSTableView object treats objects provided by its data source  
as values to be displayed in NSCell objects. If these objects  
aren’t of common value classes—such as NSString, NSNumber, and so on 
—you may need to create a custom NSFormatter object to display  
them. For more information, see Data Formatting Programming Guide  
for Cocoa.


In other words, it's not always going to be an NSString *. Whatever  
the object is, it will be converted to a string for display, but  
the table view is actually capable of holding different types of  
data and doesn't change the type that it's holding, so you can't  
assume that the object it holds is a string. Now, if you are giving  
the table strings, then by all means, cast the object to an  
NSString. If you're not sure what the type of object you're getting  
back is, you can find out in the debugger console by typing


po [returnedValue class]

or adding an NSLog statement to your code like

NSLog(@"returned value class: %@", [returnedValue class]);

HTH



___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: [Q] How to add a program as a login item after installing?

2008-06-22 Thread Jens Alfke


On 21 Jun '08, at 11:21 PM, JongAm Park wrote:


Well, in my case, we wanted to avoid such workflow.
We want installing & running the special app to be transparent from  
users.


The best thing you can do to avoid extra workflow is to *not use an  
installer*. It's best if the user can simply download your app, copy  
it to their disk if necessary, and launch it. Mac OS X has all kinds  
of features designed to avoid the need for an installer in most cases.


I would find it much nicer to double-click the app and, on the first  
launch, be asked if I want to install a login item. This is simpler,  
friendlier and safer than an installer. Seeing an installer tells me  
that this application is going to potentially splatter things all over  
my disk, that could change the behavior of the system or other apps,  
and might be difficult to remove.


Also: When I download a new app I have not yet committed to using it  
full-time, so I don't want it setting itself as a login item. If I use  
the app for ten minutes and decide I don't like it, or it's not worth  
the price, I want to quit it and not see it again. It annoys me if it  
comes back the next time I log in. (This means that, even if I say No  
to installing the login item at the beginning, there should be a  
checkbox in the prefs that I can turn on later to make it a login item.)


—Jens

smime.p7s
Description: S/MIME cryptographic signature
___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: weird bug or feature?

2008-06-22 Thread Jens Alfke


On 22 Jun '08, at 8:41 AM, William Squires wrote:

If I hover the mouse over the content region of the NSTableVIew, a  
spurious tableView:objectValueForColumn:row shows up in the console  
log (note that I'm not clicking on anything, just hovering the mouse  
over the NSTableView)


I'd guess this is due to the Leopard feature that shows the entire  
cell contents in a tooltip-like floating view after you've hovered  
over the cell for a second. It has to get the cell contents and then  
measure the pixel width to see if it fits in the cell, before deciding  
to show the expansion view.


(Remember, the table never remembers the contents of any table cells!  
Any time it has to get the value in a cell, it asks your data source  
for it. That's what makes NSTableView scalable to millions of rows.  
Don't worry about it; it's a feature.)


—Jens

smime.p7s
Description: S/MIME cryptographic signature
___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: A documentation dumdum

2008-06-22 Thread Jens Alfke


On 22 Jun '08, at 9:13 AM, Jeff LaMarche wrote:

Whatever the object is, it will be converted to a string for  
display, but the table view is actually capable of holding different  
types of data and doesn't change the type that it's holding, so you  
can't assume that the object it holds is a string.


Specifically, the object you get comes from the table cell for that  
column, and is of whatever value type that cell class uses. It depends  
on the type of cell.


This is the same situation as the more common - 
objectValueForTableColumn: method, but in reverse. In that method you  
have to return an object that will be stored as the object value for  
the cell, so it has to be a type that cell can work with. In the - 
setObjectValue: method, the cell returns you a value of its native  
type, and you have to work with it.


Here are a few examples to give you an idea of what object classes the  
various cells will give you. The documentation for each NSCell  
subclass will describe this.


text field — NSString [unless you've attached an NSNumberFormatter or  
NSDateFormatter, in which case it's an NSNumber or NSDate]
checkbox or other NSButton — NSNumber with a boolean value,  
corresponding to the -state property

slider — NSNumber
pop-up menu — NSNumber (the index of the selected item)
image — NSImage

—Jens

smime.p7s
Description: S/MIME cryptographic signature
___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: A documentation dumdum

2008-06-22 Thread Daniel Richman

I think it's fine. This was my code for your exercise:

-(void)tableView:(NSTableView *)aTableView
 setObjectValue:(id)anObject
 forTableColumn:(NSTableColumn *)aTableColumn
row:(int)rowIndex
{
   NSLog(@"Replacing '%@' with '%@'", [toDoList 
objectAtIndex:rowIndex], anObject);

   [toDoList replaceObjectAtIndex:rowIndex withObject:anObject];
}


Don't worry about giving it to the table view as an NSString. It can 
take any type of object fine. Don't type cast it.


Daniel


William Squires wrote:
okay, looking up tableView:setObjectValue:forTableColumn:row shows 
that setObjectValue: takes an (id), but what is it really? An NSString 
pointer? I want to get an NSString that represents the new value the 
user typed in for the selected (and edited) cell in the NSTableView. 
Can I safely typecast this to (NSString *)? In which case, maybe the 
docs should say that this is an (NSString *) instead of (id)?



___

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/mailman/options/cocoa-dev/applemaillist%40mm.danielrichman.com 



This email sent to [EMAIL PROTECTED]

___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: A documentation dumdum

2008-06-22 Thread Jeff LaMarche


On Jun 22, 2008, at 12:02 PM, William Squires wrote:

okay, looking up tableView:setObjectValue:forTableColumn:row shows  
that setObjectValue: takes an (id), but what is it really? An  
NSString pointer? I want to get an NSString that represents the new  
value the user typed in for the selected (and edited) cell in the  
NSTableView. Can I safely typecast this to (NSString *)? In which  
case, maybe the docs should say that this is an (NSString *) instead  
of (id)?


The documentation is correct. The Table View Programming Guide states:

The NSTableView object treats objects provided by its data source as  
values to be displayed in NSCell objects. If these objects aren’t of  
common value classes—such as NSString, NSNumber, and so on—you may  
need to create a custom NSFormatter object to display them. For more  
information, see Data Formatting Programming Guide for Cocoa.


In other words, it's not always going to be an NSString *. Whatever  
the object is, it will be converted to a string for display, but the  
table view is actually capable of holding different types of data and  
doesn't change the type that it's holding, so you can't assume that  
the object it holds is a string. Now, if you are giving the table  
strings, then by all means, cast the object to an NSString. If you're  
not sure what the type of object you're getting back is, you can find  
out in the debugger console by typing


po [returnedValue class]

or adding an NSLog statement to your code like

NSLog(@"returned value class: %@", [returnedValue class]);

HTH

___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


A documentation dumdum

2008-06-22 Thread William Squires
okay, looking up tableView:setObjectValue:forTableColumn:row shows  
that setObjectValue: takes an (id), but what is it really? An  
NSString pointer? I want to get an NSString that represents the new  
value the user typed in for the selected (and edited) cell in the  
NSTableView. Can I safely typecast this to (NSString *)? In which  
case, maybe the docs should say that this is an (NSString *) instead  
of (id)?



___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Race in Apple's NSTreeContoller/NSOutlineView

2008-06-22 Thread Jens Alfke
FYI, another source of weird inconsistently-manifesting bugs involving  
nib loading: The objects in the nib are sent -awakeFromNib messages in  
a somewhat random order. The order is often the same from one run to  
the next on a single machine, but can vary between machines, or after  
seemingly unrelated changes to the code.


What I've seen happen in my code is that object A's -awakeFromNib  
method calls another object B in the nib, and the method that's called  
relies on object B's -awakeFromNib already having run. So it works if  
B was awoken before A, but fails if B hasn't been awoken yet.


(The reason for the random order? The objects in the nib are stored in  
an NSSet, and the nib loader enumerates over that set sending each  
object -awakeFromNib. The order of enumeration of a set or dictionary  
is undefined and depends on the internal ordering of the objects in  
the hashtable, which in turn depends on the object's -hash codes. And  
NSView's -hash method, inherited from NSObject, returns ... its  
pointer value cast to an integer. So in short, the order in which the  
objects are sent -awakeFromNib is dependent on on their in-memory  
layout, and that depends on undefined details of the order in which  
all the allocations in the heap occurred and the sizes of those  
blocks. Things like that are very dependent on machine architecture  
and the timing of multiple threads.)


More than you wanted to know, I'm sure...

—Jens

smime.p7s
Description: S/MIME cryptographic signature
___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Re: weird bug or feature?

2008-06-22 Thread William Squires
Oops, forget the part about "... every few seconds." Instead, it  
should have said, "... every time the mouse enters the content region."


On Jun 22, 2008, at 10:41 AM, William Squires wrote:

  Okay, here's a strange UI glitch. I have an Xcode project in  
which I have a "to-do" list (the challenge in Chapter 6 of the new  
Hillegaas book). I've sprinkled NSLog() calls into my methods in  
AppController, so I can see what's going on. I build and run, then  
add a few items - all okay so far; they appear in the NSTableView.  
If I hover the mouse over the content region of the NSTableVIew, a  
spurious tableView:objectValueForColumn:row shows up in the console  
log (note that I'm not clicking on anything, just hovering the  
mouse over the NSTableView) about once every few seconds. Bug or  
feature? I would expect a delegate for mousing over, but not  
tableView:objectValueForColumn:row!




___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: weird bug or feature?

2008-06-22 Thread Daniel Richman
Can you post your code for your main class? I've been doing the same 
thing and haven't had anything like that.


Daniel


William Squires wrote:
  Okay, here's a strange UI glitch. I have an Xcode project in which I 
have a "to-do" list (the challenge in Chapter 6 of the new Hillegaas 
book). I've sprinkled NSLog() calls into my methods in AppController, 
so I can see what's going on. I build and run, then add a few items - 
all okay so far; they appear in the NSTableView. If I hover the mouse 
over the content region of the NSTableVIew, a spurious 
tableView:objectValueForColumn:row shows up in the console log (note 
that I'm not clicking on anything, just hovering the mouse over the 
NSTableView) about once every few seconds. Bug or feature? I would 
expect a delegate for mousing over, but not 
tableView:objectValueForColumn:row!


___

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/mailman/options/cocoa-dev/applemaillist%40mm.danielrichman.com 



This email sent to [EMAIL PROTECTED]

___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


weird bug or feature?

2008-06-22 Thread William Squires
  Okay, here's a strange UI glitch. I have an Xcode project in which  
I have a "to-do" list (the challenge in Chapter 6 of the new  
Hillegaas book). I've sprinkled NSLog() calls into my methods in  
AppController, so I can see what's going on. I build and run, then  
add a few items - all okay so far; they appear in the NSTableView. If  
I hover the mouse over the content region of the NSTableVIew, a  
spurious tableView:objectValueForColumn:row shows up in the console  
log (note that I'm not clicking on anything, just hovering the mouse  
over the NSTableView) about once every few seconds. Bug or feature? I  
would expect a delegate for mousing over, but not  
tableView:objectValueForColumn:row!


___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Why does this https post request always return "404 Not Found"

2008-06-22 Thread Steve Christensen

Hmmm... Google not working?

-  lists the APIs for a  
variety of programming languages at the bottom of the page.


-  is an open source Cocoa  
del.icio.us client, so you should be able to see what they did.



On Jun 21, 2008, at 10:14 PM, an0 wrote:


Cool, it works. Thanks a lot.
But as to APIs, I really can't find the login API, or I would of
course use that instead of posting forms.
Can you tell me where the login API is?

On Sun, Jun 22, 2008 at 6:32 AM, Jens Alfke <[EMAIL PROTECTED]>  
wrote:
This is pretty weird. After some experimenting, I narrowed it down  
to the
value of the User-Agent header. I think the del.icio.us server is  
checking
that header and returning a 404 if it doesn't like it. And it  
doesn't seem
to like CFNetwork's default user-agent header, though it likes  
Safari and

curl.

You can programmatically set the "User-Agent" header value to  
"Mozilla/5.0
(Macintosh; U; Intel Mac OS X 10_5_3; en-us) AppleWebKit/525.18  
(KHTML, like

Gecko) Version/3.1.1 Safari/525.20" and the result should work.

On the other hand, why are you trying to log into del.icio.us  
using forms
and cookies as though you were a web browser? That site already  
has a pretty

comprehensive API for applications to access it; you should use that
instead. (That may in fact be what they're trying to tell you by  
blocking

your request.)


___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Wherefore art thou, o NSTableView?

2008-06-22 Thread Daniel Richman

You should implement

-(void)tableView:(NSTableView *)aTableView
 setObjectValue:(id)anObject
 forTableColumn:(NSTableColumn *)aTableColumn
row:(int)rowIndex

The table view sends this message to you when one of its cells is being 
edited, and then you do whatever you want with the data.


Daniel


William Squires wrote:
  Okay, this one has me stumped. What delegate do I need to implement 
to handle user editing a cell in an NSTableView (i.e. after they edit 
it, and hit the  key to accept.) None of the delegate methods 
described in the docs seem to fit the bill, but maybe I'm just 
overlooking it? I've already implemented 
tableView:shouldEditTableColum:row to return YES.

  Or is this a case for connecting actions in IB?

___

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/mailman/options/cocoa-dev/applemaillist%40mm.danielrichman.com 



This email sent to [EMAIL PROTECTED]

___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Wherefore art thou, o NSTableView?

2008-06-22 Thread William Squires
  Okay, this one has me stumped. What delegate do I need to  
implement to handle user editing a cell in an NSTableView (i.e. after  
they edit it, and hit the  key to accept.) None of the  
delegate methods described in the docs seem to fit the bill, but  
maybe I'm just overlooking it? I've already implemented  
tableView:shouldEditTableColum:row to return YES.

  Or is this a case for connecting actions in IB?

___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: zlib in 10.4 and 10.5

2008-06-22 Thread Jason Coco
Yes... everything since OS X 10.4.3 uses zlib 1.2.3... but even before  
that, everything used 1.2.x. zlib has been very stable for a very long  
time so you won't really run into any issues...


/j

On Jun 22, 2008, at 06:41 , Trygve Inda wrote:




No. The library will return Z_VERSION_ERROR if you try to
inflate something that the working zlib library doesn't understand.

That said, zlib has been stable for years. If you're just now
getting started with compression, you should't have version
problems (that you can't manage).


Are all zlibs shipped in 10.4 and 10.5 mutually compatible? If I  
compress

something on 10.5.3, can 10.4.0 uncompress it?

Thanks,

Trygve


___

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/mailman/options/cocoa-dev/jason.coco 
%40gmail.com


This email sent to [EMAIL PROTECTED]


___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Data backend for larger apps --> Valentina Embedded Server.

2008-06-22 Thread Ruslan Zasukhin
On 6/22/08 2:53 AM, "Devraj Mukherjee" <[EMAIL PROTECTED]> wrote:

> Hi all,
> 
> I have gathered that Core Data (as brilliant as it is) doesn't yet
> support client/server databases. I am writing an application which
> will be installed on multiple machines but would like share the single
> data source.
> 
> Since there will be large amount of data the thought at this stage is
> to use something like MySQL obviously at the risk of not being able to
> use some so cool as CoreData. Are there any suggestions as to what the
> best way to approach this problem is.
> 
> I am certain I am not the first one to ask this question but can't
> find any valuable clues.

You can check Valentina database.

Valentina offers (royalty free) both:
* local only db
* client/server remote db

With only 2-3 lines to change, or even app can handle in the same time both
local and remote Valentina dbs.

Valentina offers Object-Relational Data model on the db level,
And it offers nice OO API for Cocoa developers.

You can read below a testimonial about Valentina for Cocoa from our page:
http://www.paradigmasoft.com/en/testimonials

Let me know if you have more questions about Valentina.


==
> Soundminer's Justin Drury on Valentina for Cocoa and REALbasic
> I¹ve been using Valentina since 2000 first with Realbasic and now with Cocoa.
> What has always struck me as impressive is not just the database engine but
> the dedication and excitement the folks at Paradigma have for their product. I
> had moved to Apple¹s Cocoa framework about a year ago and had to use alternate
> databases(SqLite/MySQL) while Valentina was prepared.
> 
> Recently I have been able to start integrating V4CC(Valentina for Cocoa) into
> my apps, and frankly its THE most exciting addition to my development
> environment! I can use Valentina¹s RAM databases with the same ease as
> CoreFoundation¹s datatypes with all the speed and efficiency that we have come
> to respect out of Valentina.
> 
> With its objective C interface and built-in binding support, Valentina for
> Cocoa (with xCode) is an incredible RAD tool. I had been using CoreData with
> both its XML store and Sql Lite store and while that was fine for a few
> thousand records it quickly started to bog down and I missed the ability to
> tinker under the hood. Within an hour I had whipped together a prototype using
> Valentina and was awed by its power. I¹m again able to access hundreds of
> thousands of records with lightning speed and with its mature SQL support I¹m
> able to manipulate the data with ease.
==



-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]


___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: zlib in 10.4 and 10.5

2008-06-22 Thread Trygve Inda

> No. The library will return Z_VERSION_ERROR if you try to
> inflate something that the working zlib library doesn't understand.
> 
> That said, zlib has been stable for years. If you're just now
> getting started with compression, you should't have version
> problems (that you can't manage).

Are all zlibs shipped in 10.4 and 10.5 mutually compatible? If I compress
something on 10.5.3, can 10.4.0 uncompress it?

Thanks,

Trygve


___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: Getting double-clicks on NSTextField

2008-06-22 Thread Steve Nicholson

On Jun 18, 2008, at 8:25 PM, Steve Nicholson wrote:
I have an NSTextField on my window that is neither editable nor  
selectable. Is there a way for my window controller to be notified  
when the user double-clicks on the field?





On Jun 18, 2008, at 6:04 PM, Andy Lee wrote:
I don't know if there's a better way, but this works:

NSTextField doesn't have a doubleAction, but NSMatrix does.  So  
instead of an NSTextField, use an NSMatrix with just one cell.  You  
can do this in IB by selecting the NSTextField and selecting Layout  
>> Embed Objects In >> Matrix from the menu.  In your window  
controller's awakeFromNib, do this:


[_textFieldMatrix setTarget:self];
[_textFieldMatrix setDoubleAction:@selector 
(doTextFieldDoubleClick:)];


--Andy


Thanks. That worked a treat.

-Steve
___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


[Q] IMKit: IMKInputController and its menu handler

2008-06-22 Thread JongAm Park

Hello, all.

I figured out why it was not possible to handle the menu item for an  
input method


According to Apple's own document...

doCommandBySelector:commandDictionary:
Passes commands that are not generated as part of the text input
process.

- (void)doCommandBySelector:(SEL)aSelector commandDictionary:
(NSDictionary*)infoDictionary

Discussion
The default implementation checks if the input controller object (that
is, self) responds to the selector. If so, it sends the message
performSelector:withObject: to the input controller class. The object
parameter in that case is the infoDictionary parameter.

This method is called when a user selects a command from the text
input menu. To support this, an input method must provide actions for
each menu item that is placed in the menu. For example,
(void)menuAction:(i



So, even though menu items are hooked up to other controller class  
than the IMKInputController, the menu event is still sent to the  
IMKInputController, instead of the controller which is hooked up.


Then if I remove the controller class I made, and hope that the menu  
items would be handled automatically once I define them in the  
IMKInputController, it is wrong. The menu items are not activated. So,  
I had to instantiate my subclass of IMKInputController in the NIB and  
hooked the menu items to the action handlers defined in the subclass.


It would be much nicer if the menu items are hooked up to any object  
in which their handlers are defined, as it was used to be for other  
kinds of classes, or if the IB gives a warning message if you are  
trying to connect menu items to objects other than the subclass of the  
IMKInputController.


Hope this helps other people who suffers like me..


___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]


Re: NSKeyedArchiver finishEncoding takes forever

2008-06-22 Thread Markus Spoettl

On Jun 21, 2008, at 11:46 PM, Mark Munz wrote:

I also recommend logging a bug with Apple against this issue. You
shouldn't need to jump through those sorts of hoops with
NSKeyedArchiver.



I did (as requested by an Apple engineer). He told me that this has  
been fixed internally already, he couldn't say when it will be  
released, though.


Regards
Markus
--
__
Markus Spoettl



smime.p7s
Description: S/MIME cryptographic signature
___

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/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]