Page 27 of 40

Posted: Sat Jun 17, 2006 8:01 pm
by ts-soft
In the moment, tailbite init all libs in ascii mode. Is there a change that this handles easier, and tailbite also init in unicode?

Posted: Sat Jun 17, 2006 8:28 pm
by El_Choni
Good point, I almost forgot that.

Posted: Wed Jun 21, 2006 12:14 pm
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

Posted: Sun Jun 25, 2006 6:36 pm
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.

Posted: Fri Jul 07, 2006 2:41 pm
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

Posted: Sun Jul 23, 2006 12:11 pm
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

Posted: Sun Jul 23, 2006 1:48 pm
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

Posted: Sun Jul 23, 2006 1:59 pm
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 ;-(

Posted: Sun Jul 23, 2006 2:52 pm
by ts-soft
You can use CreateGadget from PBOSL :wink:

Posted: Wed Jul 26, 2006 1:49 am
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

Posted: Thu Jul 27, 2006 8:23 pm
by Shannara
Any news on a working update?

PB4 and return Strings?

Posted: Thu Aug 03, 2006 12:44 am
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

Posted: Thu Aug 03, 2006 2:01 am
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

Posted: Thu Aug 03, 2006 11:12 am
by Falko
Wow, it was unicode marked in my compiler changes.
Thank's TS :)

Regards Falko

Posted: Mon Aug 14, 2006 8:13 am
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()"