gum-forms-behaviors

Explain Gum behavior mapping to DefaultFromFileXxxRuntime Forms controls.

597|79|Updated Mar 11, 2015
One-click install
npx skills add https://github.com/vchelaru/Gum --skill gum-forms-behaviors
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gum-forms-behaviors
Source: https://github.com/vchelaru/Gum/tree/main/.claude/skills/gum-forms-behaviors
Command: npx skills add https://github.com/vchelaru/Gum --skill gum-forms-behaviors

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Gum's visual save model and the Forms behavioral layer are disconnected, which forces developers to set interaction and data defaults in code after project load. This Skill explains how behaviors declared in .behx/BehaviorSave files and ElementSave behavior references are mapped at load time to DefaultFromFileXxxRuntime types that instantiate Forms controls, and why many Forms properties cannot be set from the Gum editor.

Core Features & Use Cases

  • Behavior model overview: Explains BehaviorSave, ElementBehaviorReference, and StandardFormsBehaviorNames and how behavior names are used to select runtime wrappers.
  • Wrapping lifecycle: Describes FormsUtilities.RegisterFromFileFormRuntimeDefaults, the DefaultFromFileXxxRuntime AfterFullCreation pairing, and ReactToVisualChanged event flow.
  • Property promotion gap: Identifies which common Forms properties (e.g., Button.Text, CheckBox.IsChecked, TextBox.Text, Slider range, ItemsControl items) have no VariableSave equivalent and recommends where to set defaults in code.
  • Use case: Debugging why a component's designed visual appears but its interactive defaults (selection, text, checked state, min/max values) are missing until runtime.

Quick Start

Ask the AI to summarize how a specific component's Behaviors list maps to DefaultFromFileXxxRuntime classes and which Forms properties cannot be authored in the Gum editor.

Frequently Asked Questions about gum-forms-behaviors

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How does Gum map visual components to Forms controls at runtime?

Gum maps visual components to Forms controls by matching behavior names in ElementBehaviorReference lists to DefaultFromFileXxxRuntime types during the FormsUtilities.RegisterFromFileFormRuntimeDefaults lifecycle. The AfterFullCreation pairing phase then initializes interactive defaults.

Why are my Gum component's interactive properties missing until runtime?

Interactive properties are missing because of a property promotion gap where common Forms properties like Button.Text or CheckBox.IsChecked have no VariableSave equivalent in the Gum visual editor. You must set these behavioral defaults in code after project load.

How do I debug which DefaultFromFile runtime type is selected for a Gum behavior?

Debug DefaultFromFile runtime type selection by inspecting BehaviorSave files and StandardFormsBehaviorNames constants to verify the exact behavior name mapping. Compare these names against the ElementBehaviorReference list to identify mismatches causing incorrect Forms control instantiation.

Can I set Forms control defaults like Slider range directly in the Gum editor?

You cannot set many Forms control defaults like Slider range, ItemsControl items, or TextBox.Text directly in the Gum editor. These properties lack a VariableSave equivalent and must be configured programmatically via DefaultFromFileXxxRuntime classes after the visual loads.

What is the FormsUtilities.RegisterFromFileFormRuntimeDefaults lifecycle?

The FormsUtilities.RegisterFromFileFormRuntimeDefaults lifecycle is the loading process that pairs design-time Gum visuals with runtime Forms controls. It triggers the AfterFullCreation method and ReactToVisualChanged event flow to synchronize visual states with interactive behaviors.