svlad

Check-in [3d231a001c]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:now basic events are handled
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:3d231a001c2bb91fc978541eed7422ee162cbdf9
User & Date: severak 2012-04-15 17:24:57
Context
2012-04-15
19:54
Added menu. check-in: 5c626a4a09 user: severak tags: trunk
17:24
now basic events are handled check-in: 3d231a001c user: severak tags: trunk
15:30
Now able to connect to database and do some queries and display results. check-in: 831243892a user: severak tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to svlad.lua.

38
39
40
41
42
43
44

















45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
  showresult("SELECT * FROM sqlite_master")
end

function appEnd()
  conn:close()
  --main:Free()
end


















env=luasql.sqlite3()
conn=assert(env:connect("prachy.db3"))


main=VCL.Form("mainWin")
main._={ caption="Svlad", width=500, height=500, onshow="listtables", onclose="appEnd" }

tabl=VCL.StringGrid(main,"table")
tabl._={ align="alClient", rowCount=99, ColCount=99,  AutoEdit=1 }

p=VCL.Panel(main,"panel")
p._={ align="alBottom", height=90 }

sql=VCL.Memo(p,"sql")
sql._={ align="alClient",  font={name="Courier"} }

fire=VCL.Button(p,"fire")
fire._={ align="alBottom", caption="PAL!", onclick="sql_dotaz" }

main:ShowModal()







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>









|











38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
  showresult("SELECT * FROM sqlite_master")
end

function appEnd()
  conn:close()
  --main:Free()
end

function getEdit(sender,x,y,v)
  print("getEdit")
  print(x,y,v)
  return v
end

function setEdit(sender,x,y,v)
  print("setEdit")
  print(x,y,v)
  return false
end

function OnHeaderClick(sender,IsColumn,index)
  print("OnHeaderClick")
  print(IsColumn,index)
end

env=luasql.sqlite3()
conn=assert(env:connect("prachy.db3"))


main=VCL.Form("mainWin")
main._={ caption="Svlad", width=500, height=500, onshow="listtables", onclose="appEnd" }

tabl=VCL.StringGrid(main,"table")
tabl._={ align="alClient", rowCount=99, ColCount=99,  AutoEdit=1, Options="goEditing,goRowSizing,goColSizing", OnSetEditText="setEdit", OnGetEditText="getEdit", OnHeaderClick="OnHeaderClick" }

p=VCL.Panel(main,"panel")
p._={ align="alBottom", height=90 }

sql=VCL.Memo(p,"sql")
sql._={ align="alClient",  font={name="Courier"} }

fire=VCL.Button(p,"fire")
fire._={ align="alBottom", caption="PAL!", onclick="sql_dotaz" }

main:ShowModal()