GtkBasic 003e - small Basic interpreter/IDE - 3300 functions

Stuff that has yet to be sorted into a category.
Message
Author
User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#21 Post by MU »

might be a corrupted download.
Please try this mirror:

http://puppyfiles.ca/dotpupsde/puppy3/d ... ic-003.pup

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

2byte
Posts: 353
Joined: Mon 09 Oct 2006, 18:10

#22 Post by 2byte »

Mark,

Using the latest gtkbasic, downloaded last week, I encounter a glitch with clists. The program is a menu editor that uses two clists and reads the icons that match the menu and applications from the normal locations in puppy 4.0. I can drag & drop from one clist to the other ok but if I drag a file from rox the program crashes hard with [Internal error] Memory error (SIGSEGV). It seems to be related to the type of image used for the icons. To verify it I modified the demo that comes with gtkbasic so it uses a png instead of the xpm images and it crashed in the same way. That png was created with mtpaint. When I used another png selected at random it did not crash. Very strange. I seem to recall that the latest gtkbasic was modified for drag and drop with xfe. Could this glitch be related to that?

I would be interested in any suggested fixes that I could try here.

Vern

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#23 Post by MU »

Updated to 003d, compiled with less dependencies, tested in Puppy 4, Puppy 3, Puppy 2.12 (Muppy007), Muppy0084beta2.


You also need Puppybasic 2.6, as it includes an important function-library:
http://murga-linux.com/puppy/viewtopic.php?t=11090

I do not bundle both, as Puppybasic uses less memory, so it should be used for small scripts instead of Gtkbasic.

Clists now can return multiple selections:
alist = gtk_get_list_selections("mylist1")
this returns a list with the numbers of the selected rows.
There is no example available yet, it will come in the next update of the GtkBasic-Filer:
http://www.murga-linux.com/puppy/viewtopic.php?t=32575

Mark
Last edited by MU on Sun 31 Aug 2008, 13:23, edited 1 time in total.
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#24 Post by MU »

upgraded to version 003e

Changes:
- fixed handling of clists with multiple selections

- fixed errors with drag'n'drop in clists

- keypresses now are sent to the mainloop
(see the updated Textview demo for examplecode)

- xwin_readdir( thefolder , hidden )
thefolder isa fldername
hidden is 0 or 1

Example:

Code: Select all

#!/usr/bin/gtkbasic003


f="/root"

'f="/usr/lib"

a,b=xwin_readdir(f , "1")


for n=0 to count(a)-1
	print a[n]
	print b[n]
next

a,b=xwin_readdir(f , "0")

for n=0 to count(a)-1
	print a[n]
	print b[n]
next
this will print lines like:

Code: Select all

sphere.xpm
1072    6       /usr/local/GTB-Filer/resource/sphere.xpm        1       17.08.2008 01:49        0       0       root    root    rw-r--r--
spot
1024    2               3       18.08.2008 06:34        502     502     spot    spot    rwxr-xr-x
test
1024    2               5       30.08.2008 17:43        0       0       root    root    rwxr-xr-x
size
type (1=file, 2=dir, 3=char device, 4=blockdevice, 5=fifo, 6= broken link)
link target for links
link references
date time
uid
gid
user
group
permissions


It is pretty fast :)

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#25 Post by MU »

Updated 003e

Added this function:
gtk_clist_define_cols(2)

Use any number you like.
Run it before:
gtk_createobject("GtkBasicList" , "mylist1", "window1" , "scrolledwindow1")

Now that list has more than one title.
I realized this as optional function, to keep old code working.
You now should be able to use the standard functions, e.g. to set column titles.

If not, let me know.
I'm away from mnday to wednesday, so have no time to write an extended demo.

To find out, how you can get the result from multiple selected lines, plese examine Muppy-Filer 0.2:
http://murga-linux.com/puppy/viewtopic.php?t=32575

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#26 Post by MU »

I discovered and fixed a bug in GtkBasic 003e.

The new keyevents could override buttonpresses from the mouse.

Please download again.

Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#27 Post by HairyWill »

Mark, I'm just playing in puppy 4.1alpha7 and I have a problem with the multifilechooser

Code: Select all

# ./GBdialog-multifilechooser 'open file' '/usr/local/Gtkbasic-003/dialog-multifilechooser' '*' '1' '1'

(gtkbasic003:7724): GLib-GObject-WARNING **: gsignal.c:1669: signal `event' is invalid for instance `0x8d8eee0'
[Internal error]
Memory error (SIGSEGV)
gtk() in file "GBdialog-multifilechooser", line 115:
>               mylist = gtk("gtk_file_chooser_get_filenames" , chooser[mode] , 0,0,0,0,0)

# 
It crashes when I hit the Apply button.
I originally noticed this because GTB-StructrEd does not load files.
I have installed puppybasic-2.6.
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

User avatar
MU
Posts: 13649
Joined: Wed 24 Aug 2005, 16:52
Location: Karlsruhe, Germany
Contact:

#28 Post by MU »

I updated GtkBasic 003e.

It fixes a wrong variabledeclaration, that caused the filechooser to crash in Puppy4.

Thanks to Hairywill for his detailed report!
Mark
[url=http://murga-linux.com/puppy/viewtopic.php?p=173456#173456]my recommended links[/url]

Post Reply