Standalone and Valentina

Trevor DeVore lists at mangomultimedia.com
Thu Dec 23 12:29:32 EST 2004


On Dec 23, 2004, at 8:58 AM, Jean-Claude SERRANO wrote:

> Thanks for your quick answer.
>
> I had already test the method 1.
> I have tried everything you told me to do (method 2) and it still does 
> not
> work.
>
> The dialog box in preopenstack is always empty.

Sorry, I gave you a sys_appPath function that won't work correctly.  
Replace the previous code with this:

on startup
	local tExternals = ""
	
	put sys_AppPath(true) & "/data/externals/revdb.dll" &cr into tExternals
	put sys_AppPath(true) & "/data/externals/revdb.bundle" after tExternals
	
	set the externals of this stack to tExternals
		
	pass startup
end startup

/**
   * Set the database driver path.
   */
on preOpenStack
	--> TEST: DISPLAY THE EXTERNAL PACKAGES AVAILABLE TO THE STACK
	--> SHOULD DISPLAY "RevDB".
	answer the externalPackages of this stack
	
	revSetDatabaseDriverPath (sys_AppPath() & "/data/externals/")
	
	pass preOpenStack
end preOpenStack


/**
   * Returns the path to the executable.
   *
   * @param  pGetBundleFolder	Set to true to return the folder an app 
bundle is in rather than the full path to the executable on OS X.
   *
   * @return String
   */
function sys_AppPath pGetBundleFolder
    local tPath = ""

    put address into tPath
    if pGetBundleFolder = true AND platform() contains "MacOS" and item 
1 of systemVersion() >= 10 then
		get offset(".app/Contents/MacOS/", tPath)
		if it > 0 then -- 2.4.3 or later
			delete char it to length(tPath) of tPath
		end if
	end if
	
	set itemDel to slash
    delete item -1 of tPath
	
    set itemDel to ":"
    delete item 1 of tPath

    return tPath
end sys_AppPath


That should work for you.


-- 
Trevor DeVore
Blue Mango Multimedia
trevor at mangomultimedia.com



More information about the use-livecode mailing list