FreeBASIC Extended Library Release 0.2.2

Headers, Bindings, Libraries for use with FreeBASIC, Please include example of use to help ensure they are tested and usable.
Post Reply
relsoft
Posts: 1767
Joined: May 27, 2005 10:34
Location: Philippines
Contact:

Post by relsoft »

Guys awesome lib!!!!

Nice demo@doc. :*)
notthecheatr
Posts: 1759
Joined: May 23, 2007 21:52
Location: Cut Bank, MT
Contact:

Post by notthecheatr »

I'm going through the demos to get a feel for what ext can do... thought I'd let you know there's a few bugs (or apparent bugs, anyways) that I've found:

-/bits/holder_example - This appears to be an ELF file, but I'm not able to execute it even if I rename it to .EXE. There is no code included, nor any file that can actually be executed.
-/graphics/manip_test.bas: is supposed to change all the pink pixels to yellow, but the very top row of pixels remains unchanged. Is this a bug or a feature?
-/sort/bubble.bas: Won't compile because line 21 (which contains a preprocessor macro, I'm not sure what it expands to) contains an error.
sir_mud
Posts: 1402
Joined: Jul 29, 2006 3:00
Location: A van down by the river
Contact:

Post by sir_mud »

the change_color function used in the manip_test example has a fbgfx draw string font compatibility option which it demonstrates there, the bubble sort macros have been fixed in svn, and oops, didn't know i left holder_example in the windows distro, it is an old example of bitarray that i forgot to delete.
DaveUnit
Posts: 239
Joined: Apr 20, 2006 15:47
Location: Central MA

Post by DaveUnit »

Does anyone care about the getTextWidth bug? I posted it awhile ago and no one seems to have noticed.
sir_mud
Posts: 1402
Joined: Jul 29, 2006 3:00
Location: A van down by the river
Contact:

Post by sir_mud »

sorry, i have looked at it, still trying to get that one sorted out.

*edit*
My original testing version did work before i added it and it used the same font, i'll have to compare it to the library version i guess.
Last edited by sir_mud on Jan 24, 2008 2:22, edited 1 time in total.
DaveUnit
Posts: 239
Joined: Apr 20, 2006 15:47
Location: Central MA

Post by DaveUnit »

oh, alright. As long as it is acknowledged! :)
notthecheatr
Posts: 1759
Joined: May 23, 2007 21:52
Location: Cut Bank, MT
Contact:

Post by notthecheatr »

@DaveUnit:
getTextWidth seems right to me - I even tried it since you mentioned it earlier. The number returned is 292, and checking it in mspaint it's 294 pixels wide including the box around it. Are you sure it's wrong?
DaveUnit
Posts: 239
Joined: Apr 20, 2006 15:47
Location: Central MA

Post by DaveUnit »

I guess I could be using it wrong... but every time I use it I always get a wrong value.

edit: I FOUND THE PROBLEM

if you change:

Code: Select all

if gfx.font.loadttf("Vera.ttf", 32, 128, 40, ,mylargefont) then
to:

Code: Select all

if gfx.font.loadttf("Vera.ttf", 1, 128, 40, ,mylargefont) then
it will return the correct value!

What's being changed is the font's start character and end character.
getTextWidth is only working when the starting character is 1.
sir_mud
Posts: 1402
Joined: Jul 29, 2006 3:00
Location: A van down by the river
Contact:

Post by sir_mud »

hmm, i thought i had accounted for that, but apparently not, I'll get that fixed in SVN asap
syn9
Posts: 188
Joined: May 27, 2005 17:11
Contact:

Post by syn9 »

hey sir_mud. do you have an email address i could contact you at? thanks.
notthecheatr
Posts: 1759
Joined: May 23, 2007 21:52
Location: Cut Bank, MT
Contact:

Post by notthecheatr »

Some questions:

-How do I get the latest SVN version? (I assume it's not the one linked to at http://code.google.com/p/fb-extended-lib/ is not it, since that's 0.2.1 and I already have that. Unless you just didn't update the text...)
-How would one add some code to the library? Just post it here, and you'll add it, or something else?
-Are there some conventions for how any code to be added to the library should be written? Since this is an open-source community-maintained project it would be well to set down some conventions in stone so you don't have completely different-looking code in different places. After all, this library is a major library, and you want it as consistent and professional as possible.

I ask because I'm becoming more interested in this library and I'm considering adding some things to the library that might be nice.
stylin
Posts: 1253
Joined: Nov 06, 2005 5:19

Post by stylin »

The latest development code can be viewed online or checked out here via svn:
http://fb-extended-lib.googlecode.com/svn/trunk

We've also set up a developer wiki for those willing to contribute. It contains some information on coding guidelines and practices, and can be found here:
http://hmcsoft.org/ext/wiki/doku.php

There isn't much there at the moment, so the best thing to do is probably dig into the source code and see what's going on there, as it does follow various conventions--they just aren't fully documented at this time.

If you'd like to add to the project, the easiest thing to do would be to check out the latest source, add your source code and create a patch, which can then be applied later after the developers review it. It would probably not be a good idea to post source code or patches here. Users are encouraged to join our mailing group, to keep up on latest news, talk about known or recent issues with the library, etc.:
http://groups.google.com/group/fb-ext-lib

Keep in mind that all source code must fall under and/or be compatible with our BSD-style license, which can be read here:
http://hmcsoft.org/ext/wiki/doku.php/bsdlicense

edit: Also, IMO, any and all source code being submitted should come with appropriate documentation in any headers you may have--we use NaturalDocs, it's very easy to add documentation, just follow the existing source code.

edit2: Btw, we do have an IRC presence for a little more direct contact with the developers and other contributors/users in #freebasic-ext on FreeNode. You can usually find at least one of the developers lurking there:
irc.freenode.net
notthecheatr
Posts: 1759
Joined: May 23, 2007 21:52
Location: Cut Bank, MT
Contact:

Post by notthecheatr »

How often are regular releases made? I don't really know how to use SVN, and I don't want to have to go through and download each and every one of the source files there :P
stylin
Posts: 1253
Joined: Nov 06, 2005 5:19

Post by stylin »

notthecheatr, we don't really have any kind of release schedule; the code has been changing so quickly this past year--fixing things, reorganizing, name changes, etc.--that I wouldn't necessarily trust a release to add code with. The library is very violatile right now, we're still trying to decide the best way to do certain parts (particularly the algorithms and generic containers, those probably won't be stable for some time..). But we've recently just made a few changes that will hopefully give users like you a much better foundation for adding standalone "mini-libs" to the library.

I would recommend to use TortoiseSVN; it's what I use and it makes things very easy (checking out source code, making patches, etc.). Spend just a little time in the manual and you should have all the info you need:
http://tortoisesvn.tigris.org/
sir_mud
Posts: 1402
Joined: Jul 29, 2006 3:00
Location: A van down by the river
Contact:

Post by sir_mud »

TortoiseSVN is good, i prefer RapidSVN: http://rapidsvn.tigris.org/ it has more of a explorer like interface and works great on win/lin and osx
Post Reply