[ATTENTION], "problem" with FolderItem.Exists

Kevin Windham kevo at gatorgraphics.com
Sun Feb 20 23:15:19 CST 2005


On Feb 20, 2005, at 12:52 PM, Ruslan Zasukhin wrote:
> BUG DESCRIPTION:
>
>     if to create folderItem f1 for a file which already exists,
>     then call some third-party function (via plugin)
>     to create NEW DISK FILE in that location then REALbasic
>     do not see immediately that file was replaced.
>     f1 still contains some old FSREf value.

Sounds like a logical error to me. Why would a plugin that has a 
reference to an existing file create a new file and not return a 
reference to the new file, but return the old. That's not something I 
would do in any language. I don't think this is RB's fault. Maybe I'm 
missing something. Seems like the sensible thing to do would be to set 
the file length to 0 and rename it. Or point the file reference to the 
new file.

> ------------------------
> Jon,
>
> In your project using this workaround I have change line
>
>   myDB = new FolderItem( pathDB )
>
> On this code:
>
>   pathDB = defaultDBFolderItem.AbsolutePath
>   myDB = new FolderItem( pathDB )
>
> And now your project works with no problems.
>

I wonder what the rest of the code is. This code doesn't seem to do 
anything as far as RB is concerned. The end result is the same and on 
one folderitem is created just like the first bit of code. I'm just 
wondering if this is really a bug in RB or just an abuse of folderitem 
in some way.


> ------------------------
>     I WANT TO ASC TO CLOSE THIS DISCUSSION.
>     This is REALBasic bug, and I not going in any way try
>     to "fix" it in the Valentina.
>     I have lost 2-3 days on this issue.

Sorry, feel free to not respond. Maybe Jon can shed some light on it 
for me. Just trying to figure out if this is something to be concerned 
with, or if it's a non-issue.

Thanks,
Kevin

P.S. I apologize if this discussion has been going on for some time and 
I missed it. I've been under the weather lately and have skipped a lot 
of emails.



More information about the Valentina-beta mailing list