LC 9 Dictionary, Linux

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

LC 9 Dictionary, Linux

Richard Gaskin via use-livecode
Hello,

I don't recall off the top of my head what the current remaining issue
is with the dictionary under Linux. I know there have been a couple or
three that have been reported by different people on different distros.
The workaround to open the dictionary in a browser is working pretty
well, but could use at least one enhancement if it can be managed.
Currently if I have my default browser open on some desktop other than
the one LiveCode is on, the dictionary opens in a new tab on the other
desktop. Could the command used be finessed to force it to open a new
window? This 'should' open naturally on the current desktop. Another
possible solution would be a preference option to set a browser for the
dictionary. That would allow one to use a browser other than the default
browser and avoid this (minor) inconvenience.

Warren

_______________________________________________
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: LC 9 Dictionary, Linux

Richard Gaskin via use-livecode
On 06/23/2018 07:05 PM, Warren Samples via use-livecode wrote:

> Hello,
>
> I don't recall off the top of my head what the current remaining issue
> is with the dictionary under Linux. I know there have been a couple or
> three that have been reported by different people on different distros.
> The workaround to open the dictionary in a browser is working pretty
> well, but could use at least one enhancement if it can be managed.
> Currently if I have my default browser open on some desktop other than
> the one LiveCode is on, the dictionary opens in a new tab on the other
> desktop. Could the command used be finessed to force it to open a new
> window? This 'should' open naturally on the current desktop. Another
> possible solution would be a preference option to set a browser for the
> dictionary. That would allow one to use a browser other than the default
> browser and avoid this (minor) inconvenience.
>
> Warren
>


I found a solution. I post it here in case another Linux user would be
interested in this.

It requires some very minor editing of the file:

'revidelibrary.8.livecodescript'

which is in the
'../runrev/components/<Livecode-edition-version>/Toolset/libraries/'
directory.

I commented out two lines and added for each of them a corresponding
line which launches the browser using shell(). This is what it looks
like (email formatting may insert linebreaks):

revIDEGenerateDictionaryHTML tWhich
-- launch url ("file:" & revIDEGetDictionaryUrl(tWhich))     #original code
       get shell("falkon" && revIDEGetDictionaryUrl(tWhich) &&
"</dev/null &>/dev/null &") -- my shell call, all one line

and

revIDEGenerateDictionaryHTML "api", pLibrary, pTag, pType
-- launch url ("file:" & revIDEGetDictionaryUrl("api"))  #original code
       get shell("falkon" && revIDEGetDictionaryUrl("api") &&
"</dev/null &>/dev/null &") -- my shell call, all one line

The first instance is at line 4639 and the second at line @ 4920.

I ultimately chose a dedicated browser, Falkon, for a few reasons.
Opening my default browser with a command line switch which forces a new
window works, and does what I had hoped, but using a dedicated browser
and letting it open tabs once it's open has some significant advantages.
The redirection at the end of the command detaches the running process
from the shell, making shell() non-blocking.

Warren



_______________________________________________
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: LC 9 Dictionary, Linux

Richard Gaskin via use-livecode
Hi Warren,

We made this "hack" to open the Dictionary in a browser as a workaround to
the problem where some Linux distros could not display the browser widget.
If your Linux machine is not affected by this issue, then you can do the
following to open the Dictionary in a LC stack (as it used to be):

1. in the msg box type "put 1 into $LIVECODE_USE_CEF"
2. open the dictionary, it should now open in a stack

Best,
Panos
--

On Wed, Jun 27, 2018 at 8:42 AM, Warren Samples via use-livecode <
[hidden email]> wrote:

> On 06/23/2018 07:05 PM, Warren Samples via use-livecode wrote:
>
>> Hello,
>>
>> I don't recall off the top of my head what the current remaining issue is
>> with the dictionary under Linux. I know there have been a couple or three
>> that have been reported by different people on different distros. The
>> workaround to open the dictionary in a browser is working pretty well, but
>> could use at least one enhancement if it can be managed. Currently if I
>> have my default browser open on some desktop other than the one LiveCode is
>> on, the dictionary opens in a new tab on the other desktop. Could the
>> command used be finessed to force it to open a new window? This 'should'
>> open naturally on the current desktop. Another possible solution would be a
>> preference option to set a browser for the dictionary. That would allow one
>> to use a browser other than the default browser and avoid this (minor)
>> inconvenience.
>>
>> Warren
>>
>>
>
> I found a solution. I post it here in case another Linux user would be
> interested in this.
>
> It requires some very minor editing of the file:
>
> 'revidelibrary.8.livecodescript'
>
> which is in the '../runrev/components/<Livecode-edition-version>/Toolset/libraries/'
> directory.
>
> I commented out two lines and added for each of them a corresponding line
> which launches the browser using shell(). This is what it looks like (email
> formatting may insert linebreaks):
>
> revIDEGenerateDictionaryHTML tWhich
> -- launch url ("file:" & revIDEGetDictionaryUrl(tWhich))     #original
> code
>       get shell("falkon" && revIDEGetDictionaryUrl(tWhich) && "</dev/null
> &>/dev/null &") -- my shell call, all one line
>
> and
>
> revIDEGenerateDictionaryHTML "api", pLibrary, pTag, pType
> -- launch url ("file:" & revIDEGetDictionaryUrl("api"))  #original code
>       get shell("falkon" && revIDEGetDictionaryUrl("api") && "</dev/null
> &>/dev/null &") -- my shell call, all one line
>
> The first instance is at line 4639 and the second at line @ 4920.
>
> I ultimately chose a dedicated browser, Falkon, for a few reasons. Opening
> my default browser with a command line switch which forces a new window
> works, and does what I had hoped, but using a dedicated browser and letting
> it open tabs once it's open has some significant advantages. The
> redirection at the end of the command detaches the running process from the
> shell, making shell() non-blocking.
>
>
> Warren
>
>
>
> _______________________________________________
> 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: LC 9 Dictionary, Linux

Richard Gaskin via use-livecode
On 06/27/2018 03:45 AM, panagiotis merakos wrote:
 > If your Linux machine is not affected by this issue, then you can do
the following to open the Dictionary in a LC stack (as it used to be):
 >
 > 1. in the msg box type "put 1 into $LIVECODE_USE_CEF"
 > 2. open the dictionary, it should now open in a stack
 >
 > Best,
 > Panos


Thank you! It works perfectly here. The distro is Antergos (Arch) with
KDE Plasma5, in case you're keeping a list.

Warren

_______________________________________________
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: LC 9 Dictionary, Linux

Richard Gaskin via use-livecode
On 06/27/2018 12:17 PM, Warren Samples via use-livecode wrote:
> On 06/27/2018 03:45 AM, panagiotis merakos wrote:
>  > If your Linux machine is not affected by this issue, then you can do
> the following to open the Dictionary in a LC stack (as it used to be):
>  >
>  > 1. in the msg box type "put 1 into $LIVECODE_USE_CEF"
>  > 2. open the dictionary, it should now open in a stack
>  >
>  > Best,
>  > Panos

Panos,

It works but it's not persistent. What is the best way to make this "stick"?



Warren

_______________________________________________
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: LC 9 Dictionary, Linux

Richard Gaskin via use-livecode
Hi Warren,

If you quit LC, this setting is lost next time you open LC. You could
probably tweak the script that checks the value of this setting. It should
be in the script of stack revIdeLibrary, around line 4583:

*function* revIDEBrowserWidgetUnavailable

*   return* (the platform is "Linux") and ($LIVECODE_USE_CEF is 0)

*end* revIDEBrowserWidgetUnavailable

probably the easiest way to force the Dictionary opening in a stack is to
change this handler to return false:

*function* revIDEBrowserWidgetUnavailable

*   return* false

*end* revIDEBrowserWidgetUnavailable


Hope this helps.

Best,

Panos

--

On Wed, Jun 27, 2018 at 7:15 PM, Warren Samples via use-livecode <
[hidden email]> wrote:

> On 06/27/2018 12:17 PM, Warren Samples via use-livecode wrote:
>
>> On 06/27/2018 03:45 AM, panagiotis merakos wrote:
>>  > If your Linux machine is not affected by this issue, then you can do
>> the following to open the Dictionary in a LC stack (as it used to be):
>>  >
>>  > 1. in the msg box type "put 1 into $LIVECODE_USE_CEF"
>>  > 2. open the dictionary, it should now open in a stack
>>  >
>>  > Best,
>>  > Panos
>>
>
> Panos,
>
> It works but it's not persistent. What is the best way to make this
> "stick"?
>
>
>
>
> Warren
>
> _______________________________________________
> 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