ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 ImageEnDBVect1
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

M.Schlegel

Germany
13 Posts

Posted - Oct 03 2016 :  08:44:56  Show Profile  Reply
Hello Team Imageen,

my code is:
...
ImageEnDBVect1.ObjKind[ IEV_NEXT_INSERTED_OBJECT ] := iekELLIPSE;
ImageEnDBVect1.ObjLeft[ IEV_NEXT_INSERTED_OBJECT ] := 100;
ImageEnDBVect1.ObjTop[ IEV_NEXT_INSERTED_OBJECT ] := 100;
ImageEnDBVect1.ObjWidth[ IEV_NEXT_INSERTED_OBJECT ] := 20;
ImageEnDBVect1.ObjHeight[ IEV_NEXT_INSERTED_OBJECT ] := 20;
ImageEnDBVect1.ObjPenColor[ IEV_NEXT_INSERTED_OBJECT ] := clRed;
ImageEnDBVect1.AddNewObject;
...

the new object is visible in ImageEnDBVect1.

...
table1.edit;
ImageEnDBVect1.ObjKind[ IEV_NEXT_INSERTED_OBJECT ] := iekELLIPSE;
ImageEnDBVect1.ObjLeft[ IEV_NEXT_INSERTED_OBJECT ] := 100;
ImageEnDBVect1.ObjTop[ IEV_NEXT_INSERTED_OBJECT ] := 100;
ImageEnDBVect1.ObjWidth[ IEV_NEXT_INSERTED_OBJECT ] := 20;
ImageEnDBVect1.ObjHeight[ IEV_NEXT_INSERTED_OBJECT ] := 20;
ImageEnDBVect1.ObjPenColor[ IEV_NEXT_INSERTED_OBJECT ] := clRed;
ImageEnDBVect1.AddNewObject;
table1.post;
...

the new object is not visible in ImageEnDBVect1. What is wrong?

Delphi7
Imageen 6.3.2

Thank's for help.
Matthias Schlegel

w2m

USA
1990 Posts

Posted - Oct 03 2016 :  11:24:32  Show Profile  Reply
I seldom use TImageEnDBVect. Having said that perhaps all you need is to add ImageEnDBVect1.Update or use a some of the code in the VectorialDB demo:
procedure TMainForm.Button4Click(Sender: TObject);
var
  ms:TMemoryStream;
begin
  ms:=TMemoryStream.Create;
  ImageEnVect1.SaveToStreamAll( ms );
  ms.Position := 0;
  Table1.Edit;
  TBlobField(Table1.FieldByName('Photo')).LoadFromStream( ms );
  Table1.Post;
  ms.Free;
end;

or perhaps all you need is to put the table into edit mode before post
:
Table1.Edit;
Table1.Post;

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

M.Schlegel

Germany
13 Posts

Posted - Oct 03 2016 :  12:17:50  Show Profile  Reply
Hello Bill,
thank's for the help.

Matthias Schlegel
Go to Top of Page

w2m

USA
1990 Posts

Posted - Oct 03 2016 :  12:18:37  Show Profile  Reply
Did my suggestions work?

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
Go to Top of Page

M.Schlegel

Germany
13 Posts

Posted - Oct 03 2016 :  13:52:13  Show Profile  Reply
Hello Bill,

with:

ImageEnDBVect1.Update

all work's fine.

Thank's for the help.

Matthias Schlegel
Go to Top of Page

M.Schlegel

Germany
13 Posts

Posted - Oct 04 2016 :  05:28:00  Show Profile  Reply
Hello Bill,

there is still a problem with AddNewObject via code with ImageEnDBVect. Is it possible to reproducible it in the DemoDBVect example.
I have add a Button with the code;

procedure TMainForm.Button3Click(Sender: TObject);
begin
ImageEnDBVect1.ObjKind[ IEV_NEXT_INSERTED_OBJECT ] := iekELLIPSE;
ImageEnDBVect1.ObjLeft[ IEV_NEXT_INSERTED_OBJECT ] := 33;
ImageEnDBVect1.ObjTop[ IEV_NEXT_INSERTED_OBJECT ] := 33;
ImageEnDBVect1.ObjWidth[ IEV_NEXT_INSERTED_OBJECT ] := 20;
ImageEnDBVect1.ObjHeight[ IEV_NEXT_INSERTED_OBJECT ] := 20;
ImageEnDBVect1.ObjPenColor[ IEV_NEXT_INSERTED_OBJECT ] := clRed;
ImageEnDBVect1.ObjName [ IEV_NEXT_INSERTED_OBJECT ] := 'Test';
ImageEnDBVect1.ObjStyle[ IEV_NEXT_INSERTED_OBJECT ]:= [ievsSelectable, ievsMoveable, ievsVisible] ;
ImageEnDBVect1.AddNewObject;
ImageEnDBVect1.update;
end;

After Post there is no ELLIPSE in the ImageEnDBVect1.

Thank's for help.
Matthias Schlegel

Go to Top of Page

xequte

38615 Posts

Posted - Oct 18 2016 :  00:31:58  Show Profile  Reply
Hi Matthias

There is an issue which can cause ImageEnDBVect1 to fail to set Field.Modified. We will fix for the next update.

In the meantime, just change your code to:

procedure TMainForm.Button3Click(Sender: TObject);
begin
  ImageEnDBVect1.ObjKind[ IEV_NEXT_INSERTED_OBJECT ] := iekELLIPSE;
  ImageEnDBVect1.ObjLeft[ IEV_NEXT_INSERTED_OBJECT ] := 33;
  ImageEnDBVect1.ObjTop[ IEV_NEXT_INSERTED_OBJECT ] := 33;
  ImageEnDBVect1.ObjWidth[ IEV_NEXT_INSERTED_OBJECT ] := 20;
  ImageEnDBVect1.ObjHeight[ IEV_NEXT_INSERTED_OBJECT ] := 20;
  ImageEnDBVect1.ObjPenColor[ IEV_NEXT_INSERTED_OBJECT ] := clRed;
  ImageEnDBVect1.ObjName [ IEV_NEXT_INSERTED_OBJECT ] := 'Test';
  ImageEnDBVect1.ObjStyle[ IEV_NEXT_INSERTED_OBJECT ]:= [ievsSelectable, ievsMoveable, ievsVisible]  ;
  ImageEnDBVect1.AddNewObject;
  ImageEnDBVect1.ImageChanged;
end;


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

M.Schlegel

Germany
13 Posts

Posted - Oct 21 2016 :  07:20:45  Show Profile  Reply
Hello Nigel,


thank's for the help.
with:

ImageEnDBVect1.ImageChanged;

is it better.

Matthias Schlegel
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: