How do I control when a mixin mixes into the parent guide?
Three factors affect whether a mixin mixes in: the location of the mixin file, the qualifier resource (if any), and the <mixin match>
code (if any):
- A mixin must be in the same folder as the parent guide. If several mixins are in the same folder, they will all mix into every guide in that folder, unless you use the qualifier and
<mixin match>
mechanisms to prevent them from mixing into inappropriate parent guides.
- If a mixin contains a qualifier resource, the mixin is blocked from mixing in if the qualifier returns false. A qualifier can test any part of the system's configuration, including hardware, system version, whether a particular file is present, and so forth.
- If a mixin uses the
<mixin match>
command, it will only mix into parent guides that were compiled using the same <mixin match>
signature. Likewise, parent guides with a <mixin match>
can only be modified by mixins containing the same signature.
Jeanne A. E. DeVoto jaed@jaedworks.com
Copyright © 1997 Jeanne A. E. DeVoto