Giter Site home page Giter Site logo

abstk's People

Contributors

gitter-badger avatar hishamhm avatar pedroalvesv avatar spc476 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

abstk's Issues

How to replace the contents of a list?

I think we've discussed this at some point, but we may have ended up missing it.

I need to replace the list of options in a selector from a callback. Here's an example of what I'd like to be able to do:

https://gist.github.com/hishamhm/b948ef9e6e8df30d3e3ab8aacff4a80d

Here, if you have two monitors plugged in, I'd like to change the list of resolutions when the other monitor is plugged.

(To test this with a single monitor, use this fake output file:

https://gist.github.com/hishamhm/7db71de28f24b1cac9d1b8569c74576d

and replace io.popen("xrandr", "r") with io.open("xrandr.fake", "r") in the xrandr.lua script (note popen vs. open!) )

This feature is needed in the GoboLinux installer in the screen where you pick the time zone. You type in a substring with part of the time zone name, and the list above it shrinks to include only the elements that match.

Side note: the documentation of Selector argument for set_value is incorrect. It says it takes a boolean, but it takes a number (as its own example shows)

https://pedroalvesv.github.io/AbsTK/modules/abstk.html#Screen:set_value

GTK issues on headless server

I have an Ubuntu 16.04 VPS (headless, no GTK libs) on which I try to run a sample app that uses AbsTK. I'm getting this error:

$ lua temp.lua
lua: /usr/local/share/lua/5.1/lgi/namespace.lua:151: Typelib file for namespace 'Gtk' (any version) not found
stack traceback:
        [C]: in function 'assert'
        /usr/local/share/lua/5.1/lgi/namespace.lua:151: in function 'require'
        /usr/local/share/lua/5.1/abstk/AbsGtk.lua:13: in main chunk
        [C]: in function 'require'
        /usr/local/share/lua/5.1/abstk.lua:11: in main chunk
        [C]: in function 'require'
        temp.lua:1: in main chunk
        [C]: ?

temp.lua is just one of the sample apps:

local abstk = require 'abstk'
-- abstk.set_mode("curses")
local scr = abstk.new_screen("My First AbsTK UI")
scr:add_label('hellow', "Hello, World!")
scr:add_label('msg1', "This is a minimal example to demonstrate AbsTK.")
scr:add_label('msg2', "The Screen is the main object of the toolkit. It can run as standalone or added to a Wizard. Its routine consists in creating it (line 2), populating it (lines 3 to 7) and running it (line 8).")
scr:run()

It doesn't work even if I uncomment the second line, or if I run lua temp.lua curses.

Trying to install the proper .typelib files for Gtk gets me into a whole lot of trouble, and dependencies that I don't really need on the VPS. AbsTK should probably give up on GTK when encountering this kind of error and switch to curses automatically.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.