Rubens Silva · Sep 10, 2020 go to post

This means your query is taking a longer time to return the result back to your CSP application than what it expects.

I'd recommend you to verify why it's taking so long and optimize your query, but you can also ask the CSP gateway to wait for a longer period before it times out.

  // On OnPreHTTP callback method.
  set %response.Timeout = 900 // this will make your application wait for the response for 900 seconds.

Note that %response.Timeout will change the timeout for the current request only.

Rubens Silva · Aug 17, 2020 go to post

Currently ObjectScript doesn't support method override. But you might be able to simulate it by using rest parameters and delegating to a second private method that handles it according to what has been provided to the initial method.
EDIT: Whoops! I meant overload.

Rubens Silva · Aug 11, 2020 go to post

Works even on Caché 2018.1.2. I can't think of a reason as to why it wouldn't work for IRIS CE.
EDIT: Just to point out that GetOSErrorText is indeed limited to 2020.1+ releases, including Caché.

Rubens Silva · Jul 8, 2020 go to post

Thanks for everyone's suggestions. But we have opted for using CompilePackage while providing the method the argument dynamically by using envs.

Rubens Silva · Jun 24, 2020 go to post

You mean like this?

ClassMethod CallHook(hook As %String = "", args...) As %Status [ Private ]
{
  if hook = "" return $$$OK

  set classname = $piece(hook, ":", 1)
  set method = $piece(hook, ":", 2)
  try {
    return $classmethod(classname, method, args...)
  } catch ex {
    return ex.AsStatus()
  }
  return $$$OK
}

It certainly does for me.

https://github.com/rfns/frontier/blob/fe0868c8e0821ffdfd15407994288b28327a476f/cls/Frontier/Files/Uploader.cls#L94-L111

Rubens Silva · May 26, 2020 go to post

Yes, we are on the road for making it a SPA (single page application) using React.

In the short term, we probably won't make it a PWA though since we also have developers with enough knowledge to create mobile applications using React-Native (me included).

Since you mentioned libraries and framework, I'll go a bit further and provide you a history background about why we are using React after dropping Angular:

Several years ago we initially used Angular 1.5 to create partial SPA applications embedded to our legacy CSP application, however as the demands increased we noticed that Angular introduced a spike in the learning curve messing up with our development speed as several domain specific languages had to be researched to fill these demands, including knowledge for advanced usage/creation of directives, really deep understanding of scope and its cycles. A complete mess.

We considered using Angular 2 at that time, but we dropped the idea as we noticed Angular 2 getting close to the component-based approach just like React and since our experiences with Angular were not the best along with the effort put from learning the 1.5 version becoming useless, we started to move to React.

Sadly VueJS was a late player at that time although I do recognize its efforts to use the best both from each worlds.

Rubens Silva · May 25, 2020 go to post

%CSP.StreamServer is just a helper to cut short some manual labor.

What you need to do is write the file stream back to the device and change three Content-* headers as follows.

Your CSP page has an OnPreHTTP just like every %CSP.Page extended class. You can use this method to modify the Content-Type, Content-Disposition and Content-Length headers. In your case you'll need to use the