Re: [twsocket] Error when building an answer page

2014-09-01 Thread RTT
On 01-Set-2014 17:48, Florian Hector wrote: Way cool, this finally worked. It works, but it's pretty inefficient code. I suppose you already have a tag=value list, with the values already converted to string, so you should have a look how the AnswerPage function works, and create your own Answ

Re: [twsocket] Error when building an answer page

2014-09-01 Thread Florian Hector
> Supposing you have a stringlist filled this way: > > TagValueList.Values['Date']:=DateToStr(Date); > TagValueList.Values['Time']:=TimeToStr(Time); > > You can convert this list to an array of TVarRec using this code: > > setlength(tags,TagValueList.count*2); > i:=0; > while i beg

Re: [twsocket] Error when building an answer page

2014-08-31 Thread RTT
On 31-Ago-2014 18:12, Florian Hector wrote: No luck with all sorts of ways. When I define the tags statically at design time and step through the code, the content of the variable TAGS is much different from when it is done at runtime. Supposing you have a stringlist filled this way: TagV

Re: [twsocket] Error when building an answer page

2014-08-31 Thread Florian Hector
> Tags[0]=Tag1 > Tags[1]=Value1 > Tags[2]=Tag2 > Tags[3]=Value2 No luck with all sorts of ways. When I define the tags statically at design time and step through the code, the content of the variable TAGS is much different from when it is done at runtime. > > Why do you need to build the tags d

Re: [twsocket] Error when building an answer page

2014-08-31 Thread RTT
On 31-Ago-2014 15:11, Florian Hector wrote: Would you have an example of how you assign a pair of values to this array of TVarRec. In pseudocode Tags[0]=Tag1 Tags[1]=Value1 Tags[2]=Tag2 Tags[3]=Value2 Why do you need to build the tags dynamically? -- To unsubscribe or change your settings for

Re: [twsocket] Error when building an answer page

2014-08-31 Thread Florian Hector
> That tags parameters needs to have an even number of elements ([Tag,Value]) > and to create that tags > parameter at runtime you have to use an *array of TVarRec* variable. Would you have an example of how you assign a pair of values to this array of TVarRec. Florian -- To unsubscribe or ch

Re: [twsocket] Error when building an answer page

2014-08-31 Thread RTT
On 31-Ago-2014 10:07, Florian Hector wrote: However, when I try to build the tags dynamically at runtime as string or stringlist That tags parameters needs to have an even number of elements ([Tag,Value]) and to create that tags parameter at runtime you have to use an *array of TVarRec* variab