Cplua Project: Cpluaui
#1
Posted 27 November 2005 - 06:48 PM
#2
Posted 27 November 2005 - 07:04 PM
Teraz ciekaw jestem jakie to wzbudzi zainteresowanie. Bede tu chyba lookal codziennie...
#3
Posted 27 November 2005 - 07:05 PM
#4
Posted 27 November 2005 - 07:10 PM
Yikes - One of the main improvements of CPLua 0.8 was the possibility to create a complete UI system for CPLua... But thanks antway, I will take a look at your code; maybe it will be interesting to convert it in C++ later
Where? How?? When????
Why those 'small' always get news at the end....
Manual or anything is needed....
#5
Posted 27 November 2005 - 07:28 PM
I'm planning to make the source code (or at least a part of it) available soon, so if someone is interested in the development of a new package he will just have to ask me.
I tried the example, and (fortunately?) this is not what I had in mind
With the new structure of CPLua it should be possible to create real windows, buttons and many other widgets, thus we can do even more than that
#6
Posted 27 November 2005 - 07:58 PM
Does it mean, that GUI elements won't be in documentation and only way to find it is to search the source code of CPLua, which isn't freely accessible yet?Anyways, this is a kind of things that does not really concerns the user, but rather CPLua developpers I'm planning to make the source code (or at least a part of it) available soon, so if someone is interested in the development of a new package he will just have to ask me.
I tried the example, and (fortunately?) this is not what I had in mind
With the new structure of CPLua it should be possible to create real windows, buttons and many other widgets, thus we can do even more than that
Yes, it wasn't worth to create a real GUI in LUA, but my code IMO works good enough. So I'll wait for stable release of CPLua 0.8, you may consider using some of my ideas (creating objects from classes, function executed in a "real time" or just after changing value in widget, possibility of moving around widgets with keyboard)
#7
Posted 27 November 2005 - 08:18 PM
No, it means that it is now possible to create a new package in C++ for CPLua, which will give the possibility to Lua users to define some real windows and widgets and to use them in their programs. Such a thing was not possible before, because CPLua could only manage the console window and the graph window; now there is no limitation anymore on the numbers and kind of windows that CPLua can handleDoes it mean, that GUI elements won't be in documentation and only way to find it is to search the source code of CPLua, which isn't freely accessible yet?
The way you organized your library is similar to the structure that I already had in mind (except that using the pen should be more confortable than using the keyboard - in CPLua 0.8B you can now use getpen() in the console window too)Yes, it wasn't worth to create a real GUI in LUA, but my code IMO works good enough. So I'll wait for stable release of CPLua 0.8, you may consider using some of my ideas (creating objects from classes, function executed in a "real time" or just after changing value in widget, possibility of moving around widgets with keyboard)
#8
Posted 27 November 2005 - 08:46 PM
I like keyboard It would be great if user can use both keys and pen - something like using tab on PC instead of mouse. But I understand that it may be difficult to implement.The way you organized your library is similar to the structure that I already had in mind (except that using the pen should be more confortable than using the keyboard - in CPLua 0.8B you can now use getpen() in the console window too)
#9
Posted 27 November 2005 - 10:08 PM
the new structure makes it really easy to create some other kinds of window if we want, for example for the CAS's 2D display or for 3D graphics etc.
So it will be possible to create window with 3D graph or spreadsheet and manipulate it (ie. fill cells in spreadsheet, calculate regression and integral of this regression) from lua? It would be wonderful!
#10
Posted 27 November 2005 - 10:22 PM
However it should be possible to create a custom window for 3D graphs (but not the standard window of the CP), and a "special window type" containing widgets specified in a Lua program (like in your example)
#11
Posted 28 November 2005 - 02:46 AM
it does not work as expected
the called program does not end by itself and if I press the K_EXE then the Called program executes agian
So the menu is not reachable !
Is it possible to have to column selective bottons?
column1 ...... column2
------------------------------
botton1 ...... botton1
botton2 ...... botton2
botton3 ...... botton3
botton4 ...... botton4
botton5 ...... botton5
#12
Posted 28 November 2005 - 03:01 PM
Like Orwell said, the spreadsheet will not be available in CPLua. However, regressions and integrals are already available. These are CAS commands, so they can be called by using the "cas" package. The only "problem" is that statistical computations in ClassPad are implemented as commands, not functions. This means that you need to call a statistical command, then access system variables to get the results, just as in CP Basic (this is a CP peculiarity, and has nothing to do with CPLua). For example, the codeSo it will be possible to create window with 3D graph or spreadsheet and manipulate it (ie. fill cells in spreadsheet, calculate regression and integral of this regression) from lua? It would be wonderful!
require("cas") cas("OnePropZTest \">\",0.5,15,40") probability=cas("approx(prob)")performs a one-sample, one-tail hypothesis test of a percentage. The first CAS command calls CP's statistical command "OnePropZTest". After that, the system variable "prob" holds the result (in this example, the so-called "p-value"). Then, the second CAS command assigns the result to a CPLua variable named "probability". In other words, you always need a couple of CPLua statements in order to perform statistical computations. See the appendix of the CP manual for details about system variables returned by statistical commands.
#13
Posted 28 November 2005 - 11:48 PM
You can't set as an action a function which requires arguments. Sowhen I use Interface:Button -> action :doscript
it does not work as expected
addWidget ("Button", {action = doscript}is wrong and
addWidget ("Button", {action = function () doscript ("cat/file", {args}) end})is correct
Yeah, I know, I'll fix it in the future. Currently moving cursor clears and redraws screen.the called program does not end by itself and if I press the K_EXE then the Called program executes agian
So the menu is not reachable !
Currently not, maybe in future.Is it possible to have to column selective bottons?
column1 ...... column2
------------------------------
botton1 ...... botton1
botton2 ...... botton2
botton3 ...... botton3
botton4 ...... botton4
botton5 ...... botton5
PAP, thanks for help, I'll read about it. Currently I'm looking for a way to speed up work with spreadsheet, but since it's not possible in LUA i'll stay with what I have.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users