Livecode Builder -how t write to a file?

matthias_livecode_150811 at m-r-d.de matthias_livecode_150811 at m-r-d.de
Mon Aug 22 18:45:34 EDT 2022


Thanks Zryip,

i think that is a good workaround. ;)

Thanks.

Regards,
Matthias


> Am 22.08.2022 um 00:38 schrieb zryip theSlug via use-livecode <use-livecode at lists.runrev.com>:
> 
> Dear Matthias,
> 
> I do not have the answer but a possible workaround.
> 
> For debugging purposes I'm using the post message.
> 
> In LCB add this handler:
> private handler throwWidgetError(in pError as String) returns nothing
>  post "catchWidgetError" with [pError]
> end handler
> 
> Call it by using:
> throwWidgetError("Something to log")
> 
> And catch it by adding this handler into the card script where you test
> your widget:
> 
> *command* catchWidgetError pTheError
> *   put* pTheError & cr after msg
> *end* catchWidgetError
> 
> This might be verbose as the message box will take the focus, and the
> widget will refresh, so logging in a file instead of the message box would
> be a possibility.
> 
> *command* catchWidgetError pTheError
> *   write *pTheError to file "xxx"
> *end* catchWidgetError
> 
> On Sun, 21 Aug 2022 at 20:59, matthias rebbe via use-livecode <
> use-livecode at lists.runrev.com> wrote:
> 
>> Hi.
>> 
>> From time to time and when time allows i am trying to get used to with
>> Livecode Builder.
>> For debugging i would like my lcb script to write some debug code to a
>> file, but i really do not see how this can be done.
>> I found the experimental com.livecode.file module and the operator 'the
>> filecontents of file...', but unfortunately no script example.
>> 
>> Does anyone know, if and how i can write some data to an external file on
>> hard disk in LCB?
>> 
>> 
>> Regards,
>> Matthias
>> 
>> 
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
> 
> 
> -- 
> Zryip TheSlug
> http://www.aslugontheroad.com
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list