On Tue, 14 Jul 2015, ulrich wrote:
Hi,
I have this unit, but when I compile it, I get this error:
Illegal unit name XXX_Parser. The unit is saved under dfm_rrparser.pas.
The unit name must always match the file name.
This is logical, because otherwise the compiler can never find it if a
{$IFDEF FPC}
{$MACRO ON}
{$IFNDEF XXX_}
{$DEFINE XXX_:=DFM_RR} // replace prefix
{$ENDIF}
{$ENDIF}
{$INFO compiled with XXX_}
unit XXX_parser;
{$mode objfpc}{$H+}
interface
implementation
end.
Macros are only expanded on whole tokens (aka words). So
On 2015-07-15 10:21, Sven Barth wrote:
The property could even be
protected or private and it should still work as long as the containing
class has the interface in its parent list.
I thought that would only work if you access the method via an interface
variable, not a class instance
Am 15.07.2015 09:27 schrieb Graeme Geldenhuys
mailingli...@geldenhuys.co.uk:
On 2015-07-15 05:06, David Emerson wrote:
So... since t_fancy_class implements the interface i_foo, why is
t_fancy_class.foo not available?
Because you told it a property named hook implements it, so you need
to
Am 15.07.2015 08:21 schrieb ulrich rom...@cbox.cz:
Hi,
I have this unit, but when I compile it, I get this error:
Illegal unit name XXX_Parser. The unit is saved under dfm_rrparser.pas.
Second question:
Why not displayed $INFO directive in the message window (I have enabled
-vi switch in
On 2015-07-15 05:06, David Emerson wrote:
So... since t_fancy_class implements the interface i_foo, why is
t_fancy_class.foo not available?
Because you told it a property named hook implements it, so you need
to call it as follows:
fc.hook.foo;
Regards,
- Graeme -
--
fpGUI Toolkit - a
Hi,
I have this unit, but when I compile it, I get this error:
Illegal unit name XXX_Parser. The unit is saved under dfm_rrparser.pas.
Second question:
Why not displayed $INFO directive in the message window (I have enabled
-vi switch in command line)?
{$IFDEF FPC}
{$MACRO ON}
Am 15.07.2015 06:07 schrieb David Emerson dle...@angelbase.com:
[snip]
constructor t_fancy_class.create;
begin
inherited;
f_hook := t_foo_base.create;
end;
destructor t_fancy_class.destroy;
begin
t_foo_base(f_hook).free;
inherited;
end;
[snip]
Not related to
Am 15.07.2015 11:51 schrieb Graeme Geldenhuys
mailingli...@geldenhuys.co.uk:
On 2015-07-15 10:21, Sven Barth wrote:
The property could even be
protected or private and it should still work as long as the containing
class has the interface in its parent list.
I thought that would only