PHP-GTK problem with GtkBuilder - php-gtk

Hello guys I am using Glade 3.6.7 with PHP-GTK on Ubuntu lucid lynx to create some application. During experimenting I got an error when I use GtkBuilder as Project file format in glade when i tried to execute a very simple php script to make sure it works.
<?php
$glade = new GladeXML("test.glade");
Gtk::main();
?>
I got the following error
varoom#varoom-laptop:~/public_html/gtk$ php gtk.php
(gtk.php:4800): libglade-WARNING **: Expected <glade-interface>. Got <interface>.
(gtk.php:4800): libglade-WARNING **: did not finish in PARSER_FINISH state
PHP Fatal error: Uncaught exception 'PhpGtkConstructException' with message 'could not construct GladeXML object' in /home/varoom/public_html/gtk/gtk.php:3
Stack trace:
#0 /home/varoom/public_html/gtk/gtk.php(3): GladeXML->__construct('test.glade')
#1 {main}
thrown in /home/varoom/public_html/gtk/gtk.php on line 3
Please note that i removed some comments from the php file so line numbers are not reliable though i don't have any code rather than what i put here.
When I choose Libglade as project file format everything goes well and the test runs successfully but there are some widgets disabled like TextBuffer !
So how can I use GtkBuilder with the extra widgets right there ?

you should have to save your glade gui with the extension "libglade" in the save dialog - not all gtk builders have this function -> try out glade 3.8.5 !
greetz robert

Related

unable to open include file `test.inc` in sasm

I am using SASM on Ubuntu to try out some NASM assembler coding. To test my assembler code I have created a test file and saved it in the same directory as my .asm File, but when I try to debug it in SASM I am getting the following error:
unable to open include file test.inc
How can I solve this issue?
You can solve this issue by going to Options -> Build and then selecting the “Build in current directory” option in the SASM Program

Unable to compile first Haskell Programme in VSCode

I just installed Stack GHCI and Visual Studio Code in my Windows. And I was trying to build and run the first simple Haskell putStrln programme, but with a big compile fail.
In VS Code terminal, I entered:
PS C:\Users\rmili\Documents> stack new TryHaskell
And a new folder "TryHaskell" was created, with the automatically created files "Lib.hs" and "Main.hs"
I tried to build and run the hs files. But I encountered the following errors:
In a new terminal, after I entered PS C:\Users\rmili\Documents\TryHaskell> stack build, this will result in the following error:
Error Messages:
"'C:\Users\rmili\AppData\Local\Programs\stack\x86_64-windows\ghc-8.8.4\bin\ghc-pkg.exe'
exited with an error:
ghc-pkg.exe: hLock: permission denied (Access is denied.)
)"
At the top of Main.hs and Lib.hs, the lines module Main where and module Lib both have curly lines underneath, with error message:
readCreateProcess: stack "exec" "ghc" "--" "-rtsopts=ignore" "-outputdir" "C:\\Users\\rmili\\AppData\\Local\\Temp\\hie-bios-98c9848bfed41b00" "-o" "C:\\Users\\rmili\\AppData\\Local\\hie-bios\\wrapper-4da94d68375fab32d2147da1837e9611.exe" "C:\\Users\\rmili\\AppData\\Local\\hie-bios\\wrapper-4da94d68375fab32d2147da1837e9611.hs" (exit 1): failedcompiler
Peek Problem (Alt+F8)
No quick fixes available
My GHCI directory looks fine, as shown below:
UPDATE: It seemed that antivirus is the problem for me, as whenever I tried to build a new hs file, there will be a pop up from Norton, saying data protector has blocked an action by Haskell server. After I asked Norton to exclude specifically such action, I could successfully compile and run my hs files.
However, the problem is that the curly lines under "module Main where" and "module Lib" remain. How can I remove the curly lines and its associated error messages as shown in point 2) above?
Welcome to Haskell!
Unfortunately, it seems Haskell on Windows has various "permission denied" bugs. (https://gitlab.haskell.org/ghc/ghc/-/issues/2924). I have no direct workaround to suggest, other than make sure all software is up-to-date, try different configurations, and try and build using ghc directly without stack.
Other things to try include making sure you are running as Administrator, and disabling your antivirus.

Xpra Server HTML5- Start Menu Not working

I have been working through this issue for a few weeks now, Basically I have set up an xpra server on Ubuntu 16.04 (And have tried on Ubuntu 18.04 and RHEL 8.0.0 with the same results) and can get the server running an html5 output and view it successfully on my local machine.
But once I am viewing the local output, I cannot run any program from the "Start" menu in the system tray. The only issue I can figure out with regards to the bug tracking on the xpra site is that the xdg menu file appears to be missing. So when I run
python2 -c "from xdg.Menu import parse;parse()"
I get an error that:
File "/usr/lib/python2.7/dist-packages/xdg/Menu.py", line 570, in parse
raise ParsingError ('File not found', "/etc/xdg/menus/%s" % candidate)
xdg.Exceptions.ParsingError: ParsingError in file '/etc/xdg/menus/debian-menu.menu', File not found
Which according to http://xpra.org/trac/ticket/2174?cversion=2&cnum_hist=4 is an error which sometimes occurs with XDG. I can't figure out how to fix this with any of the steps they outlined and am not even certain that this is whats causing the problem.
Below is a screencap of the system tray menu not opening as well.

Alloytools crashed and does not start anymore

I was changing the font of the Alloy-Tool editor and it crashed. Now I'm unable to launch it, returning this every time I try: screenshot of the problem
I've also tried to download different versions of alloy but each of them return the same error. Is there any way to modify some configuration file that they use at the startup?
I'm on Ubuntu 18.04
I found a solution:
modify this .xml file under your home directory
/.java/.userPrefs/edu/mit/csail/sdg/alloy4/pref.xml
with another font name at the entry
<entry key="FontName" value="FontNameHere"/>
Can you run it from the command line? If this error happens it should show an exception trace. Please report this trace on https://github.com/AlloyTools/org.alloytools.alloy/issues

Windows: Loading Haskell-Source-Code into ghci

I am a newbie to Haskell and my problem is probably very trivial, yet I do not know how to solve it.
I created a minimal source code (for faculty, as in the tutorial) with the Editor in Windows 7, then saved it as "test.hs" . Now if I try to load the file into the Haskell interpreter (ghci), then it will give me the following error message:
: can't find file S:\Haskell-Code\test.hs
Failed. modules loaded: none.
I am sure that I am in the right directory, I also tried loading test (which gives me another error message telling me that it isn't a module), also renamed the file to just "test". Is there something I am missing?
Thanks in advance.
Can you start ghci (in the right directory) and then type
:!dir
Does it display the right directory?
Do you see the file test.hs?

Resources