I'm evaluating the trial version and looking at some examples, and I noticed that instead on having OnClick events (or OnMouseOver, or others) these examples work with Repeat-Until loops to wait for user input. At first sight I'd think this is a major disadvantage compared to some other languages (I have used RapidQ a lot), but I want to hear your opinion on this.
For example how would you deal with a Form with 20 buttons, changing the cursor whenever it's over a button. Is something like this as easy to do as with the OnMouseOver events that other languages have ?
Event driven code versus waiting for userinput
- tinman
- PureBasic Expert

- Posts: 1102
- Joined: Sat Apr 26, 2003 4:56 pm
- Location: Level 5 of Robot Hell
- Contact:
Re: Event driven code versus waiting for userinput
If you write all your code in procedures you can have the same style of handling events. So you write one procedure for each event of each gadget. The only difference is that you also have to write the code which catches the events and decides which procedure gets called.
In the other languages this event catching loop is hidden from you. But it works the same way.
In the other languages this event catching loop is hidden from you. But it works the same way.
If you paint your butt blue and glue the hole shut you just themed your ass but lost the functionality.
(WinXPhSP3 PB5.20b14)
(WinXPhSP3 PB5.20b14)
PureBasic catches all the events you list but just does it in a different way, there not wrapped up in 'cute' event handlers, you have to write the code to handle them yourself (which is not as bad as it sounds).
Also remember that when purchasing PB you get great support from all the guys here and from lead dev Fred.
Also regular updates are available in roughly about 2-3months intervals. Briefly looking at RapidQ it looks like it hasn't been updated for nearly 3 yrs (08.29.2000) ???
Also remember that when purchasing PB you get great support from all the guys here and from lead dev Fred.
Also regular updates are available in roughly about 2-3months intervals. Briefly looking at RapidQ it looks like it hasn't been updated for nearly 3 yrs (08.29.2000) ???
If you want the cute event handlers and stuff you can have it too!
Check out http://www.hellobasic.com/
Check out http://www.hellobasic.com/
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Well you should be fair enough to tell that this is only true if you know WindowsAPI and use the WindowCallback as a second Event Loop in addition to the NORMAL Event Loop. And mostly it's all WindowsAPI.Kale wrote:PureBasic catches all the events you list but just does it in a different way...
So if you don't know Windows API you have to learn.
BTW: All has be done by hand. Some people say this is an advantage, others say it's a disadvantage.
IMO there are no disadvantages to have the GUI events automated...
But people are still using it (although there will be no updates anymore, because the project is abandoned)Kale wrote: Also regular updates are available in roughly about 2-3months intervals. Briefly looking at RapidQ it looks like it hasn't been updated for nearly 3 yrs (08.29.2000) ???
RapidQ also has a Linux version that is AFAIK at the same function level as the Windows Version.
PureBasic has also a Linux Version but it's not at the same stage as the Windows Version - thats a fact!
So if you want to play with a programming language, you should know what you want/need and then figure out if it's available under that language. Also look at the core language itself - is it complete, will it ever be complete, and so forth.
I am to provide the public with beneficial shocks.
Alfred Hitshock
Re: Event driven code versus waiting for userinput
Yes but you have less worktinman wrote:If you write all your code in procedures you can have the same style of handling events. So you write one procedure for each event of each gadget. The only difference is that you also have to write the code which catches the events and decides which procedure gets called.
In the other languages this event catching loop is hidden from you. But it works the same way.
Imagine you have an GUI event handler that with one line of code you call the procedures for all your Gadgets (it could be 1000 - it wouldn't matter)
or you have to SELECT CASE 1000 Gadgets and call the procedures by hand.
I prefer the first method.
I am to provide the public with beneficial shocks.
Alfred Hitshock
Let's see... $59 for a compiler, libraries, editor, visual designer, and more.Karbon wrote:If you want the cute event handlers and stuff you can have it too!
Check out http://www.hellobasic.com/
For $39 you get another visual designer with different event handling...
(BTW it isn't released for the latest PureBasic version)
Hmm...
I am to provide the public with beneficial shocks.
Alfred Hitshock
Re: Event driven code versus waiting for userinput
Its not a disadvantage, its a great possibilitie.Grumble wrote: At first sight I'd think this is a major disadvantage compared to some other languages (I have used RapidQ a lot), but I want to hear your opinion on this.
As Fred says, you can do manyother things.
In fact, you have the control on everything. Try it and after a few weeks you will find that its the best approach because its open to you how to use it.
About lazy to code eventhandler, you can write your own app that does the job for you, its easy.
PureBasic is 'plastic', you can model it in many ways.
Rapid-Q is nice, but nothing to do with PureBasic. In a near future you will look back to Rapid-Q and notice many limitations that PB dosen't have.
ARGENTINA WORLD CHAMPION
fsw:
Hey man, don't shoot the messenger
There are a few more products out there like that too, I don't think that's the only one. Bounce around a little and maybe you'll find one more to your liking.
Personally I like the way PB works. Muuuuch more powerful IMHO.
There is always VB! *grin*
Hey man, don't shoot the messenger
There are a few more products out there like that too, I don't think that's the only one. Bounce around a little and maybe you'll find one more to your liking.
Personally I like the way PB works. Muuuuch more powerful IMHO.
There is always VB! *grin*
-Mitchell
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net
Check out kBilling for all your billing software needs!
http://www.k-billing.com
Code Signing / Authenticode Certificates (Get rid of those Unknown Publisher warnings!)
http://codesigning.ksoftware.net



