[AS] Close database not working for me

M Young myoung at ieee.org
Sun Dec 12 10:24:08 CST 2004


VAPP example works to create and close database.

However when I try to create then close database with full pathname,  
only the create portion works. The close is probably failing because of  
the \ marks that are coming from somewhere. The problem appears to be  
strictly an AppleScript issue, since I get the problem when trying to  
close files with other applications. I will continue to look for an  
answer.

Michael

> hi Michael,
>
> I think this is question to Valentina list but not to vstudio.
>
> Please check examples of VAPP. They show create/close/open.
> Run and check that examples work for you.
>
>>  AppleScript
>>
>> Create()
>>
>> tell application "Valentina Carbon"
>>     close database "Macintosh HD:Customers"
>> end tell
>>
>> ---------------------------------------------------------------------- 
>> ------
>> on Create()
>>     tell application "Valentina Carbon"
>>         activate
>>         set theDB to make new database with data file "Macintosh  
>> HD:Customers"
>>         set Customer to make new base object with properties  
>> {name:"Customer"}
>> at end of theDB
>>     end tell
>> end Create
>>
>> *************************************************************
>>
>> Event Log
>> tell application "Valentina Carbon"
>>     activate
>>         current application
>>     activate
>>     make new database with data file "Macintosh HD:Customers"
>>         database "Customers"
>>     make new base object with properties {name:"Customer"} at end of  
>> database
>> "Customers"
>>         base object "Customer" of database "Customers"
>>     close database "Macintosh HD:Customers"
>>         "Valentina Carbon got an error: database \"Macintosh  
>> HD:Customers\"
>> doesn't understand the close message."
>>
>> *************************************************************
>>
>> Database "Customers" is created in the correct location, however close
>> database fails. What am I doing wrong?
>
> -- 
> Best regards,
> Ruslan Zasukhin      [ I feel the need...the need for speed ]



More information about the Valentina mailing list