🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.pascal
Article #92312

Re: [A propos] Pozornie oczywista instrukcja WITH, czyli Re: Obiekt jako parametr procedury - problem

#92312
From: Terrmit
Date: Fri, 07 Dec 2007 13:31
64 lines
2413 bytes
Magda S pisze:
>> Może jestem nie kumaty, a może po prostu nie czaruj,
>> tyko powiedz o co chodzi?
> Chyba jesteś niekumaty, skoro nie rozumiesz prostej rzeczy: uruchom 
> przykład, o którym pisałam.
No to zgłoś babola do Borlanda, bo u mnie czerwona robi się kontrolka.
Free Pascal 2.2.0-0; Lazarusa 0.9.25; Fedora 8.

Pozdrawiam waszą kumatość,
   Sławek

<code>
unit Unit1;

{$mode objfpc}{$H+}

interface

uses
   Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, 
StdCtrls;

type

   { TForm1 }

   TForm1 = class(TForm)
     Button1: TButton;
     Edit1: TEdit;
     procedure Button1Click(Sender: TObject);
   private
     { private declarations }
   public
     { public declarations }
   end;

var
   Form1: TForm1;

implementation

{ TForm1 }

procedure TForm1.Button1Click(Sender: TObject);
var
   X: TComponent;
begin
   X := Edit1;
   if X is TControl then
   begin
     with TControl(X) do
     begin
       Color := clRed;
       // Co zrobi się czerwone: forma czy kontrolka?
     end;
   end;
   Refresh;
end;

initialization
   {$I unit1.lrs}

end.
</code>
Technical Details
Message-ID: <fjbi7q$l0j$1@atlantis.news.tpi.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!feed.news.interia.pl!news.nask.pl!news.nask.org.pl!news.internetia.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
References: <fj7cka$ldq$1@nemesis.news.tpi.pl> <fj899b$8j6$1@atlantis.news.tpi.pl> <fj8fdm$ehh$1@news.onet.pl> <fj8on4$2pb$1@atlantis.news.tpi.pl> <fj9f6s$jr9$1@news.onet.pl> <fjb7v2$f65$1@atlantis.news.tpi.pl> <fjb9jn$5df$1@news.onet.pl> <fjbd1d$cg1$1@nemesis.news.tpi.pl> <fjbdts$j6v$1@news.onet.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!feed.news.interia.pl!news.nask.pl!news.nask.org.pl!news.internetia.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
From: Terrmit <terrmitv@poczta.onet.pl>
Newsgroups: pl.comp.lang.pascal
Subject: Re: [A propos]  Pozornie oczywista instrukcja WITH, czyli Re: Obiekt       jako parametr procedury - problem
Date: Fri, 07 Dec 2007 14:31:59 +0100
Organization: tp.internet - http://www.tpi.pl/
Lines: 64
Message-ID: <fjbi7q$l0j$1@atlantis.news.tpi.pl>
References: <fj7cka$ldq$1@nemesis.news.tpi.pl> <fj899b$8j6$1@atlantis.news.tpi.pl> <fj8fdm$ehh$1@news.onet.pl> <fj8on4$2pb$1@atlantis.news.tpi.pl> <fj9f6s$jr9$1@news.onet.pl> <fjb7v2$f65$1@atlantis.news.tpi.pl> <fjb9jn$5df$1@news.onet.pl> <fjbd1d$cg1$1@nemesis.news.tpi.pl> <fjbdts$j6v$1@news.onet.pl>
NNTP-Posting-Host: fge166.internetdsl.tpnet.pl
Mime-Version: 1.0
X-Trace: atlantis.news.tpi.pl 1197034554 21523 83.13.160.166 (7 Dec 2007 13:35:54 GMT)
X-Complaints-To: usenet@tpi.pl
NNTP-Posting-Date: Fri, 7 Dec 2007 13:35:54 +0000 (UTC)
User-Agent: Thunderbird 2.0.0.9 (X11/20071115)
In-Reply-To: <fjbdts$j6v$1@news.onet.pl>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit