T.R | Title | User | Personal Name | Date | Lines |
---|
908.1 | It might be ILV, but if only the IMPM bombs ?? | TOOK::KOHLS | Ruth Kohls | Thu Apr 11 1991 18:05 | 14 |
| I have no idea whether ILV has any bearing on this for the IMPM, but
currently the ILV routines do not support Implementation Default for
Constructor (set, sequence, et al) types. Someone put in a QAR a while
ago against the SRM, but I missed it until today.
Unfortunately, the current IMPLDEFAULT mechanism won't work for constructors.
The first workaround I thought of won't work either, and the second workaround
is getting a little complex.
Fortunately, I'm thinking (smell the smoke?) about ILV and ASN right now,
so I'll toss this problem into the stew.
Ruth
|
908.2 | why I thought it worked from FCL | COOKIE::KITTELL | Richard - Architected Info Mgmt | Fri Apr 12 1991 11:10 | 31 |
|
RE: .1
>Unfortunately, the current IMPLDEFAULT mechanism won't work for constructors.
Well, it does kinda work for the common case, that of the default being an
empty set. But I agree that is more of an accident than anything.
Given the Policies Enabled attribute described in the basenote, I can
issue
MCC>SET MediaLibrary mumble Policies Enabled
The ILV generated by FCL is
[ 0 ] (
[ 1 ] (
[ 37 ] (
[ 1 ] 34 -- 4
[ 3 ] 00
[ 4 ] (
)
)
)
)
So when doing the ILV decode I open the construct as usual and get ILVEOC
on the first mcc_ilv_get_id. That leaves my in-memory structures for the
attribute describing an empty set, which is the default value. I realize
that isn't the way the defaulting mechanism should work, but it did a good
job of masquerading as the real thing.
|
908.3 | The AM can do the defaulting.... | TOOK::CAREY | | Fri Apr 12 1991 11:31 | 31 |
|
Yeah, the QAR against the SRM on this issue came from me (at least one
of them did).
If you'd like to set a default value for a constructed type your best
bet right now is to "assume a reasonable value" if the argument isn't
supplied. That is, your AM can know about this information.
In DECnet Phase IV we've considered using this approach a couple of
times for use on first use of a value (which is usually pretty easy to
guess at in DECnet).
The default values in the dictionary are intended to be "likely
defaults" for use only by the Iconic Map to display to the user. They
are never intended to be passed across the MCC interface. The idea is
that a specific entity may know how it wants to set its default values
better than a generic director, and must get the opportunity to do so.
To get these defaults in general working, you may want to provide that
fraction of the entity's behavior in your Access Module. That is,
notice "implementation default" attributes, and replace them in the
parameter list with the defaults you have selected. This isn't
necessarily trivial, but it allows you to project a nice behavior onto
an entity that may not know a whole lot about being nice.
The other side of the coin is DECnet/OSI, where the entities are
expected to be capable of retaining enough information to know their
own defaults and want the right to set it themselves.
-Jim Carey
|
908.4 | | COOKIE::KITTELL | Richard - Architected Info Mgmt | Fri Apr 12 1991 17:13 | 16 |
|
RE: .2
> To get these defaults in general working, you may want to provide that
> fraction of the entity's behavior in your Access Module. That is,
Jim,
The "defaults in general" are working just fine, and weren't at all
difficult to implement.
And the AM automatically supplies "initial values" for most attributes. It
differentiates between initial values and default values. Default values
are only applicable to settable attributes, and are applied when an
instance is created and whenever mcc_ilv_get returns the right code. Initial
values are applied only when an instance is created.
|
908.5 | actually an FCL bug makes it work... | TOOK::CALLANDER | | Fri Apr 12 1991 17:31 | 6 |
| FCL is supposed to be trying to send the flag, like IMPM does, but in one
case we didn't get the code in place so....we pick up the string from the
default field in the dictionary and convert it into an ilv encoded value
just like a user typed it in. In reality this is listed as a bug, and the
FCL PM has been qared on it.
|