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 Tue 30 Sep 2014, 18:36
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
gtkbasic-0.0.2
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 3 of 6 [78 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6 Next
Author Message
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Wed 23 May 2007, 18:21    Post subject: A mouse bug with gtkbasic002?
Subject description: Double entry
 

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.
Back to top
View user's profile Send private message 
MU


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

PostPosted: Wed 23 May 2007, 18:37    Post subject:  

This is a bug in JWM I think.
Look at calc.pb

You see:
Code:
    if event = "GDK_BUTTON_RELEASE" or event = "GDK_BUTTON_PRESS" then


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:

Code:
    if event = "GDK_BUTTON_PRESS" then


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" Wink

This button-issue has high priority, as it is essential.

Mark
Back to top
View user's profile Send private message Visit poster's website 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Wed 23 May 2007, 18:49    Post subject: Thanks for clarification!
Subject description: Calc now works fine in IceWM
 

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
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5032
Location: Arizona, U.S.A.

PostPosted: Thu 24 May 2007, 04:13    Post subject:  

Hey Mark; I installed GTKbasic-002 in Puppy216 & I get this error with the filechooser demo:
Argument count mismatch!

It installed with no errors... was there something I missed? (probably)
I haven't followed this thread closely... Terry
Back to top
View user's profile Send private message 
MU


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

PostPosted: Thu 24 May 2007, 04:17    Post subject:  

The error is intended, it is an error-dialog I added.
After this message, you should see several fileselectiondialogs.
The error-message is just a custom dialog to show, that the fileselector checks, if it is called correctly.

Maybe a bit confusing, I should add a message that explains that Wink

Mark
Back to top
View user's profile Send private message Visit poster's website 
vovchik


Joined: 23 Oct 2006
Posts: 1285
Location: Ukraine

PostPosted: Thu 24 May 2007, 07:18    Post subject: Calc variation
Subject description: Learning gtkbasic
 

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
calc2.zip
Description 
zip

 Download 
Filename  calc2.zip 
Filesize  887 Bytes 
Downloaded  551 Time(s) 
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5032
Location: Arizona, U.S.A.

PostPosted: Thu 24 May 2007, 14:52    Post subject:  

Your right as usual, the file browser ran properly.

I'm fixing a few of my posted apps., but I'll let you know how I do with it.
I already have a few ideas for guis to try making with it... Terry

Good work vovchik, we need more coders to fill in the gaps!
Back to top
View user's profile Send private message 
MU


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

PostPosted: Thu 07 Jun 2007, 00:48    Post subject:  

I updated the archives.

The buttons now seem to work in JWM and Icewm, using

Code:
    if event = "GDK_BUTTON_RELEASE"  then


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
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: Thu 07 Jun 2007, 12:53    Post subject:  

Smile 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

Smile

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


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

PostPosted: Thu 07 Jun 2007, 13:10    Post subject:  

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 Smile
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 Razz Very Happy

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/glib/glib-Threads.html#GStaticMutex
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:
    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);

 


Here I surrounded the call of a Gtk-function with this mutex-code, what prevents the xlib-sync errors.

Mark
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: Thu 07 Jun 2007, 14:39    Post subject:  

MU wrote:

Logo? Ok, I'm curious Smile
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 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)

However I am not familiar with any existing logo?

you mean this?


OK I am on it . . .

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


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

PostPosted: Thu 07 Jun 2007, 14:55    Post subject:  

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 Smile
Mark
GtkBasic.png
 Description   
 Filesize   3.28 KB
 Viewed   798 Time(s)

GtkBasic.png

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: Thu 07 Jun 2007, 15:34    Post subject:  


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


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

PostPosted: Thu 07 Jun 2007, 15:45    Post subject:  

hey, looks great Smile

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 Very Happy
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
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: Thu 07 Jun 2007, 17:39    Post subject:  

Glad you like it - modify any way that suits Smile
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.

Smile

_________________
Puppy WIKI
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 3 of 6 [78 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6 Next
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.0854s ][ Queries: 12 (0.0050s) ][ GZIP on ]