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 
Interactive Fish interpreter
Author Message
jpjacobs
Member
***


Posts: 113
Group: Registered
Joined: Jul 2007
Status: Offline
Reputation: 0
Post: #1
Interactive Fish interpreter

I'm having trouble creating a text editor, for creating sort of an interactive editor/interpreter for the Fish language.

With Fluid, I've managed to generate the window etc, but in the textarea text can not be entered.

The code:

Code:
-- Declaration of global variables
make_window = make_window or nil
win = {}
function make_window()
  win.window = fltk:Fl_Double_Window(334, 210, 565, 355, "Fish interpreter")
  do
    win.edt_buffer = fltk:Fl_Text_Buffer()
    win.edt = fltk:Fl_Text_Editor(25, 25, 260, 280)
    win.edt:textfont(fltk.FL_SCREEN)
    win.edt:textsize(10) -- TODO un magic number
    win.edt:selection_color(fltk.FL_BLACK)

    local o = fltk:Fl_Text_Display(285, 25, 260, 280)
    local o = fltk:Fl_Roller(135, 320, 55, 25, "Delay")
    o:align(4)
    o:step(0)
    local o = fltk:Fl_Value_Output(190, 320, 25, 25)
    local o = fltk:Fl_Button(215, 320, 70, 25, "Back")
    local o = fltk:Fl_Button(285, 320, 70, 25, "Step")
    local o = fltk:Fl_Return_Button(355, 320, 70, 25, "Run")
  end
  win.window['endd'](win.window)
  return win.window
end

for _,i in ipairs {make_window()} do i:show() end
Fl:run()


Any ideas how to solve this?

Regards,

Jan-Pieter

This post was last modified: 05-06-2011 01:32 AM by jpjacobs.

04-21-2011 08:09 PM
Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
Interactive Fish interpreter - jpjacobs - 04-21-2011 08:09 PM
RE: Texteditor - mikshaw - 04-22-2011, 12:43 AM
RE: Texteditor - jpjacobs - 04-22-2011, 08:14 PM
RE: Interactive Fish interpreter - mikshaw - 05-06-2011, 11:23 PM

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

Forum Jump: