No, the source is REC_SOURCE_EXPLICIT even if the variable is not mentioned in
records.config. How else can a plugin tell if a config variable it creates has
a value in records.config?
On Monday, November 21, 2016 12:21 PM, James Peach <[email protected]>
wrote:
> On Nov 21, 2016, at 9:14 AM, Alan Carroll
> <[email protected]> wrote:
>
> REC_SOURCE_EXPLICIT - see TSMgmtStringCreate in InkAPI.cc (around line 8896).
> That is the same value as setting the value in a configuration file.
That sounds correct to me. The value was set in a configuration file and is
being consumed by a plugin.
> On Monday, November 21, 2016 10:29 AM, James Peach <[email protected]>
>wrote:
>
>
>
>> On Nov 21, 2016, at 7:20 AM, Alan Carroll
>> <[email protected]> wrote:
>>
>> The config variable sourcing data was originally put in to be able to detect
>> that a variable was set even if that setting was the same as the default
>> (otherwise this is impossible to reliably determine). I am working with a
>> plugin that defines its own config records but as far as I can tell (1) the
>> source value for a plugin configured record default is the same as for an
>> explicitly set value and (2) the source information is not available via the
>> plugin API.
>
> What is the source when you specify a record in records.config, then register
> it from a plugin?
>
>> I would like to fix both of these.
>> First, add a "PLUGIN" value to RecSourceT to indicate the value is set as a
>> default by the plugin and use EXPLICIT only for values from configuration
>> files or explicit value setting API calls.
>> Second,
>> * Move or copy the RecSourceT define to apidef.h.in.* Add
>> TSMgmtSourceGet(const char*) to return the RecSourceT value for a
>> configuration variable.
>>
>
>