BGHUDAppKit icon indicating copy to clipboard operation
BGHUDAppKit copied to clipboard

BGHUDTokenField - Text colour breaks after token deletion

Open displaced opened this issue 14 years ago • 6 comments

Hi,

I'm currently using BGHUDTokenField/BGHUDTokenFieldCell in my application. However, I'm seeing the following odd behaviour:

  • Add a BGHUDTokenField to a HUD-styled NSPanel
  • Run the application
  • Enter some tokens into the field (e.g. 'this, is, a set, of, tokens')
  • Note how the text colour is white
  • Either backspace to delete s token or two, or hit Cmd+A, Backspace to delete all.
  • Start typing some new keywords.
  • Now, strangely, the text colour is black.

Any advice on how to work around this?

Many thanks, Chris

displaced avatar Feb 21 '11 00:02 displaced

Chris, sorry for the delay, long day at work today. I should get a chance to look at this tomorrow, just wanted to stop and let you know I did see the issue. Thanks!

timthedevguy avatar Feb 22 '11 01:02 timthedevguy

Update: I think I have this fixed, I'll be able to test it more in the morning and if it works I'll push it.

timthedevguy avatar Feb 27 '11 04:02 timthedevguy

So after looking at the code I realized the section I was going to modify was already modified awhile ago. I can't actually reproduce this behavior on my machine.

Do you have the most recent version from the repo?

timthedevguy avatar Mar 10 '11 12:03 timthedevguy

Hi again!

Sorry for the delay getting back to you -- it's been a while since I've been able to take another look at this!

I removed all traces of BGHUDAppKit and re-cloned from the GitHub URL. A quick rebuild and re-adding of the framework to my app and...

Unfortunately, I'm still seeing this bug, even with the latest version. Just to check that I'm using the control correctly, I deleted the existing BGHUDTokenField and did the following:

  • Added a new NSTokenField to my panel
  • Changed the class to BGHUDTokenField
  • Clicked in to the inner NSTokenFieldCell and changed its class to BGHUDTokenFieldCell

I'm using Xcode 4, if that's any help!

Thanks, Chris

displaced avatar Apr 09 '11 22:04 displaced

The problem is that you are using Xcode 4, it currently is unsupported in bghudappkit, support is coming. Sorry for the confusion.

timthedevguy avatar Apr 10 '11 05:04 timthedevguy

Ah, ok - no problem!

It works well enough to finish and test my app.

Thanks for your help!

Chris

displaced avatar Apr 11 '11 10:04 displaced