Hi folks,
here I show, how powerful the hrader.cfg of XIDE is.
If you have something like this
ACCESS VarName AS INT
ASSIGN VarName AS INT
simply move your cursor over one of them and click ctrl-H. Select 'Bindable-Property Int'
and you will get
/// <summary>
/// Ruft VarName ab oder setzt </summary>
/// <value>VarName ist ...</value>
// Created by you : 05.10.2016 22:53
PROPERTY VarName AS INT
GET ; RETURN _VarName ; END GET
SET
IF SELF:@@Set<INT>( REF _VarName, VALUE )
NOP
ENDIF
END SET
END PROPERTY
PRIVATE _VarName AS INT
How does it work? Simply copy the followíng inbto headers.cfg:
[Bindable-Property Int]
/// <summary>
/// Ruft %entity% ab oder setzt </summary>
/// <value>%entity% ist ...</value>
// Created by you : %DATE% %TIME%
PROPERTY %entity% AS INT
GET ; RETURN _%entity% ; END GET
SET
IF SELF:@@Set<INT>( REF _%entity%, VALUE )
NOP
ENDIF
END SET
END PROPERTY
PRIVATE _%entity% AS INT
Now we have a frame, where we may copy and paste whats in the access/assign methods.
Or when create a new property, this is useful:
[Bindable-Property General]
/// <summary>
/// Ruft $TEMPLATEOPTION:Property Name$ ab oder setzt </summary>
/// <value>$TEMPLATEOPTION:Property Name$ ist ...</value>
// Created by you : %DATE% %TIME%
PROPERTY $TEMPLATEOPTION:Property Name$ AS $TEMPLATEOPTION:Property Type$
GET ; RETURN _$TEMPLATEOPTION:Property Name$ ; END GET
SET
IF SELF:@@Set<$TEMPLATEOPTION:Property Type$>( REF _$TEMPLATEOPTION:Property Name$, VALUE )
NOP
ENDIF
END SET
END PROPERTY
PRIVATE _$TEMPLATEOPTION:Property Name$ AS $TEMPLATEOPTION:Property Type$
When selcting 'Bindable-Property General', a dialog box opens and asks for name and type of the property. Here the result for ExampleName and ExampleType
/// <summary>
/// Ruft ExampleName ab oder setzt </summary>
/// <value>ExampleName ist ...</value>
// Created by Frank Maraite : 05.10.2016 22:59
PROPERTY ExampleName AS ExampleType
GET ; RETURN _ExampleName ; END GET
SET
IF SELF:@@Set<ExampleType>( REF _ExampleName, VALUE )
NOP
ENDIF
END SET
END PROPERTY
PRIVATE _ExampleName AS ExampleType
These example show, how powerful XIDE is.
Good night
Frank
XIDE and header for properties
-
- Posts: 178
- Joined: Sat Dec 05, 2015 10:44 am
- Location: Germany
XIDE and header for properties
Hi Frank,
thank you for remembering this!
Wolfgang
thank you for remembering this!
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it