Hi

 

I am attempting to learn a little Delphi.

 

I have an application that creates an image sequence upon clicking a TImage 
property.

 

The image is identified as TDevicePT1C: TImage.

 

The transmission is through the following code -

 

procedure TLoopBuilderForm.DeviceNotebookMouseUp(Sender: TObject;

  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

begin

  {request a device build}

 

  DeviceNotebookMouseUpAlias(Sender, Button, Shift, X, Y);

 

end;

 

This is received by -

 

rocedure   DeviceNotebookMouseUpAlias(Sender: TObject;

        Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

var

   indx : integer;

   RegisteredClass  : TdsDeviceClass;

   PermissionGranted : Boolean;

 

begin

   if Sender is TImage then

   begin

      {check if this is a device request}

      try

         PermissionGranted := FALSE;

 

         indx := StreamClassRegistry.indexOf(TImage(Sender).name);

         RegisteredClass := StreamClassRegistry.OBJECTS[indx] AS TdsDeviceClass;

         CurrDeviceReq :=  RegisteredClass.TheClass;      {create the 
registered object}

         {first check if any device spawning is required....}

         DigDeviceContactSelectionForm.RequestContactSelectionUpdate

                             (TBaseDevice(CurrDeviceReq), PermissionGranted);

 

 

All of the above works well.

 

I want to add the capability of generating the image sequence from a database 
(Postrgresql v8.1)

 

Here is the code that I have developed for this -

 

procedure TAutoLoopBldrForm.NewLoopButtonMouseUp(Sender: TObject;

  Button: TMouseButton; Shift: TShiftState; X, Y: Integer);

 

  begin

          PSQLQuery1.Close ;

          PSQLQuery1.Params[0].AsString;

          PSQLQuery1.ExecSQL;

      DeviceNotebookMouseUpAlias(Sender, Button, Shift, X, Y);

 

end;

 

When I compile and click the button nothing happens.

 

I hope someone can point out the error of my ways.

 

Bob Pawley
_______________________________________________
Delphi-DB mailing list
Delphi-DB@elists.org
http://www.elists.org/mailman/listinfo/delphi-db

Reply via email to