On Monday 19 May 2008 00.02:55 Marc Santhoff wrote:
> Am Sonntag, den 18.05.2008, 23:41 +0200 schrieb Graeme Geldenhuys:
> > 2008/5/18 Marc Santhoff <[EMAIL PROTECTED]>:
> > > Since the compiler dod not warn about using the "as" operator I assume
> > > it is safe? Like this:
> > >
> > > procedure T
Am Montag, den 19.05.2008, 09:16 +0200 schrieb Graeme Geldenhuys:
> Marc Santhoff wrote:
> > Am Sonntag, den 18.05.2008, 23:41 +0200 schrieb Graeme Geldenhuys:
> >> 2008/5/18 Marc Santhoff <[EMAIL PROTECTED]>:
> >>> Since the compiler dod not warn about using the "as" operator I assume
> >>> it is
Marc Santhoff wrote:
Am Sonntag, den 18.05.2008, 23:41 +0200 schrieb Graeme Geldenhuys:
2008/5/18 Marc Santhoff <[EMAIL PROTECTED]>:
Since the compiler dod not warn about using the "as" operator I assume
it is safe? Like this:
procedure TObservable.DeRegister( obsv: IObserver );
var
i:
Am Sonntag, den 18.05.2008, 23:41 +0200 schrieb Graeme Geldenhuys:
> 2008/5/18 Marc Santhoff <[EMAIL PROTECTED]>:
> > Since the compiler dod not warn about using the "as" operator I assume
> > it is safe? Like this:
> >
> > procedure TObservable.DeRegister( obsv: IObserver );
> > var
> >i:
2008/5/18 Marc Santhoff <[EMAIL PROTECTED]>:
> Since the compiler dod not warn about using the "as" operator I assume
> it is safe? Like this:
>
> procedure TObservable.DeRegister( obsv: IObserver );
> var
>i: integer;
> begin
>if (fObservers.count<=0) then exit;
>for i:=0 t
> Am Sonntag, den 18.05.2008, 23:07 +0200 schrieb Marco van de Voort:
> begin
> if (fObservers.count<=0) then exit;
> for i:=0 to fObservers.count-1 do begin
> if ((fObservers[i] as IObserver)=obsv) then begin
> fObservers.delete(i);
>
Am Sonntag, den 18.05.2008, 23:07 +0200 schrieb Marco van de Voort:
> > I have two questions about interface usage.
> >
> > 1. How interfaces are to handle when casting?
> > Theoretically it should be safe to do this:
> >
> > TObservable = class
> > public
> > procedure Register( obsv: IObserve
Am Sonntag, den 18.05.2008, 17:54 -0300 schrieb Joao Morais:
> Marc Santhoff wrote:
> > Hi,
> >
> > I have two questions about interface usage.
> >
> > 1. How interfaces are to handle when casting?
> > Theoretically it should be safe to do this:
> >
> > TObservable = class
> > public
> > proce
Am Sonntag, den 18.05.2008, 22:51 +0200 schrieb Graeme Geldenhuys:
> 2008/5/18 Marc Santhoff <[EMAIL PROTECTED]>:
> > When using a cast from an interface to an object the compiler warns
> > about the class types "TObject" and "IObserver" not being related.
> >
> > Since an implementor of in interfa
> I have two questions about interface usage.
>
> 1. How interfaces are to handle when casting?
> Theoretically it should be safe to do this:
>
> TObservable = class
> public
> procedure Register( obsv: IObserver );
> private
> procedure NotifyObservers(param: TParameter);
> fObservers: TFP
Marc Santhoff wrote:
Hi,
I have two questions about interface usage.
1. How interfaces are to handle when casting?
Theoretically it should be safe to do this:
TObservable = class
public
procedure Register( obsv: IObserver );
private
procedure NotifyObservers(param: TParameter);
fObserver
2008/5/18 Marc Santhoff <[EMAIL PROTECTED]>:
> When using a cast from an interface to an object the compiler warns
> about the class types "TObject" and "IObserver" not being related.
>
> Since an implementor of in interface always will be a class type and any
> class type at least inherits from TO
Hi,
I have two questions about interface usage.
1. How interfaces are to handle when casting?
Theoretically it should be safe to do this:
TObservable = class
public
procedure Register( obsv: IObserver );
private
procedure NotifyObservers(param: TParameter);
fObservers: TFPObjectList;
end;
13 matches
Mail list logo