<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=text/html;charset=iso-8859-1 http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 6.00.6001.17509"></HEAD>
<BODY style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-TOP: 15px"
id=MailContainerBody leftMargin=0 topMargin=0 bgColor=#ffffff
CanvasTabStop="true" name="Compose message area">
<DIV><FONT size=2 face=Arial>I'm getting the error: <FONT
color=#ff0000><STRONG>unit1.pas(48,3) Warning: Local variable "List" does not
seem to be initialized</STRONG></FONT><BR></FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Here's the code (which used to work):</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>unit Unit1; </FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial>{$mode objfpc}{$H+}</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial>interface</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial>uses<BR> Classes, SysUtils, LResources,
Forms, Controls, Graphics, Dialogs,<BR> ZConnection, ZDataset, db,
DBGrids, DbCtrls, SdfData, StdCtrls;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial>type</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial> { TForm1 }</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial> TForm1 = class(TForm)<BR>
Datasource1: TDatasource;<BR> Datasource2:
TDatasource;<BR> DBGrid1: TDBGrid;<BR>
DBNavigator1: TDBNavigator;<BR> ZConnection1:
TZConnection;<BR> ZTable1: TZTable;<BR>
ZTable2: TZTable;<BR> procedure Button1Click(Sender:
TObject);<BR> procedure FormCreate(Sender: TObject);<BR>
private<BR> { private declarations }<BR>
public<BR> { public declarations }<BR> end;
</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial>var<BR> Form1: TForm1; </FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial>implementation</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial>{ TForm1 }</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial>procedure TForm1.FormCreate(Sender:
TObject);<BR><STRONG><FONT color=#ff0000>var<BR> List:
TStringList</FONT></STRONG>;<BR>begin</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial> ZConnection1.Connected:=True;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial> ZTable1.Active:=True;<BR>
ZTable2.Active:=True;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial><STRONG><FONT color=#ff0000>
list.Add('here');</FONT></STRONG><BR> {<BR> while not ZTable2.EOF
do<BR> begin<BR>
List.Add(ZTable2.FieldByName('MAKE').AsString);<BR>
ZTable2.Next;<BR> end;
//while<BR> }<BR>
//showmessage(list.Strings[0]);<BR> //
DBGrid1.Columns[0].PickList:=List;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial>end;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial>procedure TForm1.Button1Click(Sender:
TObject);<BR>begin<BR> end;</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2 face=Arial>initialization<BR> {$I
unit1.lrs}</FONT></DIV>
<DIV><FONT size=2 face=Arial>end.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>What has happened?</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>bob k.</DIV>
<DIV><BR>
</FONT></DIV></BODY></HTML>