[V4RB] 2.0 b46 uploaded.

jda jda at his.com
Wed Feb 16 17:33:49 CST 2005


I have found what appears to be the problem, and a workaround.

After Valentina creates a file, it may not actually exist yet (I see 
this when using GetSaveFolderItem in RB and replacing an existing 
file).

If I add this line

       app.DoEvents

the file status changed to .exists = true

This is obviously something we shouldn't have to code every time a 
Valentina db is created. Maybe Valentina just needs to yield time to 
RB after the file is created?

Jon


>  > I found that when replacing an older file, immediately after
>>  db.create the RB debugger shows the folderItem does not exist! After
>>  a short time I recheck and now it exists.
>>
>>  I can see this in your example, DB_CreateCloseOpen. If you run it
>>  once, it is fine. But if you create a new database, close it, and
>>  then create one *without throwing the old one away* you'll see the f
>>  -> does not exist right after this line:
>>
>>  mDataBase.Create( f, EVDbMode.kDscDatBlbInd, 32 * 1024, EVOs.kDefault )
>>
>>  To see, create a db, close it, then put a breakpoint at the line
>>  above. Create a new db, step through the mDataBase.Create line, then
>>  check for the existence of f in the debugger.
>>
>>  I hope I am making myself clear.
>
>I think all this is result of big "gifts" from Apple.
>
>How to explain you....
>
>You have see that I have spend a lots time with this FSRef.
>Apple have provide strange non-consistent logic for
>     EXISTED and non-EXISTED objects.
>
>To make it working I was need write special wrapper around,
>Watch with help of some bool flags and so on.
>
>I think REAL have fight with the same problems.
>
>Probably they recognize that object already exists with some delay.
>This is not because asynchronously.
>I think just in their code exists few branches of calls.
>And at least one branch do not check if object already exists.
>And other branch do this, so RB start to see object exists.
>
>This is only assumption.
>If it is correct then small bug present in the RB code.
>


More information about the Valentina-beta mailing list