[Gambas-user] Programming beginner: first program won't run?
Doriano Blengino
doriano.blengino at ...1909...
Sun Apr 19 19:37:44 CEST 2009
phohammer ha scritto:
> Ok, I tried copying every thing over to my project from the "Object" example.
> I copied every single
> thing from the project tree. And I deleted all of my stuff from my project,
> essentially making an "Object" project
> of my own that I could edit. It still wouldn't run.
>
> I tried running the IDE from a terminal and there was no output into the
> terminal whether the project ran (with
> "Object") or it didn't (with mine).
>
> On the having qt on my system, I am not too sure but here is what I have
> installed that is qt related: http://www.nabble.com/file/p23124849/qt.png
> qt.png .
> I'm not sure how that could be a problem since I have seen a project run
> successfully on my system (the "Object" example.)
>
> I have a question here though, maybe this is my problem. What project type
> should I be using ( http://www.nabble.com/file/p23124849/whichtype.png
> whichtype.png )?
> I've been using the "Graphical Application" thus far.
>
I assume you have QT installed, because gambas would'nt work without.
Graphical application should be ok.
No compilation errors - ok.
Next, try to understand, when you press GO (F5?), if the program really
runs or not. While the program "seems" to run, you can confirm by using
a terminal and the ps(1) command: on my system turns out:
9612 ? S 0:02 gbr2 /usr/bin/gambas2
9619 ? S 0:00 /usr/bin/gbx2 -g -f
/root/programmi/gambas/prove/Parted --
You see "gbr2 ...gambas2", which is the IDE, and "gbx2 ...Parted" which
is the program.
If your program does'nt show, then it is not running - try to execute it
step by step to see if terminates instead of opening a window and
entering the idle loop.
If it runs, look in the taskbar, where you see open
windows/applications. If a button is there, then your program has an
open window somewhere outside the desktop (window manager issue). You
can try to pull it inside a desktop by using the contestual menu.
If the program runs, but no window is shown, check with "lsof -p
<your_program_pid>"; on my system, at the end, it shows:
gbx2 9619 root 21r REG 3,70 14625 35686
/usr/lib/gambas2/gb.qt.gambas
gbx2 9619 root 22r REG 3,70 1033214 35701
/usr/lib/gambas2/gb.form.gambas
showing the the program actually uses QT (and many more information).
There other tools to see if your program really opened a window, but
things get more complicated... it is easier to see what is wrong in the
source.
Anyway, make a source tarball (Project->Create->Source package -- or
something like that) and send the .tar.gz; this will let other users on
this list to examine your project to find something you missed.
Regards,
--
Doriano Blengino
"Listen twice before you speak.
This is why we have two ears, but only one mouth."
More information about the User
mailing list