mirror of
https://github.com/gnustep/libs-gdl2.git
synced 2025-02-19 17:50:47 +00:00
* DBModeler/Inspectors/RelationshipInspector.m (-awakeFromNib):
Set text field delegate, implement controlTextDidEndEditing. * DBModeler/Resources/Preferences.gorm: Remove unimplemented outlets. * DBModeler/ModelerAttributeEditor.h: Add ivar. * DBModeler/ModelerAttributeEditor.m: Add EOObserving for the current selection. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gdl2/trunk@28022 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
ecdc0c32ad
commit
31c7948faf
6 changed files with 49 additions and 1 deletions
|
@ -4,6 +4,12 @@
|
|||
controlTextDidEndEditing:.
|
||||
* DBModeler/Inspectors/AttributesInspector.gorm: Set text field
|
||||
delegates, and nextKeyView.
|
||||
* DBModeler/Inspectors/RelationshipInspector.m (-awakeFromNib):
|
||||
Set text field delegate, implement controlTextDidEndEditing.
|
||||
* DBModeler/Resources/Preferences.gorm: Remove unimplemented outlets.
|
||||
* DBModeler/ModelerAttributeEditor.h: Add ivar.
|
||||
* DBModeler/ModelerAttributeEditor.m: Add EOObserving for the current
|
||||
selection.
|
||||
|
||||
2009-03-01 Matt Rice <ratmice@gmail.com>
|
||||
|
||||
|
|
|
@ -163,6 +163,7 @@
|
|||
|
||||
- (void) awakeFromNib
|
||||
{
|
||||
[name_textField setDelegate:self];
|
||||
[destEntity_tableView setAllowsEmptySelection:NO];
|
||||
[srcAttrib_tableView setAllowsEmptySelection:NO];
|
||||
[destAttrib_tableView setAllowsEmptySelection:NO];
|
||||
|
@ -386,5 +387,14 @@ row:(int)row
|
|||
[[self selectedObject] setToMany: [[sender selectedCell] tag]];
|
||||
}
|
||||
|
||||
- (void) controlTextDidEndEditing:(NSNotification *)notif
|
||||
{
|
||||
id sender = [notif object];
|
||||
NSLog(@"%@ %@", NSStringFromSelector(_cmd), sender);
|
||||
|
||||
if (sender == name_textField)
|
||||
[self nameChanged:sender];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
@class NSTableView;
|
||||
@class EODisplayGroup;
|
||||
@class PlusMinusView;
|
||||
@class NSArray;
|
||||
|
||||
@interface ModelerAttributeEditor : ModelerTableEmbedibleEditor <EOObserving>
|
||||
{
|
||||
|
@ -41,6 +42,7 @@
|
|||
EODisplayGroup *_relationships_dg;
|
||||
id _entityToObserve;
|
||||
id _attributeToObserve;
|
||||
NSArray *_oldSelection;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -187,7 +187,12 @@
|
|||
|
||||
[self addDefaultTableColumnsForTableView:_relationships_tableView
|
||||
displayGroup:_relationships_dg];
|
||||
|
||||
|
||||
[[NSNotificationCenter defaultCenter]
|
||||
addObserver:self
|
||||
selector:@selector(selectionDidChange:)
|
||||
name:EOMSelectionChangedNotification
|
||||
object:[self document]];
|
||||
return self;
|
||||
}
|
||||
|
||||
|
@ -262,6 +267,31 @@
|
|||
return [NSArray arrayWithObjects: [ModelerEntityEditor class], nil];
|
||||
}
|
||||
|
||||
- (void) selectionDidChange:(NSNotification *)notif
|
||||
{
|
||||
EOModelerDocument *doc = [notif object];
|
||||
NSArray *newSelection = [[EOMApp currentEditor] selectionWithinViewedObject];
|
||||
int i, c;
|
||||
|
||||
c = [_oldSelection count];
|
||||
|
||||
for (i = 0; i < c; i++)
|
||||
{
|
||||
id obj = [_oldSelection objectAtIndex:i];
|
||||
|
||||
[EOObserverCenter removeObserver:self forObject:obj];
|
||||
}
|
||||
|
||||
c = [newSelection count];
|
||||
for (i = 0; i < c; i++)
|
||||
{
|
||||
id obj = [newSelection objectAtIndex:i];
|
||||
|
||||
[EOObserverCenter addObserver:self forObject:obj];
|
||||
}
|
||||
ASSIGN(_oldSelection, newSelection);
|
||||
}
|
||||
|
||||
- (void) objectWillChange:(id)sender
|
||||
{
|
||||
[[NSRunLoop currentRunLoop]
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue