This appears with both the older and latest wxLua, and might even be native to 
Lua, but I don't think so.

I'm using the Windows registry to associate files, such that I right click on a 
data file, select an option I put there to open it with a script I associated 
it with, the script in turn being associated with wxLua. This normally works 
fine (excepting problems noted earlier in other post about latest wxLua..).

If I open a data file in the same location as the script, bitmaps for toolbar 
buttons in a subdirectory are found, if I open a data file elsewhere, they are 
not! That means that the data file path, not the script file path, is being 
assumed to be the working directory, which is definitely odd. (This is my best 
assumption anyway, I don't know how to prove it because if I ask it to print 
the path, it just prints what I told it, not the expanded path it tried to use).

Normally I could do this:
PATH="./Bitmaps/"

But for now I have to do this to force wxLua to look at the right path to chose 
as working directory:
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...


------------------------------------------------------------------------------
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

Reply via email to