Announcement

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

    Is RPCRequest really a class?

    According to the docs, RPCRequest is a Class. However, it does not seem to support .setProperty. Also, DSRequest, which extends RPCRequest does not support the .create() method.


    Code:
    var req = isc.RPCRequest.create();    // <-- works.
    
    req.setProperty("data" ,"asdf");    // Error: req.setProperty is not a function
    
    var dsReq = isc.DSRequest.create();   // Error: Cannot read property 'create' of undefined
    So, are these really Classes in the isc class system, If so, why don't the Class methods work? Or are they Objects?



    #2
    Not sure what is your question. Before ECMAScript 2015 javascript did not have classes. There were only objects and functions. And even in ES6 class is not something new - it is just a simplified syntax over inheritance.

    Is it just a theoretical question?

    In SmartGWT both (RPCRequest and DSRequest) are classes.

    Comment


      #3
      We've made a change to SC 11.1d/SGWT 6.1d to ensure that the two classes you mention are documented as objects and not classes.

      You've not specified what release you're using. Please provide that information whenenver you report a bug.

      Comment


        #4
        As of today, looking at 11.1d (2017-06-14) on the SmartClient site, it looks like they are still Classes. Is the update coming in a future build?

        Comment


          #5
          The change will be in the nightly builds dated 2017-06-15 and beyond.

          Comment


            #6
            Hi,

            I do not understand that change.

            I used to have isc.RPCRequest.addProperties({ useSimpleHttp: true }); to have all RPCRequests use my simple backend.
            Now, when RPCRequest is not a SmartClient Class I can't add this property to all RPCRequests.

            Best regards,
            Janusz

            Comment


              #7
              Code like that would not have had any effect, so nothing has changed for you.

              Comment

              Working...
              X