Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 21 Nov 2014, 08:31
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Freebasic + Glade
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [5 Posts]  
Author Message
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Fri 20 Jun 2008, 06:05    Post subject:  Freebasic + Glade
Subject description: More cructacean programming mayhem
 

I am putting together this info on using FreeBasic and Glade Smile
http://tmxxine.com/wik/wikka.php?wakka=FreeBasic

    FreeBasic working
    Glade working


Now I get this . . .

Code:
# glade2bas           

(<unknown>:27288): libglade-WARNING **: could not find glade file '/root/my-documents/glade2bas.glade'

(<unknown>:27288): libglade-CRITICAL **: glade_xml_get_widget: assertion `self != NULL' failed

(<unknown>:27288): libglade-CRITICAL **: glade_xml_get_widget: assertion `self != NULL' failed
Segmentation fault
#


What does it mean?
Is there any hope?
HELP! Confused

_________________
Puppy WIKI
Back to top
View user's profile Send private message Visit poster's website 
MU


Joined: 24 Aug 2005
Posts: 13644
Location: Karlsruhe, Germany

PostPosted: Fri 20 Jun 2008, 07:50    Post subject:  

I think glade2bas is outdated and will not work with new versions of Glade, if I remember well.

You can do this:

freebasic has an example folder.
FreeBASIC/examples/libraries/Gtk/

I use Puppy3 with FreeBASIC-v0.18.3b-linux.tar.gz from the freebasic-website, so I don't know, if they are included in Puppy 4.

So I do:

cd FreeBASIC/examples/libraries/Gtk/
fbc glade_gui.bas
./glade_gui

That compiles and runs a program.
The program displays some elements in a window, that are loaded from glade_gui.xml.
This is a file created with Glade.
You cannot open this file in Glade 3, but that is no problem, as we can use a new one.

Now for tests, I create a subfolder "1".
I copy there glade_gui.bas and glade_gui.
I run glade (3.0.3), create a new window with some buttons.
I save that file as /root/project.glade.
Now I copy this file to FreeBASIC/examples/libraries/Gtk/1/glade_gui.xml

Then I type:
cd FreeBASIC/examples/libraries/Gtk/1/
./glade_gui

Now my new window is displayed, instead of the Glade-example.

The buttons do not react, and I must exit it by pressing CTRL-C in the consolewindow.
The reason is, that the buttons have different names than in the Glade-example xml file.
So I now had to edit glade_gui.bas to rename the example-functions, where a button is pressed.
You can open glade_gui.xml in a texteditor, to see the names (or look them up in the properties dialog in Glade).

Mark

_________________
my recommended links
Back to top
View user's profile Send private message Visit poster's website 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Fri 20 Jun 2008, 08:02    Post subject:  

Thanks Mark Wink

I just found this on Barrys blog
which means it is a known bug
that was? is? sorted?

Quote:
'glade2bas' is a GUI application for converting a .glade file into a skeleton freeBASIC program. It is in the devx_400.sfs file, however it was reported on the forum that it doesn't work -- its own glade2bas.glade file is missing.
I had to hack the source code, as it only looks for glade2bas.glade in the "current directory", which could be anything. I fixed it at /usr/bin/glade2bas.glade, so it is always found.

I have created a PET package 'glade2bas_DEV-1.0-patched1' rather than put it directly into the devx directory, as I'm gradually working toward Unleashed having all 'devx' components as individual PET packages. All chosen '_DEV' packages will end up in the 'devx' file.
Glade2bas also now has a menu entry, in the Utility menu. There is also a help file at /usr/share/doc/freebasic/howto_glade_freebasic.pdf.


I do not have glade2bas.glade anywhere on my system
. . . that might be the problem?

I am using Puppy 4 (two alphas not yet working on my hardware . . .)
so may have to come back to this thread

Other advisement welcome . . .

_________________
Puppy WIKI
Back to top
View user's profile Send private message Visit poster's website 
MU


Joined: 24 Aug 2005
Posts: 13644
Location: Karlsruhe, Germany

PostPosted: Fri 20 Jun 2008, 08:18    Post subject:  

glade2bas.glade
Maybe that is the one, that you create yourself with glade for your program?
Mark

_________________
my recommended links
Back to top
View user's profile Send private message Visit poster's website 
Lobster
Official Crustacean


Joined: 04 May 2005
Posts: 15117
Location: Paradox Realm

PostPosted: Fri 20 Jun 2008, 08:26    Post subject:  

Laughing

Did think of that but was too obvious Embarassed

Will give it a go . . .
many thanks
. . . ah progress . . .

Code:

# glade2bas
Segmentation fault
#

_________________
Puppy WIKI
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [5 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0529s ][ Queries: 11 (0.0037s) ][ GZIP on ]