This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
sample_code:introspector [2014/10/11 06:24] stevegarman |
sample_code:introspector [2015/03/28 20:01] octazid [The code] Change Database to Open |
||
---|---|---|---|
Line 4: | Line 4: | ||
It is incomplete as it does not drill down far enough but it is much better than nothing. | It is incomplete as it does not drill down far enough but it is much better than nothing. | ||
===== Warnings ===== | ===== Warnings ===== | ||
- | Please be aware that using undocumented functions is not recommended by the AndroidScript | + | Please be aware that using undocumented functions is not recommended by the DroidScript |
Please also be aware that the **" | Please also be aware that the **" | ||
===== Acknowledgements ===== | ===== Acknowledgements ===== | ||
- | Andreas Rozek would recognize much oif the code as the heart of it is stolen from his post at [[https:// | + | Andreas Rozek would recognize much of the code as the heart of it is stolen from his post at [[https:// |
Thanks also to Salvatore Fusto for finding a bug in the app. | Thanks also to Salvatore Fusto for finding a bug in the app. | ||
Line 25: | Line 25: | ||
var docfold = "/ | var docfold = "/ | ||
var docfile = docfold + "/ | var docfile = docfold + "/ | ||
+ | var evalsfile = docfold + "/ | ||
// | // | ||
Line 39: | Line 40: | ||
var control_list = " | var control_list = " | ||
- | +", | + | +", |
+", | +", | ||
+", | +", | ||
Line 55: | Line 56: | ||
/ | / | ||
- | FunctionView = app.CreateTextEdit('' | + | FunctionView = app.CreateTextEdit('' |
+ | // | ||
PageArea.AddChild(FunctionView); | PageArea.AddChild(FunctionView); | ||
FunctionView.SetVisibility(' | FunctionView.SetVisibility(' | ||
Line 112: | Line 114: | ||
case " | case " | ||
myobj = app.CreateCrypt(); | myobj = app.CreateCrypt(); | ||
+ | break; | ||
+ | case " | ||
+ | myobj = app.OpenDatabase(" | ||
break; | break; | ||
case " | case " | ||
Line 161: | Line 166: | ||
myobj=app; | myobj=app; | ||
lastMenu = " | lastMenu = " | ||
- | } | + | } |
prepareFunctionList(); | prepareFunctionList(); | ||
showOverview(); | showOverview(); | ||
Line 238: | Line 243: | ||
var layDlg = app.CreateLayout( " | var layDlg = app.CreateLayout( " | ||
layDlg.SetPadding( 0.02, | layDlg.SetPadding( 0.02, | ||
- | edtDlg = app.CreateTextEdit(' | + | edtDlg = app.CreateTextEdit(' |
edtDlg.SetCursorPos(edtDlg.GetText().length); | edtDlg.SetCursorPos(edtDlg.GetText().length); | ||
layDlg.AddChild(edtDlg); | layDlg.AddChild(edtDlg); | ||
Line 257: | Line 262: | ||
dlg.Dismiss(); | dlg.Dismiss(); | ||
myobj = eval(edtDlg.GetText()); | myobj = eval(edtDlg.GetText()); | ||
- | prepareFunctionList(); | + | if ((myobj != null) && |
- | showOverview(); | + | |
- | if ((myobj != null) && | + | |
lastMenu = myobj.GetType(); | lastMenu = myobj.GetType(); | ||
- | else | + | app.WriteFile(evalsfile, |
+ | } | ||
+ | else{ | ||
lastMenu = " | lastMenu = " | ||
+ | } | ||
main_header_txt.SetText( lastMenu ); | main_header_txt.SetText( lastMenu ); | ||
+ | prepareFunctionList(); | ||
+ | showOverview(); | ||
}//dlg_ok | }//dlg_ok | ||
function dlg_canc(){ | function dlg_canc(){ | ||
Line 272: | Line 280: | ||
</ | </ | ||
- | I have placed an spk of this app at [[http:// | + | I have placed an spk of this app at [[http:// |
- | And for the sake of completeness, | + | And for the sake of completeness, |