Nibbler
python pyobjc utility for macOS for displaying dialogs using .nib files
Install / Use
/learn @macadmins/NibblerREADME
nibbler
Nibbler is officially end of life. Check out the swiftDialog project if you need similar functionality to nibbler.
Examples
The best way to play with nibbler is to download this git repo and play with the two example files.
-
Download this repo:
git clone https://github.com/macadmins/nibbler.git cd nibbler/examples -
Now you can choose between running the
sweet_example.pyandsam_example.pyscripts.
Getting Started
Now that you've seen what nibbler does from the examples you'll likely want to build your own dialog box. To get started you'll need:
- A Mac with Python (fortunately all modern Macs come with this built-in)
- The PyObjC bridge (again comes built-in)
- Xcode (available from the MAS or Apple Developer Portal)
Once the requirements above are meet we're able to create our dialog.
- Launch Xcode.
- From your menu bar select
File > New > File.... - For the correct template in Xcode 8, select
macOSand inUser InterfaceselectWindow. - Click
Nextand you'll be prompted to save your file. Select a name and location. - Now we need to get this file into a
.nibfile. From your menu bar selectFile > Export.... Make sure and change your File Format toInterface Builder Cocoa NIB. - Now you need to write the python code to connect your elements.
Tips
- Make sure and give all of your UI elements in Xcode a static identifier. Xcode by default sets identifiers to
Automatichowever that does not work with nibbler. - Printing your content handles is very helpful:
print n.nib_contents - Printing your views can also help with troubleshooting:
print n.views - Consult Apple's macOS Human Interface Guidelines for the authoritative source on the correct usage of UI elements.
- Consult Apple's Start Developing iOS Apps (Swift):Build a Basic UI for a tutorial on building a UI in Xcode.
Related Skills
node-connect
347.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
