Development :  K-Meleon Web Browser Forum
K-Meleon development related discussions. 
LUA tutorial?
Posted by: SimpleInventor
Date: May 28, 2006 05:14PM

I know how to code, but I would like a very detailed tutorial for LUA and K-Meleon programming (I know that they exist seperately, but I would like to see them together.) Anyone out there who can help?

Options: ReplyQuote
Re: LUA tutorial?
Posted by: rmn
Date: May 30, 2006 03:32AM

Done. Dunno how good it is, but at least it's something.

By the way, in my opinion, "very detailed tutorial" isn't really useful. Tutorials should only introduce a particular topic; detailed descriptions and explanations are better left in reference manuals.

Options: ReplyQuote
Re: LUA tutorial?
Posted by: mark307
Date: June 03, 2006 02:11PM

@rms
Thanks a lot.

@SimpleInventor
I will give you a hint. Lua plugin is just bridge between lua and K-Meleon API. APIs are mapped to lua functions.

BTW: Previous lua thread grows enough. May I use this thread for a continuation?

I will release soon a new version with Lua 5.1.1.
Thanks.

Options: ReplyQuote
Re: LUA tutorial?
Posted by: rmn
Date: June 03, 2006 03:26PM

> Previous lua thread grows enough. May I use this thread for a continuation?

I suggest you create a new thread for each version, similar to how the K-Meleon 1.0 beta announcements are made. That way the threads don't get too long, and can be read and searched easily.

Options: ReplyQuote
Re: LUA tutorial?
Posted by: simpleinventor
Date: June 07, 2006 12:24AM

I want to make a macro that uses standard GUI stuff - a window with check-boxes, scrollboxes, buttons, bmps, etc. I don't think LUA by itself can do that, you need more libraries, no?

Options: ReplyQuote
Re: LUA tutorial?
Posted by: Hao Jiang
Date: June 07, 2006 05:18AM

Actually I 'm making a standard GUI KM new preference panel and it's in progress which is using lua and I will let it available with next K-MeleonCCF release.

Hao

Options: ReplyQuote
Re: LUA tutorial?
Posted by: rmn
Date: June 07, 2006 05:30AM

The Lua macro plugin does not provide this functionality (if it did, it would be in api.txt, under "Windows functions").

The kmplus plugin may be exactly what you need, but I haven't tried it myself.

Options: ReplyQuote
Re: LUA tutorial?
Posted by: Hao Jiang
Date: June 07, 2006 05:51AM

rmn,
Yes. I 'm using kmplus plugin to fulfill this function. And I did use only the lua macro plugin to have a preference panel, you just need to write your own customized dialog function...

Hao

Options: ReplyQuote
Re: LUA tutorial?
Posted by: rmn
Date: June 07, 2006 07:00AM

@Hao:

My comment was to answer simpleinventor (you beat me to the Post button :-).

But there's one thing I don't understand, how you "write your own customized dialog function" using only the Lua plugin (without kmplus).

Options: ReplyQuote
Re: LUA tutorial?
Posted by: simpleinventor
Date: June 07, 2006 07:53PM

Awesome guys! I just need to now know how to use bitmaps, and I should be set. I'm trying to code this idea of mine: [http://kmeleonbrowser.org/forum/read.php?f=4&i=6509&t=6509]Graphical Menu/Toolbar Editor[/url]. Hao, how much how of that preferance panel do you have done? I could sure use some help starting this up!

Options: ReplyQuote
Re: LUA tutorial?
Posted by: mark307
Date: June 08, 2006 02:17PM

simpleinventor,

Sorry, now kmplus dialog can't paint bitmaps. I think kmplus dialog isn't suitable for the editor. Because it is too restrected to write complicated UI.

There are some GUI and Win32 API library for lua, please visit lua-users.org. But I haven't used them with k-meleon, so using them might have trouble.

There are other way, plugin, XUL, or standalone application. In particular, Standalone application is free from restart of browser that needs restart to apply menu/toolbar settings.

Thanks.

Options: ReplyQuote
Re: LUA tutorial?
Posted by: simpleinventor
Date: June 08, 2006 09:15PM

Ok, I'm going to try my first plugin then. I've done some c++ before, but only command prompt/linux stuff. My school has visual studio 2003 pro, will that work? Do I need to comple the whole source to make a DLL? I've never done this before, so any help is appreciated (the resources on the wiki is very dry.)

Options: ReplyQuote
Re: LUA tutorial?
Posted by: mark307
Date: June 09, 2006 01:43PM

My school has visual studio 2003 pro, will that work?
That will work fine.

Do I need to comple the whole source to make a DLL?
You don't need to build k-meleon. You needs "kmeleon_plugin.h" only.

regards.

Options: ReplyQuote
Re: LUA tutorial?
Posted by: Hao Jiang
Date: June 09, 2006 02:19PM

@mark307,
Sometime, you also need resource.h for building plugins.

Regards,

Hao

Options: ReplyQuote


K-Meleon forum is powered by Phorum.