|Home » Technical Support » Elevate Web Builder Technical Support » Support Forums » Elevate Web Builder 2 Preview » View Thread|
|Messages 1 to 3 of 3 total|
|Awkward JSON Object Property Names!|
|Tue, Jun 16 2015 12:23 PM||Permanent Link|
I am making extensive use of the JSON reading / writing capabilities for class published properties. This functionality is really useful and straightforward to use. It's also very fast!
However, one of the properties in the JSON that is returned from the API is called "create". I cannot seem to read this since the compiler won't let me define a published property like this:
property Create: boolean read fCreate write fCreate;
It causes a compiler error further down the code inside the Create override. Do you have a neat way around this?
|Sat, Jun 20 2015 6:52 AM||Permanent Link|
Tim Young [Elevate Software]
Elevate Software, Inc.
<< It causes a compiler error further down the code inside the Create
override. Do you have a neat way around this? >>
You'll have to do a custom load with this property in the
TPersistent.LoadProperty method for your class:
function TMyComponent.LoadProperty(AReader: TReader): Boolean;
if (TempPropertyName <> '') then
if SameText(TempPropertyName,'create') then
// Handle special property name here....
|Sat, Jun 20 2015 11:43 AM||Permanent Link|
"Tim Young [Elevate Software]" wrote:
>>You'll have to do a custom load with this property in the
>>TPersistent.LoadProperty method for your class:
Of course ....... doh ...... cheers Tim