TMS FNC Object Inspector

Similar documents
TMS FNC Calendar. TMS SOFTWARE TMS FNC UI Pack DEVELOPERS GUIDE

TMS FNC TableView. TMS SOFTWARE TMS FNC UI Pack DEVELOPERS GUIDE

TMS SECURITY SYSTEM QUICK START GUIDE

TMS FNC UI Controls, a set of framework neutral controls

TMS FNC Dashboard Controls

TTIWResponsiveList - TTIWDBResponsiveList. TMS SOFTWARE TTIWResponsiveList - TTIWDBResponsiveList DEVELOPERS GUIDE

Exercises for Delphi Advanced Programming Technology (English Version)

Getting started with Lazarus

TMS Grid for FireMonkey TMS Grid for FireMonkey Whitepaper

TMS SOFTWARE UpdateBuilder Quick Start Guide

Inheritance, and Polymorphism.

TMS FMX Chart DEVELOPERS GUIDE

TMS FixInsight DEVELOPERS GUIDE. TMS SOFTWARE TMS FixInsight DEVELOPERS GUIDE

TMS TPlannerExport DEVELOPERS GUIDE

Today we spend some time in OO Programming (Object Oriented). Hope you did already work with the first Starter and the box at:

For more detailed information on the differences between DelphiScript and Object Pascal, refer to the DelphiScript Reference document.

The undo stack and reusing the memento pattern

TMS FNC UI Pack. TMS SOFTWARE TMS FNC UI Pack DEVELOPERS GUIDE

Microsoft Visual Basic 2005: Reloaded

InfoPower for FireMonkey 2.5

TMS SOFTWARE TMS FMX UI Pack DEVELOPERS GUIDE TMS FMX UI Pack DEVELOPERS GUIDE

TMS Advanced Smooth Mega Menu

Extending the Lazarus IDE: Custom forms and units

InfoPower for FireMonkey 3.0

Simple Factory Pattern

TMS TPLANNER TDBPLANNER DEVELOPERS GUIDE


FirePower 4.1. Woll2Woll Software Nov 3rd, Version 4.1 Supporting RAD Studio versions: XE7. FirePower 4.

Writing Delphi Custom Components

Combining kbmmw and kbmwabd for kbmwabd v and kbmmw v

RAD Server (EMS) and TMS WEB Core

Inheritance and Encapsulation. Amit Gupta

TMS WEB Core DEVELOPERS GUIDE. TMS SOFTWARE TMS WEB Core DEVELOPERS GUIDE

Advanced Systems Programming

9/21/2010. Based on Chapter 2 in Advanced Programming Using Visual Basic.NET by Bradley and Millspaugh

Chapter 02 Building Multitier Programs with Classes

TMS Analytics Delphi Development Library

Standard. Number of Correlations

(1) Trump (1) Trump (2) (1) Trump ExampleU ExampleP (2) Caption. TrumpU (2) Caption. (3) Image FormTrump. Top 0 Left 0.

CGS 2405 Advanced Programming with C++ Course Justification

Database charts. From tutorial files: Database charts. Contents

Documentation. February 2018 Copyright (c) 2018 by tmssoftware.com bvba.


Preface...3 Acknowledgments...4. Contents...5. List of Figures...17

FlowCanvas Offline Documentation.

C++ Programming: From Problem Analysis to Program Design, Fifth Edition. Chapter 12: Classes and Data Abstraction

3.Constructors and Destructors. Develop cpp program to implement constructor and destructor.

C++ Inheritance and Encapsulation

Inheritance. A mechanism for specialization A mechanism for reuse. Fundamental to supporting polymorphism

Object oriented programming. Encapsulation. Polymorphism. Inheritance OOP

Remobjects for Webservices

Elevate Web Builder Modules Manual

Lecture Contents CS313D: ADVANCED PROGRAMMING LANGUAGE. What is Inheritance?

C++ Programming Style Guide

Introducing TTMSFMXGrid: a flexible, productivity feature-packed cross platform grid for FireMonkey

Information on InfoPower VCL for RAD Studio 10 Seattle

DDObjects Version 1.1.5

Using OMNIS Studio. OMNIS Software

CS313D: ADVANCED PROGRAMMING LANGUAGE

Mobile Image Processing

TMS SOFTWARE TMS TableView for FireMonkey DEVELOPERS GUIDE TMS TableView for FireMonkey DEVELOPERS GUIDE

Chapter 12. OOP: Creating Object- Oriented Programs. McGraw-Hill. Copyright 2011 by The McGraw-Hill Companies, Inc. All Rights Reserved.

TMS FNC PDF Library. TMS SOFTWARE TMS FNC UI Pack DEVELOPERS GUIDE

PROGRAMMING DELPHI DATABASE APPLICATIONS by Francisco Charte. (C) 2017 Danysoft

10. Object-oriented Programming. 7. Juli 2011

What property of a C# array indicates its allocated size? What keyword in the base class allows a method to be polymorphic?

Pascal Expert. Copyright Peganza

Classes and Methods גרא וייס המחלקה למדעי המחשב אוניברסיטת בן-גוריון

Connect for SAP (NetWeaver)

Q&As. Microsoft MTA Software Development Fundamentals. Pass Microsoft Exam with 100% Guarantee

Delphi Generics.Collections

Using the API... 3 edriven.core... 5 A PowerMapper pattern... 5 edriven.gui... 7 edriven.gui framework architecture... 7 Audio... 9 Animation...

Programming overview

What is a Dashboard visualisation? (Speed dial and traffic light)

Object Oriented Programming. Assistant Lecture Omar Al Khayat 2 nd Year

OOPS Viva Questions. Object is termed as an instance of a class, and it has its own state, behavior and identity.

Image. uses Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls, ExtCtrls ;

Apps Framework API. Version Samsung Smart Electronics Copyright All Rights Reserved

CIS 110: Introduction to computer programming

TMS Scripter Documentation

STRUCTURING OF PROGRAM

Time : 3 hours. Full Marks : 75. Own words as far as practicable. The questions are of equal value. Answer any five questions.

UNIT Files. Procedure/Functionand Other Declarations (CONST, TYPE, VAR) can be stored under different Object Pascal Files (Library).

Querying CDDB in Lazarus

Delphi by Design. One-Step ActiveX - Part 2

Object-Oriented Programming Paradigm

Introduction to OOP. Procedural Programming sequence of statements to solve a problem.

Course Syllabus C # Course Title. Who should attend? Course Description

Software opmaak.indd :32:15

CMSC 202 Final May 19, Name: UserID: (Circle your section) Section: 101 Tuesday 11: Thursday 11:30

Advanced Programming Using Visual Basic 2008

More on Objects in JAVA TM

Delphi MVC Framework. Mathias Pannier

Relationship Manager

A General Purpose Interactive Simulation System

Unity Scripting 4. CS 491 / DES 400 Crea.ve Coding. Computer Science

INHERITANCE: EXTENDING CLASSES

Final thoughts on functions F E B 2 5 T H

Lecture 5: Inheritance

Essentials of IBM Rational Rhapsody v7.5 for Software Engineers (C++)

Transcription:

TMS FNC Object Inspector September 2018 Copyright 2018 by tmssoftware.com bvba Web: http://www.tmssoftware.com Email: info@tmssoftware.com 1

Index Getting Started... 3 Availability... 3 Hierarchy... 4 Assigning an object... 4 Reading / Writing properties... 6 Collection / list editor... 8 Datasource... 9 2

Getting Started You can already start using the TTMSFNCObjectInspector by dropping an instance on the form and assign a value to the Object property (public). The object inspector will read the properties and display them inside the list represented with a name and value column. The TTMSFNCObjectInspector inherits from TTMSFNCTreeView, please see the TTMSFNCTreeView documentation for more information. Availability Supported frameworks and platforms - VCL Win32/Win64 - FMX Win32/Win64, MacOS-X - LCL Win32/Win64, Linux Supported IDE s - Delphi XE7 and C++ Builder XE7 or newer releases - Lazarus 1.4.4 with FPC 2.6.4 or newer official releases. 3

Hierarchy 1) The Name column, showing the name of the property 2) The Value column, showing the value / class name of the property 3) An assignable property, shown in red. Can be used to assign an object to a property of a specific class. Typically used for non-visual components, such as TPopupMenu or TTMSFNCBitmapContainer. 4) An expandable property. The object inspector lists the full hierarchy of the object. Assigning an object The TTMSFNCObjectInspector not only supports visual and non-visual components but supports any kind of object. You can easily create your own class and pass this as an object to the object inspector. To do so, create a class inside your unit. For this purpose, we have created a TTestClass with a set of properties of different types. type TTestProperty = (tpvalue1, tpvalue2, tpvalue3); TTestClass = class private FB: TDate; FC: TTestProperty; FA: string; FObject: TComponent; published property A: string read FA write FA; property B: TDate read FB write FB; 4

property C: TTestProperty read FC write FC; property AssignableObject: TComponent read FObject write FObject; The property A is a string property that simply shows an editable field with plain text. The AssignableObject property is colored in red, which indicates it can be assigned with an instance of an object that is found on the main form, of that specific class type. The property B is a TDate property that can show an inplace date picker editor. 5

The property C is a propert of type TTestProperty, which shows a combobox with the possible values. Reading / Writing properties With the above sample, the values that are present on the object are all listed inside the object inspector. Sometimes, it might be necessary to hide values from the user, or change the value that is writing to the object property, therefore the object inspector exposes a set of events for reading. The event OnReadProperty can be used to hide or show the value inside the object inspector. For example, if we want to hide property B, we can write the following code: procedure TForm1.TMSFNCObjectInspector1ReadProperty(Sender, AObject: TObject; APropertyInfo: PPropInfo; APropertyName: string; APropertyType: TTypeKind; var ACanRead: Boolean); begin ACanRead := (APropertyName <> 'B'); 6

If you want to display the property, but want to change the value instead, you can use the OnReadPropertyValue event. Below is a sample that shows how to change the default value shown in the object inspector. This can be helpful to predefine a value for a specific property, or manipulate the value that is being read from the property itself. procedure TForm1.TMSFNCObjectInspector1ReadPropertyValue(Sender, AObject: TObject; APropertyInfo: PPropInfo; APropertyName: string; APropertyType: TTypeKind; var APropertyValue: string; var ACanRead: Boolean); begin if APropertyName = 'A' then APropertyValue := 'Hello World'; Whenever a property value is being changed, the OnWritePropertyValue is being triggered. This event can be used to change the value, or prevent to value from being written to the property. Below is a sample that demonstrates how to change the value being written to the property. procedure TForm1.TMSFNCObjectInspector1WritePropertyValue(Sender, AObject: TObject; APropertyInfo: PPropInfo; APropertyName: string; APropertyType: TTypeKind; var APropertyValue: string; var ACanWrite: Boolean); begin if APropertyName = 'A' then APropertyValue := 'Changed Value'; 7

Collection / list editor Whenever a collection / list is detected, the object inspector can show the collection or list inside a popup editor. Below is a sample when we add a TStringList to TTestClass. type TTestProperty = (tpvalue1, tpvalue2, tpvalue3); TTestClass = class private FB: TDate; FC: TTestProperty; FA: string; FObject: TComponent; FMyStrings: TStringList; public constructor Create; destructor Destroy; override; published property A: string read FA write FA; property B: TDate read FB write FB; property C: TTestProperty read FC write FC; property AssignableObject: TComponent read FObject write FObject; property MyStrings: TStringList read FMyStrings; Click on the MyStrings value column to start the editor. The editor will show the values inside the editor. At the left side a memo is shown which can be used to change the value. 8

When editing a TCollection, the memo is replaced by a TTMSFNCObjectInspector instance, that allows editing the properties of the TCollectionItem instance, selected from the list at the right side. The changes that are being made to the properties are directly applied to the collection. Datasource The TTMSFNCObjectInspector is also capable of showing the fields and fields data from the active record. It also changes the value and posts it directly to the dataset as well as updates automatically when a value in the dataset field changes. Below is a sample that demonstrates this with the biolife.xml file assigned to a TClientDataSet. Changing a field value will automatically post the value to the dataset. There are equivalent events that can be used to read or write the field value: OnReadDBField and OnReadDBFieldValue and OnWriteDBFieldValue. These events are only triggered when a DataSource is assigned. 9