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
 FillFromDirectory error reading filename
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

Eric

18 Posts

Posted - Dec 05 2013 :  09:12:16  Show Profile  Reply
Hi,
ImageEnMView1.FillFromDirectory(DirectoryListBox1.Directory, -1, false, '', False, '', False,False);
for i := 0 to ImageEnMView1.ImageCount - 1 do
begin
sFileName := ImageEnMView1.ImageFileName[i];
end;

there is the problem
if LoadonDemand = true sFileName work fine but if i load many files
when i drag the scroll bar it will crash
if LoadonDeman = false sfilename return nil

version is 5.05

w2m

USA
1990 Posts

Posted - Dec 05 2013 :  09:31:31  Show Profile  Reply
I suggest you get the filenames in the OnAllDisplayed event, because the filenames may not be available until all the images are loaded.

When you call FillFromDirectory, then immediately try to get the filenames, all of the files may not have been loaded yet, so the ImageFilename is empty.


William Miller
Go to Top of Page

Eric

18 Posts

Posted - Dec 09 2013 :  00:08:05  Show Profile  Reply
Hi,
After OnAllDisplayed the filename still empty.
I found Imageenversion 4.3.1 works fine and quickly more then 5.05.
and in 5.05 method FillfromDirectory always hanged when I drag scroolbar up & down
Go to Top of Page

w2m

USA
1990 Posts

Posted - Dec 09 2013 :  07:37:04  Show Profile  Reply
Do you have 4.3.1 and 5.05 on your pc at the same time?
Perhaps the compiler is including code from both versions or is trying to use the old versions code when compiling with the new version. If you have both versions installed do you have paths set to both in the ide?

I do not see this problem here.

OnAllDisplayed always returns the filenames here.

William Miller
Go to Top of Page

xequte

38616 Posts

Posted - Dec 09 2013 :  13:47:04  Show Profile  Reply
Hi Eric

In most situations you should use LoadOnDemand for best performance.

I'm surprised to hear it is crashing, as I personally tested this a lot for v5 when implementing TImageEnFolderMView (which uses FillFromDirectory internally).

Can you give us more detail?



Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: