Robert Cemper · Feb 7, 2018 go to post

If you go in Atelier menu to Windows > Preferences
and in there to  General > Keys  you find the definition for Ctrl+right / Ctrl+left

This tells me it's deep embedded in Eclipse. But can be changed:

https://wiki.eclipse.org/FAQ_How_do_I_provide_a_keyboard_shortcut_for_m…

I found ~ 1800 keymaps on Eclipse Marketplace
and for MS Visual Studio keymap (which might be closest) still 83 hits.

To summarize: it's NOT a configuration issue as long as you don't have something ready to include.
It might take some time to find a useful one.
 

Robert Cemper · Feb 7, 2018 go to post

In Caché you typically work on objects but you can present them also as rows in an SQLtable.
The identifier for objects is IDKEY if you don't do it yourself it is assigned by Caché.
PrimaryKey is something you assign by your application.

Both are UNIQUE.
And if you define your PrimaryKey as Autoincrement  starting with 1 both are quite likely identical.

That's a basic view. IDKEY has far more variants to be found in documentation.

Robert Cemper · Feb 6, 2018 go to post

There is a solution using WIN command  attrib to check read only access flag.
It doesn't write files.
You are welcome to discuss about "elegance" .

 
    set dir=yourDirectory
    set dev="|CPIPE|"
    set cmd="attrib /d "
    set result=""
    open dev:(cmd_dir:"R"):0
    if $test use dev read result close dev
    if $piece($zstrip(result,"<>"," "),dir)["R" write "directory read only",!
    else  write "directory accessible"
,!
 
Robert Cemper · Feb 6, 2018 go to post

But $ZU(140,1,Directory) ALWAYS returns -5  "no access"

tested on Cache for Windows (x86-64) 2016.2

Robert Cemper · Feb 6, 2018 go to post

Your observation is correct.
I checked the underlying system call.
In Windows  {for me Win10} all you get back  is the flag ="isDirectory"
So you need to do the indirect check as described in the comments

Robert Cemper · Feb 6, 2018 go to post

You are right. Open Parameter should be "WN"
It is just an indirect test as OPEN on a directory fails with < NOTOPEN>
And it also fails if the file already exists and can be accessed.
 

Robert Cemper · Feb 5, 2018 go to post

corrected:

Set file="full file reference"
OPEN file:("WN"):0  Else  Write "write lock on file",!
Robert Cemper · Feb 5, 2018 go to post

You have to be aware that  you access the file by the rather high privileged account that Caché service is running in.
Have you blocked this account too ?
 

Robert Cemper · Feb 5, 2018 go to post

ZEN component  <datacombo has a parameter title  which is displayed on mouseover event of the browser

example out of SAMPLES/ Class ZENApp.HelpDesk 

Robert Cemper · Feb 5, 2018 go to post

Basically $c(1) s a NONPRINTING character - it has to be invisible by definition.

Instead of WRITE command use ZWRITE to visualize it or $TRANSLATE function to make it visible.

example:

USER>s ^rcc=$lts($lb(123,"abc",23432,"hak","uuk"),$c(1))
 

USER>w ^rcc
123abc23432hakuuk
USER>zw ^rcc
^rcc="123"_$c(1)_"abc"_$c(1)_"23432"_$c(1)_"hak"_$c(1)_"uuk"
USER>ZZDUMP ^rcc
0000: 31 32 33 01 61 62 63 01 32 33 34 33 32 01 68 61         123.abc.23432.ha
0010: 6B 01 75 75 6B                                          k.uuk
USER>write $TR(^rcc,$c(1),"*")
123*abc*23432*hak*uuk
USER>
Robert Cemper · Feb 3, 2018 go to post

OK if this Is outside you control you NEED a dirty trick.

Just before after the last Set Properties(....)  in ZAUTHENTICATE insert this line:

Kill %myProperties Merge %myProperties=Properties

to get a full copy of the array in %myProperties

Robert Cemper · Feb 2, 2018 go to post

property onselectrow as %ZEN.Datatype.eventHandler;

onselectrow event handler: This event is fired when a new row is selected. This event is passed a variable, which, which indicates how the row was selected: "", "click" or "keypress".

I'd assume in your case as you did neither "click" nor "keypress"    var which ="" will apply.

So you may use this to ignore the call and return without action.

Robert Cemper · Feb 2, 2018 go to post

It would be easier to help you with the concrete call  to ZAUTHENTICATE in hands.

In addition ZAUTHENTICATE.mac needs to be modeled by un-commenting  lines.

Or do you use the pre-configured OAUTH2.AUTHENTICATE.mac

in both cases you need to have activated this line:

Set Properties("Comment")="....whatever you may pass along...."

according to your description this is done .

So the issue might result from the way the call is done
Comment in ZAUTHENICATE.mac Line 90 says:

Properties - Array of returned values, passed by reference

So your call should look like

 Do ^ZAUTHENTICATE(ServiceName,Namespace,Username,Password,Credentials,.Properties)
#;--------------------------------------------------------------------^^^


 It's the dot in front of variable name Properties that does the Pass by Reference and enables you to use the updated array after the call.

The dirty approach would be to name your array %myProp instead of Properties thus using a variable with public scope.

Robert Cemper · Feb 2, 2018 go to post

Pls. be more specific on "It is not working."
+ what would you expect to work
eventually you have code and data separated, then it's more than just a single DB
various mapping may add even more DBs

You should get previous releases from WRC based on your service contract.
But be aware: from 2007 to 2017 there have been  15..20 releases.   
Each with changes + release notes that may affect you. 
 

Robert Cemper · Feb 2, 2018 go to post

Hi Ben,

I just installed a few samples as in description . CONGRATULATIONS !
- not only that I get what I want and leave the rest aside
- I also can split samples by subjects in several DBs and namespaces without being trapped by (hidden) dependencies.
I think this makes live for training and teaching significantly easier!
And allows central bug fixing independent from core release dates.


A great idea! Thanks!

Robert Cemper · Feb 2, 2018 go to post

To my understanding the main purpose of introducing %INLIST in our SQL was
to have a more handy option than the classic IN (....)

%INLIST takes a Single $LISTBUILD()  as parameter with a Variable number of values that you pass at runtime by only 1 "?"

while IN (p1,p2,p3,p4)   or better IN (?,?,?,?)  requires a fixed static number of parameters during execution. 
so you have to know the maximum number of values ahead when you create your query
and eventually to fill unused parameters by some impossible value to feed the query
 

Robert Cemper · Feb 1, 2018 go to post

I wasn't sure.
therfore:  .... some kind of code optimizer eventually might run.

I remembered a discussion around Java JIT compiler and XEP being faster on globals that pure COS.
But I can't remember any result or consequences.

Robert Cemper · Feb 1, 2018 go to post

I had the issue short after an update of Eclipse.
I fixed it by re-installing the glassfish stuff  (whatever that might be) explicitly from Marketplace.

Robert Cemper · Feb 1, 2018 go to post

Query 1 Example 1 could be marginally faster by less line terminations and less command dispatch:
But as this will be compiled some kind of code optimizer eventually might run.

Query2 Example1 is faster by less line terminations and less command dispatch.
BUT:  Both cases aren't the place to win benchmarks. Rather look for Global access , SQL optimizing, ....

Robert Cemper · Feb 1, 2018 go to post

query 1 misses a variant:

set $lb(a,b,c,d,e,f)=$lb("345","arun","kumar","hi","yello","orange")

query 2,example 2 should be 

I a=2 SET R="Arun"
Robert Cemper · Feb 1, 2018 go to post

Hi Ben,
- I like the idea of external samples. That offers definitely more flexibility .
- DOCUMATIC is unchanged and works local!  That's important. OK 
- JDBC: it isn't visible in Custom Install.  You only see xDBC -> ODBC .   
   Not an issue, rather a surprise. The .jar are  where they used to be before.

I'm really happy that we finally can get out of old chains imposed by 40yrs (DSM-11 and others) backward compatibility .

Robert