TailBite 1.0 Preview, soon in PureProject and PureArea

TailBite specific forum

Moderators: gnozal, ABBKlaus, lexvictory

gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post by gnozal »

I have a wish.
Could you add a /THRD flag to TailBite.exe, so we can compile our libs in threadsafe mode ?
I suggest :
TAILBITE.PB

Code: Select all

...
; gnozal
Global UseThreadOption
;
...
ForEach Parameter()
  Select UCase(Left(Parameter(), 5))
    ; gnozal
    Case "/THRD"
      UseThreadOption = 1
    ;
    Case "/ASKD"
      AskDelete = 1
...
PBCOMPILE.PB

Code: Select all

Procedure PBCompile(ThisFile$, ExeName$, Extra$, Icon, DelFolder$, fatal)
...
  If Icon
    CmdLine$+" /ICON "+q+GetPathPart(ThisFile$)+"Windows.ico"+q
  EndIf
  
  ; gnozal
  If UseThreadOption
    CmdLine$+" /THREAD"
  EndIf
  ;
...
So we can compile a standard and a threadsafe version of our libs and use them together via the subsystems. It seems to work well : http://www.purebasic.fr/english/viewtopic.php?t=22347
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
rob6523
User
User
Posts: 59
Joined: Sat Sep 25, 2004 2:02 pm
Location: Netherlands (Ophemert)
Contact:

Post by rob6523 »

@El_Choni,

If there is anything this great PB community can help you with PLEASE let us know.
I'm sure that even on your great Tailbyte program some genious minds of this community can help you solve the problem you're facing right now.

You're so good sharing Tailbyte with us, let us share our mindpower with you to solve any problem...

Regards,
Rob.
va!n
Addict
Addict
Posts: 1104
Joined: Wed Apr 20, 2005 12:48 pm

Post by va!n »

@El Choni:
Version: 1.3 PR 1.8 Date: May 29th 2006 seems to be the latest public version, right? Is or will there be any new fixed version soon? Because i have a lot sources they may not tailibited :( Would be nice if you can tell the comunity about future plans/updates ^^

If you need, i can send you the "routines" that may not work with tailibite. have a nice day
va!n aka Thorsten

Intel i7-980X Extreme Edition, 12 GB DDR3, Radeon 5870 2GB, Windows7 x64,
nicolaus
Enthusiast
Enthusiast
Posts: 456
Joined: Tue Aug 05, 2003 11:30 pm
Contact:

Post by nicolaus »

@El Choni

If i use the functions TB_UsedWindow() or so from TailBite i have all times errors like this:
"POLINK: fatal errors: 3 unresolved external(s)"

Is it true taht you work on a update?

THX,
Nico
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

@nicolaus
nicolaus wrote: If i use the functions TB_UsedWindow()
you can use this:

Code: Select all

Procedure GetGadgetParent()
  !EXTRN _PB_Object_GetThreadMemory@4
  !EXTRN _PB_Gadget_Globals
  !MOV   Eax,[_PB_Gadget_Globals]
  !push  eax
  !call  _PB_Object_GetThreadMemory@4
  !MOV   Eax,[Eax]
  ProcedureReturn
EndProcedure
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
nicolaus
Enthusiast
Enthusiast
Posts: 456
Joined: Tue Aug 05, 2003 11:30 pm
Contact:

Post by nicolaus »

@ts-soft

Danke dir erstmal jedoch hat sich nix geändert.
Ich benutze aber noch mehr von den TB-Funktionen wie z.b. TB_SetGadget() oder die strukture TB_GadgetVT.

Wenn ich alle TB-Funktionen aus dem code nehme erstellt tailbit die lib jedoch gehts sie ja dann nit ;-(
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

You can use CreateGadget from PBOSL :wink:
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

Don't if it was already reported but there's a bug here :

Code: Select all

TB_DebugError(#LIB_MSG_NOT_INITIALIZED) 
Compiler complains :
Bad parameter type, number expected instead of string
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
Shannara
Addict
Addict
Posts: 1808
Joined: Thu Oct 30, 2003 11:19 pm
Location: Emerald Cove, Unformed

Post by Shannara »

Any news on a working update?
User avatar
Falko
Enthusiast
Enthusiast
Posts: 271
Joined: Sat Oct 04, 2003 12:57 pm
Location: Germany
Contact:

PB4 and return Strings?

Post by Falko »

Sorry, is it a Bug or a Future?

The following source shold be a lib. There are global variables in it:

Code: Select all

; Globalisierungen
 Global MeinString.s
 Global MeinLong.l
 MeinString=Space(255)
ProcedureDLL.l Mul(a.l,b.l)
  Shared MeinString
  MeinLong=a*b
  If MeinLong <=0
    MeinString="Du solltest Werte größer als Null eingeben"
  Else
    MeinString="Du hast alles richtig gemacht"
  EndIf
  ProcedureReturn MeinLong
EndProcedure

ProcedureDLL.s RetErr()
 ProcedureReturn MeinString 
EndProcedure
and this source i do testing this lib:

Code: Select all

Debug   Mul(200,200)
Debug RetErr()
Debug"----------------------------------------"

Debug Mul(0,0)
Debug RetErr()
but the strings, returns following:
PB4-Debug wrote:40000
???4??????????t
----------------------------------------
0
?????4????????????????5?????????????
Regards, Falko
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

your code runs, but only in ascii - mode, tailbite doesn't support unicode in the moment!

This works:

Code: Select all

; Globalisierungen
 Global MeinString.s
 Global MeinLong.l
ProcedureDLL.l Mul(a.l,b.l)
  Shared MeinString
  MeinLong=a*b
  If MeinLong <=0
    MeinString="Du solltest Werte größer als Null eingeben"
  Else
    MeinString="Du hast alles richtig gemacht"
  EndIf
  ProcedureReturn MeinLong
EndProcedure

ProcedureDLL.s RetErr()
 ProcedureReturn MeinString
EndProcedure

ProcedureDLL.s RetErr_UNICODE()
 Protected MeinString_ascii.s = Space(255)
 PokeS(@MeinString_ascii, MeinString, #PB_Any, #PB_Unicode)
 ProcedureReturn MeinString_ascii
EndProcedure
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
Falko
Enthusiast
Enthusiast
Posts: 271
Joined: Sat Oct 04, 2003 12:57 pm
Location: Germany
Contact:

Post by Falko »

Wow, it was unicode marked in my compiler changes.
Thank's TS :)

Regards Falko
User avatar
Progi1984
Addict
Addict
Posts: 806
Joined: Fri Feb 25, 2005 1:01 am
Location: France > Rennes
Contact:

Post by Progi1984 »

Excuse me : I have a question...

How can i use a linked list (of string) by example in parameter... ?

Because if we use this code

Code: Select all

;--- The userlib
ProcedureDLL MaFonction(truc.l, Param.s())
  Debug truc
  ForEach Param()
    MessageRequester("", Param())
  Next
EndProcedure
We compile thee userlib

Code: Select all

;--- The code
NewList Linked.s()
For i=0 To 10
  AddElement(Linked())
  Linked()= "----"+Str(i)+"----"
Next
MaFonction(7,Linked())
That doesn't run...
The error : "Ligne 8 : Bad Parameter type, number expected instead of string"
In the status bar : "MaFonction(truc.l, Param.s()"
Last edited by Progi1984 on Mon Aug 14, 2006 2:41 pm, edited 1 time in total.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

Progi1984 wrote:Excuse me : I have a question...

How can i use a linked list (of string) by example in parameter... ?
Use
"%FILE" "%TEMPFILE" /KEEPSRCFILES /WRITEBATCH
as parameter for TailBite.
Change the type from Long to LinkedList
ReCreate the lib.
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
Progi1984
Addict
Addict
Posts: 806
Joined: Fri Feb 25, 2005 1:01 am
Location: France > Rennes
Contact:

Post by Progi1984 »

That doesn't run....

And i want to use a linked list of string like in my example !
Post Reply