Timezone library - how to use in Livecode Server?

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Timezone library - how to use in Livecode Server?

Bob Sneidar via use-livecode
Hi,

i´ve just noticed that the new Timezone Library is not available under Livecode server. I´ve checked the Extension folder  of the desktop version of LC and  found an .lcb file, which means that the library was written in Livecode Builder.

Is there a way to use such libraries with Livecode Server? Or are LCB libraries not usable under LC server in general?

Regards,

Matthias
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Timezone library - how to use in Livecode Server?

Bob Sneidar via use-livecode
Hi Matthias,

loading extensions (.lcm files) works with LC server too.
Please see "load extension" in the dictionary.


Ralf


> On 5. Sep 2018, at 00:56, Matthias Rebbe via use-livecode <[hidden email]> wrote:
>
> Hi,
>
> i´ve just noticed that the new Timezone Library is not available under Livecode server. I´ve checked the Extension folder  of the desktop version of LC and  found an .lcb file, which means that the library was written in Livecode Builder.
>
> Is there a way to use such libraries with Livecode Server? Or are LCB libraries not usable under LC server in general?
>
> Regards,
>
> Matthias


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Timezone library - how to use in Livecode Server?

Bob Sneidar via use-livecode
Ralf,

thank you very much. It´s so easy if one knows how to do. ;)

Being able to use LCB built libraries extremely extends LC Server.

One question: Did you find out about that by your own or was it announced somewhere, maybe with additional useful information?

Regards,

Matthias



> Am 05.09.2018 um 09:51 schrieb Ralf Bitter via use-livecode <[hidden email]>:
>
> Hi Matthias,
>
> loading extensions (.lcm files) works with LC server too.
> Please see "load extension" in the dictionary.
>
>
> Ralf
>
>
>> On 5. Sep 2018, at 00:56, Matthias Rebbe via use-livecode <[hidden email]> wrote:
>>
>> Hi,
>>
>> i´ve just noticed that the new Timezone Library is not available under Livecode server. I´ve checked the Extension folder  of the desktop version of LC and  found an .lcb file, which means that the library was written in Livecode Builder.
>>
>> Is there a way to use such libraries with Livecode Server? Or are LCB libraries not usable under LC server in general?
>>
>> Regards,
>>
>> Matthias
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Timezone library - how to use in Livecode Server?

Bob Sneidar via use-livecode
Hm,

seems i was a little bit to quick with my answer.

Loading the .lcm and  “put timezones()” outputs all timezones.

But executing the following lines

load extension from file "./extensions/com.livecode.library.timezone/module.lcm"
put  the seconds into tDate
put FromUniversaltime(tDate, "Europe/Berlin") into tDate
convert tDate to dateItems
put tDate

returns these errors
file "/home/xxxxxxx/public_html/xxxxxx/tz.lc"
  row 4, col 5: extension: error occurred with domain (runtime)
  row 4, col 5: extension: error occurred with description (unable to load foreign library)
  row 4, col 5: extension: error occurred with file (timezone.lcb)
  row 4, col 5: extension: error occurred with line (62)
  row 4, col 5: extension: error occurred with column (1)
  row 4, col 5: extension: error occurred with file (timezone.lcb)
  row 4, col 5: extension: error occurred with line (737)
  row 4, col 5: extension: error occurred with column (1)
  row 4, col 5: Function: error in function handler (FromUniversaltime)
  row 4, col 5: put: error in expression

This works in LC IDE (w/o Line 1).


Regards,

Matthias

> Am 05.09.2018 um 10:07 schrieb Matthias Rebbe via use-livecode <[hidden email]>:
>
> Ralf,
>
> thank you very much. It´s so easy if one knows how to do. ;)
>
> Being able to use LCB built libraries extremely extends LC Server.
>
> One question: Did you find out about that by your own or was it announced somewhere, maybe with additional useful information?
>
> Regards,
>
> Matthias
>
>
>
>> Am 05.09.2018 um 09:51 schrieb Ralf Bitter via use-livecode <[hidden email]>:
>>
>> Hi Matthias,
>>
>> loading extensions (.lcm files) works with LC server too.
>> Please see "load extension" in the dictionary.
>>
>>
>> Ralf
>>
>>
>>> On 5. Sep 2018, at 00:56, Matthias Rebbe via use-livecode <[hidden email]> wrote:
>>>
>>> Hi,
>>>
>>> i´ve just noticed that the new Timezone Library is not available under Livecode server. I´ve checked the Extension folder  of the desktop version of LC and  found an .lcb file, which means that the library was written in Livecode Builder.
>>>
>>> Is there a way to use such libraries with Livecode Server? Or are LCB libraries not usable under LC server in general?
>>>
>>> Regards,
>>>
>>> Matthias
>>
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Timezone library - how to use in Livecode Server?

Bob Sneidar via use-livecode
Matthias,

in my understanding you need to add
the path to the resources where all the
zoneinfo is lacated using "with resource path".


Ralf


> On 5. Sep 2018, at 10:34, Matthias Rebbe via use-livecode <[hidden email]> wrote:
>
> Hm,
>
> seems i was a little bit to quick with my answer.
>
> Loading the .lcm and  “put timezones()” outputs all timezones.
>
> But executing the following lines
>
> load extension from file "./extensions/com.livecode.library.timezone/module.lcm"
> put  the seconds into tDate
> put FromUniversaltime(tDate, "Europe/Berlin") into tDate
> convert tDate to dateItems
> put tDate
>
> returns these errors
> file "/home/xxxxxxx/public_html/xxxxxx/tz.lc"
>  row 4, col 5: extension: error occurred with domain (runtime)
>  row 4, col 5: extension: error occurred with description (unable to load foreign library)
>  row 4, col 5: extension: error occurred with file (timezone.lcb)
>  row 4, col 5: extension: error occurred with line (62)
>  row 4, col 5: extension: error occurred with column (1)
>  row 4, col 5: extension: error occurred with file (timezone.lcb)
>  row 4, col 5: extension: error occurred with line (737)
>  row 4, col 5: extension: error occurred with column (1)
>  row 4, col 5: Function: error in function handler (FromUniversaltime)
>  row 4, col 5: put: error in expression
>
> This works in LC IDE (w/o Line 1).
>
>
> Regards,
>
> Matthias


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Timezone library - how to use in Livecode Server?

Bob Sneidar via use-livecode
In reply to this post by Bob Sneidar via use-livecode
Hmm... don't remember and don't have any further infos.


> On 5. Sep 2018, at 10:07, Matthias Rebbe via use-livecode <[hidden email]> wrote:
>
> One question: Did you find out about that by your own or was it announced somewhere, maybe with additional useful information?
>
> Regards,
>
> Matthias


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Timezone library - how to use in Livecode Server?

Bob Sneidar via use-livecode
In reply to this post by Bob Sneidar via use-livecode
Hi Matthias,

On 2018-09-05 10:34, Matthias Rebbe via use-livecode wrote:

> file "/home/xxxxxxx/public_html/xxxxxx/tz.lc"
>   row 4, col 5: extension: error occurred with domain (runtime)
>   row 4, col 5: extension: error occurred with description (unable to
> load foreign library)
>   row 4, col 5: extension: error occurred with file (timezone.lcb)
>   row 4, col 5: extension: error occurred with line (62)
>   row 4, col 5: extension: error occurred with column (1)
>   row 4, col 5: extension: error occurred with file (timezone.lcb)
>   row 4, col 5: extension: error occurred with line (737)
>   row 4, col 5: extension: error occurred with column (1)
>   row 4, col 5: Function: error in function handler (FromUniversaltime)
>   row 4, col 5: put: error in expression
>
> This works in LC IDE (w/o Line 1).

The IDE and standalone builder have an extra step which makes sure an
extension can find its code (shared library) resources. In this specific
case, before 'load extension' you need to do:

set the revLibraryMapping["tz"] to
"/home/ua829968/public_html/rebbe.tech/tz-test/extensions/com.livecode.library.timezone/code/x86_64-linux/tz.so"

(substitute x86_64-linux for x86-linux, if you are running on a 32-bit
host)

This tells the engine where to find the 'tz' library which is referenced
by the foreign handler bindings in the tz extension.

Warmest Regards,

Mark.

P.S. https://github.com/livecode/livecode/pull/6660

--
Mark Waddingham ~ [hidden email] ~ http://www.livecode.com/
LiveCode: Everyone can create apps

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Timezone library - how to use in Livecode Server?

Bob Sneidar via use-livecode
Thank you very much Mark.
With that addition it works now. The timezone library is a great enhancement for Livecode Server. No need to call external php code to do timezone conversions.

And thanks for the ps. I can´t wait for 9.1 to test. :)

Regards

Matthias




> Am 06.09.2018 um 11:57 schrieb Mark Waddingham via use-livecode <[hidden email]>:
>
> Hi Matthias,
>
> On 2018-09-05 10:34, Matthias Rebbe via use-livecode wrote:
>> file "/home/xxxxxxx/public_html/xxxxxx/tz.lc"
>>  row 4, col 5: extension: error occurred with domain (runtime)
>>  row 4, col 5: extension: error occurred with description (unable to
>> load foreign library)
>>  row 4, col 5: extension: error occurred with file (timezone.lcb)
>>  row 4, col 5: extension: error occurred with line (62)
>>  row 4, col 5: extension: error occurred with column (1)
>>  row 4, col 5: extension: error occurred with file (timezone.lcb)
>>  row 4, col 5: extension: error occurred with line (737)
>>  row 4, col 5: extension: error occurred with column (1)
>>  row 4, col 5: Function: error in function handler (FromUniversaltime)
>>  row 4, col 5: put: error in expression
>> This works in LC IDE (w/o Line 1).
>
> The IDE and standalone builder have an extra step which makes sure an extension can find its code (shared library) resources. In this specific case, before 'load extension' you need to do:
>
> set the revLibraryMapping["tz"] to "/home/ua829968/public_html/rebbe.tech/tz-test/extensions/com.livecode.library.timezone/code/x86_64-linux/tz.so"
>
> (substitute x86_64-linux for x86-linux, if you are running on a 32-bit host)
>
> This tells the engine where to find the 'tz' library which is referenced by the foreign handler bindings in the tz extension.
>
> Warmest Regards,
>
> Mark.
>
> P.S. https://github.com/livecode/livecode/pull/6660
>
> --
> Mark Waddingham ~ [hidden email] ~ http://www.livecode.com/
> LiveCode: Everyone can create apps
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Timezone library - how to use in Livecode Server?

Bob Sneidar via use-livecode
On Thu, Sep 6, 2018 at 5:55 AM Matthias Rebbe via use-livecode <
[hidden email]> wrote:

>
> And thanks for the ps. I can´t wait for 9.1 to test. :)
>
No need to wait. I downloaded the LCB file and built it in the extension
builder using 9.0. I just had to comment out the “resolve file” line which
that caused an error because it is new syntax. Other than that the
macStatusBar code works great in 9.0 and I have implemented it in an
application.

--
Trevor DeVore
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Timezone library - how to use in Livecode Server?

Bob Sneidar via use-livecode
Trevor, thanks for letting me know.

I am not very used with GitHub. Still learning how to organize my stuff.

So where do i find the .lcb file?

Regards,

Matthias


> Am 06.09.2018 um 13:18 schrieb Trevor DeVore via use-livecode <[hidden email] <mailto:[hidden email]>>:
>
> On Thu, Sep 6, 2018 at 5:55 AM Matthias Rebbe via use-livecode <
> [hidden email] <mailto:[hidden email]>> wrote:
>
>>
>> And thanks for the ps. I can´t wait for 9.1 to test. :)
>>
> No need to wait. I downloaded the LCB file and built it in the extension
> builder using 9.0. I just had to comment out the “resolve file” line which
> that caused an error because it is new syntax. Other than that the
> macStatusBar code works great in 9.0 and I have implemented it in an
> application.
>
> --
> Trevor DeVore
> _______________________________________________
> use-livecode mailing list
> [hidden email] <mailto:[hidden email]>
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

Matthias Rebbe
Tel +49 5741 310000
https://matthiasrebbe.eu <https://matthiasrebbe.eu/>‌

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Timezone library - how to use in Livecode Server?

Bob Sneidar via use-livecode
Hello Matthias,

In the PR Mark posted, click on the tab "Files Changed". Then scroll down
until you see the diffs for the macstatusmenu.lcb file. Click on the "View"
button for this file. Then click on "Raw". This should take you to this
page:

https://raw.githubusercontent.com/livecode/livecode/64d08e39ac161530cb62ac06e784ad3d5be8725e/extensions/libraries/macstatusmenu/macstatusmenu.lcb

Then just choose Save As .. etc

Best,
Panos
--

On Thu, Sep 6, 2018 at 3:27 PM Matthias Rebbe via use-livecode <
[hidden email]> wrote:

> Trevor, thanks for letting me know.
>
> I am not very used with GitHub. Still learning how to organize my stuff.
>
> So where do i find the .lcb file?
>
> Regards,
>
> Matthias
>
>
> > Am 06.09.2018 um 13:18 schrieb Trevor DeVore via use-livecode <
> [hidden email] <mailto:[hidden email]>>:
> >
> > On Thu, Sep 6, 2018 at 5:55 AM Matthias Rebbe via use-livecode <
> > [hidden email] <mailto:[hidden email]>>
> wrote:
> >
> >>
> >> And thanks for the ps. I can´t wait for 9.1 to test. :)
> >>
> > No need to wait. I downloaded the LCB file and built it in the extension
> > builder using 9.0. I just had to comment out the “resolve file” line
> which
> > that caused an error because it is new syntax. Other than that the
> > macStatusBar code works great in 9.0 and I have implemented it in an
> > application.
> >
> > --
> > Trevor DeVore
> > _______________________________________________
> > use-livecode mailing list
> > [hidden email] <mailto:[hidden email]>
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
> Matthias Rebbe
> Tel +49 5741 310000
> ‌https://matthiasrebbe.eu <https://matthiasrebbe.eu/>‌
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Timezone library - how to use in Livecode Server?

Bob Sneidar via use-livecode
In reply to this post by Bob Sneidar via use-livecode
Mark,


when using an other LCB library , where do i see what i have to enter in

set the revLibraryMapping[“?????? ”] …….

I cannot find any information about revLibraryMapping in the dictionary.

Regards,

Matthias



> Am 06.09.2018 um 12:54 schrieb Matthias Rebbe via use-livecode <[hidden email]>:
>
> Thank you very much Mark.
> With that addition it works now. The timezone library is a great enhancement for Livecode Server. No need to call external php code to do timezone conversions.
>
> And thanks for the ps. I can´t wait for 9.1 to test. :)
>
> Regards
>
> Matthias
>
>
>
>
>> Am 06.09.2018 um 11:57 schrieb Mark Waddingham via use-livecode <[hidden email]>:
>>
>> Hi Matthias,
>>
>> On 2018-09-05 10:34, Matthias Rebbe via use-livecode wrote:
>>> file "/home/xxxxxxx/public_html/xxxxxx/tz.lc"
>>> row 4, col 5: extension: error occurred with domain (runtime)
>>> row 4, col 5: extension: error occurred with description (unable to
>>> load foreign library)
>>> row 4, col 5: extension: error occurred with file (timezone.lcb)
>>> row 4, col 5: extension: error occurred with line (62)
>>> row 4, col 5: extension: error occurred with column (1)
>>> row 4, col 5: extension: error occurred with file (timezone.lcb)
>>> row 4, col 5: extension: error occurred with line (737)
>>> row 4, col 5: extension: error occurred with column (1)
>>> row 4, col 5: Function: error in function handler (FromUniversaltime)
>>> row 4, col 5: put: error in expression
>>> This works in LC IDE (w/o Line 1).
>>
>> The IDE and standalone builder have an extra step which makes sure an extension can find its code (shared library) resources. In this specific case, before 'load extension' you need to do:
>>
>> set the revLibraryMapping["tz"] to "/home/ua829968/public_html/rebbe.tech/tz-test/extensions/com.livecode.library.timezone/code/x86_64-linux/tz.so"
>>
>> (substitute x86_64-linux for x86-linux, if you are running on a 32-bit host)
>>
>> This tells the engine where to find the 'tz' library which is referenced by the foreign handler bindings in the tz extension.
>>
>> Warmest Regards,
>>
>> Mark.
>>
>> P.S. https://github.com/livecode/livecode/pull/6660
>>
>> --
>> Mark Waddingham ~ [hidden email] ~ http://www.livecode.com/
>> LiveCode: Everyone can create apps
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Timezone library - how to use in Livecode Server?

Bob Sneidar via use-livecode


> On 7 Sep 2018, at 12:34 am, Matthias Rebbe via use-livecode <[hidden email]> wrote:
>
> when using an other LCB library , where do i see what i have to enter in
>
> set the revLibraryMapping[“?????? ”] …….
>
> I cannot find any information about revLibraryMapping in the dictionary.

It is not documented because it is intended for use only by the IDE. It is only used for extensions include a compiled library like the tz.so library used by the timezone library. We will at some point do something for server so you can just put extensions in a folder like you do with externals.

Cheers

Monte
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Timezone library - how to use in Livecode Server?

Bob Sneidar via use-livecode
In reply to this post by Bob Sneidar via use-livecode


> On 6 Sep 2018, at 9:18 pm, Trevor DeVore via use-livecode <[hidden email]> wrote:
>
>  I just had to comment out the “resolve file” line which
> that caused an error because it is new syntax.

It’s just important to remember if using the library with this commented out that it will only find images where you provide the full path rather than paths relative to the stack.

Cheers

Monte
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode