Women in Technology

Hear us Roar



Article:
  Write Your Own Automator Actions
Subject:   Lost
Date:   2005-05-14 17:13:22
From:   MtnBiker
I get lost here:


In our case, we just need an NSTextField where the user can enter a number, and a label explaining what to do with it. As a crude way of enforcing the requirement that the user enter a number in the NSTextField, I've made the NSTextField noneditable, and I've added an NSStepper, on which the user must click to change the number in the NSTextField.



I can create the text fields, but have no idea how to make them noneditable nor attach NTStepper.


Maybe this wasn't meant for neophytes.

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • Lost
    2005-05-25 15:43:59  shayman [View]

    To make the text field noneditable, just select it in Interface Builder after you've dragged it into the view, and bring up the Attributes Inspector (easiest way: command-1 (that's a "one")); there's an "Editable" checkbox right there. Just uncheck it.

    As for the NSStepper, that is another object you will find on the Controls palette (it's the object located just to the right of the colour well. ) Drag that into your window and set its bindings exactly the same way you set the bindings for the text field. You've now got 2 UI objects bound to the same property, so updating the value in one will automatically update the value in the other.