Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    History.registerCallback arguments have diverged from documentation

    SmartClient_SNAPSHOT_v101d_2015-10-29_PowerEdition

    The callbacks registered with History.registerCallback now appear to be called with "historyId" whereas before they were called with "id".

    isc.Class.fireCallback(callback, ["historyId", "data"], [historyId, data]);

    A) This happened to be a breaking change for us and I'm not sure what the reasoning was
    B) The documentation still lists the outdated "id":

    "The parameters 'id' and 'data' will be passed to your callback, in that order."

    #2
    That's a bug. Fixed now and will appear in the next nightly build - sorry about that!

    Comment


      #3
      SmartClient Version: SNAPSHOT_v10.1p_2015-12-10/Enterprise Deployment (built 2015-12-10)

      Hello, does this problem has come back?

      Code:
      20:32:06.501:WARN:Log:ReferenceError: historyId is not defined
      Stack from error.stack:
          eval(<no args: exited>) @ [no file]:3:17
          [c]Class.fireCallback(_1=>"historyCallback(historyId)", _2=>Array[2], _3=>Array[2], _4=>undef, _5=>undef) on [Class Class] @ ISC_Core.js:295:104
          $8(_1=>"ath") @ ISC_History.js:105:171
          $5() @ ISC_History.js:98:506
          <anonymous>() @ [no file]:1:13

      Comment


        #4
        please note: I'm using modules-debug files

        Comment


          #5
          This crash shows that your code is still trying to use "historyId". The correct parameter name is "id". The fact that it was instead passed as "historyId" was a bug that has been corrected.

          Comment


            #6
            yes, you're right, I was still doing:
            Code:
            isc.History.registerCallback("historyCallback(historyId)");
            correcting to
            Code:
            isc.History.registerCallback("historyCallback(id)");
            fixed the problem.

            Thank you very much.

            Comment

            Working...
            X