Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (25) </ ... 17 18 19 20 21 [22] 23 24 25 >/

[ Track this topic :: Email this topic :: Print this topic ]

new topic new poll
Topic: DSL v4.3< Next Oldest | Next Newest >
lucky13 Offline





Group: Members
Posts: 1478
Joined: Feb. 2007
Posted: May 16 2008,14:31 QUOTE

Quote
The fans are really loud, though.

Swap them out with your old ones if they're quieter and in decent shape.


--------------
"It felt kind of like having a pitbull terrier on my rear end."
-- meo (copyright(c)2008, all rights reserved)
Back to top
Profile PM WEB 
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: May 16 2008,16:09 QUOTE

mikshaw wrote:
Quote
I wonder if it might be easier to do a check for fltk in the LUA_INIT file before running any fltk commands. This assumes that -lfltk is being used as part of the interpreter as mentioned earlier, and that -lfltk loads fltk before LUA_INIT is read, neither of which I know at this point.  In any case, if it works, I think either method could be used. I only mention sticking with LUA_INIT because it would allow you to skip running dofile in every fltk-enabled script.

I have found the best place for such dofile, in a single location, is /usr/local/share/lua/5.1/fltk.lua, the inititalization for the murgaLua fltk bindings. This way the non-gui lua scripts are not penalized with any extra processing to determine to further process fltk only commands.
Back to top
Profile PM WEB 
florian Offline





Group: Members
Posts: 66
Joined: Dec. 2006
Posted: May 16 2008,16:49 QUOTE

Quote

I have found the best place for such dofile, in a single location, is /usr/local/share/lua/5.1/fltk.lua, the inititalization for the murgaLua fltk bindings. This way the non-gui lua scripts are not penalized with any extra processing to determine to further process fltk only commands.


I was going to suggest the same. In fact you could perhaps add the following line just after the invokation of the murgaLua shared lib (the package.loadlib call):
Code Sample

pcall ( function() dofile(os.getenv("HOME".."/.luafltkrc") end )

This would then automatically execute a ".luafltrc" lua file from the user's directory if such file exists.
Back to top
Profile PM WEB 
florian Offline





Group: Members
Posts: 66
Joined: Dec. 2006
Posted: May 16 2008,17:00 QUOTE

Yes this works. I have all my scripts running with the plastic theme by putting Fl:scheme("plastic") in ~/.luafltkrc
Back to top
Profile PM WEB 
roberts Offline





Group: Members
Posts: 4983
Joined: Oct. 2003
Posted: May 16 2008,17:49 QUOTE

I agree, pcall is better than just a dofile. Will implement.
BTW slight typo missing close ) after "HOME")


Edited by roberts on May 16 2008,18:05
Back to top
Profile PM WEB 
123 replies since April 22 2008,05:38 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (25) </ ... 17 18 19 20 21 [22] 23 24 25 >/
new topic new poll
Quick Reply: DSL v4.3

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code