Coder Social home page Coder Social logo

nibbler's Introduction

nibbler

Nibbler is a python PyOjbC utility for displaying dialogs using .nib files.

Examples

The best way to play with nibbler is to download this git repo and play with the two example files.

  1. Download this repo:

    git clone https://github.com/pudquick/nibbler.git
    cd nibbler/examples
  2. Now you can choose between running the sweet_example.py and sam_example.py scripts.

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.

  1. Launch Xcode.
  2. From your menu bar select File > New > File....
  3. For your templete scroll down to macOS > User Interface > Window.
  4. You'll be prompted to save your file. Select a name and location.
  5. Now we need to get this file into a .nib file. From your menu bar select File > Export.... Make sure and change your File Format to Interface Builder Cocoa NIB.
  6. 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 Automatic however that does 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

nibbler's People

Contributors

pudquick avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.