Skip to content
This repository has been archived by the owner on Apr 3, 2023. It is now read-only.

[URGENT] Cannot get "Platform" value before a window is being activated in UWP project #68

Closed
goldmont opened this issue Dec 18, 2018 · 4 comments

Comments

@goldmont
Copy link

Version Number of Plugin: 4.0.0.13
Device Tested On: Windows 10 (1809)
Version of VS: Community V15.9.4 (4.7.03190)
Version of UWP: 6.2.2

Hi,

I'm working on a UWP project and if I try to get the Platform value before a window is being activated, I get a System.Exception. The issue is with this line of code because your library checks whether the UserInteractionMode is Mouse or Touch and this is only possible with an active window. Since I need to get the Platform value when my App has just started, the library fails. I need an urgent fix, please.

Thanks for your efforts.

Best regards,
Giuseppe Montuoro, Italy.

@jamesmontemagno
Copy link
Owner

There is a try catch around that so should be just fine.... did you copy and paste this code into your app and run it?

@goldmont
Copy link
Author

Yeah, directly in the project it works fine. By the way, I'm getting the Platform value from inside a NuGet package made by me. The exception returns the following message:

System.Exception: Unable to locate element.

Do you think it's an issue related to my library? Thanks.

@jamesmontemagno
Copy link
Owner

Do you have a stack trace? With a try catch like I have I don't see how it can crash.

@jamesmontemagno
Copy link
Owner

I put some more checks into 4.1.0-beta, you can try that... but again my code shouldn't crash as i try/catch. Let me know. Closing out.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants