Hi Wolfgang,
I was wondering when you would get around to telling me this ;-0)
The truth is that I have been so busy trying to get other stuff done (based on Nick's DevShare 2015 sample etc.), that I just did not get around to finding a better solution to the Property definition, also I was fitting my code into Robert's example which already had a Field declared, so I needed to use the same name as that. If I recall correctly I tried 'auto' and it did not work the way I required it to, but there may have been another reason for that.
Everywhere else I do use 'auto' for Get/Set.
I may revisit this topic later this morning, when I am going to try the Generic sample of a "Stack of Stacks" - I will make Stacks of INT, DateTime, String, Decimal and Enum items, and then Push these stacks into another 'outer' Stack. Was an idea I had in bed ;-0)
Speak soon,
Phil.
HELP please - syntax for new class ...... >>
- Phil Hepburn
- Posts: 743
- Joined: Sun Sep 11, 2016 2:16 pm
-
- Posts: 248
- Joined: Fri Oct 14, 2016 7:09 am
HELP please - syntax for new class ...... >>
Phil, I'm worried, you may need to re-evaluate your work life balance!!!Phil Hepburn wrote:Hi Wolfgang,
I will make Stacks of INT, DateTime, String, Decimal and Enum items, and then Push these stacks into another 'outer' Stack. Was an idea I had in bed ;-0)
Nick
- Phil Hepburn
- Posts: 743
- Joined: Sun Sep 11, 2016 2:16 pm
HELP please - syntax for new class ...... >>
Hi Wolfgang,
Okay then, I have taken some time to start coding the Properties as you recently suggested.
Here is my first attempt along your single line approach :-
As a matter of interest, is there a way of having a compound (or more complex) 'SET' clause ?
And here is the line in action with three different Types of myStack :-
I am having syntax problems trying to have a Stack of my Stacks ! More on that later.
Cheers,
Phil.
Okay then, I have taken some time to start coding the Properties as you recently suggested.
Here is my first attempt along your single line approach :-
As a matter of interest, is there a way of having a compound (or more complex) 'SET' clause ?
And here is the line in action with three different Types of myStack :-
I am having syntax problems trying to have a Stack of my Stacks ! More on that later.
Cheers,
Phil.
- Phil Hepburn
- Posts: 743
- Joined: Sun Sep 11, 2016 2:16 pm
HELP please - syntax for new class ...... >>
Nick,
For starters, who ever suggested that I was balanced ?
Secondly, if you were retired you would realise that there are an awful lot of hours in a week.
And on top of that I have been stuck in the middle of a local power and politics 'squeeze' it would seem. So because my four year term of Governorship has come to an end, I am not being invited back. No one can seemingly tell me why. So even more time to kill!
Life is rather strange currently, both local, national and global. I am sure we can't meaningfully blame Microsoft for that, although a few guys down the pub (at least one left) will give it a try. Oh! and a guy in the Netherlands too. (Guess who.)
Speak soon,
Phil.
P.S. If I have a class of ' myStack<T> ' how do I code things such that I can have a stack of stacks ? After all we can have arrays of arrays, and lists or lists. It seems to be the Generic 'bit' that causes the issue(s).
For starters, who ever suggested that I was balanced ?
Secondly, if you were retired you would realise that there are an awful lot of hours in a week.
And on top of that I have been stuck in the middle of a local power and politics 'squeeze' it would seem. So because my four year term of Governorship has come to an end, I am not being invited back. No one can seemingly tell me why. So even more time to kill!
Life is rather strange currently, both local, national and global. I am sure we can't meaningfully blame Microsoft for that, although a few guys down the pub (at least one left) will give it a try. Oh! and a guy in the Netherlands too. (Guess who.)
Speak soon,
Phil.
P.S. If I have a class of ' myStack<T> ' how do I code things such that I can have a stack of stacks ? After all we can have arrays of arrays, and lists or lists. It seems to be the Generic 'bit' that causes the issue(s).
HELP please - syntax for new class ...... >>
Hi Phil,
Wolfgang
P.S. if you are curious what I do in the SetupBinding method:
It is really name based binding that we all know from VO <g>
of course. You can separate them by commas. Personally I prefer to write the extensive form of property when I have more complex set clauses, but this sample from my base ComboBox class works:As a matter of interest, is there a way of having a compound (or more complex) 'SET' clause ?
Code: Select all
public new property Name as string get super:Name set super:Name := value, self:SetupBinding()
P.S. if you are curious what I do in the SetupBinding method:
Code: Select all
method SetupBinding() as void
local oBinding as Binding
oBinding := Binding{ self:Name }
oBinding:ValidatesOnDataErrors := true
oBinding:UpdateSourceTrigger := UpdateSourceTrigger.PropertyChanged
self:SetBinding( ComboBox.TextProperty, oBinding )
return
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