X

Geertjan's Blog

  • February 14, 2011

attr name="weight" intvalue="100"

Geertjan Wielenga
Product Manager
You decide to predefine the size and position of the main window via the "WindowManager.wswmgr" file. One already exists in the "Window - Core" module, so you'll need to override that file. You create a new one and register it in your layer. Now, to ensure the correct load order of modules, you set a dependency on the "Window - Core" module. That dependency, since that module doesn't expose an API, needs to be an implementation dependency:

All this is very inconvenient. Wouldn't it be simpler if you could specify in the layer that your file overrides the default? Well, you can do exactly that. Click that link, read, remove the impl dep, and then change the layer registration as follows:

<folder name="Windows2">
<file name="WindowManager.wswmgr" url="WindowManager.wswmgr"><attr name="weight" intvalue="100"/>
</file>
</folder>

Nice simplification, plus one less dependency in your application.

Join the discussion

Comments ( 1 )
  • Jesse Glick Monday, February 14, 2011

    "That dependency, since that module doesn't expose an API, needs to be an implementation dependency" - not true; you can use a regular (specification version) dependency, since you are not trying to compile against o.n.core.windows. Anyway using the weight attr is of course preferable.


Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.