Setting paths to Externals

Andre Garzia andre at andregarzia.com
Fri Nov 23 22:48:39 EST 2007


Aloha Sivakatirswami,

the steps are easy. First, put the externals inside the bundle of the
standalone. choose inspect the package from the finder and drop the
external into the externals folder inside it.

If you set the externals property of the stack right then it should
just work. Remember the only time when you're allowed to bind an
external is during the startup handler. you can't load externals
during openstack or preopenstack or anything like that. Just during
startup.

So if you want you can put something like that:

on startup
 set the externals of this stack to ("libKiosk.bundle" & cr & "libKiosk.dll")
end startup

IIRC, you must set both a bundle and a dll even if the dll does not
exist, but you're welcome to try without it.

Om shanti
andre

On 11/24/07, Sivakatirswami <katir at hindu.org> wrote:
> OK I think I've wasted about 3 hours on this and
> am finally throwing in the towel...(smile)
>
> I'm trying to get Andre's Kiosk external loaded with my stand alone.
>
> a) I don't see how to tell the Standalone builder to copy any externals
> in use from the "My Revolution Enterprise" folder to the stand alone...
> I want to select Rev Browser for possible later use, so I am unable to
> check the box for the standalone builder to get the externals in use by
> the stack automatically. If I
> have the libkiosk.bundle in  "My Revolution Enterprise/Externals/" it
> works fine...
>
> b) I tried everything "under the sun" to load an external by script. but
> I'm doing something wrong
>
> besides. I don't see how you can dynamically load an external anyway,
> since the docs state you have stop and restart your application. But if
> you are loading them by script in a preopenstack or open stack handler,
> then how will you ever activate them?
>
> c) then there is the issue of : you ask the stand alone builder to
> set-copy some externals and then you are setting the externals by
> script... how does that work?
>
> A "Best Practices" video on "Working with Externals in Revolution" would
> be most welcome!
> I'm missing something fundamental, as all the paths look right now --
> having solved the for movies
> I know for sure the paths are correct for the location of the externals
>
>
> --> all handlers
> local tPath
>
>
> ON preopenstack
>     set the rect of this stack to (the screenrect)
>     set the loc of this stack to the screenloc
> END preopenstack
>
> ON openstack
>   set the itemdel to "/"
>   put (the filename of this stack) into tPath
>   put environment() into tEnvirons
>   IF tEnvirons = "standalone application" THEN
>     answer "yes a standalone" WITH "OK"
>     delete item -4 to -1 of tPath #crawl back out of the OS X package
>   ELSE
>     delete item -1 of tPath
>   END IF
>   loadMovies tPath
>   loadExternals tPath
>   runMovies
>   send loadGuestRecords to this stack in 1 second
>
> END openstack
>
> ON loadMovies tPath # Hurray! this works now
>     set the filename of player 2 to url (tPath & "/media/tandava take
> 3.mov")
>     set the filename of player 1 to url (tPath &
> "/media/aadheenam_2007-02-06_sm-vision-puja.mov")
> END loadMovies
>
> ON loadExternals tPath # Boo Hoo... this is not working
> # where the external is in a folder adjacent to the standalone
> #  and not inside the standalone bundle
>    put "/plug-ins/libkiosk.bundle/Contents/MacOS/libkiosk" after tPath #
> doesnt' work
>   --put "/plug-ins/libkiosk" after tPath # also doesn't work
>    answer tPath WITH "OK"
>    set the externals of this stack to tPath
> END loadExternals
>
> # Any attempt to call functions in the external give a script error
> # And I wonder how things play out if you are tell Revolution to
> # include externals when running the Standalone builder and the
> # setting them yourself by script... won't they conflict?
>
> ON runMovies
>     set the playloudness of player "Player1" to 0
>     start player "player1"
>     set the playrate of player "player2" to fld "tandavaRate"
>     start player "player2"
> END runMovies
>
>
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>


-- 
http://www.andregarzia.com All We Do Is Code.



More information about the use-livecode mailing list