Flype UserLibraries for PureBasic 4.0

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

*** NEW ***

SubSystem PostgreSQL 8.1.4 for PB4.0 - BETA STAGE.

see first post.
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
danraymond
User
User
Posts: 43
Joined: Wed Jun 28, 2006 6:02 am

email links in URL

Post by danraymond »

Flype I am usingyour richedit library to have clickable links in a notepad like app I am doing. Wonderfull stuff thank you.

I can get it to work beautifully with www.site.com links and also mailto:here@mail.com is there a work around to get just here@mail.com links recognised with out the mailto: so my users can cut and paste email addresses?

thanks

Dan Raymond
Xombie
Addict
Addict
Posts: 898
Joined: Thu Jul 01, 2004 2:51 am
Location: Tacoma, WA
Contact:

Post by Xombie »

It looks like I need to start getting into a little bit of database stuff. Do I have to install and run a MySQL/PostgreSQL server in order order to work with the two in PB? For example, if I want to write a simple database client and have some really small and simple database just sitting in the same directory as the program - can I read & write directly to that file? Or am I thinking too much in MS Access terms?

Oh and your libraries are great, Flype :)
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

can I read & write directly to that file? Or am I thinking too much in MS Access terms?
Yes you are :D
What you need is a local database such as Access (*.mdb) or SQLite (*.sdb). i'm making a subsystem for SQLite but PBOSL has its own which is very good.

But mysql & postgresql are client/server database which means you need a server installed.
On such install, database are used/called from a 'hostname' (or ip).
With access or sqlite, database are used/called from a file which is much more friendly for single/small app.

i use a lot mysql and recently postgresql for internal use in my company.
we have an IBM Server on which i installed datbases, and we have about 60 computers which are running pb apps all connected to the shared database. In this case, for example, SQLite isn't 'suitable'.

with SQLite you can share the file between several computers by opening this way '\\computer1\shared\client.sdb' but if users are modifying data at the same time it will be a big mess. But for single app is perfect :wink:
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Re: email links in URL

Post by Flype »

danraymond wrote:Flype I am usingyour richedit library to have clickable links in a notepad like app I am doing. Wonderfull stuff thank you.

I can get it to work beautifully with www.site.com links and also mailto:here@mail.com is there a work around to get just here@mail.com links recognised with out the mailto: so my users can cut and paste email addresses?

thanks

Dan Raymond
oups, didn't seen this one. no, sorry, i don't know how to do this.
i tried a bit but it seems not possible.
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
mskuma
Enthusiast
Enthusiast
Posts: 573
Joined: Sat Dec 03, 2005 1:31 am
Location: Australia

Post by mskuma »

Flype wrote:SubSystem MySQL 5.1 for PB4.0 - BETA STAGE.

At the moment, in beta stage
Hi Flype, how stable/usable is this beta do you think? Sorry to ask, but I'm about to starting on a mySQL/PB project, and I was originally planning to do it with the PB ODBC but when I saw this, I figured maybe this new subsystem might be a better approach. Would you mind explaining the advantage of using this subsystem over ODBC (or even over the mysql.dll)? I gather ODBC is 'slow' (and a recent coding questions topic indicated that 'using libmysql.dll is faster than ODBC' as reported by jqn), but in my case speed is not critical - functionality, stability and ease of programming are the main issues. Sorry, I'm kinda PB-db-programming illiterate, so your comment is most welcome. Thanks.
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

honestly,

i use mysql since 3 years using PB3.x/PB4.0 and ODBC.
and i can't say it is slow !
i must say it works, and it works very well.

just an example,
imagine you have dozen of computers and PB apps connected to a distant mysql server through ODBC.
when i restart the (distant) server, thanks ODBC i do not
lost my database connection in client apps. and that's very comfortable.

on the other hand,
i have to install on each computer (clients and server) the ODBC driver which need to be downloaded from mysql website :
http://www.mysql.com/products/connector/odbc/
and then configure connections by using 'odbcad32.exe' in a 'cmd' window.

here, the mysql subsytem is on VERY BETA STAGE, not really finished.
i wait for a TailBite update, and feedbacks.

I do not use it - in production at work - at the moment.

Maybe it is faster than odbc !
OK but the main goal of doing a subsystem is to make it easier for beginners to use the same commands set as the purebasic one.
And it's easier to configure because you do not need to install/config the odbc specific driver.

I think that the provided SubSystem is really usable !
I can't promise it to be perfect because i still need feedbacks
but all my (home) tests are OK.
You must know - before using it - that it is not unicode/threadsafe ready.
Also, there might be some missing 'last error message'...

All you need is to run the examples, and you will see some good stuff in it.

The subsystem is a simple 'includefile' which is easy to use.
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

mskuma wrote:Sorry to ask, but I'm about to starting on a mySQL/PB project, and I was originally planning to do it with the PB ODBC but when I saw this, I figured maybe this new subsystem might be a better approach.
do not forget that using pb commands or the subsystem
should not change your programming approach.

you will have to use in both case InitDatabase(), OpenDatabase(), DatabaseQuery(), DatabaseError(), etc...

just try you will see.

with purebasic / odbc way, try to do a simple app with some sql queries (some insert, some select, some create statements).

then just include the mysql subsystem at the beginning of your source.
should work. one will need the odbc driver to work, one will need the dll to work.
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
Yogi Yang
Enthusiast
Enthusiast
Posts: 107
Joined: Sun Dec 11, 2005 2:19 pm

Post by Yogi Yang »

Flype wrote:Yes, isn't it... :D

Final objective is - once the model is validated - to do the same for PostGreSQL, SQLite, FireBird, And so on...
I am waiting impatiently for FireBird lib in PureBasic.

please make haste as I would like to test how fast and easily will Firebird would work with PB. :?
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

Hello,

i'm interested in having contact with firebird users (i have no one at the moment).

i mainly use MySQL and i do not know well FireBird.

but well, i've made an include file for 'FireBird', i've done so few test then i can't say if it works well. Can you test for me ?


Include file for use with FireBird 2.0 (181 Ko)

http://www.firebirdsql.org/
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
Yogi Yang
Enthusiast
Enthusiast
Posts: 107
Joined: Sun Dec 11, 2005 2:19 pm

Post by Yogi Yang »

Flype wrote:Hello,

i'm interested in having contact with firebird users (i have no one at the moment).

but well, i've made an include file for 'FireBird', i've done so few test then i can't say if it works well. Can you test for me ?


Include file for use with FireBird 2.0 (181 Ko)

http://www.firebirdsql.org/
Thanks for the Include File.

I do not use PureBasic for commercial develeopment yet. But I am learning and planing to switch to PB.

Currently I use VB and FieBird Embeded from for my development.

I would like to test and give you feed back on your include file but I can't as I am yet a toddler (crawling) in PB.

Give me some time and I will give you feedback on your Include file.

Thanks again.
User avatar
kenmo
Addict
Addict
Posts: 2033
Joined: Tue Dec 23, 2003 3:54 am

Post by kenmo »

Rather late, but I just bought a USB gamepad today, and THANK YOU FLYPE for the awesome and simple to use JoystickEx lib. Hopefully you'll see a gamepad-based game from me sometime soon, so expect to be credited!
yabune
User
User
Posts: 65
Joined: Mon Aug 22, 2005 2:31 pm

Post by yabune »

I tried to compile the rmchart example you've included but I get this error in rmchart.pbi:

Code: Select all

Line 874: With 'EnableExplicit', variables have to be declared: __RMCHART__
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

so you have PB4.01 :wink:

just have a look here :
http://www.purebasic.fr/english/viewtop ... highlight=

will be fixed with PB4.02.
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
yabune
User
User
Posts: 65
Joined: Mon Aug 22, 2005 2:31 pm

Post by yabune »

Flype wrote:so you have PB4.01 :wink:

just have a look here :
http://www.purebasic.fr/english/viewtop ... highlight=

will be fixed with PB4.02.
ok, thanks :)
Post Reply