#1 Burning Software

It is currently Thu Apr 24, 2014 4:08 pm

All times are UTC




Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 67 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next
Author Message
 Post subject: Re: Looking for certain features
PostPosted: Tue Nov 02, 2010 7:56 pm 
Offline

Joined: Sun Jun 14, 2009 6:00 pm
Posts: 507
*Sigh*

Okay...what about replacing files in a UdfDataburner? There are "Add" methods, but Add will fail if the file exists. So I'd look for a remove...which is only located in the Files property. Fine for me, but how do I determine the index of the file to remove? Should I iterate over all existing files to find the index every time I want to replace a file? Seems horribly inefficient to me?


Top
 Profile  
 
 Post subject: Re: Looking for certain features
PostPosted: Tue Nov 02, 2010 8:05 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4045
Location: British Virgin Islands
Need to check the code as we've dramatically re-worked UDF engine and completely replaced ISO with a new code. Tons of things were changed / added.


Top
 Profile  
 
 Post subject: Re: Looking for certain features
PostPosted: Wed Nov 03, 2010 5:40 am 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 601
Hello

We will investigate this issue!

Regards,

Dmitry


Top
 Profile  
 
 Post subject: Re: Looking for certain features
PostPosted: Sat Nov 13, 2010 1:09 pm 
Offline

Joined: Sun Jun 14, 2009 6:00 pm
Posts: 507
No news on how to replace files yet?


Top
 Profile  
 
 Post subject: Re: Looking for certain features
PostPosted: Sat Nov 13, 2010 7:42 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4045
Location: British Virgin Islands
- Remove
- Add

We definitely can write a wrapper over these calls called - Replace but it's not there yet.


Top
 Profile  
 
 Post subject: Re: Looking for certain features
PostPosted: Sat Nov 13, 2010 8:22 pm 
Offline

Joined: Sun Jun 14, 2009 6:00 pm
Posts: 507
Yes, but how to remove and add efficiently?


Top
 Profile  
 
 Post subject: Re: Looking for certain features
PostPosted: Sat Nov 13, 2010 10:01 pm 
Offline
Site Admin

Joined: Fri Jun 18, 2004 12:03 am
Posts: 4045
Location: British Virgin Islands
You should have some kind of a tree control in your app (if you allow your user to select/add/remove files). Keep reference pointer to file object you add and use it to remove. We'll overwrap the call with one call but it's not going to be faster b/c it's going to perform the same sequence of actions.


Top
 Profile  
 
 Post subject: Re: Looking for certain features
PostPosted: Sat Dec 18, 2010 4:28 am 
Offline

Joined: Mon Aug 25, 2008 1:50 pm
Posts: 394
flöle wrote:
*Sigh*

Okay...what about replacing files in a UdfDataburner? There are "Add" methods, but Add will fail if the file exists. So I'd look for a remove...which is only located in the Files property. Fine for me, but how do I determine the index of the file to remove? Should I iterate over all existing files to find the index every time I want to replace a file? Seems horribly inefficient to me?


I thought I can help you Sir, as like you I am an user of StarBurnX, hence I am posting my opinion on your question.

I think as you are adding files in a folder. So you have parentFolder as DataFolder and it's path with you.
Next thing you need is filename, so what you can do is before adding each file you can query for filename in parentFolder like,

' Search the file object
fileToDelete = parentFolder.GetFileObject(pathToSearch)

It's your choice whether to delete existing file and add new one now. Do what you want here...
And if you have deleted the file then add new file.

Am I clear, Sir?
Thank you.


Top
 Profile  
 
 Post subject: Re: Looking for certain features
PostPosted: Thu Dec 30, 2010 10:35 am 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 601
Hello,

Yes, you are right! Thanx for your help!


Regards,

Dmitry


Top
 Profile  
 
 Post subject: Re: Looking for certain features
PostPosted: Thu Dec 30, 2010 2:57 pm 
Offline

Joined: Sun Jun 14, 2009 6:00 pm
Posts: 507
deepakp wrote:
' Search the file object
fileToDelete = parentFolder.GetFileObject(pathToSearch)


And now what? I can't delete the file if I have a reference to it, as I need an index. I know how to do that, but doing it for all files of a folder is inefficient.


Top
 Profile  
 
 Post subject: Re: Looking for certain features
PostPosted: Thu Dec 30, 2010 5:18 pm 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 601
Hello,

The DataFolder object provides the property Files which gives access to collection of child items ( files and folders). This collection provides the method Clear!! This collection provides also the method Remove, the type of input parameter is Variant so ... the passed value can be Index or File object.

P.s. Look into the our examples DataBurner and UDFDataBurner :)


Regards,

Dmitry


Top
 Profile  
 
 Post subject: Re: Looking for certain features
PostPosted: Thu Dec 30, 2010 6:03 pm 
Offline

Joined: Sun Jun 14, 2009 6:00 pm
Posts: 507
Nope, StarBurnX only exposes a single Remove method, only accepting an int.


Top
 Profile  
 
 Post subject: Re: Looking for certain features
PostPosted: Thu Dec 30, 2010 6:21 pm 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 601
Hmmm ... [ void Remove(object Index) - Member of RocketDivision.StarBurnX.IDataFiles] ... as you see the the Index parameter has type Object!! :))

Regards,

Dmitry


Top
 Profile  
 
 Post subject: Re: Looking for certain features
PostPosted: Thu Dec 30, 2010 7:27 pm 
Offline

Joined: Sun Jun 14, 2009 6:00 pm
Posts: 507
Ah, I see, thanks. Guess I focused too much on the parameter name. Will try it.


Top
 Profile  
 
 Post subject: Re: Looking for certain features
PostPosted: Thu Dec 30, 2010 7:44 pm 
Offline

Joined: Thu Dec 13, 2007 8:44 am
Posts: 601
Excellent!!

P.s. do not forget to look into the our samples :)

Regards,

Dmitry


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 67 posts ]  Go to page Previous  1, 2, 3, 4, 5  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group