Unable to set default for sLoadingRecords

Unable to set default for sLoadingRecords

timtuckertimtucker Posts: 48Questions: 0Answers: 0
edited March 2012 in General
I have a number of tables where I'd like to use common text for sLoadingRecords (set by extending the default settings), but want to set unique values for sEmptyTable and sZeroRecords for each table.

It took me a while to figure out why I wasn't seeing the loading text I expected, but eventually I noticed that _fnLanguageCompat gets called before applying the default values.

It would seem like there would be a way of detecting the difference between the original defaults and overridden defaults and only applying the backward compatibility methods if there wasn't a new value in the overridden defaults.

Any thoughts?

Replies

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    Oh dear - this is a really frustrating bug as there is really only way I can see of fixing it without adding a deal of complication. What I've just done is to add a check to see if the default has been altered before the override in _fnLanguageCompat is used - feels a little messy because its adding bytes to the code. I think I probably need an 'isDefaultValue' function for this kind of thing, but that means copying the defaults on load which also seems messy.

    I think I might be looking at dropping the language backwards compatibility in 1.10, but we'll see how things go.

    Anyway, my fix is available in the 1.9.1.dev nightly on the downloads page now.

    Thanks for flagging this up.

    Allan
This discussion has been closed.