Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues with storyboards and segues #206

Closed
wants to merge 9 commits into from
Closed

Conversation

gcasa
Copy link
Member

@gcasa gcasa commented Oct 9, 2023

The purpose of this issue is to fix a number of remaining issues with NSPopover, principally the positioning issue and some issues with NSStoryboardSegue.

[_contentViewController loadView];
view = [_contentViewController view];
viewFrame = [view frame];
window = [view window];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see where this new variable gets used.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now things are in flux a bit. I will be moving a lot of things to NSDebugLog or removing them once I am done.

@@ -294,8 +295,8 @@ - (void) showRelativeToRect: (NSRect)positioningRect
[_realPanel setFrame: windowFrame display: YES];
[_realPanel makeKeyAndOrderFront:self];

NSDebugLog(@"Showing relative to in window %@",NSStringFromRect(positioningRect));
NSDebugLog(@"Showing relative to in screen %@",NSStringFromRect(screenRect));
NSLog(@"Showing relative to in window %@",NSStringFromRect(positioningRect));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a permanent change? If so, do we really want this log all the time?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I will be taking it out before I finish.

[po showRelativeToRect: rect
ofView: _popoverAnchorView
preferredEdge: _preferredEdge];
NSLog(@"anchor view = %@", _popoverAnchorView);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should rather be a NSDebugLLog

@gcasa
Copy link
Member Author

gcasa commented Oct 11, 2023

@fredkiefer I am working on some of the issues with segues as we had discussed months ago. The code that does the action for the segue is not generating (or decoding) that object properly so some of the data is not present. I am going through the logic and fixing issues.

What's happening is that the popoverAnchorView isn't being decoded so the NSPopover is just appearing at a random place. There are also some other issues with that portion of the code. I would like to refactor things into separate classes for different kinds of segues, but I am not sure I am going to do that for this PR.

@gcasa
Copy link
Member Author

gcasa commented May 28, 2024

OBE by refactor. No longer needed, so... closing.

@gcasa gcasa closed this May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants