News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.

Post Reply  Post Thread 
Alien is complicated
Author Message
Senior Member

Posts: 522
Group: Registered
Joined: Apr 2007
Status: Offline
Reputation: 5
Post: #1
Alien is complicated

I'm still trying to get my head around Alien...looks like something that could open some pretty huge doors. I got a funny error message at one point when fooling around:

gtkMsgBox.lua:11: bad argument #1 to 'tostring' (userdata expected, got userdata)

One of my systems has Gtk2 installed in /opt, so the alien.load function in the gtk test doesn't work since it uses a full path to the file. Removing "/usr/lib" (using just the name of the library) fixed it.

I've been trying to find out if alien can supply a list of functions available in a given library, but haven't had much luck so far. When making changes to the gtk test I eventually got something, but it doesn't look like gtk functions. I'm just poking at it for now.

local gtk,p,i=alien.load(""),"pointer","int"
for i,v in pairs(gtk_tab) do
gtk_tab2=getmetatable(i) end
for i,v in pairs(gtk_tab2.__index) do print(i,v,type(v)) end

The result:

sub     function: 0x8262ef8     function
upper   function: 0x8262f28     function
len     function: 0x8262df0     function
gfind   function: 0x8262d80     function
rep     function: 0x8262e90     function
find    function: 0x8262cd8     function
match   function: 0x8262e58     function
char    function: 0x8260878     function
dump    function: 0x8262ca0     function
gmatch  function: 0x8262d80     function
reverse function: 0x8262ec0     function
byte    function: 0x8260840     function
format  function: 0x8262d10     function
gsub    function: 0x8262db8     function
lower   function: 0x8262e20     function

That looks like functions in string rather than gtk

06-23-2009 10:29 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
Alien is complicated - mikshaw - 06-23-2009 10:29 AM
RE: Alien is complicated - jpjacobs - 06-23-2009, 06:25 PM
RE: Alien is complicated - Juergen - 06-24-2009, 10:53 AM
RE: Alien is complicated - mikshaw - 06-24-2009, 10:38 PM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: