On 23.08.2017 20:38, Marcos Douglas B. Santos wrote:
> On Wed, Aug 23, 2017 at 3:25 PM, Sven Barth via fpc-pascal
> wrote:
>> On 23.08.2017 19:57, Marcos Douglas B. Santos wrote:
>>> Would we have any problem of memory leaks using Interface helper with
>>> COM
On Wed, Aug 23, 2017 at 3:25 PM, Sven Barth via fpc-pascal
wrote:
> On 23.08.2017 19:57, Marcos Douglas B. Santos wrote:
>> Would we have any problem of memory leaks using Interface helper with
>> COM interfaces (refcount)?
>> I mean, the "type helper" has
On 23.08.2017 19:57, Marcos Douglas B. Santos wrote:
> On Wed, Aug 23, 2017 at 2:45 PM, Sven Barth via fpc-pascal
> wrote:
>> Am 23.08.2017 19:39 schrieb "Marcos Douglas B. Santos" :
>>>
>>> Wait a minute. Now I realize that procedure
Am 23.08.2017 16:01 schrieb "Anthony Walter" :
>
> As to what they are useful for, consider the following:
>
> type
> // IShellLink is define by Microsoft
> IShellLinkHelper = record helper for IShellLink
> public
> procedure Save(const Target, Description, Link:
Am 23.08.2017 19:40 schrieb "Anthony Walter" :
>
> Sven, multiple helpers would be greatly appreciated, especially
considering everyone wants to add their own helpers for types like string.
At least in FPC modes they can use inheritance to solve this (see below) or
by putting
Am 23.08.2017 19:39 schrieb "Marcos Douglas B. Santos" :
>
> On Wed, Aug 23, 2017 at 11:00 AM, Anthony Walter wrote:
> > Marco, it doesn't work that way.
> >
> > Type helpers simply allow you to extend an existing type with new
methods
> > and/or properties.
Sven, multiple helpers would be greatly appreciated, especially considering
everyone wants to add their own helpers for types like string.
Thanks again!
___
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
On Wed, Aug 23, 2017 at 11:00 AM, Anthony Walter wrote:
> Marco, it doesn't work that way.
>
> Type helpers simply allow you to extend an existing type with new methods
> and/or properties. When you declare a type helper you extend all instances
> of said type given that:
>
> A)
On Wed, Aug 23, 2017 at 12:13 PM, Sven Barth via fpc-pascal
wrote:
> Am 23.08.2017 16:58 schrieb "Marcos Douglas B. Santos" :
>>
>> Is this compatible with Delphi?
>
> Interface helpers are only supported by FPC. But the other helpers (class,
>
Am 23.08.2017 16:01 schrieb "Anthony Walter" :
>
> Marco, it doesn't work that way.
>
> Type helpers simply allow you to extend an existing type with new methods
and/or properties. When you declare a type helper you extend all instances
of said type given that:
>
> A) You 'use'
Am 23.08.2017 16:59 schrieb "Marcos Douglas B. Santos" :
>
> On Wed, Aug 23, 2017 at 11:07 AM, Anthony Walter wrote:
> > Here is another example:
> >
> > type
> > TDay = (Monday = 0, Tuesday, Wednesday, Thursday, Friday, Saturday,
> > Sunday);
> >
> >
Am 23.08.2017 16:58 schrieb "Marcos Douglas B. Santos" :
>
> On Wed, Aug 23, 2017 at 11:00 AM, Anthony Walter wrote:
> > Marcos, it doesn't work that way.
> >
> > Type helpers simply allow you to extend an existing type with new
methods
> > and/or properties.
On Wed, Aug 23, 2017 at 11:07 AM, Anthony Walter wrote:
> Here is another example:
>
> type
> TDay = (Monday = 0, Tuesday, Wednesday, Thursday, Friday, Saturday,
> Sunday);
>
> TDayHelper = record helper for TDay
> function AsByte: Byte;
> function ToString: string;
On Wed, Aug 23, 2017 at 11:00 AM, Anthony Walter wrote:
> Marcos, it doesn't work that way.
>
> Type helpers simply allow you to extend an existing type with new methods
> and/or properties. When you declare a type helper you extend all instances
> of said type given that:
>
>
Here is another example:
type
TDay = (Monday = 0, Tuesday, Wednesday, Thursday, Friday, Saturday,
Sunday);
TDayHelper = record helper for TDay
function AsByte: Byte;
function ToString: string;
end;
function TDayHelper.AsByte: Byte;
begin
Result := Ord(Self);
end;
function
Marco, it doesn't work that way.
Type helpers simply allow you to extend an existing type with new methods
and/or properties. When you declare a type helper you extend all instances
of said type given that:
A) You 'use' the unit declaring the type helper in some other unit.
B) No other unit
On Wed, Aug 23, 2017 at 6:18 AM, Sven Barth via fpc-pascal
wrote:
> Am 23.08.2017 09:42 schrieb "Michael Van Canneyt" :
>>
>>
>> Any other examples ?
>
> It's the same as for the other kinds of helpers: being syntactic sugar.
> E.g. if I
Am 23.08.2017 09:42 schrieb "Michael Van Canneyt" :
>
>
>
> On Tue, 22 Aug 2017, Anthony Walter wrote:
>
>> I just wanted to point out that revision 37023 Sven added type helper
>> support for interfaces.
>>
>> Good job and thank you Sven!
>>
>
> I'm having trouble
On Tue, 22 Aug 2017, Anthony Walter wrote:
I just wanted to point out that revision 37023 Sven added type helper
support for interfaces.
Good job and thank you Sven!
I'm having trouble understanding why this could be useful (apart from
completeness).
The only thing I can come up with is
Am 23.08.2017 02:04 schrieb "Anthony Walter" :
>
> I just wanted to point out that revision 37023 Sven added type helper
support for interfaces.
>
> Good job and thank you Sven!
You're welcome. I wanted to add them for some time already :)
Regards,
Sven
20 matches
Mail list logo