gtkbasic-0.0.2
A mouse bug with gtkbasic002?
Dear Mark,
I don't know whether other users can replicate this "feature", but I get "11" entered into the demo calc program each time I press, ofr example, a single "1". Upon a mouse click, a single number appears in the input field. When I move the mouse away, and the number is still highlighted, a repeat of the original input takes place. I don't know whether that is a bug in the calc program itself (calc.pb), which i've not examined yet, or a general problem with mouse button handling in gtkbasic002.
Has anybody else experienced that same problem?
With kind regards,
Vovchik
PS. I just downloaded and tested the new version and the bug still seems to be there, if, indeed, it is in gtkbasic002 and not in calc.pb.
I don't know whether other users can replicate this "feature", but I get "11" entered into the demo calc program each time I press, ofr example, a single "1". Upon a mouse click, a single number appears in the input field. When I move the mouse away, and the number is still highlighted, a repeat of the original input takes place. I don't know whether that is a bug in the calc program itself (calc.pb), which i've not examined yet, or a general problem with mouse button handling in gtkbasic002.
Has anybody else experienced that same problem?
With kind regards,
Vovchik
PS. I just downloaded and tested the new version and the bug still seems to be there, if, indeed, it is in gtkbasic002 and not in calc.pb.
This is a bug in JWM I think.
Look at calc.pb
You see:
GDK_BUTTON_PRESS is a good signal, but captured by JWM.
With Icewm it works fine, if you have a different windowmanager than JWM, replace the line like this:
Now it works correct in Icewm, but not at all in JWM.
This issue currently is unresolved.
If I find time, I will write Joe Wing (JWM) to see, if he has an idea.
I also may try to modify the internal signal-handling.
If a "GDK_BUTTON_RELEASE" is detected, it might be catched, and instead a "GDK_BUTTON_PRESS" might be sent. But I'm not shure, if my knowledge is good enough to do that.,
I will try it next week, when I hopefully have more free evenings (no more dentist or Server-room upgrade at work or journey to Hamburg).
On wednesday I'll finally get 9 new teeth in my bottom jaw, at moment I have some made of plastic. Feel a bit like "Mr. Data"
This button-issue has high priority, as it is essential.
Mark
Look at calc.pb
You see:
Code: Select all
if event = "GDK_BUTTON_RELEASE" or event = "GDK_BUTTON_PRESS" then
With Icewm it works fine, if you have a different windowmanager than JWM, replace the line like this:
Code: Select all
if event = "GDK_BUTTON_PRESS" then
This issue currently is unresolved.
If I find time, I will write Joe Wing (JWM) to see, if he has an idea.
I also may try to modify the internal signal-handling.
If a "GDK_BUTTON_RELEASE" is detected, it might be catched, and instead a "GDK_BUTTON_PRESS" might be sent. But I'm not shure, if my knowledge is good enough to do that.,
I will try it next week, when I hopefully have more free evenings (no more dentist or Server-room upgrade at work or journey to Hamburg).
On wednesday I'll finally get 9 new teeth in my bottom jaw, at moment I have some made of plastic. Feel a bit like "Mr. Data"
This button-issue has high priority, as it is essential.
Mark
Thanks for clarification!
Dear Mark,
Thanks for the code snippet. Everything now works as it should in calc.pb under IceWM, which is my standard WM. JWM must have a bug related to mouse signal handling.
MfG,
Vovchik
Thanks for the code snippet. Everything now works as it should in calc.pb under IceWM, which is my standard WM. JWM must have a bug related to mouse signal handling.
MfG,
Vovchik
Calc variation
Dear Mark,
I took the liberty of restructuring the calc program so that I could myself get a better handle on gtkbasic. I am attaching it here as it might be useful for others on the forum. I also added a "divison by zero" check without which the program would bomb if "0" were the divisor. To run it, just click on it in rox (once it has been made executable).
With kind regards,
Vovchik
I took the liberty of restructuring the calc program so that I could myself get a better handle on gtkbasic. I am attaching it here as it might be useful for others on the forum. I also added a "divison by zero" check without which the program would bomb if "0" were the divisor. To run it, just click on it in rox (once it has been made executable).
With kind regards,
Vovchik
- Attachments
-
- calc2.zip
- (887 Bytes) Downloaded 671 times
I updated the archives.
The buttons now seem to work in JWM and Icewm, using
I modified this event, after it is detected, a gtk_widget_activate(GTK_WIDGET(widget) ); is executed internally.
This forces the window to continue without that you explicitly have to move the mouse.
The IDE-prototype still has the problem with xlib-sync errors, if you open more than one window simultaneously in a program.
I googled some more, again found hints about the Thread-handling of Gtk and Xlib. This will not be easy to solve.
Vovchick: thanks for your calc-rewrite.
Wanted to add it to the updated archive, but then found a bug in it inherited from mine. I just had time to update my code, will add yours to the next update. (Bug was: you just could type 1 digit of a number after you chose +-/*).
Mark
The buttons now seem to work in JWM and Icewm, using
Code: Select all
if event = "GDK_BUTTON_RELEASE" then
This forces the window to continue without that you explicitly have to move the mouse.
The IDE-prototype still has the problem with xlib-sync errors, if you open more than one window simultaneously in a program.
I googled some more, again found hints about the Thread-handling of Gtk and Xlib. This will not be easy to solve.
Vovchick: thanks for your calc-rewrite.
Wanted to add it to the updated archive, but then found a bug in it inherited from mine. I just had time to update my code, will add yours to the next update. (Bug was: you just could type 1 digit of a number after you chose +-/*).
Mark
- Lobster
- Official Crustacean
- Posts: 15522
- Joined: Wed 04 May 2005, 06:06
- Location: Paradox Realm
- Contact:
Moin Mark - actually afterMoin - sort of Guten Tag
anyway finally had a look at your innovations
calc worked OK - looking foward to the IDE (if that is possible)
The name "TuxBasic" is available - also you intend it to be a major component of Muppy? So MuppyBasic . . .
If you want to use PuppyBasic2 or GtkBasic as the name or whatever (let me know) and I can create a logo and wiki page and get some support going?
In fact I might create a page from the developing Prism Page at tmxxine
http://tmxxine.com/Wikka/wikka.php?wakka=RainbowPrism
anyway finally had a look at your innovations
calc worked OK - looking foward to the IDE (if that is possible)
The name "TuxBasic" is available - also you intend it to be a major component of Muppy? So MuppyBasic . . .
If you want to use PuppyBasic2 or GtkBasic as the name or whatever (let me know) and I can create a logo and wiki page and get some support going?
In fact I might create a page from the developing Prism Page at tmxxine
http://tmxxine.com/Wikka/wikka.php?wakka=RainbowPrism
I think there once was a Gtkbasic for Gtk1, but I found not much using google.
So I think it might be ok to stay with GtkBasic.
Logo? Ok, I'm curious
The current one is a mix of the wxWidgets-logo (mondrian, a painter , who painted such yellow white blue red paintings), and the Gtk-logo.
I used the wxLogo because I like it, and Gtkbasic derives of wxBasic.
Though it has no more "wx" left in it at all.
I updated the archives.
I now finally could fix those xlib-sync-errors
It was done by locking the functions that access Gtk-widgets, so that no other function can disturb our actions.
This is done using a "mutex", see:
http://developer.gnome.org/doc/API/2.0/ ... taticMutex
Was a bit hefty to finally find this solution, but the code itself is pretty simple.
So if someone reads this via google, e.g. if he looks for thread-errors in Python, he might have a look at the sourcecode:
Here I surrounded the call of a Gtk-function with this mutex-code, what prevents the xlib-sync errors.
Mark
So I think it might be ok to stay with GtkBasic.
Logo? Ok, I'm curious
The current one is a mix of the wxWidgets-logo (mondrian, a painter , who painted such yellow white blue red paintings), and the Gtk-logo.
I used the wxLogo because I like it, and Gtkbasic derives of wxBasic.
Though it has no more "wx" left in it at all.
I updated the archives.
I now finally could fix those xlib-sync-errors
It was done by locking the functions that access Gtk-widgets, so that no other function can disturb our actions.
This is done using a "mutex", see:
http://developer.gnome.org/doc/API/2.0/ ... taticMutex
Was a bit hefty to finally find this solution, but the code itself is pretty simple.
So if someone reads this via google, e.g. if he looks for thread-errors in Python, he might have a look at the sourcecode:
Code: Select all
static int current_number = 0;
static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
g_static_mutex_lock (&mutex);
GSList* thefilenames = gtk_file_chooser_get_filenames (GTK_FILE_CHOOSER (obj));
g_static_mutex_unlock (&mutex);
Mark
- Lobster
- Official Crustacean
- Posts: 15522
- Joined: Wed 04 May 2005, 06:06
- Location: Paradox Realm
- Contact:
I am familiar with Mondrian - they have some of his paintings in the Tate Gallery London and Apple had a special edition computer with his design (I think it was Apple)MU wrote: Logo? Ok, I'm curious
The current one is a mix of the wxWidgets-logo (mondrian, a painter , who painted such yellow white blue red paintings), and the Gtk-logo.
I used the wxLogo because I like it, and Gtkbasic derives of wxBasic.
Though it has no more "wx" left in it at all.
However I am not familiar with any existing logo?
you mean this?
OK I am on it . . .
There is an icon included in the dotpup, the larger original pictures are in the source.tgz (in /media).
I attach the current icon.
It was however just a quick solution to have something that fits more or less, so other suggestions are welcome
Mark
I attach the current icon.
It was however just a quick solution to have something that fits more or less, so other suggestions are welcome
Mark
- Attachments
-
- GtkBasic.png
- (3.28 KiB) Downloaded 1068 times
hey, looks great
I would reduce the bottom-part, so that the whole picture becomes a square (for the Desktop-Icon).
I think I will add it to the next update, good work, Lob
You did that with Xara?
Btw. I think of leaving germany, as I currently just earn 10 Euro/hour.
In London I found via web jobs for Perl-programmers, where I could get 3-6 times more.
So I'll start writing an english CV soon.
Would be nice to drink a coffee together after work, right?
Mark
I would reduce the bottom-part, so that the whole picture becomes a square (for the Desktop-Icon).
I think I will add it to the next update, good work, Lob
You did that with Xara?
Btw. I think of leaving germany, as I currently just earn 10 Euro/hour.
In London I found via web jobs for Perl-programmers, where I could get 3-6 times more.
So I'll start writing an english CV soon.
Would be nice to drink a coffee together after work, right?
Mark
- Lobster
- Official Crustacean
- Posts: 15522
- Joined: Wed 04 May 2005, 06:06
- Location: Paradox Realm
- Contact:
Glad you like it - modify any way that suits
Yes done in Xara
London is great but expensive to live in
Coffee would be great - you can get great coffee
BUT . . . years ago I was travelling by National Express coach from London, with my Spanish girlfriend and the hostess came along and asked if we wanted coffee . . . I declined and advised NOT to order 'coffee' - but she ordered . . .
"You have not drunk your coffee?" enquired the hostess collecting cups and litter
"That is not coffee!" she was informed with suitable disdain.
Yes done in Xara
London is great but expensive to live in
Coffee would be great - you can get great coffee
BUT . . . years ago I was travelling by National Express coach from London, with my Spanish girlfriend and the hostess came along and asked if we wanted coffee . . . I declined and advised NOT to order 'coffee' - but she ordered . . .
"You have not drunk your coffee?" enquired the hostess collecting cups and litter
"That is not coffee!" she was informed with suitable disdain.
Ok, I can ask my mum to send me instant coffee from germany
I updated:
http://dotpups.de/dotpups/Programming/Gtkbasic-002.pup
It now includes a *simple* IDE.
It might be unstable, I encountered Xlib-errors again, but more seldom now.
I however decided to release it, as it already might help to get started.
The IDE itself does not "save" files, it just uses leafpad and Glade.
So it is not so worse, if it should crash.
You currently can create new projects (a button or a calculator), run them, modify them, dotpup them.
Not much more yet, but I think for someone completely new it is hepfull to have everything available from one interface.
Here is a screenshot:
Limitations:
occasional crashes when the "new"-dialog opens.
The Textview crashes often, if the text you load contains ":".
For this reason I wrote a function as a workaround, that replaces ":" with "-->".
Very dirty, just to avoid crashes, until I found out what the heck is going on here.
Please see it still in Prototype-stadium, but now at least somewhat usable.
You can use xkill to delete crashed windows:
http://www.murga-linux.com/puppy/viewto ... ach&id=217
Mark
I updated:
http://dotpups.de/dotpups/Programming/Gtkbasic-002.pup
It now includes a *simple* IDE.
It might be unstable, I encountered Xlib-errors again, but more seldom now.
I however decided to release it, as it already might help to get started.
The IDE itself does not "save" files, it just uses leafpad and Glade.
So it is not so worse, if it should crash.
You currently can create new projects (a button or a calculator), run them, modify them, dotpup them.
Not much more yet, but I think for someone completely new it is hepfull to have everything available from one interface.
Here is a screenshot:
Limitations:
occasional crashes when the "new"-dialog opens.
The Textview crashes often, if the text you load contains ":".
For this reason I wrote a function as a workaround, that replaces ":" with "-->".
Very dirty, just to avoid crashes, until I found out what the heck is going on here.
Please see it still in Prototype-stadium, but now at least somewhat usable.
You can use xkill to delete crashed windows:
http://www.murga-linux.com/puppy/viewto ... ach&id=217
Mark