Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

Custom Properties

 Post Reply Post Reply
Author
Price Rhett View Drop Down
Member
Member
Avatar

Joined: 11 Feb 2012
Posts: 45
Post Options Post Options   Quote Price Rhett Quote  Post ReplyReply Direct Link To This Post Topic: Custom Properties
    Posted: 02 Dec 2019 at 4:46am
Is there a way to assign non-visible custom Text properties for each Blox object?

For example I need a way to allow a user to pick a custom property in the Property Editor for each individual Block and then store that with the BLOX file. I don't want it shown as Text on the object.

Thanks,

Rhett Price
IndySoft

Back to Top
Pieter Scheldeman View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 3454
Post Options Post Options   Quote Pieter Scheldeman Quote  Post ReplyReply Direct Link To This Post Posted: 02 Dec 2019 at 1:58pm
Hi,

You can inherit from each blox object class, add a published property and the published properties will be stored in JSON. Below is a sample:

type
  TTMSFNCCustomBlock = class(TTMSFNCBloxImageBlock)
  private
    FCustomProp: string;
  published
    property CustomProp: string read FCustomProp write FCustomProp;
  end;

....

implementation

{$R *.fmx}

....

initialization
  RegisterElement(TTMSFNCCustomBlock, '', 'Custom', 'Basic');

end.



Back to Top
Price Rhett View Drop Down
Member
Member
Avatar

Joined: 11 Feb 2012
Posts: 45
Post Options Post Options   Quote Price Rhett Quote  Post ReplyReply Direct Link To This Post Posted: 02 Dec 2019 at 3:30pm
Great! I'll give it a try. How would I go about adding it to the Properties section with a custom editor to select the data? I need to popup my own dialog box to select the data then store it.

Thanks,

Rhett Price
IndySoft

Back to Top
Price Rhett View Drop Down
Member
Member
Avatar

Joined: 11 Feb 2012
Posts: 45
Post Options Post Options   Quote Price Rhett Quote  Post ReplyReply Direct Link To This Post Posted: 02 Dec 2019 at 6:32pm
Also, are there any plans to have a WebCore version of FNC Blox? 
Back to Top
Pieter Scheldeman View Drop Down
TMS Support
TMS Support
Avatar

Joined: 18 May 2010
Posts: 3454
Post Options Post Options   Quote Pieter Scheldeman Quote  Post ReplyReply Direct Link To This Post Posted: 03 Dec 2019 at 8:25am
I'll investigate the possibilities. You could potentially also use the TTMSFNCObjectInspector to list all properties. About WEB Support: working on it as we speak ;-) I can't give you more details about a timeframe however.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down