Re: making a clickable link in NSTableView

2011-06-19 Thread Houdah - ML Pierre Bernard
Hi!

Here is the solution I got from DTS:

http://dl.dropbox.com/u/2381634/DTS/TableViewLinks-updated.zip

At a later WWDC they introduced a more evolved version of the same code:

http://developer.apple.com/library/mac/#samplecode/CocoaTipsAndTricks/Introduction/Intro.html

Best,
Pierre Bernard
Houdah Software s.à r.l.


On Jun 19, 2011, at 1:08 PM, Rick C. wrote:

 Hello,
 
 I currently have a NSTableView which displays a list of files and normally 
 the table view is not clickable or selectable.  In this list of files I 
 actually display the file path as a subtitle to the file name.  What I would 
 like to do is to turn that file path into a clickable link that when clicked 
 would do the equivalent of Reveal in Finder.  Ideally the file path in my 
 table view would look the way it does currently but when the mouse hovers 
 over it then the cursor would change to a hand indicating it's a link.  I'm 
 assuming I would have to turn the file path into an NSURL but could someone 
 point me in the right direction how to make all of this happen?  Thanks!
 
 rc___
 
 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/pierre.bernard%40lists.houdah.com
 
 This email sent to pierre.bern...@lists.houdah.com

- - -
Houdah Software s. à r. l.
http://www.houdah.com

HoudahGeo: One-stop photo geocoding
HoudahSpot: Powerful Spotlight frontend




___

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 arch...@mail-archive.com


Re: Temporarily enabling layer backing for NSView

2011-06-18 Thread Houdah - ML Pierre Bernard
Try calling -display after -setWantsLayer:

The view needs to be drawn once into the layer before being able to animate.

Another way of achieving the desired result is to draw the initial and target 
view into images and then animate the swapping of image views.

Best,
Pierre Bernard
Houdah Software s.à r.l.

On Jun 18, 2011, at 6:33 AM, Indragie Karunaratne wrote:

 Super late reply here, but I just tried that and it still doesn't work. It 
 seems to work every now and then randomly but other times it doesn't work at 
 all. Sounds like some sort of timing issue.
 
 On 2011-05-18, at 1:04 AM, Josh Abernathy wrote:
 
 Try doing the animation one runloop after calling -setWantsLayer:, kinda 
 like this (typed in Mail):
 
 - (void)doAnimation {
   [parentView setWantsLayer:YES];
   [self performSelector:@selector(noSeriouslyDoTheAnimation) withObject:nil 
 afterDelay:0];
 }
 
 - (void) noSeriouslyDoTheAnimation {
   CATransition *transition = [CATransition animation];
   transition.type = kCATransitionPush;
   transition.subtype = kCATransitionFromLeft;
   transition.timingFunction = [CAMediaTimingFunction 
 functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
   [CATransaction begin];
   [CATransaction setCompletionBlock:^(void) {
  [parentView setWantsLayer:NO];
   }];
   [parentView setAnimations:[NSDictionary dictionaryWithObject:transition 
 forKey:@subviews]];
   [[parentView animator] replaceSubview:firstView with:secondView];
   [CATransaction commit];
 }
 
 
 On May 17, 2011, at 7:59 PM, Indragie Karunaratne wrote:
 
 Hi all,
 
 I'm trying to use CATransition in my app to provide an animated slide 
 transition when swapping views. I don't want to permanently layer back my 
 views because they cause various glitches (no subpixel antialiasing, resize 
 issues when backed with a CATiledLayer, etc.) To get around this, I want to 
 temporarily layer back my view, run the animation, and then disable layer 
 backing after the animation completes. This is my code thus far:
 
 CATransition *transition = [CATransition animation];
 transition.type = kCATransitionPush;
 transition.subtype = kCATransitionFromLeft;
 transition.timingFunction = [CAMediaTimingFunction 
 functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
 [parentView setWantsLayer:YES];
 [CATransaction begin];
 [CATransaction setCompletionBlock:^(void) {
  [parentView setWantsLayer:NO];
 }];
 [parentView setAnimations:[NSDictionary dictionaryWithObject:transition 
 forKey:@subviews]];
 [[parentView animator] replaceSubview:firstView with:secondView];
 [CATransaction commit];
 
 With this code, the animation doesn't run (the views just get swapped 
 without animation but the completion block is still called). The problem 
 seems to be the fact that I'm calling -setWantsLayer: immediately before 
 the animation begins. If I call this method in -awakeForNib, the animation 
 will run. I'm thinking that this might be some sort of runloop issue, but I 
 have no idea what I can do to work around this. I've tried moving my 
 -setWantsLayer: call to various places within the animation method but this 
 has no effect.
 
 Any help is greatly appreciated.
 Thanks,
 Indragie
 
 http://indragie.com ___
 
 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/joshaber%40gmail.com
 
 This email sent to josha...@gmail.com
 
 
 ___
 
 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/pierre.bernard%40lists.houdah.com
 
 This email sent to pierre.bern...@lists.houdah.com

- - -
Houdah Software s. à r. l.
http://www.houdah.com

HoudahGeo: One-stop photo geocoding
HoudahSpot: Powerful Spotlight frontend




___

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 arch...@mail-archive.com


Accessibility for NSTableView

2010-04-23 Thread Houdah - ML Pierre Bernard
Hi!

I have a table view which lists files.  I would like to make the represented 
objects available through Accessibility. I.e. I want to add 
NSAccessibilityURLAttribute and NSAccessibilityFilenameAttribute to the table 
rows.

So far, I have come up with this:

- (id)accessibilityHitTest:(NSPoint)point;
{
NSObject *row = [super accessibilityHitTest:point];

if (row != nil) {
@try {
NSNumber *rowNumber = [row valueForKey:@row];

NSObject *dataSource = [self dataSource];
ResultItem *resultItem = [dataSource tableView:self 
objectValueForTableColumn:nil row:[rowNumber intValue]];

[row accessibilitySetOverrideValue:[resultItem pathURL] 
forAttribute:NSAccessibilityURLAttribute];
[row accessibilitySetOverrideValue:[resultItem path] 
forAttribute:NSAccessibilityFilenameAttribute];
}
@catch (NSException *exception) {
NSLog(@exception: %@, exception);
}
}

return row;
}

Sadly, this is not working. Neither attribute is visible in the Accessibility 
Inspector.

Best,
Pierre Bernard
Houdah Software s.à r.l.

- - -
Houdah Software s. à r. l.
http://www.houdah.com

HoudahGeo: One-stop photo geocoding
HoudahSpot: Powerful Spotlight frontend




___

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 arch...@mail-archive.com


Re: NSRuleEditor: Criteria for new row

2009-12-23 Thread Houdah - ML Pierre Bernard
I was able to fake it by subclassing a private method:

- (void)_addOptionFromSlice:(id)slice ofRowType:(unsigned int)type
{
int rowIndex = [(NSRuleEditorViewSlice*)slice rowIndex];

NSArray *criteriaForRow = [self criteriaForRow:rowIndex];
NSArray *displayValuesForRow = [self displayValuesForRow:rowIndex];

self.template = [NSArray arrayWithObjects:criteriaForRow, 
displayValuesForRow, nil];

[super _addOptionFromSlice:slice ofRowType:type];
}

- (void)insertRowAtIndex:(NSInteger)rowIndex 
withType:(NSRuleEditorRowType)rowType asSubrowOfRow:(NSInteger)parentRow 
animate:(BOOL)shouldAnimate
{
[super insertRowAtIndex:rowIndex withType:rowType 
asSubrowOfRow:parentRow animate:shouldAnimate];

NSArray *template = self.template;

if (template != nil) {
[self setCriteria:[template objectAtIndex:0] 
andDisplayValues:[template objectAtIndex:1] forRowAtIndex:rowIndex];
}
}

Pierre

On Dec 23, 2009, at 12:37 AM, Peter Ammon wrote:

 
 On Dec 22, 2009, at 10:57 AM, Houdah - ML Pierre Bernard wrote:
 
 When I hit the + button on a row in NSRuleEditor, a new row is created. 
 How can I take influence on the criteria used for that row.
 
 It seems NSRuleEditor defaults to selecting the first criterion sequentially 
 from the list of possible values. I would much rather have the new row match 
 the row where the + was clicked.
 
 Pierre
 
 Sorry, this isn't possible right now.
 

- - -
Houdah Software s. à r. l.
http://www.houdah.com

HoudahGeo: One-stop photo geocoding
HoudahSpot: Powerful Spotlight frontend




___

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 arch...@mail-archive.com


NSRuleEditor: Criteria for new row

2009-12-22 Thread Houdah - ML Pierre Bernard
When I hit the + button on a row in NSRuleEditor, a new row is created. How 
can I take influence on the criteria used for that row.

It seems NSRuleEditor defaults to selecting the first criterion sequentially 
from the list of possible values. I would much rather have the new row match 
the row where the + was clicked.

Pierre

- - -
Houdah Software s. à r. l.
http://www.houdah.com

HoudahGeo: One-stop photo geocoding
HoudahSpot: Powerful Spotlight frontend




___

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 arch...@mail-archive.com


Re: User interface validation doesn't work, right?

2009-08-23 Thread Houdah - ML Pierre Bernard

Just ran into the same problem and came up with HHValidatedButton:
http://www.bernard-web.com/pierre/blog/index.php?id=6542976061063123843

Pierre Bernard

On Jul 1, 2009, at 11:24 PM, Bill Cheeseman wrote:

For years, the Implementing Validation section of Apple's User  
Interface Validation document has said  the following:


Before it is displayed, a user interface item checks to see if its  
target implements validateUserInterfaceItem:. If it does, then the  
enabled status of the item is determined by the return value of the  
method. You can therefore conditionally enable or disable an item by  
implementing validateUserInterfaceItem: in the target object.


This has never been true. Right?

My custom window controller implements the action method for a  
button, so it is the button's target, and it also implements - 
validateUserInterfaceItem:, all according to the User Interface  
Validation document. But my -validateUserInterfaceItem: method is  
never called.


If I want it to be called automatically, by analogy to - 
validateMenuItem:, I have to override NSWindow's -update method, by  
analogy to -[NSMenu update]. In my override of -update, I have to do  
for myself what the document claims already happens -- or I have to  
observe NSWindow's -NSWindowDidUpdateNotification. Right?



--

Bill Cheeseman
b...@cheeseman.name

___

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/pierre.bernard%40lists.houdah.com

This email sent to pierre.bern...@lists.houdah.com


___

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 arch...@mail-archive.com


NSDateFormatter formats from NSLocale

2009-08-11 Thread Houdah - ML Pierre Bernard

Hi!

I am trying to format dates for display. So far I have been using this  
formatter:


	NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init]  
autorelease];


[dateFormatter setFormatterBehavior:NSDateFormatterBehavior10_4];
[dateFormatter setDateStyle:NSDateFormatterShortStyle];
[dateFormatter setTimeStyle:kCFDateFormatterMediumStyle];


Now, I want to add leading zeros to days and month values. It seems  
there is no way of teaching the above formatter to do so. It goes with  
whatever format the user has set in System Preferences.


Thus I am trying the below formatter:

	NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init]  
autorelease];


[dateFormatter setFormatterBehavior:NSDateFormatterBehavior10_4];
[dateFormatter setDateFormat:@dd/mm/yy hh:MM:ss a];

This works fine, except for the fact that I have now hardcoded the  
fact that I display day/month/year rather than month/day/year.


It would seem that NSLocale should know about the user's preferences.  
Yet I can find no way to query it for date format.


Pierre
___

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 arch...@mail-archive.com


Re: NSDateFormatter formats from NSLocale

2009-08-11 Thread Houdah - ML Pierre Bernard

Hi Sean,

I want to respect the user's locale, yet ignore his/her preferences as  
to formatting.


I thought about modifying the format I get from the standard styles. I  
would however expect NSLocale to know the correct order of elements in  
the date format.


Pierre

So you want to use the user's preference and yet you don't.  The  
choice

of leading zeros or no is part of the user's choice.  But if you must,
you could get the user's format string and carefully alter it to add
leading zeros.

--

Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Software Developer  Montréal, Québec, Canada




___

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 arch...@mail-archive.com


Re: NSDateFormatter formats from NSLocale

2009-08-11 Thread Houdah - ML Pierre Bernard
Figured out one way to get the desired result. But really don't like  
it. I'd much rather have NSLocal tell me if day or months value should  
go first.


Anyway, here it goes:

	NSDateFormatter *dateFormatter = [[[NSDateFormatter alloc] init]  
autorelease];


[dateFormatter setFormatterBehavior:NSDateFormatterBehavior10_4];
[dateFormatter setDateStyle:NSDateFormatterShortStyle];
[dateFormatter setTimeStyle:NSDateFormatterMediumStyle];

	NSMutableString *dateFormat = [NSMutableString stringWithString: 
[dateFormatter dateFormat]];


	[dateFormat replaceOccurrencesOfString:@d withString:@dd options: 
0 range:NSMakeRange(0, [dateFormat length])];
	[dateFormat replaceOccurrencesOfString:@ddd withString:@dd  
options:0 range:NSMakeRange(0, [dateFormat length])];
	[dateFormat replaceOccurrencesOfString:@ddd withString:@dd  
options:0 range:NSMakeRange(0, [dateFormat length])];
	[dateFormat replaceOccurrencesOfString:@M withString:@MM options: 
0 range:NSMakeRange(0, [dateFormat length])];
	[dateFormat replaceOccurrencesOfString:@MMM withString:@MM  
options:0 range:NSMakeRange(0, [dateFormat length])];
	[dateFormat replaceOccurrencesOfString:@MMM withString:@MM  
options:0 range:NSMakeRange(0, [dateFormat length])];
	[dateFormat replaceOccurrencesOfString:@h withString:@hh options: 
0 range:NSMakeRange(0, [dateFormat length])];
	[dateFormat replaceOccurrencesOfString:@hhh withString:@hh  
options:0 range:NSMakeRange(0, [dateFormat length])];
	[dateFormat replaceOccurrencesOfString:@hhh withString:@hh  
options:0 range:NSMakeRange(0, [dateFormat length])];
	[dateFormat replaceOccurrencesOfString:@m withString:@mm options: 
0 range:NSMakeRange(0, [dateFormat length])];
	[dateFormat replaceOccurrencesOfString:@mmm withString:@mm  
options:0 range:NSMakeRange(0, [dateFormat length])];
	[dateFormat replaceOccurrencesOfString:@mmm withString:@mm  
options:0 range:NSMakeRange(0, [dateFormat length])];
	[dateFormat replaceOccurrencesOfString:@s withString:@ss options: 
0 range:NSMakeRange(0, [dateFormat length])];
	[dateFormat replaceOccurrencesOfString:@sss withString:@ss  
options:0 range:NSMakeRange(0, [dateFormat length])];
	[dateFormat replaceOccurrencesOfString:@sss withString:@ss  
options:0 range:NSMakeRange(0, [dateFormat length])];


[dateFormatter setDateFormat:dateFormat];
[dateFormatter setLenient:YES];

Pierre


On Aug 11, 2009, at 6:51 PM, Houdah - ML Pierre Bernard wrote:


Hi Sean,

I want to respect the user's locale, yet ignore his/her preferences  
as to formatting.


I thought about modifying the format I get from the standard styles.  
I would however expect NSLocale to know the correct order of  
elements in the date format.


Pierre

So you want to use the user's preference and yet you don't.  The  
choice
of leading zeros or no is part of the user's choice.  But if you  
must,

you could get the user's format string and carefully alter it to add
leading zeros.

--

Sean McBride, B. Eng s...@rogue-research.com
Rogue Researchwww.rogue-research.com
Mac Software Developer  Montréal, Québec, Canada




___

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/pierre.bernard%40lists.houdah.com

This email sent to pierre.bern...@lists.houdah.com


___

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 arch...@mail-archive.com


NSUndoManager vs @synthesize

2009-08-03 Thread Houdah - ML Pierre Bernard

Hi!

Do I still need to write my own accessors in order to perform  
NSUndoManager registration?


Could my model objects observe themselves and register undoable  
changes in observeValueForKeyPath:ofObject:change:context:  ?


How does CoreData go about registering changes with the undo manager?  
Is this done by @synthesize setter or by the NSManagedObjectContext  
watching the model objects?


Pierre
___

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 arch...@mail-archive.com


★★★★ Cocoa project for sale

2009-07-13 Thread Houdah - ML Pierre Bernard

HoudahStudy 2.0 (aka Ebbinghaus).
Study card software.
Late alpha / early beta. CoreData, CoreAnimation, GC, properties, …

Ebbinghaus 1.0 was freeware
2.0 is a complete rewrite. Not yet released.

Inquire via email to pierre.bern...@houdah.com
Current build available upon 
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 arch...@mail-archive.com


UINavigationController for desktop Cocoa?

2009-06-11 Thread Houdah - ML Pierre Bernard

Hi!

Has anyone already re-implemented UINavigationController for desktop  
Cocoa. That should be a cool thing to have.


Pierre

- - -
Houdah Software s. à r. l.
http://www.houdah.com

HoudahGeo: One-stop photo geocoding
HoudahSpot: Powerful Spotlight frontend



___

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 arch...@mail-archive.com


CoreImage: bend frame with shadow

2009-03-08 Thread Houdah - ML Pierre Bernard

Hi!

I remember someone posting code to their blog / web site showing how  
to frame a slightly bend image and add a shadow to it: Much like a  
sticker peeling off.


I can't find the link anymore.

Best,
Pierre Bernard

- - -
Houdah Software s. à r. l.
http://www.houdah.com

HoudahGeo: One-stop photo geocoding
HoudahSpot: Powerful Spotlight frontend



___

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 arch...@mail-archive.com


CoreData mystery: configuration used to open the store is incompatible...

2008-12-15 Thread Houdah - ML Pierre Bernard

Hi!

I am puzzled! I have run into this weirdest problem. It only happens  
if I target Tiger.


I am working on an update to HoudahGeo and suddenly, my current build  
refuses to open documents. This includes both existing documents and  
documents created by the running application. The error is:


Error Domain=NSCocoaErrorDomain Code=134020 UserInfo=0x2b7b10 The  
model configuration used to open the store is incompatible with the  
one that was used to create the store.
NSUnderlyingException = Can't find table for entity MovieReference in  
database at URL file://localhost/Users/pierre/Desktop/HoudahGeo-Leopard.hgeo 
;


There is no MovieReference entity in the model. There never was.  
Actually I have seen the same message with varying entity names. I  
believe they are taken from other applications.


BTW, the model has not been updated in over a year. And most certainly  
not between saving and attempting to reopen using the same running  
application.


The stack is:

#0  0x96da7e17 in objc_exception_throw
#1  0x9496344b in -[NSSQLCore _ensureDatabaseMatchesModel]
#2  0x94962b35 in -[NSSQLCore load:]
#3	0x94958732 in -[NSPersistentStoreCoordinator  
addPersistentStoreWithType:configuration:URL:options:error:]
#4	0x915f5fe9 in -[NSPersistentDocument  
configurePersistentStoreCoordinatorForURL:ofType:modelConfiguration:storeOptions:error 
:]
#5	0x915f6fab in - 
[NSPersistentDocument(NSPersistentDocumentDeprecated)  
configurePersistentStoreCoordinatorForURL:ofType:error:]

#6  0x915f63b6 in -[NSPersistentDocument readFromURL:ofType:error:]
#7  0x41c2 in -[Document readFromURL:ofType:error:] at Document.m:177
#8  0x913f16c6 in -[NSDocument initWithContentsOfURL:ofType:error:]
#9	0x913c1274 in -[NSDocumentController  
makeDocumentWithContentsOfURL:ofType:error:]
#10	0x913c0898 in -[NSDocumentController  
openDocumentWithContentsOfURL:display:error:]



This only happens when I target Tiger. When I target Leopard with the  
same code all works fine.

It occurs on both 10.5.5 and 10.5.6

When I compile an older version of the project, it works just fine.  
Thus I broke something with my recent changes. Yet I have no idea  
what. I did not touch the model.


Pierre
___

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 arch...@mail-archive.com


Drag Drop: PREVENT file move

2008-12-11 Thread Houdah - ML Pierre Bernard

Hi!

My application shows a list of files in a table view.

I have implemented drag and drop so that users may drag files from the  
list. I could envision them dragging the files onto other applications  
for viewing or dragging them on a removable media to create archive  
copies.


The problem occurs when the user drags the file to another folder on  
the same disk. By default, the Finder then wants to move the file. I  
need to prevent just that as it will cause havoc. For one, I would  
lose track of the file.


Is there a way for the originating application to control the allowed  
drag operations?


Best,
Pierre Bernard
___

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 arch...@mail-archive.com


Re: Window title bar accessory view

2008-11-19 Thread Houdah - ML Pierre Bernard

Hi Andrew,

No I am not talking about the toolbar.

I am referring to the lock icon and the new green certificate  
information text displayed by Safari in the window's title bar.

iCal displays a pop-up menu where one can pick the time zone.

Pierre


On 19 Nov 2008, at 03:52, Andrew Merenbach wrote:


On Nov 18, 2008, at 6:26 PM, Houdah - ML Pierre Bernard wrote:


Hi!

I would like to replicate the accessory views found in the top  
right of window title bars. Examples include Coda, iCal, Safari,...


How can I add subviews to the window's title bar?

Pierre


Greetings, Pierre,

I think that what you're referring to is the toolbar (class  
NSToolbar), as I don't see anything besides that at the top of my  
iCal or Safari windows.  (On Leopard, the Unified Title/Toolbar  
setting in Interface Builder, or through code, makes the title bar,  
which is actually separate, look connected to the toolbar.)


If you can afford to target Leopard-only and are willing to put up  
with a slightly buggy interface, you can use Interface Builder to  
set up the toolbar in the window itself and store it in the nib or  
xib that way.  Otherwise, if for whatever reason that won't work for  
you*, you may wish to use a toolbar delegate to handle the  
configuration of the toolbar.  The docs have much more info, as well  
as dos and dont's of toolbars (for instance: anything in a  
toolbar, last I checked, should have a menu item equivalent; thus if  
you have a Reset button or a Send button or whatnot in your toolbar,  
there should be a Reset or Send menu item, accessible from the menu  
bar).  Hope this helps!


* Selectable toolbar items are one example of why the Interface  
Builder approach may no work for you -- such items are not currently  
configurable in IB.  (They're the sort of item used in the iTunes  
preferences window, where they act like push-buttons of which only  
one can be selected at a time.)


Cheers,
Andrew



___

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: Window title bar accessory view

2008-11-19 Thread Houdah - ML Pierre Bernard

Hi Kyle!

Thanks a lot.

This sounds like a great idea. I will give it a try ASAP.

Pierre

On 19 Nov 2008, at 04:03, Kyle Sluder wrote:


On Tue, Nov 18, 2008 at 9:26 PM, Houdah - ML Pierre Bernard
[EMAIL PROTECTED] wrote:
I would like to replicate the accessory views found in the top  
right of

window title bars. Examples include Coda, iCal, Safari,...


Are you talking about things like the little lock icon in HTTPS Safari
windows?  If so, use -[NSWindow standardWindowButton:] to get an
NSButton instance, and then use -[NSView superview] to get at the
window frame view.  Then use -[NSView addSubview:] to add your custom
view and position it accordingly.

--Kyle Sluder


___

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]


Window title bar accessory view

2008-11-18 Thread Houdah - ML Pierre Bernard

Hi!

I would like to replicate the accessory views found in the top right  
of window title bars. Examples include Coda, iCal, Safari,...


How can I add subviews to the window's title bar?

Pierre
___

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]


NSRuleEditor/NSPredicateEditor selected rows

2008-10-31 Thread Houdah - ML Pierre Bernard

Hi!

NSRuleEditor has the concept of selected rows in its API. I however  
see no visual clues of which rows are selected.


Is it possible to subclass whatever cell view is used by the rule  
editor to add such a visual clue?


Pierre

___

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: NSInMemoryStoreType: Not really persistent, is it?

2008-10-22 Thread Houdah - ML Pierre Bernard
(I did a little demo app at one point long ago that used an in  
memory store to cache results from Amazon's web services API.   The  
front end was all pure Cocoa / bindings / CD with a minimal amount  
of additional code to pull data from amazon and push it into the  
local store).


Is that demo available some place?

Pierre

___

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]