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 cases of readonly on [Import]'s #350

Merged
merged 1 commit into from
Nov 13, 2022

Conversation

kornman00
Copy link
Contributor

Both OpenDocumentResult and ShowToolResult imported IShell but their member variable was set to readonly, which resulted in a composition exception (member is not writable, see below). They are no longer readonly.

Additionally. no code was actually making use of the Show.Document/Tool helpers, which is likely how this went uncaught, despite the README.md providing an example of it for the HomeViewModel. ViewHome and ViewToolboxCommandHandler now use Show class instead of importing IShell themselves.

The composition produced a single composition error. The root cause is provided below. Review the CompositionException.Errors property for more detailed information.

1) Cannot set the value of 'Gemini.Framework.Results.OpenDocumentResult._shell' because the member is not writable. If the member is a property, it must have an accessible setter; otherwise, if it is a field, it must not be read-only.

Resulting in: Cannot activate part 'Gemini.Framework.Results.OpenDocumentResult'.
Element: Gemini.Framework.Results.OpenDocumentResult -->  Gemini.Framework.Results.OpenDocumentResult

Both OpenDocumentResult and ShowToolResult imported IShell but their member variable was set to readonly, which resulted in a composition exception (member is not writable). They are no longer readonly.

Additionally. no code was actually making use of the Show.Document/Tool helpers, which is likely how this went uncaught, despite the README.md providing an example of it for the HomeViewModel. ViewHome and ViewToolboxCommandHandler now use Show class instead of importing IShell themselves.
@kornman00
Copy link
Contributor Author

Additionally, changed mixed spacing to use spaces instead of tabs in the touched files, as that's what is in the .editorconfig

@kornman00
Copy link
Contributor Author

Friendly bump @tgjones :)

@kornman00
Copy link
Contributor Author

Please @tgjones :)?

@tgjones tgjones merged commit 79282e5 into tgjones:master Nov 13, 2022
@tgjones
Copy link
Owner

tgjones commented Nov 13, 2022

Sorry for the delay, merged now.

@kornman00 kornman00 deleted the fix_import_readonly branch November 15, 2022 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants