fbpx
Welcome, Guest
Username: Password: Remember me
Share your code snippets, screen shots etc. here
  • Page:
  • 1

TOPIC: XIDE and header for properties

XIDE and header for properties 2 years 5 months ago #1

  • Frank Maraite
  • Frank Maraite's Avatar Topic Author
  • Offline
  • Posts: 169
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

Please Log in or Create an account to join the conversation.

XIDE and header for properties 2 years 5 months ago #2

  • wriedmann
  • wriedmann's Avatar
  • Away
  • Posts: 1406
  • Karma: 6
Hi Frank,

thank you for remembering this!

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
This email address is being protected from spambots. You need JavaScript enabled to view it.
www.riedmann.it - docs.xsharp.it

Please Log in or Create an account to join the conversation.

  • Page:
  • 1