lgi-devs / lgi-devs/lgi

having trouble with getting started and showing a window

Open
#340 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
491
Forks
81
PR merge metrics
No merged PRs in 30d

Description

I'm interested in lgi, and started following the overview, but none of these:

window.title = 'I am a window'
window:show_all()
window.title = window.title .. ' made by Lgi'

do anything and i get an error when i try window.has_resize_grip = true or print(window.style.resize_grip_height)

test.lua:

local lgi = require("lgi")

local Gtk = lgi.Gtk
local Gio = lgi.Gio
local GLib = lgi.GLib

local window = Gtk.Window()

window.title = "I am a window"
window:show_all()
window.title = window.title .. " made by Lgi"

window.has_resize_grip = true
print(window.style.resize_grip_height)

output:

~/coding/lgi_test » lua5.1 test.lua                                                                                                                                             mark@coollaptop
lua5.1: /usr/share/lua/5.1/lgi/override/Gtk.lua:87: bad argument #1 to 'format' (string expected, got nil)
stack traceback:
	[C]: in function 'format'
	/usr/share/lua/5.1/lgi/override/Gtk.lua:87: in function </usr/share/lua/5.1/lgi/override/Gtk.lua:83>
	test.lua:14: in main chunk
	[C]: ?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with docs/overview.md and reproduce the example using the test.lua snippet. Then inspect /usr/share/lua/5.1/lgi/override/Gtk.lua around line 87 and compare the reported property access with the documented API. Done means the getting-started example has a clear, working outcome and the reported error is addressed or documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.