diff --git a/ChangeLog b/ChangeLog index f007f3fa..07f55469 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-02-17 12:49-EST Gregory John Casamento + + * GormCore/GormViewEditor.m + * GormCore/GormViewWindow.m: Minor correction to view resizing for + windowless views to show contents properly. Still working on + editor issues. + 2008-02-17 01:07-EST Gregory John Casamento * GormCore/GormInternalViewEditor.m diff --git a/GormCore/GormViewEditor.m b/GormCore/GormViewEditor.m index 0be2f08c..8e06284f 100644 --- a/GormCore/GormViewEditor.m +++ b/GormCore/GormViewEditor.m @@ -304,13 +304,11 @@ static BOOL currently_displaying = NO; // if this window is nil when the editor is created, we know it's a // standalone view. - /* - if([anObject window] == nil) + if([anObject window] == nil && [anObject superview] == nil) { NSDebugLog(@"#### Stand alone view: %@",_editedObject); viewWindow = [[GormViewWindow alloc] initWithView: _editedObject]; } - */ } return self; diff --git a/GormCore/GormViewWindow.m b/GormCore/GormViewWindow.m index 362ef322..122bc30a 100644 --- a/GormCore/GormViewWindow.m +++ b/GormCore/GormViewWindow.m @@ -90,11 +90,14 @@ { NSRect newFrame = [_view frame]; - newFrame.origin.x = windowFrame.origin.x; - newFrame.origin.y = windowFrame.origin.y; - newFrame.size.height += 70; + newFrame.origin.x = windowFrame.origin.x+10; + newFrame.origin.y = windowFrame.origin.y+20; + newFrame.size.height += 100; newFrame.size.width += 20; + [_view setPostsFrameChangedNotifications: NO]; + [_view setFrame: newFrame]; + [_view setPostsFrameChangedNotifications: YES]; [window setFrame: newFrame display: YES]; } @@ -122,6 +125,7 @@ else { [_view setFrame: newFrame]; + [_view setNeedsDisplay: YES]; } } @@ -169,8 +173,20 @@ - (void) activateEditorForView { - id obj = [[(id)NSApp activeDocument] editorForObject: _view create: YES]; - [obj activate]; + id editor = [[(id)NSApp activeDocument] editorForObject: _view create: YES]; + // NSArray *subviews = [_view subviews]; + // NSEnumerator *en = [subviews objectEnumerator]; + // id sub = nil; + + // activate the parent and all subview editors... + [editor activate]; + /* + while((sub = [en nextObject]) != nil) + { + editor = [[(id)NSApp activeDocument] editorForObject: sub create: YES]; + [editor activate]; + } + */ } - (void) encodeWithCoder: (NSCoder *)coder