← 返回 Skill 列表
extension
分类: 开发与工程API Key 暂未确认

makepad-reference

重要:用于Makepad故障排除和参考。触发条件包括:故障排除、错误、调试、修复、问题、无匹配字段、解析错误、找不到小部件、UI未更新、代码质量、重构、响应式布局、自适应、API文档、参考等

person作者: jakexiaohubgithub

Makepad Reference

This category provides reference materials for debugging, code quality, and advanced layout patterns.

When to Use

  • You need quick-reference material for common Makepad errors, debugging, or API lookups.
  • The task is diagnostic or reference-oriented rather than writing a focused feature in one subsystem.
  • You want a central starting point before diving into more specialized Makepad skills.

Quick Navigation

| Topic | File | Use When | |-------|------|----------| | API Documentation | Official docs index, quick API reference | Finding detailed API info | | Troubleshooting | Common errors and fixes | Build fails, runtime errors | | Code Quality | Makepad-aware refactoring | Simplifying code safely | | Adaptive Layout | Desktop/mobile responsive | Cross-platform layouts |

Common Issues Quick Reference

| Error | Quick Fix | |-------|-----------| | no matching field: font | Use text_style: <THEME_FONT_*>{} | | Color parse error | Check the installed live-design parser syntax; changing a valid hex color is not a general fix | | set_text missing argument | Add cx as first argument | | UI not updating | Call redraw(cx) after changes | | Widget not found | Check ID spelling, use ids!() for paths |

Debug Tips

# Run with line info for better error messages
MAKEPAD=lines cargo run  # Use the project-pinned toolchain; verify this diagnostic flag for its revision
// Add logging
log!("Value: {:?}", my_value);
log!("State: {} / {}", self.counter, self.is_loading);

Resources

Limitations

  • Use this skill only when the task clearly matches the scope described above.
  • Do not treat the output as a substitute for environment-specific validation, testing, or expert review.
  • Stop and ask for clarification if required inputs, permissions, safety boundaries, or success criteria are missing.

The navigation table names topics, not bundled reference files. Verify exact Makepad API signatures and the project toolchain before changing code; preserve private values in logs, and test widget updates, input and target layouts rather than assuming a redraw call fixes every issue.