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 
strange problem with fltk ,diffrent from cmdline start or drag/drop start
Author Message
jyf1987
Member
***


Posts: 58
Group: Registered
Joined: Jun 2008
Status: Offline
Reputation: 0
Post: #1
strange problem with fltk ,diffrent from cmdline start or drag/drop start

it is very stangely that i run the same code with diffrent start method
and one work well while the other do not
the code is

Code:
function quit_callback(msg)
   if fltk.fl_choice("Are you sure you want to EXIT ?", "No", "Yes", nil) >= 1 then
      w:hide()
      os.exit()
   end
end

ww,wh,wt=300,280,"Simple IRC Client - Powered by jyf1987"

w= fltk:Fl_Window(ww,wh,wt)
w:callback(quit_callback)

msgout= fltk:Fl_Browser(5, 5, 290, 240)


msgin= fltk:Fl_Input(5, 250, 290, 25)
msgin:callback(
function()
  msgout:add(msgin:value())
  msgout:bottomline(msgout:size())
  msgin:value("")
end
)
msgin:when(fltk.FL_WHEN_ENTER_KEY_ALWAYS)
w:show()

msgout:add("hello")
msgout:bottomline(msgout:size())

Fl:run()



when i run it from cmdline ,i juse type murgalua.exe 2chat.lua
it works well
but when i try to drag the code file 2chat.lua and drop it on murgalua.exe
it dont work

so what's the problem

i just want to test if the code ("msgout:add("hello")") run in the fltk loop


Cheers
jyf
09-16-2008 12:26 AM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
strange problem with fltk ,diffrent from cmdline start or drag/drop start - jyf1987 - 09-16-2008 12:26 AM

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

Forum Jump: