Correct the fileName parmeter description for WASDK ResourceLoader(String fileName) constructor#122
Conversation
…ring fileName) constructor
…ring fileName) constructor on _resourceloader_290278668.md
|
Looping in @huichen123 |
GrantMeStrength
left a comment
There was a problem hiding this comment.
The ResourceLoader(String) constructor has two distinct use cases that this PR collapses into one. The original documentation ("resource identifier treated as a URI fragment") described the common case: passing a simple name like "Errors" to access a ResourceMap by name, which looks up resources relative to errors.resw or errors.resjson. The new text only describes loading by PRI file path, which is the less common case. A developer who writes new ResourceLoader("Errors") will be confused if the docs only mention PRI file paths. Please retain the resource-map-identifier explanation as the primary case, and add the PRI file path as a secondary note if applicable.
|
@copilot /review |
GrantMeStrength
left a comment
There was a problem hiding this comment.
Review: Needs Verification
This PR changes the ResourceLoader constructor description from loading a "resource map" to loading a "PRI file."
ResourceLoader doesn't directly load PRI files by path — it accesses named resource maps within the app's resource infrastructure. The parameter is a resource map identifier (e.g., "Errors" maps to resources in errors.resw), not a file system path to a .pri file.
Please verify this semantic change is accurate before merging.
This PR updates the description for the
fileNameparameter required for Windows App SDK's ResourceLoader.String() constructor. ThefileNameparameter takes in the path to a.prifile, not aresourceMap. The description added matches the description for the same parameter in ResourceLoader(String, String), which was introduced at the same time as the one-parameter constructor.See Windows App SDK Issue #2406 - ResourceLoader can not load the specified resource.