V2MD - init/open database

Ruslan Zasukhin sunshine at public.kherson.ua
Wed Jan 11 14:46:27 CST 2006


On 1/11/06 2:03 PM, "Timo Rehmann" <valentina at pixelrund.de> wrote:

> hi folks,
> sadly it is not an ease to work with the V2MD-plugin (due to my
> novice-state?!):
> 
> the init-method does not work as you (ruszlan) described during our last
> correspondence,
> i have to use valentina 1 syntax to init the database:
> 
> ValentinaInit()
> 
> instead of
> 
> Valentina.init() // this will lead to "Script-Errorr, Operator expected"

I think you have miss that in V2 you MUST create object Valentina

      Valentina = new (Xtra("Valentina"))

Please look into V4MD/Examples/Common/Init_Shutdown


Here go to ValentinaGlobals to see such code:

------------------------------------------
on InitializeValentinaReferences ()
  
  -- Whether we will use examples in client-server mode
  gClient = false
  Valentina = new (Xtra("Valentina"))



Button Init of this example have script.
Note that "Valentina" this is name of global variable here.
Actually it can be any other name, e.g. "Vengine"

------------------------------------------
global Valentina

on mouseUp me
  -- First of all we must init Valentina engine
  Valentina.Init( 8 * 1024 * 1024, "", "" )
  if not CheckValError() then
    -- The next line helps you debug code using "Valentina for Director"
    Valentina.debugLevel = #kLogFunctions
    
    -- Enable logging to the text file.
    Valentina.logToFile(true, false)
    
    put Valentina.cacheSize into field "CacheSize"
    put Valentina.version into field "Version"
    put Valentina.debugLevel into field "DebugLevel"
  end if
  
end



-- 
Best regards,

Ruslan Zasukhin
VP Engineering and New Technology
Paradigma Software, Inc

Valentina - Joining Worlds of Information
http://www.paradigmasoft.com

[I feel the need: the need for speed]




More information about the Valentina mailing list