Arto Alatalo · Jun 13, 2018 go to post

Thanks, good to know. Sounds like the authentication is simplest way to make the thing clear.

Arto Alatalo · Jun 13, 2018 go to post

The Id is a string of random characters, like VAzZwAod6o. And I need a way to get some more details about the session.

Arto Alatalo · Jun 13, 2018 go to post

Thanks for the tip, but as I mentioned, so far we were not able to reproduce the problem, it comes time after time without evident reasons.

That's why I'm looking for a way to find out details of the client created the session.

Arto Alatalo · May 30, 2018 go to post

As I see it, xml-to-objects classes need DOM while the whole purpose of TextReaded is to read the xml without DOM creation

Arto Alatalo · Apr 30, 2018 go to post

Right.  Somehow I missed the evident idea that all the indexes can be simply initialized with -1 $order. Thanks. 

The only thing, last index should be not set to its previous value.

Arto Alatalo · Apr 20, 2018 go to post

Vladimir, the question was to resume the iteration from given point. Say we have only two indexes, A and B. When resuming, the code first has to check next values of B and only then next values of A. Your code stars with A skipping all remaining values of B.

Check $query-based solution in my answer to a post below. Looks to me as more elegant than with nested loops.

Arto Alatalo · Apr 13, 2018 go to post

>which is easy to do with $ORDER

Tried to do this but solution did not look easy at all :) 

Arto Alatalo · Apr 13, 2018 go to post

My reworked solution so far. Looks working on samples I tested

	; Get log for given 'clientid'
	; 'maxlog' records max, starting from given 'date','dek','idx'
GetXLog(clientid,date,dek,idx,maxlog) public
{
	s:maxlog="" maxlog=400
	s counter=0
	s gl=$name(^cxlog(clientid,date,dek,idx)) ; ^cxlog("EFRW1000",20161219,2,1,"date")=20161219
	
	for { q:counter=maxlog
		s oldroot=$name(@gl,4)	; we care only about first 4 indexes
		s gl=$query(@gl)	; take next global
		s root=$name(@gl,4)
		continue:oldroot=root ; skip all sub-globals		
		
		q:clientid'=$qsubscript(root,1) ; for given 'clientid' only
			
		w root,!
		s counter=counter+1
	}
	
	w !
}
Arto Alatalo · Apr 13, 2018 go to post

Does it work for you? I think at least the order must be c->b->a, not a->b-c

Arto Alatalo · Dec 15, 2017 go to post

John,

  • There were no changes neither to ns configuration nor to db configuration.
  • Looks like ns gets its twin as soon as updated routines are imported into this namespace.
  • The issue happens on production db only, we can't repeat it on test databases of same version.

If I see your explanations right, the issue is just a harmless result of some internal Cache's behaviour, so I should not really care, right? 

Arto Alatalo · Dec 15, 2017 go to post

ok, thanks for explanations.

We do the import always in the same way for many years and never saw this problem, but I doublecheck with my colleagues the way used last time

Arto Alatalo · Jun 14, 2017 go to post

The idea is extremely simple: each class includes auto-generated query 'select ID from classname'  that returns ids of all existing objects of this class

Arto Alatalo · Jun 14, 2017 go to post

I just mean that if I have simple task to show 1000 records split into 10 pages, with "raw" globals I can do it simple with $order but with objects there is nothing similar to $Order so I have to use SQL

Arto Alatalo · Jun 13, 2017 go to post

Very same as with raw Order: user opens a list, you give him first 100 objects and when he presses Next page, you continue from index 101

Arto Alatalo · Jun 13, 2017 go to post

I wonder why when working with objects, we still must use SQL (Extent Query) to be able iterate all instances of a class. Do you know reasons for this design?

Arto Alatalo · Jun 13, 2017 go to post

Let's say we must iterate all Persons. Sure, by knowing its storage scheme, we can do it with Order but it's like invoking virtual function by memory offset in c++ world. The only object-oriented (i.e. without knowing too much of object internals) way I know is to use Extent. I wonder why generated class does not provide methods like GetFirst/GetLast/GetNext, this way users of the class could iterate extent in object-oriented way.

Arto Alatalo · Jun 13, 2017 go to post

I always thought Extent is the only way. If I have for example persons in the database, how can I iterate all of them?

Arto Alatalo · Jun 13, 2017 go to post

...you can probably go without the SQL layer...

I guess you must at least use Extent query to be able iterate the objects. Or can you manage without?

Arto Alatalo · Apr 17, 2017 go to post

so it's not really feasible.

It is not possible to change the behaviour but I think it is possible to add some optional compiler function to give a warning when any type mismatch detected

Arto Alatalo · Apr 17, 2017 go to post

"I don't tend to use the call stack view"

I'm not able to comprehend thatsmiley In my world stack view is as natural as.. as... as... I don't know, there is nothing more natural as working stack view in any debugger.

The trick with LOG^%ETN is for a case when you need the stack saved to a diagnostic log. But usual case for stack view is you have your debugger stopped on a breakpoint in some library routine and want to know what path brought you here. What you do? I look at stack view and click it to navigate to a call place.

Arto Alatalo · Apr 17, 2017 go to post

"I don't tend to use the call stack view"

I'm not able to comprehend thatsmiley In my world stack view is as natural as.. as... as... I don't know, there is nothing more natural as working stack view in any debugger.

The trick with LOG^%ETN is for a case when you need the stack saved to a diagnostic log. But usual case for stack view is you have your debugger stopped on a breakpoint in some library routine and want to know what path brought you here. What you do? I look at stack view and click it to navigate to a call place.

Arto Alatalo · Apr 17, 2017 go to post

The 'crash' is my post is actually incorrect. Studio never crashes, it always stops responding. So no error codes.

Now it took me about 15 minutes to reproduce the problem. I placed several breakpoints in my code and randomly clicked the stack every time debugger stopped, and at first everything worked OK. But then, without any evident reason, Studio stopped responding. Process info reports this:

Execution Details
Process State: EVTW
Last Global Reference: %apiOLE("debug")
Routine: %Debugger.System.1
Source Location: +415^%Debugger.System.1

I refreshed the page several times, the info remains the same

Arto Alatalo · Apr 13, 2017 go to post

From CacheQuality web site:

Pricing
We have different pricing model accordingly with your needs, starting at a rate of 4.200$

To me this is a way to expensive just to know that method or property doesn't exist. Moreover, I want to know it immediately at project compile time. An external tool could parse the code during the night and tell some complex statistics but simple things must tell compiler

Arto Alatalo · Apr 13, 2017 go to post

yes, I agree, all this would be really useful to have. At least as an external Lint tool.

But I know what they answer about (6): "it is not possible because of Dynamic Dispatch".

While Dynamic Dispatch is almost never needed but <method not exist> is every day experience

Arto Alatalo · Apr 12, 2017 go to post

I don't like idea to set breakpoints in source code. At least because once set, you have to remember to remove it. This way is the only way for hardcore OS-level debugging but for application programming today I would prefer adequate debugger