Hungarian-style variables in settings

Hungarian-style variables in settings

AllanCochraneAllanCochrane Posts: 41Questions: 1Answers: 2
edited February 2014 in DataTables 1.10
One of the features of 1.10 is that there's now a non-Hungarian variant for all options. Does this extend to the internals though?

I wish to use the ColReorder extension and its fnOrder() API function (curiously still with Hungarian notation) to apply the desired column order. To do this I must find the current order through

[code]
$('#myTable').DataTable().settings()[0]
[/code]

When I inspect the object that the above code returns then I see the old Hungarian style property names. Are non-Hungarian property names available or am I doing something wrong?

I have created the table with Hungarian options since I am migrating from 1.9.4 to 1.10.0

Replies

  • allanallan Posts: 63,602Questions: 1Answers: 10,486 Site admin
    > Does this extend to the internals though?

    No - absolutely not. Internally DataTables still uses Hungarian notation - it has to, otherwise all backwards compatibility would be out of the window.

    Funnily enough, this came up yesterday as well: http://datatables.net/forums/discussion/19582/get-settings-without-hungarian-notation .

    I would also stress that the settings object is considered to be private. It can and will change between releases. fnOrder can be used to get the current order - it returns an array with the order if no parameters are passed in.

    Regarding the ColReorder method naming, the intention with the latest plug-in releases was 1.10 compatibility, not a significant rewrite of their own APIs - otherwise DataTables 1.10 would be delayed for months while I work on that. Something that I'm sure none of us want... Having said that, I will be working on major releases of the plug-ins in future which update the APIs to use the new style DataTables 1.10 API. I will be writing a blog post at some point some explaining my plans for the extensions.

    Allan
This discussion has been closed.