John Labenski <jlaben...@gmail.com> wrote: (28/05/2009 23:56) >> PATH=string.gsub(arg[0],"^(.+[/\\]).+$","%1").."Bitmaps/" >> >> It works, but it's a clumsy method. At least it's portable, it accepts >> non-Windows path separators... > >This is a typical problem of finding where a program's external >resources are and is not unique to wxLua or Lua. The way you do it is >pretty a pretty standard way. You may want to create a shortcut to >your app and set the "Start In" path to the directory of the program >and its resources. >
Ok, I guess not everything native to the OS is lovely. :) Shortcuts are binaries, they break at times (especially if triggered accidentally when they can't find the file they want...), I learned to avoid them except for simple stuff like drag-generated shortcuts made from existing files on demand. I'll stay with the method I worked out because that way I can separate the path and filename from the string, and I know I'll be wanting that done anyway for various things. Just need to use gfind instead of gsub to fetch both parts to variables. ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com _______________________________________________ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users