lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



On Feb 03, 2005, at 09:35, Peter Loveday wrote:

Does this solve the problem for locating other (non-lua) files relative to my package also, or only other .lua ones?

Well, once you know the location of a package, you can find non-Lua resources relative to that package.

In a nutshell, this is what I'm planning to do:

"An NSBundle represents a location in the file system that groups code and resources that can be used in a program. NSBundles locate program resources, dynamically load executable code, and assist in localization."

http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ ObjC_classic/Classes/NSBundle.html

Say I want to load a .jpg file that I bundle with my package, for whaterver reason, can I use this method in 5.1 to do this?

Not out-of-the-box, but once you have the package location itself, it's breeze to do so.

If not, then the problem still exists...

It would be indeed helpful if the magic 'require' function did record the original location of a package and made that information available in a standard fashion. In the meantime, debug.getinfo() it is :/

Cheers

--
PA, Onnay Equitursay
http://alt.textdrive.com/