Custom NSFormatter behaving oddly

Discussion in 'Mac Programming' started by BadWolf13, Mar 1, 2011.

  1. BadWolf13 macrumors 6502

    Joined:
    Dec 17, 2009
    #1
    Ok, so I created a custom NSFormatter that I've connected my textfield to. It's working fine as long as the text field is the active object in the window. As soon as I select another text field, the formatted text field becomes blank. Even more strange, it regains it's former value as soon as I select it again. It just *poof* reappears. I haven't connected the value of the text field to anything either through code or bindings, but shouldn't this work even without any connection of the text field's value?
     
  2. kainjow Moderator emeritus

    kainjow

    Joined:
    Jun 15, 2000
    #2
    When posting questions like this, post your code if possible. Otherwise it's hard to know how to help.
     
  3. BadWolf13 thread starter macrumors 6502

    Joined:
    Dec 17, 2009
    #3
    Unfortunately there's not much code to speak of. I do most of the connections in interface builder.

    This program started working when I added an IBOutlet in the AppDelegate class, even though I hadn't connected it to the text field. I took the IBOutlet out, and it still works. At this point I still have no idea why it didn't work before but works now.
     

Share This Page