> Greg said me that this is Ok because we don't need a full String > comparison with equals() , but so why not remove the statements > if (previousLabel != label) > and always assign the new value ?
Because we fire events when the value changes, which would be incorrect if the value did in fact not change. We use reference equality comparison because we don't want to incur the string comparison overhead, but we do need to perform some comparison. -T
