PART I
Warm-up
Reconnect with a useful idea before starting compose text and button components. In one or two sentences, describe the input, output or host boundary from the previous exercise that this lesson builds on. If you are arriving directly, skim the worked example first; there is no locked prerequisite.
A rough note is enough. You can revise it after the example.
PART II
Instruction & guided example
Assemble a dashboard action without false success
Text communicates state and a button requests an action. Their composition needs a semantic contract: label, event, target, permission, repeated action and failure response. Native controls do not remove those responsibilities. Callback values and object configuration are proposed source forms, not executed code here.
Operations dashboard has title Orders 4, button Refresh orders and status Current. A click starts request R1. Host returns denied and preserves the old count. The owner remains open; optional audio is unavailable.
Worked reasoning: While R1 runs status becomes Refreshing. On denial restore an honest Refresh unavailable status and retain Orders 4. Do not invent Orders 0, display Refreshed, or retry through an unrelated API. Audio availability is irrelevant to authorization.
Failed alternative: Clearing the count before confirmation makes a denied request look like an empty dataset, confusing unavailable data with a real zero.
Worked reasoning and supplied artifact
Initial:title Orders4,status Current
Click:R1 pending,status Refreshing,count4 retained
Denied:status Refresh unavailable,count4 retained
Native host requirements:mount/update,event delivery,authorized refresh
No fake execution claimIllustrative example from the proposed WillowScript design. The language and WUIX/WMATH/WDB/WAUDIO/WTMP services are not implemented in the supplied source. This site has no interpreter, VM or native host and does not execute or certify the snippet.
Walk through the example, one line at a time
Initial:title Orders4,status CurrentRead this key/value within its containing object. State which parent owns it and the narrow visible behavior it configures.
Click:R1 pending,status Refreshing,count4 retainedRead this key/value within its containing object. State which parent owns it and the narrow visible behavior it configures.
Denied:status Refresh unavailable,count4 retainedRead this key/value within its containing object. State which parent owns it and the narrow visible behavior it configures.
Native host requirements:mount/update,event delivery,authorized refreshRead this key/value within its containing object. State which parent owns it and the narrow visible behavior it configures.
No fake execution claimRead this statement in its surrounding contract. Identify which value or host operation it contributes; do not infer an undocumented API.
Try the guided change
Reconstruct the supplied worked case first: list its inputs, intermediate decisions and final artifact. Compare each row with the explanation and identify exactly where the rejected alternative fails. Then use the changed inputs in Part IV for independent work.
- Write the supplied inputs and initial state before following the example.
- Reconstruct each intermediate calculation or host decision, then compare with the worked artifact.
- Explain why the contrasting alternative fails before attempting the changed inputs in Part IV.
PART III
Take a breather
Step back after the guided example. Look away from the screen, stretch, or reread your prediction. This is an optional learning pause, not a timer or an assessment gate.
When you return, try to name the lesson’s key idea without copying its wording. If that feels difficult, return to Part II and trace one line rather than restarting the entire lesson.
PART IV
Independent practice
Project context: Operations dashboard. Build a small, understandable change around compose text and button components.
Build a Shipment 6 dashboard with Inspect button and a separately denied details request. Supply state/permission tables and a meaningful no-details message.
What to produce
An integrated text/button/configuration artifact with pending, success, denied and closed-owner predictions.
- State the intended behavior in a sentence before editing.
- Use only source-backed syntax and the host services whose contract you have been given.
- Record a normal case and a boundary or unavailable-resource case.
- Label hand predictions separately from anything actually measured in a supplied toolchain.
Syntax colors are a reading aid, not a compiler. The line you are editing stays uncolored until you move to a different line; capitalization is never changed. Drafts stay on this browser and code is not executed.
Need a hint?
Denial supplies no replacement dataset; the contract preserves the old count and reports unavailability separately.
Clearing the count before confirmation makes a denied request look like an empty dataset, confusing unavailable data with a real zero.
Original learning-path task and reference
Integrate every section in this module into Operations dashboard. Submit .ws source, a list of approved host APIs, eight acceptance cases, and a short explanation. Demonstrate WUIX creates native interfaces; Arrange a column and spacing; Compose text and button components.
import wuix.widget.button;
import wuix.layout;
domain Login {
const screen = {
layout: { type: "column", padding: [24, 32], gap: 16 },
components: [{ type: "text", value: "Welcome back" }]
};
fnc show() -> void {
wuix.mount("main", screen);
}
}Where the original task needs a host API that is not supplied here, write the contract and predictions. Do not invent a runtime result.
PART V
Self-check
Use this check to notice what to revisit. It does not award a private course grade, block another page or claim to verify compiled code. Every answer has a learning explanation.
You may keep exploring even if you are unsure. Use the hint, compare the trace, and revise your explanation.
PART VI
Recap & small task
Bring the idea back to the mod feature you are building. A useful recap connects the mechanism to a decision you can make in your own code.
- Assemble a dashboard action without false success
- Build a Shipment 6 dashboard with Inspect button and a separately denied details request. Supply state/permission tables and a meaningful no-details message.
- Separate source-backed behavior, host requirements and untested predictions.
One small recap task
State the difference between zero records and no authorized refresh result.
This marks your personal practice record only. It is not a certification or an official workspace assessment.
