Ram�n Jim�nez <[EMAIL PROTECTED]> writes:

> Peter
>> Not sure what you mean here
>> set OBJID="1||2"
>> set obj=##class(ChildClass).%OpenId(OBJID)
>> ??
>
> Yes, I'd expect that to work (haven't done it myself). But I am not
> sure if Mikko is indeed using CSP Bind or if he's got a reference to
> the parent object and he's opening it after posting the page.

Actually it works fine.  I had a copy-paste mistake in my code and was
blind to it.  My code was:

 set s.cSta=##class(A.B).%OpenId(id)

where cSta property is of type %Status.  The assignment caused the
interpreter to trap and I got a CSP error which I could see was coming
somewhere inside Cache.  I mistakenly assumed it was because of the id
format which was different.

Another interesting discovery: it seems you cannot pass a property by
reference.  My first attempt to fix my code was:

 set ab=##class(A.B).%OpenId(id,,.s.cSta)

but this does not compile.  I got a response from WRC that there is a
problem parsing the two dots.  So my final code became:

 set st=$$$OK  // maybe this is not needed?
 set ab=##class(A.B).%OpenId(id,,.st)
 set s.cSta=st

-- 
Mikko Harjula                   tel.   +358-3-316 7552
[EMAIL PROTECTED]         mobile +358-40-778 6669

Reply via email to