Page 13 of 15
Posted: Tue Feb 24, 2004 4:20 pm
by RValois
Hi El_Choni,
Thanks for the fix, the recursive procedure is now generated correctly.
Put "src.pack" in the TailBite folder and click on the "Extract TailBite sources" button
I already tried that, for some reason only the
src dir is created but no sources. I'm using WinMe.
Thanks again,
RValois.
Posted: Tue Feb 24, 2004 4:35 pm
by El_Choni
Thanks, I'll check that.
Posted: Tue Feb 24, 2004 5:13 pm
by Dare2
El_Choni,
Thank you for this.
I know zero about building a PB library. I took a the code for dll I had written a while back, and "TailBit" it. Modded some program code to replace the callFunction xxx(n,args) with xxx(args). Ran it. And it worked.
I stand in awe.
Whilst I still know zero about building PB libraries, I now can build them. Or more accurately, I can give TailBite some code and it will build them.
Many, many thanks again.

Posted: Tue Feb 24, 2004 6:25 pm
by El_Choni
Thanks for all the feedback, it helps a lot.
Regards,
Posted: Tue Feb 24, 2004 7:33 pm
by El_Choni
Posted: Wed Feb 25, 2004 3:43 am
by ricardo
Hi El_Choni,
Im trying to make as small lib from a procedure i find here in the forums (cant remember who code it!

)
Code: Select all
ProcedureDLL.s xxGetWebPage(URL.s) ; Get a web Page
OpenType = 1
isLoop.b=1
INET_RELOAD.l = $80000000
hInet.l=0
hURL.l=0
Bytes.l=0
Buffer.s=Space(2048)
res.s=""
hInet = InternetOpen_("PB@INET", OpenType, #NULL, #NULL, 0)
hURL = InternetOpenUrl_(hInet, URL, #NULL, 0, INET_RELOAD, 0)
Repeat
Delay(0)
InternetReadFile_(hURL,@Buffer, Len(Buffer), @Bytes)
If Bytes = 0
isLoop=0
Else
Delay(0)
res = res + Left(Buffer, Bytes)
EndIf
Until isLoop=0
InternetCloseHandle_(hURL)
InternetCloseHandle_(hInet)
ProcedureReturn res
EndProcedure
Now, when the lib is mades, if i try to call it from a code i get an error telling this:
TBTemp\Function .text: undefined reference to 'GetWebPage_S2'
GetWebPage is the name of the lib.
What im doing wrong?
Posted: Wed Feb 25, 2004 2:24 pm
by El_Choni
You're doing fine, lol. It was a bug, TailBite took "PB@INET" for an API function. Fixed now, thanks a lot.
Posted: Wed Feb 25, 2004 2:40 pm
by einander
@El_Choni:
Thanks for TailBite! I'm amazed!
To make PB libs with TB is a breeze.
Nice!
Einander
_______
TailBite is a very powerful tool; will be good some place to upload libraries, where PB gurus can evaluate and comment them, because for sure in a few days everybody and his dog will be making his own libs.
Posted: Wed Feb 25, 2004 3:18 pm
by Dare2
einander wrote:.. because for sure in a few days everybody and his dog will be making his own libs
And we'll all calling our functions the same names. *Visualising 40,000 libraries with NOT() and SGN()*
Maybe we'll end up needing a standards committee

because TailBite just made it all too easy.
Posted: Wed Feb 25, 2004 3:44 pm
by Paul
That has already happened
Just convert the samples that come with TailBite and you will see they conflict with Danilo's TooBar lib.
With no set naming convention, there will be conflicting and broken libraries all over the place.
Posted: Wed Feb 25, 2004 3:57 pm
by El_Choni
Oops! I'll change that, thanks, Paul.
EDIT: Paul, I don't find the conflicting function, could you tell me which is it to change its name?
About a naming convention, it would be good. But I don't have any idea myself on how it should be done (I think this has been discussed before with no result?).
Posted: Wed Feb 25, 2004 4:21 pm
by Dare2
Bit of a tough one, that.
I think I'll make mine unique by starting with the letter "Y":
yNOT(

)
yTRY( :roll: )
yFRONT( 8O )
yBOTHER(zzZZzz)
[EDIT]
El Choni, I think there is a conflict with myPaintBoxGadget and the PureTools.
[/EDIT]
lol @ Iria (below) - but yNOT?
Nice work El_Choni
Posted: Wed Feb 25, 2004 4:23 pm
by Iria
First up, nice work on the old Tailbite
As for naming conventions, before you know it we'll be using namespace conventions
purebasic.tailbite.iria.libx.linux.say.hello.function
Seriously though it would be nice for some such explicit namespace definitions in PB
Ill keep watching this space until someone says Tailbite is good to go until then good luck everyone

Posted: Wed Feb 25, 2004 4:32 pm
by El_Choni
Yep, something like you say, but with underscores (no kidding). For example:
El_Choni_SQLite_MyFunction()
It looks ugly, but it avoids conflicts, doesn't it?
As for TailBite, I want to change the TBManager IDE a bit and, apart from bugs that will, of course, appear, it's almost ready to upload to Paul's and Andre's sites.
EDIT: I've reinstalled Danilo's PureTools and TBPro and compiled the MyPaintBoxGadget example, no conflicts. Just in case, I've changed a structure name in TB_GadgetExtension.res and suffixed all sample functions with EC_. Can somebody else check if it's ok now?
Posted: Wed Feb 25, 2004 7:25 pm
by Paul
The conflict is with your "myMDITest" example. You have a procedure called CreateTB(), which is also a command from the ToolbarPro library.
It's a good example of how easy it is to create libs and procedure that conflict
