Comments (9)
In addition to apps that can be runned both from OS and form other processes we need other kinds of process too. For example I think that menu and number-input are widgets rather when apps.
from akros.
You are right - but on this architecture they are all treated in the same way, so I don't want to cause confusion, and make all of them called the same. But right now, I'm considering running away from the problem and doing it like this:
lib_window_vessel_stats.ks -> job_vessel_stats.ks
open_window_vessel_stats -> run_vessel_stats
draw_window_vessel_stats -> draw_vessel_stats
update_window_vessel_stats -> update_vesel_stats
Not only the names are shorter, but also the word job
is used only in the name of file. What do you think?
from akros.
Fine. Though apps actually have a slightly different interface: their constructor should have the same signature (the number and type of parameters).
from akros.
Yeah, but since everything in menu is launched via the program_list.ks
wrapper, even proper apps don't need to have exact same constructor.
Closing issue after having applied changes.
from akros.
@akrasuski1 Wait. I thought that program_list is a placeholder.
from akros.
Hmm, no, not really. Why? Is this a bad design? User might want to "install" only some programs to his OS. And where such install should be specified? I thought a separate file, with list of programs is okay.
from akros.
Hmmm. Now you got me thinking - I actually can make users create a function named register_vessel_stats
or so, and call it while running the library. Then it would add itself to the menu. Is that better? While the wrapper would still persist, it would be only used for system programs and such - "normal" apps would have to have a constructor consisting of only os_data, window_index
.
from akros.
OK, I implemented what I've said above. Look at current version of program list. It's very edit-easy, having pretty much just the list of libraries to include. As a compromise, every widget library needs now to include these two lines on top (or bottom, doesn't matter):
parameter os_data.
register_program(os_data,"Vessel stats","run_vessel_stats",false).
This tells the OS to "install" the program - add its name to main menu and know which function to run afterwards. The last argument is almost always false - if true, it forces the program to be run in zeroth window (without user choice of window). Also, now menu-runnable programs need to follow the specific constructor:
function run_x{
parameter
os_data,
window_index.
//stuff
}
from akros.
Yes I was thinking about something similar. Self-registering applications (but not all job
s because there is not much use in opening dialog without parent) are the only approach I like.
All other variants I thought about:
- A show a menu where the user can run any program and hope that it will be a "job" - a recipe for disaster
- Search for files with matching certain pattern and load them - I like it very much but there are no string operations in kOS just yet
- Have a file that the user will edit manually - a bad idea because the user can misspell/damage something in that file
from akros.
Related Issues (20)
- Add window change mechanic to process manager
- 1 and 2 are working in the window manager (but should not) HOT 2
- Add default else's to all widgets' run_mode big if
- Improve process manager HOT 2
- It's possible to open more than one process in the same window HOT 6
- There is no way to reopen the main window upon killing it HOT 12
- Rename option "back" in the main menu to "title screen"
- Opening window manager while having process manager open causes crash HOT 1
- Process manager doesn't update it's list of processes when the new process is created, quitted, killed by another process manager, or moved to another window HOT 2
- Status bar is not cleared when quitting vessel stats
- Add function get_free_windows
- Some files in akrOS rely on some other files to be imported by other parts of OS HOT 4
- Problem with main menu child HOT 2
- Number dialog in the background causes an exception
- [bug] Strange window manager behaviour HOT 3
- No controls and empty status window in window manager HOT 7
- [bug] division by zero in the calculator causes OS crash
- Idea: debug stats widget HOT 1
- Add a way to disable main menu permamently
- Add clear_status_bar
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from akros.