Re: LC-apps for HC

2018-11-30 Thread kee nethery via use-livecode
Livecode is a program for creating programs.
MacPaint is a program for creating images that as far as I know ran on 68K 
macs. Not sure it ever ran on PPC Macs. Not sure if MacPaint images can import 
into Livecode.
Asking if MacPaint works in LC doesn’t make sense to me.
Kee

> On Nov 30, 2018, at 2:02 PM, Ingar Roggen via use-livecode 
>  wrote:
> 
> But before that I would like to know if MacPaint works in LC. Anybody know 
> that?
> 
> Sendt fra min iPhone




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Troubleshooting revIgniter library functions

2018-11-30 Thread Keith Clarke via use-livecode
Brilliant - thanks for the analysis and syntax corrections, Ralf. 

That’s clarified more of the LCS / MVC ‘plumbing' and provided a worked example 
I can repeat as I start to build-out the app proper.

Much appreciated
Best,
Keith  

> On 30 Nov 2018, at 22:56, Ralf Bitter via use-livecode 
>  wrote:
> 
> Hi Keith,
> 
> seems that you have overlooked that your library  
> handler is not a function, see line  
> 
>   put somehandler() into gData["testlib"]
> 
> in your controller.  
> 
> Furthermore don’t forget to adjust the name of your library  
> initialisation handler to “rigRunInitialteslibConfig”.  
> 
> 
> Ralf
> 
> 
> 
>> On 30. Nov 2018, at 18:26, Keith Clarke via use-livecode 
>>  wrote:
>> 
>> Thanks Ralf. Renaming the library got past that library load error. However, 
>> the view page is listing other errors, which may hint at other mistakes I’ve 
>> made.
>> 
>> The key page markup is below - I’d appreciate any advice.
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Insert a "Waiting/Busy" Icon Into Browser Widget

2018-11-30 Thread hh via use-livecode
The following works tested here on desktop, should work everywhere where the 
browser widget works.

1. Overlay browser widget "browser" with a browser widget "loader" (that 
displays a loading animation).
2. Load the slow loading url into widget "browser".
3. Hide widget "loader" by browserDocumentLoadComplete of widget "browser".

For example:
http://forums.livecode.com/viewtopic.php?p=173867#p173867


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: LiveCode Server

2018-11-30 Thread Richard Gaskin via use-livecode

Ralph DiMola wrote:

> For my first web services I implementing the "start using" of library
> stacks method back in the day. Like you I moved to "start using" of
> script only library stacks. I'll just keep chugging along with "start
> using"s. I'll keep include/require on the back shelf for now...

Good move.

The more you stick with language features common to both the Server and 
desktop LC engines, the greater opportunities there are for crafting 
very helpful test harnesses you can use right in the IDE without having 
to deal with the building-a-ship-in-a-bottle experience of LC Server.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


RE: LiveCode Server

2018-11-30 Thread Ralph DiMola via use-livecode
Thanks Alex,

For my first web services I implementing the "start using" of library stacks 
method back in the day. Like you I moved to "start using" of script only 
library stacks. I'll just keep chugging along with "start using"s. I'll keep 
include/require on the back shelf for now...

Thanks again!

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net


-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of 
Alex Tweedly via use-livecode
Sent: Friday, November 30, 2018 3:16 PM
To: use-livecode@lists.runrev.com
Cc: Alex Tweedly
Subject: Re: LiveCode Server

Hmmm I hesitated to reply earlier, just in case there are subtleties I might 
get wrong and mislead you - but here goes.

include / require are essentially ways to include the text of the included 
file. Include will do that - and do it every time you use it 

so you could have a trivial nonsensical example like ...

mydebug.lc   - a file which will dump out a bunch of variable info ...

>  put "Data is:" && gVar1 && gVar2 && gArray[temp]
>
and use it as

.
doSomeHandler gVar1, 17
-- and check what the current status is now include "mydebug.lc"
doSomeOtherFunctions
-- and check again
include "mydebug.lc"


note that you can now change the file to do any other logging you might want, 
and each occurrence will be changed.

NB - I have never used 'include' except in a few places where I should have 
used require :-) And I've never wanted to use it as I just described :-) :-)

require is similar, but the file contents will only be inserted the
*first* time; so it's useful to include the source of library-like functions. 
And you don't need to worry if you do this in multiple places. I used to use 
this a lot.

Note that include and require are both specific to LC server. I basically no 
longer use them, now that we have script-only stacks. I now develop 99% of all 
LC server functionality as script-only stacks, testing in either the IDE or via 
LCServer as needed. And for this, you use "start using" just like in the IDE 
world.

-- Alex.

P.S. Note - there are (I think) strange subtleties in using globals and/or 
script locals in include'd / require'd files - very confusing, and I suspect 
it's a bug - but  couldn't quite come up with a reliable mental model or 
example; that was when I just converted to script-only library stacks.


On 30/11/2018 16:26, Ralph DiMola via use-livecode wrote:
> Ahh... I see that the revIgniter library is the way to go for my 
> number 2 question and I am immersed in the docs. But I'm still 
> wondering about my question # 1 (differences between "Include", 
> "Require" and "Start using")
>
> I've been using LiveCode Server for a few years now with great success 
> as various web services from LCS. I started this when I was a relative newbie.
> I access my library stacks via "Start using".
> 1) Can anyone shed some light on the subtle differences between 
> "Include", "Require" and "Start using"? The docs are not clear to me.
>
> I'm starting a new project using interactive web pages. I have an in 
> house web designer that I need to show how to call LC server scripts 
> to populate web pages. I would rather use LC Server and MySQL and my 
> on-staff html designer rather than sub it all out using vb.net and SQL server.
> 2) Are there any examples of how to do this?
>
> Thanks in advance.
>
> Ralph DiMola
> IT Director
> Evergreen Information Services
> rdim...@evergreeninfo.net 
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: LC-apps for HC

2018-11-30 Thread Richard Gaskin via use-livecode

Ingar Roggen wrote:

> But before that I would like to know if MacPaint works in LC.
> Anybody know that?

I doubt it.  IIRC the format was directly dependent on QuickDraw - from 
Wikipedia:


  Applications using QuickDraw will still run under OS X 10.8
  through macOS 10.12; however, the current versions of Xcode
  and the macOS SDK do not contain the header files to compile
  such programs.

https://en.wikipedia.org/wiki/Apple_QuickDraw


This is one of the benefits I've come to appreciate with open source: 
data longevity. When formats and the code needed to operate on them are 
free and open, data can never die.


Proprietary formats only live as long as the vendor chooses to support them.

I have a hard drive in my archives filled with data dependent on 
software that no longer runs on any modern OS.


--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Troubleshooting revIgniter library functions

2018-11-30 Thread Ralf Bitter via use-livecode
Hi Keith,

seems that you have overlooked that your library  
handler is not a function, see line  

put somehandler() into gData["testlib"]

in your controller.  

Furthermore don’t forget to adjust the name of your library  
initialisation handler to “rigRunInitialteslibConfig”.  


Ralf



> On 30. Nov 2018, at 18:26, Keith Clarke via use-livecode 
>  wrote:
> 
> Thanks Ralf. Renaming the library got past that library load error. However, 
> the view page is listing other errors, which may hint at other mistakes I’ve 
> made.
> 
> The key page markup is below - I’d appreciate any advice.


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC-apps for HC

2018-11-30 Thread Ingar Roggen via use-livecode
But before that I would like to know if MacPaint works in LC. Anybody know that?

Sendt fra min iPhone

> 30. nov. 2018 kl. 22:50 skrev Ingar Roggen via use-livecode 
> :
> 
> I’ll look into it again, Devin.
> 
>> 30. nov. 2018 kl. 20.10 skrev Devin Asay via use-livecode 
>> :
>> 
>> The authoritative guide for converting HyperCard stacks to LiveCode is still 
>> Jacque’s tutorial at 
>> https://www.hyperactivesw.com/mctutorial/rrtutorialtoc.html
>> 
>> Devin
>> 
>> On Nov 30, 2018, at 10:02 AM, Ingar Roggen via use-livecode 
>> mailto:use-livecode@lists.runrev.com>> wrote:
>> 
>> Hello, André,
>> I hope you still remember that we met in Las Vegas. I still use HyperCard 
>> and wonder if it has become easier to port HC-stacks to LiveCode? Do you 
>> know if there are any apps for that? And if not, would it be difficult to 
>> write them?
>> Regards
>> Ingar
>> 
>> Sendt fra min iPhone
>> 
>> 30. nov. 2018 kl. 14:41 skrev Andre Alves Garzia via use-livecode 
>> mailto:use-livecode@lists.runrev.com>>:
>> 
>> Kaveh,
>> 
>> I would work which lines should be shown and hidden inside a variable and 
>> then replace the whole field...
>> 
>> On 30/11/2018 13:07, Kaveh Bazargan wrote:
>> Yes Andre, that is the line that fixed it, in a split second :-)
>> 
>> But here is a follow-up: Now I want to hide all lines that have no text 
>> style and only show lines with colored text. I use:
>> 
>> repeat with i = 1 to the number of lines of fld 1
>>if the textcolor of line i of fld "text" is not empty then
>>   set the hidden of line i of fld "text" to false
>>end if
>> end repeat
>> 
>> This is taking time too. Any suggestions how to speed this up?
>> 
>> On Fri, 30 Nov 2018 at 12:12, Andre Alves Garzia via use-livecode 
>> mailto:use-livecode@lists.runrev.com> 
>> > wrote:
>> 
>> There is another tip here in this thread about
>> 
>> set the hidden of line 1 to -1 of field "the field" to false
>> 
>> As a single command, it might be better.
>> 
>> On 30/11/2018 12:07, Kaveh Bazargan via use-livecode wrote:
>> Thank you guys. I am always embarrassed to ask here as I know
>> the answer is
>> a one liner!!
>> 
>> And Andre the screen was locked already. :-)
>> 
>> On Fri, 30 Nov 2018 at 11:56, Klaus major-k via use-livecode <
>> use-livecode@lists.runrev.com
>> > wrote:
>> 
>> Hi Andre,
>> 
>> Am 30.11.2018 um 12:48 schrieb Andre Alves Garzia via
>> use-livecode <
>> use-livecode@lists.runrev.com
>> >:
>> tied locking the screen first?
>> tied AND locked?
>> Andre, you are hardcore! :-D
>> 
>> On 30/11/2018 10:33, Kaveh Bazargan via use-livecode wrote:
>> I have a text field with some 3500 lines of text. I want to
>> ensure all
>> lines are visible, as I have hidden some before. I use:
>> 
>> repeat with i = 1 the number of lines of fld 1
>> set the hidden of line i of fld 1 to false
>> end repeat
>> 
>> This is taking over 1 minute to complete. I have tried
>> removing all
>> styling
>> from the text so e.g. backgroundcolor is empty, etc. Same result.
>> 
>> Any suggestions pls?
>> Best
>> 
>> Klaus
>> 
>> --
>> Klaus Major
>> http://www.major-k.de
>> kl...@major-k.de 
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> 
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com 
>> 
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> 
>> --
>> Kaveh Bazargan
>> Director
>> River Valley Technologies  • Twitter 
>>  • LinkedIn 
>> 
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription 
>> preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> Devin Asay
>> Director
>> Office of Digital Humanities
>> Brigham Young University
>> 
>> ___
>> 

Re: LC-apps for HC

2018-11-30 Thread Ingar Roggen via use-livecode
I’ll look into it again, Devin.

> 30. nov. 2018 kl. 20.10 skrev Devin Asay via use-livecode 
> :
> 
> The authoritative guide for converting HyperCard stacks to LiveCode is still 
> Jacque’s tutorial at 
> https://www.hyperactivesw.com/mctutorial/rrtutorialtoc.html
> 
> Devin
> 
> On Nov 30, 2018, at 10:02 AM, Ingar Roggen via use-livecode 
> mailto:use-livecode@lists.runrev.com>> wrote:
> 
> Hello, André,
> I hope you still remember that we met in Las Vegas. I still use HyperCard and 
> wonder if it has become easier to port HC-stacks to LiveCode? Do you know if 
> there are any apps for that? And if not, would it be difficult to write them?
> Regards
> Ingar
> 
> Sendt fra min iPhone
> 
> 30. nov. 2018 kl. 14:41 skrev Andre Alves Garzia via use-livecode 
> mailto:use-livecode@lists.runrev.com>>:
> 
> Kaveh,
> 
> I would work which lines should be shown and hidden inside a variable and 
> then replace the whole field...
> 
> On 30/11/2018 13:07, Kaveh Bazargan wrote:
> Yes Andre, that is the line that fixed it, in a split second :-)
> 
> But here is a follow-up: Now I want to hide all lines that have no text style 
> and only show lines with colored text. I use:
> 
> repeat with i = 1 to the number of lines of fld 1
> if the textcolor of line i of fld "text" is not empty then
>set the hidden of line i of fld "text" to false
> end if
>  end repeat
> 
> This is taking time too. Any suggestions how to speed this up?
> 
> On Fri, 30 Nov 2018 at 12:12, Andre Alves Garzia via use-livecode 
> mailto:use-livecode@lists.runrev.com> 
> > wrote:
> 
>  There is another tip here in this thread about
> 
>  set the hidden of line 1 to -1 of field "the field" to false
> 
>  As a single command, it might be better.
> 
>  On 30/11/2018 12:07, Kaveh Bazargan via use-livecode wrote:
> Thank you guys. I am always embarrassed to ask here as I know
>  the answer is
> a one liner!!
> 
> And Andre the screen was locked already. :-)
> 
> On Fri, 30 Nov 2018 at 11:56, Klaus major-k via use-livecode <
> use-livecode@lists.runrev.com
>  > wrote:
> 
> Hi Andre,
> 
> Am 30.11.2018 um 12:48 schrieb Andre Alves Garzia via
>  use-livecode <
> use-livecode@lists.runrev.com
>  >:
> tied locking the screen first?
> tied AND locked?
> Andre, you are hardcore! :-D
> 
> On 30/11/2018 10:33, Kaveh Bazargan via use-livecode wrote:
> I have a text field with some 3500 lines of text. I want to
>  ensure all
> lines are visible, as I have hidden some before. I use:
> 
> repeat with i = 1 the number of lines of fld 1
>  set the hidden of line i of fld 1 to false
> end repeat
> 
> This is taking over 1 minute to complete. I have tried
>  removing all
> styling
> from the text so e.g. backgroundcolor is empty, etc. Same result.
> 
> Any suggestions pls?
> Best
> 
> Klaus
> 
> --
> Klaus Major
> http://www.major-k.de
> kl...@major-k.de 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
>  
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> 
>  ___
>  use-livecode mailing list
>  use-livecode@lists.runrev.com 
> 
>  Please visit this url to subscribe, unsubscribe and manage your
>  subscription preferences:
>  http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> 
> 
> --
> Kaveh Bazargan
> Director
> River Valley Technologies  • Twitter 
>  • LinkedIn 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
> 
> Devin Asay
> Director
> Office of Digital Humanities
> Brigham Young University
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list

Re: LC-apps for HC

2018-11-30 Thread Ingar Roggen via use-livecode
I’ll use HC on the other side too, Kee!
Ingar

> 30. nov. 2018 kl. 20.13 skrev kee nethery via use-livecode 
> :
> 
> And I thought I was the last hold-out using Hypercard. Sold all my PPC Mac 
> Minis.
> 
> Kee nethery
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC-apps for HC

2018-11-30 Thread Ingar Roggen via use-livecode
Thank you, Bob

> 30. nov. 2018 kl. 18.49 skrev Bob Sneidar via use-livecode 
> :
> 
> I'll jump in here. 
> 
> Porting/opening Hypercard stacks is a convenience. The primary issue is that 
> Hypercard was optimized to index every text of every card in a stack to make 
> finding information easier. New records? New cards. 
> 
> Livecode? Not so much. In fact, not at all. There will be performance issues. 
> But at least your field and button layouts will be intact, and you scripting 
> *should* work out of the box. 
> 
> At that point, your next task will be to refactor your app to switch to a 
> database oriented app with single form layouts as opposed to multiple cards 
> as records. Getting the information out of your cards and into a database, 
> although not difficult, will have to be scripted. So far as I know, there is 
> nothing that can "automagically" do that for you. 
> 
> Bob S
> 
> 
>> On Nov 30, 2018, at 09:02 , Ingar Roggen via use-livecode 
>>  wrote:
>> 
>> Hello, André,
>> I hope you still remember that we met in Las Vegas. I still use HyperCard 
>> and wonder if it has become easier to port HC-stacks to LiveCode? Do you 
>> know if there are any apps for that? And if not, would it be difficult to 
>> write them?
>> Regards
>> Ingar
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting hidden of lines very slow

2018-11-30 Thread Richard Gaskin via use-livecode

Kaveh wrote:
> Now how many lines of JavaScript would that be? ;-)

The equivalent of chunk expressions are ridiculously verbose in JS, but 
this one's not bad:


getElementById("id").removeAttribute("style");

--
 Richard Gaskin
 Fourth World Systems
 Software Design and Development for the Desktop, Mobile, and the Web
 
 ambassa...@fourthworld.comhttp://www.FourthWorld.com

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: LiveCode Server

2018-11-30 Thread Alex Tweedly via use-livecode
Hmmm I hesitated to reply earlier, just in case there are subtleties I 
might get wrong and mislead you - but here goes.


include / require are essentially ways to include the text of the 
included file. Include will do that - and do it every time you use it 


so you could have a trivial nonsensical example like ...

mydebug.lc   - a file which will dump out a bunch of variable info ...



and use it as

.
doSomeHandler gVar1, 17
-- and check what the current status is now
include "mydebug.lc"
doSomeOtherFunctions
-- and check again
include "mydebug.lc"


note that you can now change the file to do any other logging you might 
want, and each occurrence will be changed.


NB - I have never used 'include' except in a few places where I should 
have used require :-)

And I've never wanted to use it as I just described :-) :-)

require is similar, but the file contents will only be inserted the 
*first* time; so it's useful to include the source of library-like 
functions. And you don't need to worry if you do this in multiple 
places. I used to use this a lot.


Note that include and require are both specific to LC server. I 
basically no longer use them, now that we have script-only stacks. I now 
develop 99% of all LC server functionality as script-only stacks, 
testing in either the IDE or via LCServer as needed. And for this, you 
use "start using" just like in the IDE world.


-- Alex.

P.S. Note - there are (I think) strange subtleties in using globals 
and/or script locals in include'd / require'd files - very confusing, 
and I suspect it's a bug - but  couldn't quite come up with a reliable 
mental model or example; that was when I just converted to script-only 
library stacks.



On 30/11/2018 16:26, Ralph DiMola via use-livecode wrote:

Ahh... I see that the revIgniter library is the way to go for my number 2
question and I am immersed in the docs. But I'm still wondering about my
question # 1 (differences between "Include", "Require" and "Start using")

I've been using LiveCode Server for a few years now with great success as
various web services from LCS. I started this when I was a relative newbie.
I access my library stacks via "Start using".
1) Can anyone shed some light on the subtle differences between "Include",
"Require" and "Start using"? The docs are not clear to me.

I'm starting a new project using interactive web pages. I have an in house
web designer that I need to show how to call LC server scripts to populate
web pages. I would rather use LC Server and MySQL and my on-staff html
designer rather than sub it all out using vb.net and SQL server.
2) Are there any examples of how to do this?

Thanks in advance.

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net   


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting hidden of lines very slow

2018-11-30 Thread Geoff Canyon via use-livecode
Why do you need to simulate non-contiguous selections? Set the
listBehavior, multipleHilites, and noncontiguousHilites of the field to
true and then you can do things like:

set the hilitedLines of fld 1 to 1,3,5

But to your original question, you should use:

repeat for each line L in the htmlText of fld 1
  -- put some htmlText after a variable based on what L contains
end repeat
  -- set the htmlText of fld 1 to the new htmlText

Or if you know what you want to do and don't need to check the existing
textColor and hidden, just:

repeat for each line L in fld 1


Here's an example of what the htmlText looks like for a field where the
first line has a font color and the second line is hidden:

test
this
thing

So if you don't need to check the existing state your code would look
something like this:

put 0 into i -- if you need a line count
repeat for each line L in fld 1
 add 1 to i -- again, if you need a line count
 if  then
  put "" & L & ""
& cr after newHTML
else
   put "" & L & "" & cr after newHTML
end if
end repeat
set the htmlText of fld 1 to newHTML

gc


On Fri, Nov 30, 2018 at 8:36 AM Kaveh Bazargan via use-livecode <
use-livecode@lists.runrev.com> wrote:

> I am simulating a non-contiguous selection of text with a "Find all" button
> that sets the style of all found items of text.
>
> Then I want to inspect those "selections" only but showing the paras that
> contain them and hiding all other lines. So I have a full view and a
> "compact" view that the user can choose by clicking a button
>
> On Fri, 30 Nov 2018 at 16:31, Glen Bojsza via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > I was wondering at what stage or how the lines get chosen to be hidden or
> > not?
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
>
>
> --
> Kaveh Bazargan
> Director
> River Valley Technologies  • Twitter
>  • LinkedIn
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC-apps for HC

2018-11-30 Thread kee nethery via use-livecode
And I thought I was the last hold-out using Hypercard. Sold all my PPC Mac 
Minis.

Kee nethery
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: LC-apps for HC

2018-11-30 Thread Devin Asay via use-livecode
The authoritative guide for converting HyperCard stacks to LiveCode is still 
Jacque’s tutorial at https://www.hyperactivesw.com/mctutorial/rrtutorialtoc.html

Devin

On Nov 30, 2018, at 10:02 AM, Ingar Roggen via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

Hello, André,
I hope you still remember that we met in Las Vegas. I still use HyperCard and 
wonder if it has become easier to port HC-stacks to LiveCode? Do you know if 
there are any apps for that? And if not, would it be difficult to write them?
Regards
Ingar

Sendt fra min iPhone

30. nov. 2018 kl. 14:41 skrev Andre Alves Garzia via use-livecode 
mailto:use-livecode@lists.runrev.com>>:

Kaveh,

I would work which lines should be shown and hidden inside a variable and then 
replace the whole field...

On 30/11/2018 13:07, Kaveh Bazargan wrote:
Yes Andre, that is the line that fixed it, in a split second :-)

But here is a follow-up: Now I want to hide all lines that have no text style 
and only show lines with colored text. I use:

repeat with i = 1 to the number of lines of fld 1
 if the textcolor of line i of fld "text" is not empty then
set the hidden of line i of fld "text" to false
 end if
  end repeat

This is taking time too. Any suggestions how to speed this up?

On Fri, 30 Nov 2018 at 12:12, Andre Alves Garzia via use-livecode 
mailto:use-livecode@lists.runrev.com> 
> wrote:

  There is another tip here in this thread about

  set the hidden of line 1 to -1 of field "the field" to false

  As a single command, it might be better.

  On 30/11/2018 12:07, Kaveh Bazargan via use-livecode wrote:
Thank you guys. I am always embarrassed to ask here as I know
  the answer is
a one liner!!

And Andre the screen was locked already. :-)

On Fri, 30 Nov 2018 at 11:56, Klaus major-k via use-livecode <
use-livecode@lists.runrev.com
  > wrote:

Hi Andre,

Am 30.11.2018 um 12:48 schrieb Andre Alves Garzia via
  use-livecode <
use-livecode@lists.runrev.com
  >:
tied locking the screen first?
tied AND locked?
Andre, you are hardcore! :-D

On 30/11/2018 10:33, Kaveh Bazargan via use-livecode wrote:
I have a text field with some 3500 lines of text. I want to
  ensure all
lines are visible, as I have hidden some before. I use:

repeat with i = 1 the number of lines of fld 1
  set the hidden of line i of fld 1 to false
end repeat

This is taking over 1 minute to complete. I have tried
  removing all
styling
from the text so e.g. backgroundcolor is empty, etc. Same result.

Any suggestions pls?
Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de 


___
use-livecode mailing list
use-livecode@lists.runrev.com
  
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



  ___
  use-livecode mailing list
  use-livecode@lists.runrev.com 

  Please visit this url to subscribe, unsubscribe and manage your
  subscription preferences:
  http://lists.runrev.com/mailman/listinfo/use-livecode



--
Kaveh Bazargan
Director
River Valley Technologies  • Twitter 
 • LinkedIn 

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Devin Asay
Director
Office of Digital Humanities
Brigham Young University

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting hidden of lines very slow

2018-11-30 Thread Keith Clarke via use-livecode
In jQuery it’d be something like $j(‘div #id’).text(); selecting the field’s 
enclosing div by ID or class. 

Best,
Keith

> On 30 Nov 2018, at 17:43, Bob Sneidar via use-livecode 
>  wrote:
> 
> And how much would the Javascript training and certification cost be to learn 
> how to do it? ;-)
> 
> Bob S
> 
> 
>> On Nov 30, 2018, at 09:17 , Kaveh Bazargan via use-livecode 
>>  wrote:
>> 
>>> FWIW, the fastest way that I know to remove all text stylings from a field
>>> of text is this:
>>> 
>>> put fld 1 into fld 1
>>> 
>>> 
>> That's poetically beautiful. Now how many lines of JavaScript would that
>> be? ;-)
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LC-apps for HC

2018-11-30 Thread Bob Sneidar via use-livecode
I'll jump in here. 

Porting/opening Hypercard stacks is a convenience. The primary issue is that 
Hypercard was optimized to index every text of every card in a stack to make 
finding information easier. New records? New cards. 

Livecode? Not so much. In fact, not at all. There will be performance issues. 
But at least your field and button layouts will be intact, and you scripting 
*should* work out of the box. 

At that point, your next task will be to refactor your app to switch to a 
database oriented app with single form layouts as opposed to multiple cards as 
records. Getting the information out of your cards and into a database, 
although not difficult, will have to be scripted. So far as I know, there is 
nothing that can "automagically" do that for you. 

Bob S


> On Nov 30, 2018, at 09:02 , Ingar Roggen via use-livecode 
>  wrote:
> 
> Hello, André,
> I hope you still remember that we met in Las Vegas. I still use HyperCard and 
> wonder if it has become easier to port HC-stacks to LiveCode? Do you know if 
> there are any apps for that? And if not, would it be difficult to write them?
> Regards
> Ingar

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting hidden of lines very slow

2018-11-30 Thread Bob Sneidar via use-livecode
And how much would the Javascript training and certification cost be to learn 
how to do it? ;-)

Bob S


> On Nov 30, 2018, at 09:17 , Kaveh Bazargan via use-livecode 
>  wrote:
> 
>> FWIW, the fastest way that I know to remove all text stylings from a field
>> of text is this:
>> 
>> put fld 1 into fld 1
>> 
>> 
> That's poetically beautiful. Now how many lines of JavaScript would that
> be? ;-)


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Troubleshooting revIgniter library functions

2018-11-30 Thread Keith Clarke via use-livecode
Thanks Ralf. Renaming the library got past that library load error. However, 
the view page is listing other errors, which may hint at other mistakes I’ve 
made.

The key page markup is below - I’d appreciate any advice.

**

The testlib.lc library content is just the prototype with a “Hello World” test 
return in the example handler...

[[gData["testlib"] ]]



The inline error list override of the view page may provide some clues (paths 
truncated with ‘…' ) ...
file “/.../system/application/config/autoload.lc"
file “/.../system/libraries/Controller.lc"
file “/.../system/libraries/Loader.lc"
file “/.../system/libraries/Language.lc"
file “/.../system/libraries/Output.lc"
file “/.../system/application/config/routes.lc"
file “/.../system/libraries/Input.lc"
file “/.../system/libraries/Router.lc"
file “/.../system/libraries/Config.lc"
file “/.../system/libraries/URI.lc"
file “/.../system/libraries/Log.lc"
file “/.../system/libraries/Hooks.lc"
file “/.../system/libraries/Benchmark.lc"
file “/.../system/application/config/config.lc"
file “/.../system/revigniter/Common.lc"
file “/.../system/application/config/constants.lc"
file “/.../system/revigniter/RevIgniter.lc"
file “/.../index.lc"
file “/.../system/application/config/config.lc"
  row 1822, col 1: Handler: can't find handler (rigRunInitialtestlibConfig)
  row 1823, col 1: do: error in statement (rigRunInitialtestlibConfig "")
  row 1823, col 1: if-then: error in statement
  row 1819, col 1: Handler: error in statement (_rigRiInitLibrary)
  row 1284, col 1: Handler: can't find handler (_rigRiInitLibrary)
  row 1284, col 1: repeat: error in statement
  row 1284, col 1: repeat: error in statement
  row 1187, col 1: Handler: error in statement (_rigLoadLibrary)
  row 106, col 1: Handler: can't find handler (_rigLoadLibrary)
  row 106, col 1: if-then: error in statement
  row 106, col 1: if-then: error in statement
  row 95, col 1: Handler: error in statement (rigLoaderLoadLibrary)
file “/.../system/revigniter/RevIgniter.lc"
  row 13, col 1: Handler: can't find handler (rigLoaderLoadLibrary)
  row 13, col 1: Handler: error in statement (home)
file “/.../system/application/controllers/home.lc"
  row 399, col 1: Handler: can't find handler (home)
  row 400, col 1: do: error in statement (home)
  row 400, col 1: if-then: error in statement
  row 400, col 1: if-then: error in statement
  row 387, col 1: Handler: error in statement (_rigDo)
  row 273, col 1: Handler: can't find handler (_rigDo)
file “/.../system/application/libraries/testlib.lc"
Best,
Keith

> On 30 Nov 2018, at 16:14, Ralf Bitter via use-livecode 
>  wrote:
> 
> Hi Keith,
> 
> if you change the name of your library to Testlib.lc
> and if you adjust the name in your controller respectively
> all should work as expected.
> There is a naming convention for library files, i.e.
> camel case is not allowed, but it seems this is not
> mentioned in the user guide.
> Sorry for the hassle. Will fix that.
> 
> 
> Ralf
> 
>> On 30. Nov 2018, at 15:23, Keith Clarke via use-livecode 
>>  wrote:
>> 
>> Thanks Ralf (& Andre) for the responses.
>> 
>> I have read the user guide and understood more than I expected, given my 
>> basic HTML + jQuery + CSS background! I’ve also been learning more as I 
>> build my app out using user guide worked examples where they exist.
>> 
>> Thanks for the syntax for processing the response returned from the library 
>> - I know understand the central role of the controller page and how that 
>> call & response should work. 
>> 
>> Thanks also for the tip regarding the log, as that has proven more 
>> revealing… errors when attempting to load library files into any controllers.
>> 
>> Stripping back to basics, I have created a testLib.lc library file in the 
>> default system/application/libraries folder that contains just the prototype 
>> markup from the user guide.
>> 
>> My default controller is home.lc (copied from welcome.lc) which throws an 
>> error "Unable to load the requested library:Testlib” if I add 
>> 'rigLoaderLoadLibrary “testLib” ‘ to the home or index handler markup.
>> 
>> Any clues as to what I may have missed?  
>> Thanks
>> Keith
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Insert a "Waiting/Busy" Icon Into Browser Widget

2018-11-30 Thread Sannyasin Brahmanathaswami via use-livecode
I watch with interest all of HH amazing thing he does the browser widget. 
Haven't had time to keep up. But I have a common use case that I can't figure 
out that possibly relates

a) On mobile, let's say you have connectivity… It may not be fast at the 
moment, but it is it good enough for you to wait.
b) We "install" a web URL on the browser widget.
c) Now… the page has a big pay load… usually a lot of JS coming thru first, 
before it renders at anything.  
Two examples
 One is a badly designed site .. some "Wicks" platform : 
https://www.hindouisme.org/ 

   The other is a huge HTML5 application
   https://mydigitalpublication.com/publication?m=45852=1

d) You get a "white screen" as the browser is busy getting resources.
e) User thinks it has "hanging 

I have tried using native LC to display a busy "spinner" . But inevitably the 
browser takes over the CPU and such things as

browserFinishedLoading pUrl 

 don’t work.

So, now, is possible to "insert" JS script into a browser, right at "init" to 
display a spinner, while we wait for the full page render?

BR



Brahmanathaswami
browserFinishedLoading pUrl


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting hidden of lines very slow

2018-11-30 Thread Kaveh Bazargan via use-livecode
On Fri, 30 Nov 2018 at 17:12, Dan Friedman  wrote:

> Kaveh,
>
> Well, you learn something every day!   I didn't know you could hide a line
> of text.  Pretty cool!
>
>
Really nice. Working on speeding it up which will be great.


> FWIW, the fastest way that I know to remove all text stylings from a field
> of text is this:
>
> put fld 1 into fld 1
>
>
That's poetically beautiful. Now how many lines of JavaScript would that
be? ;-)


>
> -Dan
>
>
> On 11/30/18, 8:37 AM, "use-livecode on behalf of Kaveh Bazargan via
> use-livecode"  use-livecode@lists.runrev.com> wrote:
>
> I am simulating a non-contiguous selection of text with a "Find all"
> button
> that sets the style of all found items of text.
>
> Then I want to inspect those "selections" only but showing the paras
> that
> contain them and hiding all other lines. So I have a full view and a
> "compact" view that the user can choose by clicking a button
>
> On Fri, 30 Nov 2018 at 16:31, Glen Bojsza via use-livecode <
> use-livecode@lists.runrev.com> wrote:
>
> > I was wondering at what stage or how the lines get chosen to be
> hidden or
> > not?
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
>
>
> --
> Kaveh Bazargan
> Director
> River Valley Technologies  •
> Twitter
>  • LinkedIn
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>

-- 
Kaveh Bazargan
Director
River Valley Technologies  • Twitter
 • LinkedIn

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting hidden of lines very slow

2018-11-30 Thread Dan Friedman via use-livecode
Kaveh,

Well, you learn something every day!   I didn't know you could hide a line of 
text.  Pretty cool!

FWIW, the fastest way that I know to remove all text stylings from a field of 
text is this:

put fld 1 into fld 1


-Dan
 

On 11/30/18, 8:37 AM, "use-livecode on behalf of Kaveh Bazargan via 
use-livecode"  wrote:

I am simulating a non-contiguous selection of text with a "Find all" button
that sets the style of all found items of text.

Then I want to inspect those "selections" only but showing the paras that
contain them and hiding all other lines. So I have a full view and a
"compact" view that the user can choose by clicking a button

On Fri, 30 Nov 2018 at 16:31, Glen Bojsza via use-livecode <
use-livecode@lists.runrev.com> wrote:

> I was wondering at what stage or how the lines get chosen to be hidden or
> not?
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


-- 
Kaveh Bazargan
Director
River Valley Technologies  • Twitter
 • LinkedIn

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your 
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

LC-apps for HC

2018-11-30 Thread Ingar Roggen via use-livecode
Hello, André,
I hope you still remember that we met in Las Vegas. I still use HyperCard and 
wonder if it has become easier to port HC-stacks to LiveCode? Do you know if 
there are any apps for that? And if not, would it be difficult to write them?
Regards
Ingar

Sendt fra min iPhone

> 30. nov. 2018 kl. 14:41 skrev Andre Alves Garzia via use-livecode 
> :
> 
> Kaveh,
> 
> I would work which lines should be shown and hidden inside a variable and 
> then replace the whole field...
> 
>> On 30/11/2018 13:07, Kaveh Bazargan wrote:
>> Yes Andre, that is the line that fixed it, in a split second :-)
>> 
>> But here is a follow-up: Now I want to hide all lines that have no text 
>> style and only show lines with colored text. I use:
>> 
>> repeat with i = 1 to the number of lines of fld 1
>>   if the textcolor of line i of fld "text" is not empty then
>>  set the hidden of line i of fld "text" to false
>>   end if
>>end repeat
>> 
>> This is taking time too. Any suggestions how to speed this up?
>> 
>> On Fri, 30 Nov 2018 at 12:12, Andre Alves Garzia via use-livecode 
>> mailto:use-livecode@lists.runrev.com>> wrote:
>> 
>>There is another tip here in this thread about
>> 
>>set the hidden of line 1 to -1 of field "the field" to false
>> 
>>As a single command, it might be better.
>> 
>>On 30/11/2018 12:07, Kaveh Bazargan via use-livecode wrote:
>>> Thank you guys. I am always embarrassed to ask here as I know
>>the answer is
>>> a one liner!!
>>>
>>> And Andre the screen was locked already. :-)
>>>
>>> On Fri, 30 Nov 2018 at 11:56, Klaus major-k via use-livecode <
>>> use-livecode@lists.runrev.com
>>> wrote:
>>>
>>>> Hi Andre,
>>>>
>>>>> Am 30.11.2018 um 12:48 schrieb Andre Alves Garzia via
>>use-livecode <
>>>> use-livecode@lists.runrev.com
>>>:
>>>>> tied locking the screen first?
>>>> tied AND locked?
>>>> Andre, you are hardcore! :-D
>>>>
>>>>> On 30/11/2018 10:33, Kaveh Bazargan via use-livecode wrote:
>> I have a text field with some 3500 lines of text. I want to
>>ensure all
>> lines are visible, as I have hidden some before. I use:
>>
>> repeat with i = 1 the number of lines of fld 1
>>set the hidden of line i of fld 1 to false
>> end repeat
>>
>> This is taking over 1 minute to complete. I have tried
>>removing all
>>>> styling
>> from the text so e.g. backgroundcolor is empty, etc. Same result.
>>
>> Any suggestions pls?
>>>> Best
>>>>
>>>> Klaus
>>>>
>>>> --
>>>> Klaus Major
>>>> http://www.major-k.de
>>>> kl...@major-k.de 
>>>>
>>>>
>>>> ___
>>>> use-livecode mailing list
>>>> use-livecode@lists.runrev.com
>>
>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>
>>>
>> 
>>___
>>use-livecode mailing list
>>use-livecode@lists.runrev.com 
>>Please visit this url to subscribe, unsubscribe and manage your
>>subscription preferences:
>>http://lists.runrev.com/mailman/listinfo/use-livecode
>> 
>> 
>> 
>> -- 
>> Kaveh Bazargan
>> Director
>> River Valley Technologies  • Twitter 
>>  • LinkedIn 
>> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LiveCode equivalent to 'cron' for automated background functions?

2018-11-30 Thread Sannyasin Brahmanathaswami via use-livecode
Been using LC scripts on the server for "like 20 years."  

But run on the cron of the server itself.  

Brahmanathaswami
 

On 11/30/18, 2:37 AM, "use-livecode on behalf of Keith Clarke via 
use-livecode"  wrote:

Thanks Andre - good call. 
Following others’ reminders of the single-threaded nature of LCS, I’m 
trying to rethink data flows as on-demand, to avoid all background tasks.
Best,
Keith

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting hidden of lines very slow

2018-11-30 Thread Kaveh Bazargan via use-livecode
I am simulating a non-contiguous selection of text with a "Find all" button
that sets the style of all found items of text.

Then I want to inspect those "selections" only but showing the paras that
contain them and hiding all other lines. So I have a full view and a
"compact" view that the user can choose by clicking a button

On Fri, 30 Nov 2018 at 16:31, Glen Bojsza via use-livecode <
use-livecode@lists.runrev.com> wrote:

> I was wondering at what stage or how the lines get chosen to be hidden or
> not?
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


-- 
Kaveh Bazargan
Director
River Valley Technologies  • Twitter
 • LinkedIn

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting hidden of lines very slow

2018-11-30 Thread Glen Bojsza via use-livecode
I was wondering at what stage or how the lines get chosen to be hidden or
not?
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


LiveCode Server

2018-11-30 Thread Ralph DiMola via use-livecode
Ahh... I see that the revIgniter library is the way to go for my number 2
question and I am immersed in the docs. But I'm still wondering about my
question # 1 (differences between "Include", "Require" and "Start using")

I've been using LiveCode Server for a few years now with great success as
various web services from LCS. I started this when I was a relative newbie.
I access my library stacks via "Start using".
1) Can anyone shed some light on the subtle differences between "Include",
"Require" and "Start using"? The docs are not clear to me.

I'm starting a new project using interactive web pages. I have an in house
web designer that I need to show how to call LC server scripts to populate
web pages. I would rather use LC Server and MySQL and my on-staff html
designer rather than sub it all out using vb.net and SQL server.
2) Are there any examples of how to do this?

Thanks in advance.

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net   


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Setting hidden of lines very slow

2018-11-30 Thread Kaveh Bazargan via use-livecode
Did not know about textStyle which has opened a whole new world! Thank you
so much for ruining my weekend Trevor. ;-)

hh, I love the first solution, which shows the beauty of LiveCode. But the
speed is the same as before...

i will try htmltext too. A while since I worked with it.

Thanks again.

On Fri, 30 Nov 2018 at 15:33, hh via use-livecode <
use-livecode@lists.runrev.com> wrote:

> If showing *only* lines with colored text means that all others
> are hidden then you could use:
>
> ...
> set hidden of line i of fld "text" to \
> (the textcolor of line i of fld "text" is empty)
> ...
>
> Trevor's script would then read:
> ...
> put (tTextA[i]["runs"][1]["style"]["textcolor"] is empty) \
>  into tTextA[i]["style"]["hidden"]
> ...
>
> Here yet another fast method:
>
> on mouseUp
>   put the millisecs into m1
>   lock screen; lock messages
>   put the htmltext of fld 1 into ht
>   set linedelimiter to "   put the htmltext of fld 1 into ht
>   replace " hidden" with empty in ht
>   repeat for each line L in ht
> if offset("color=",L)>0 then put " else put "   end repeat
>   set htmltext of fld 1 to  s
>   put the millisecs-m1 into fld "timing"
> end mouseUp
>
>
> > > Kaveh wrote:
> > > But here is a follow-up: Now I want to hide all lines that
> > > have no text style and only show lines with colored text.
> > > I use:
> > >
> > > repeat with i = 1 to the number of lines of fld 1
> > >   if the textcolor of line i of fld "text" is not empty then
> > > set the hidden of line i of fld "text" to false
> > >   end if
> > > end repeat
> > >
> > > This is taking time too. Any suggestions how to speed this up?
> > >
> >
> > Trevor wrote:
> > Try working with the styledText property.
> >
> > put the styledText of field "text" into tTextA
> >
> > # loop through paragraphs
> > repeat with i = 1 to the number of elements of tTextA
> >   # Check if first run has textcolor set
> >   if tTextA[i]["runs"][1]["style"]["textcolor"] is not empty then
> > # hide paragraph
> > put true into tTextA[i]["style"]["hidden"]
> >   end if
> > end repeat
> >
> > set the styledText of fld "text" to tTextA
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


-- 
Kaveh Bazargan
Director
River Valley Technologies  • Twitter
 • LinkedIn

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Troubleshooting revIgniter library functions

2018-11-30 Thread Ralf Bitter via use-livecode
Hi Keith,

if you change the name of your library to Testlib.lc
and if you adjust the name in your controller respectively
all should work as expected.
There is a naming convention for library files, i.e.
camel case is not allowed, but it seems this is not
mentioned in the user guide.
Sorry for the hassle. Will fix that.


Ralf

> On 30. Nov 2018, at 15:23, Keith Clarke via use-livecode 
>  wrote:
> 
> Thanks Ralf (& Andre) for the responses.
> 
> I have read the user guide and understood more than I expected, given my 
> basic HTML + jQuery + CSS background! I’ve also been learning more as I build 
> my app out using user guide worked examples where they exist.
> 
> Thanks for the syntax for processing the response returned from the library - 
> I know understand the central role of the controller page and how that call & 
> response should work. 
> 
> Thanks also for the tip regarding the log, as that has proven more revealing… 
> errors when attempting to load library files into any controllers.
> 
> Stripping back to basics, I have created a testLib.lc library file in the 
> default system/application/libraries folder that contains just the prototype 
> markup from the user guide.
> 
> My default controller is home.lc (copied from welcome.lc) which throws an 
> error "Unable to load the requested library:Testlib” if I add 
> 'rigLoaderLoadLibrary “testLib” ‘ to the home or index handler markup.
> 
> Any clues as to what I may have missed?  
> Thanks
> Keith


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting hidden of lines very slow

2018-11-30 Thread hh via use-livecode
If showing *only* lines with colored text means that all others
are hidden then you could use:

...
set hidden of line i of fld "text" to \
(the textcolor of line i of fld "text" is empty)
...

Trevor's script would then read:
...
put (tTextA[i]["runs"][1]["style"]["textcolor"] is empty) \
 into tTextA[i]["style"]["hidden"] 
...

Here yet another fast method:

on mouseUp
  put the millisecs into m1
  lock screen; lock messages
  put the htmltext of fld 1 into ht
  set linedelimiter to " > Kaveh wrote:
> > But here is a follow-up: Now I want to hide all lines that
> > have no text style and only show lines with colored text. 
> > I use:
> >
> > repeat with i = 1 to the number of lines of fld 1
> >   if the textcolor of line i of fld "text" is not empty then
> > set the hidden of line i of fld "text" to false
> >   end if
> > end repeat
> >
> > This is taking time too. Any suggestions how to speed this up?
> >
> 
> Trevor wrote:
> Try working with the styledText property.
> 
> put the styledText of field "text" into tTextA
> 
> # loop through paragraphs
> repeat with i = 1 to the number of elements of tTextA
>   # Check if first run has textcolor set
>   if tTextA[i]["runs"][1]["style"]["textcolor"] is not empty then
> # hide paragraph
> put true into tTextA[i]["style"]["hidden"]
>   end if
> end repeat
> 
> set the styledText of fld "text" to tTextA

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Setting hidden of lines very slow

2018-11-30 Thread Trevor DeVore via use-livecode
On Fri, Nov 30, 2018 at 7:08 AM Kaveh Bazargan via use-livecode <
use-livecode@lists.runrev.com> wrote:

> But here is a follow-up: Now I want to hide all lines that have no text
> style and only show lines with colored text. I use:
>
> repeat with i = 1 to the number of lines of fld 1
>   if the textcolor of line i of fld "text" is not empty then
>  set the hidden of line i of fld "text" to false
>   end if
>end repeat
>
> This is taking time too. Any suggestions how to speed this up?
>

Try working with the styledText property.

```
put the styledText of field "text" into tTextA

# loop through paragraphs
repeat with i = 1 to the number of elements of tTextA
  # Check if first run has textcolor set
  if tTextA[i]["runs"][1]["style"]["textcolor"] is not empty then
# hide paragraph
put true into tTextA[i]["style"]["hidden"]
  end if
end repeat

set the styledText of fld "text" to tTextA
```

-- 
Trevor DeVore
CTO - ScreenSteps
www.screensteps.com
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Troubleshooting revIgniter library functions

2018-11-30 Thread Keith Clarke via use-livecode
Thanks Ralf (& Andre) for the responses.

I have read the user guide and understood more than I expected, given my basic 
HTML + jQuery + CSS background! I’ve also been learning more as I build my app 
out using user guide worked examples where they exist.

Thanks for the syntax for processing the response returned from the library - I 
know understand the central role of the controller page and how that call & 
response should work. 

Thanks also for the tip regarding the log, as that has proven more revealing… 
errors when attempting to load library files into any controllers.

Stripping back to basics, I have created a testLib.lc library file in the 
default system/application/libraries folder that contains just the prototype 
markup from the user guide.

My default controller is home.lc (copied from welcome.lc) which throws an error 
"Unable to load the requested library:Testlib” if I add 'rigLoaderLoadLibrary 
“testLib” ‘ to the home or index handler markup.

Any clues as to what I may have missed?  
Thanks
Keith

> On 30 Nov 2018, at 12:37, Ralf Bitter via use-livecode 
>  wrote:
> 
> Hi Keith,  
> 
> in addition to Andre’s valuable tips I would like  
> to comment that your approach should actually work,  
> but be advised to make sure you include your custom  
> library as described here:  
> 
> https://revigniter.com/userGuide/general/creating_libraries.html  
> 
> Furthermore you can leave your function as is i.e.  
> call your library function within your DocLogin.lc controller like:  
> 
>   put myDocLoginHandler() into gData["doc_token"]
>   
> For debugging purposes make sure the logs folder is writable,  
> set the gConfig["logThreshold"]  in config.lc to 4 and check the  
> log file in case something goes wrong.  
> 
> 
> Ralf  
> 
>> On 30. Nov 2018, at 10:32, Keith Clarke via use-livecode 
>>  wrote:
>> 
>> Folks,
>> I’m struggling to get my head around revIgniter / MVC concepts and map basic 
>> LC desktop concepts to the right places in LCS + revIgniter. (I’m still 
>> searching for a 'Rosetta Stone’ to translate between these two worlds!)  
>> 
>> My use case is to share public FAQs from specific pages designated as public 
>> in our knowledge base. I have a basic LC desktop prototype that I’m 
>> migrating to LCS + revIgniter. The desktop stack includes a single function 
>> stack script that logs into the KB server as a proxy ‘public user' and 
>> returns an access token string for subsequent page requests. 
>> 
>> To migrate this across to the server environment, I have simply transferred 
>> the stack script into a DocLogin.lc library file, replacing the final 
>> 'return “token”’ with put tToken into gData[“doc_token”] I may have 
>> misunderstood the revIgniter docs that this is the way to get the data 
>> ‘back’ to the controller, rather than use the desktop-style function do & 
>> return to a library (or stack) file?
>> 
>> A DocLogin.lc controller file then attempts to call the above library and 
>> open a view file to check that the token is available via 
>> [[gData[“doc_token"] ]] 
>> 
>> The controller is opening the view but the token merge field is not shown 
>> and adding the generic rigShowError “message” alerts that the library 
>> couldn’t be loaded. 
>> 
>> I’d appreciate a steer as I’ve a feeling my approach here is fundamentally 
>> wrong for the LCS + revIgniter way of working.
>> Thanks
>> Keith
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting hidden of lines very slow

2018-11-30 Thread Andre Alves Garzia via use-livecode

Kaveh,

I would work which lines should be shown and hidden inside a variable 
and then replace the whole field...


On 30/11/2018 13:07, Kaveh Bazargan wrote:

Yes Andre, that is the line that fixed it, in a split second :-)

But here is a follow-up: Now I want to hide all lines that have no 
text style and only show lines with colored text. I use:


repeat with i = 1 to the number of lines of fld 1
      if the textcolor of line i of fld "text" is not empty then
         set the hidden of line i of fld "text" to false
      end if
   end repeat

This is taking time too. Any suggestions how to speed this up?

On Fri, 30 Nov 2018 at 12:12, Andre Alves Garzia via use-livecode 
mailto:use-livecode@lists.runrev.com>> 
wrote:


There is another tip here in this thread about

set the hidden of line 1 to -1 of field "the field" to false

As a single command, it might be better.

On 30/11/2018 12:07, Kaveh Bazargan via use-livecode wrote:
> Thank you guys. I am always embarrassed to ask here as I know
the answer is
> a one liner!!
>
> And Andre the screen was locked already. :-)
>
> On Fri, 30 Nov 2018 at 11:56, Klaus major-k via use-livecode <
> use-livecode@lists.runrev.com
> wrote:
>
>> Hi Andre,
>>
>>> Am 30.11.2018 um 12:48 schrieb Andre Alves Garzia via
use-livecode <
>> use-livecode@lists.runrev.com
>:
>>> tied locking the screen first?
>> tied AND locked?
>> Andre, you are hardcore! :-D
>>
>>> On 30/11/2018 10:33, Kaveh Bazargan via use-livecode wrote:
 I have a text field with some 3500 lines of text. I want to
ensure all
 lines are visible, as I have hidden some before. I use:

 repeat with i = 1 the number of lines of fld 1
        set the hidden of line i of fld 1 to false
 end repeat

 This is taking over 1 minute to complete. I have tried
removing all
>> styling
 from the text so e.g. backgroundcolor is empty, etc. Same result.

 Any suggestions pls?
>> Best
>>
>> Klaus
>>
>> --
>> Klaus Major
>> http://www.major-k.de
>> kl...@major-k.de 
>>
>>
>> ___
>> use-livecode mailing list
>> use-livecode@lists.runrev.com

>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>

___
use-livecode mailing list
use-livecode@lists.runrev.com 
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode



--
Kaveh Bazargan
Director
River Valley Technologies  • 
Twitter  • LinkedIn 


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting hidden of lines very slow

2018-11-30 Thread Kaveh Bazargan via use-livecode
Yes Andre, that is the line that fixed it, in a split second :-)

But here is a follow-up: Now I want to hide all lines that have no text
style and only show lines with colored text. I use:

repeat with i = 1 to the number of lines of fld 1
  if the textcolor of line i of fld "text" is not empty then
 set the hidden of line i of fld "text" to false
  end if
   end repeat

This is taking time too. Any suggestions how to speed this up?

On Fri, 30 Nov 2018 at 12:12, Andre Alves Garzia via use-livecode <
use-livecode@lists.runrev.com> wrote:

> There is another tip here in this thread about
>
> set the hidden of line 1 to -1 of field "the field" to false
>
> As a single command, it might be better.
>
> On 30/11/2018 12:07, Kaveh Bazargan via use-livecode wrote:
> > Thank you guys. I am always embarrassed to ask here as I know the answer
> is
> > a one liner!!
> >
> > And Andre the screen was locked already. :-)
> >
> > On Fri, 30 Nov 2018 at 11:56, Klaus major-k via use-livecode <
> > use-livecode@lists.runrev.com> wrote:
> >
> >> Hi Andre,
> >>
> >>> Am 30.11.2018 um 12:48 schrieb Andre Alves Garzia via use-livecode <
> >> use-livecode@lists.runrev.com>:
> >>> tied locking the screen first?
> >> tied AND locked?
> >> Andre, you are hardcore! :-D
> >>
> >>> On 30/11/2018 10:33, Kaveh Bazargan via use-livecode wrote:
>  I have a text field with some 3500 lines of text. I want to ensure all
>  lines are visible, as I have hidden some before. I use:
> 
>  repeat with i = 1 the number of lines of fld 1
> set the hidden of line i of fld 1 to false
>  end repeat
> 
>  This is taking over 1 minute to complete. I have tried removing all
> >> styling
>  from the text so e.g. backgroundcolor is empty, etc. Same result.
> 
>  Any suggestions pls?
> >> Best
> >>
> >> Klaus
> >>
> >> --
> >> Klaus Major
> >> http://www.major-k.de
> >> kl...@major-k.de
> >>
> >>
> >> ___
> >> use-livecode mailing list
> >> use-livecode@lists.runrev.com
> >> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> >
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


-- 
Kaveh Bazargan
Director
River Valley Technologies  • Twitter
 • LinkedIn

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: LiveCode equivalent to 'cron' for automated background functions?

2018-11-30 Thread Keith Clarke via use-livecode
Thanks Andre - good call. 
Following others’ reminders of the single-threaded nature of LCS, I’m trying to 
rethink data flows as on-demand, to avoid all background tasks.
Best,
Keith

> On 30 Nov 2018, at 12:10, Andre Alves Garzia via use-livecode 
>  wrote:
> 
> Keith,
> 
> 
>> The examples in the dictionary look potentially useful for a couple of 
>> lightweight activities I’d like to have ticking-over in the background on my 
>> LC Server, pending page visits.
> 
> You shouldn't have the CGI engine hogging up like that, thats not how web 
> stuff is supposed to work. First, Apache (or whatever you're running) will 
> kill the process after some seconds if it fails to exit on its own. Second, 
> it is a waste of resources. Imagine that you have this running for every 
> request that is made, so each time a user requests your site, your LC Server 
> engine hangs in the background for a while, hogging up system resources.
> 
> LC Servers should reply as fast as possible and then exit. If you need a long 
> running process to do some administrative stuff regularly, then, consider 
> building a little script and running that as a real proper cronjob on the 
> server, not tied to visits.
> 
> Cheers
> 
> andre
> 
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Troubleshooting revIgniter library functions

2018-11-30 Thread Ralf Bitter via use-livecode
Hi Keith,  

in addition to Andre’s valuable tips I would like  
to comment that your approach should actually work,  
but be advised to make sure you include your custom  
library as described here:  

https://revigniter.com/userGuide/general/creating_libraries.html  

Furthermore you can leave your function as is i.e.  
call your library function within your DocLogin.lc controller like:  

put myDocLoginHandler() into gData["doc_token"]

For debugging purposes make sure the logs folder is writable,  
set the gConfig["logThreshold"]  in config.lc to 4 and check the  
log file in case something goes wrong.  


Ralf  

> On 30. Nov 2018, at 10:32, Keith Clarke via use-livecode 
>  wrote:
> 
> Folks,
> I’m struggling to get my head around revIgniter / MVC concepts and map basic 
> LC desktop concepts to the right places in LCS + revIgniter. (I’m still 
> searching for a 'Rosetta Stone’ to translate between these two worlds!)  
> 
> My use case is to share public FAQs from specific pages designated as public 
> in our knowledge base. I have a basic LC desktop prototype that I’m migrating 
> to LCS + revIgniter. The desktop stack includes a single function stack 
> script that logs into the KB server as a proxy ‘public user' and returns an 
> access token string for subsequent page requests. 
> 
> To migrate this across to the server environment, I have simply transferred 
> the stack script into a DocLogin.lc library file, replacing the final 'return 
> “token”’ with put tToken into gData[“doc_token”] I may have misunderstood the 
> revIgniter docs that this is the way to get the data ‘back’ to the 
> controller, rather than use the desktop-style function do & return to a 
> library (or stack) file?
> 
> A DocLogin.lc controller file then attempts to call the above library and 
> open a view file to check that the token is available via 
> [[gData[“doc_token"] ]] 
> 
> The controller is opening the view but the token merge field is not shown and 
> adding the generic rigShowError “message” alerts that the library couldn’t be 
> loaded. 
> 
> I’d appreciate a steer as I’ve a feeling my approach here is fundamentally 
> wrong for the LCS + revIgniter way of working.
> Thanks
> Keith


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting hidden of lines very slow

2018-11-30 Thread Andre Alves Garzia via use-livecode

There is another tip here in this thread about

set the hidden of line 1 to -1 of field "the field" to false

As a single command, it might be better.

On 30/11/2018 12:07, Kaveh Bazargan via use-livecode wrote:

Thank you guys. I am always embarrassed to ask here as I know the answer is
a one liner!!

And Andre the screen was locked already. :-)

On Fri, 30 Nov 2018 at 11:56, Klaus major-k via use-livecode <
use-livecode@lists.runrev.com> wrote:


Hi Andre,


Am 30.11.2018 um 12:48 schrieb Andre Alves Garzia via use-livecode <

use-livecode@lists.runrev.com>:

tied locking the screen first?

tied AND locked?
Andre, you are hardcore! :-D


On 30/11/2018 10:33, Kaveh Bazargan via use-livecode wrote:

I have a text field with some 3500 lines of text. I want to ensure all
lines are visible, as I have hidden some before. I use:

repeat with i = 1 the number of lines of fld 1
   set the hidden of line i of fld 1 to false
end repeat

This is taking over 1 minute to complete. I have tried removing all

styling

from the text so e.g. backgroundcolor is empty, etc. Same result.

Any suggestions pls?

Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode





___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: LiveCode equivalent to 'cron' for automated background functions?

2018-11-30 Thread Andre Alves Garzia via use-livecode

Keith,



The examples in the dictionary look potentially useful for a couple of 
lightweight activities I’d like to have ticking-over in the background on my LC 
Server, pending page visits.


You shouldn't have the CGI engine hogging up like that, thats not how 
web stuff is supposed to work. First, Apache (or whatever you're 
running) will kill the process after some seconds if it fails to exit on 
its own. Second, it is a waste of resources. Imagine that you have this 
running for every request that is made, so each time a user requests 
your site, your LC Server engine hangs in the background for a while, 
hogging up system resources.


LC Servers should reply as fast as possible and then exit. If you need a 
long running process to do some administrative stuff regularly, then, 
consider building a little script and running that as a real proper 
cronjob on the server, not tied to visits.


Cheers

andre




___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting hidden of lines very slow

2018-11-30 Thread Kaveh Bazargan via use-livecode
Thank you guys. I am always embarrassed to ask here as I know the answer is
a one liner!!

And Andre the screen was locked already. :-)

On Fri, 30 Nov 2018 at 11:56, Klaus major-k via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hi Andre,
>
> > Am 30.11.2018 um 12:48 schrieb Andre Alves Garzia via use-livecode <
> use-livecode@lists.runrev.com>:
> >
> > tied locking the screen first?
>
> tied AND locked?
> Andre, you are hardcore! :-D
>
> > On 30/11/2018 10:33, Kaveh Bazargan via use-livecode wrote:
> >> I have a text field with some 3500 lines of text. I want to ensure all
> >> lines are visible, as I have hidden some before. I use:
> >>
> >> repeat with i = 1 the number of lines of fld 1
> >>   set the hidden of line i of fld 1 to false
> >> end repeat
> >>
> >> This is taking over 1 minute to complete. I have tried removing all
> styling
> >> from the text so e.g. backgroundcolor is empty, etc. Same result.
> >>
> >> Any suggestions pls?
>
> Best
>
> Klaus
>
> --
> Klaus Major
> http://www.major-k.de
> kl...@major-k.de
>
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


-- 
Kaveh Bazargan
Director
River Valley Technologies  • Twitter
 • LinkedIn

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Setting hidden of lines very slow

2018-11-30 Thread Andre Alves Garzia via use-livecode

Klaus,

uhahuahuahuaahuauhahuhuahuahua it took me a while to notice.

On 30/11/2018 11:56, Klaus major-k via use-livecode wrote:

Hi Andre,


Am 30.11.2018 um 12:48 schrieb Andre Alves Garzia via use-livecode 
:

tied locking the screen first?

tied AND locked?
Andre, you are hardcore! :-D


On 30/11/2018 10:33, Kaveh Bazargan via use-livecode wrote:

I have a text field with some 3500 lines of text. I want to ensure all
lines are visible, as I have hidden some before. I use:

repeat with i = 1 the number of lines of fld 1
   set the hidden of line i of fld 1 to false
end repeat

This is taking over 1 minute to complete. I have tried removing all styling
from the text so e.g. backgroundcolor is empty, etc. Same result.

Any suggestions pls?

Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Setting hidden of lines very slow

2018-11-30 Thread Klaus major-k via use-livecode
Hi Andre,

> Am 30.11.2018 um 12:48 schrieb Andre Alves Garzia via use-livecode 
> :
> 
> tied locking the screen first?

tied AND locked? 
Andre, you are hardcore! :-D

> On 30/11/2018 10:33, Kaveh Bazargan via use-livecode wrote:
>> I have a text field with some 3500 lines of text. I want to ensure all
>> lines are visible, as I have hidden some before. I use:
>> 
>> repeat with i = 1 the number of lines of fld 1
>>   set the hidden of line i of fld 1 to false
>> end repeat
>> 
>> This is taking over 1 minute to complete. I have tried removing all styling
>> from the text so e.g. backgroundcolor is empty, etc. Same result.
>> 
>> Any suggestions pls?

Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Setting hidden of lines very slow

2018-11-30 Thread Andre Alves Garzia via use-livecode

tied locking the screen first?

On 30/11/2018 10:33, Kaveh Bazargan via use-livecode wrote:

I have a text field with some 3500 lines of text. I want to ensure all
lines are visible, as I have hidden some before. I use:

repeat with i = 1 the number of lines of fld 1
   set the hidden of line i of fld 1 to false
end repeat

This is taking over 1 minute to complete. I have tried removing all styling
from the text so e.g. backgroundcolor is empty, etc. Same result.

Any suggestions pls?



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Setting hidden of lines very slow

2018-11-30 Thread Niggemann, Bernd via use-livecode
Try

set the hidden of line 1 to - 1 of field 1 to false


Kind regards

Bernd


From: Kaveh Bazargan

I have a text field with some 3500 lines of text. I want to ensure all
lines are visible, as I have hidden some before. I use:

repeat with i = 1 the number of lines of fld 1
 set the hidden of line i of fld 1 to false
end repeat

This is taking over 1 minute to complete. I have tried removing all styling
from the text so e.g. backgroundcolor is empty, etc. Same result.

Any suggestions pls?

--
Kaveh Bazargan

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Setting hidden of lines very slow

2018-11-30 Thread Kaveh Bazargan via use-livecode
I have a text field with some 3500 lines of text. I want to ensure all
lines are visible, as I have hidden some before. I use:

repeat with i = 1 the number of lines of fld 1
  set the hidden of line i of fld 1 to false
end repeat

This is taking over 1 minute to complete. I have tried removing all styling
from the text so e.g. backgroundcolor is empty, etc. Same result.

Any suggestions pls?

-- 
Kaveh Bazargan
Director
River Valley Technologies  • Twitter
 • LinkedIn

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Troubleshooting revIgniter library functions

2018-11-30 Thread Andre Alves Garzia via use-livecode

Keith,

RevIgniter is a normal LiveCode collection of libraries. Have you read 
the getting started guide at:


  https://revigniter.com/userGuide/overview/getting_started.html

It will walk you through the concepts of MVC and how they are used in 
RevIgniter. Basically your models are the stuff that touch data, views 
are the templates that are shown to the user and controllers are where 
the business logic is. You can also have libraries. So if your DocLogin 
has a function that returns a token, you can call it from a model or a 
controller and get the value.


There is really no "1 minute explanation" that will clear it all, 
RevIgniter is quite easy and consistent but it requires you to go over 
its documentation at least once. Some URLs of interest are:


  https://revigniter.com/userGuide/overview/appflow.html

  https://revigniter.com/userGuide/tutorials/chat.html

I recommend doing the tutorial a lot.

Cheers

andre

On 30/11/2018 09:32, Keith Clarke via use-livecode wrote:

Folks,
I’m struggling to get my head around revIgniter / MVC concepts and map basic LC 
desktop concepts to the right places in LCS + revIgniter. (I’m still searching 
for a 'Rosetta Stone’ to translate between these two worlds!)

My use case is to share public FAQs from specific pages designated as public in 
our knowledge base. I have a basic LC desktop prototype that I’m migrating to 
LCS + revIgniter. The desktop stack includes a single function stack script 
that logs into the KB server as a proxy ‘public user' and returns an access 
token string for subsequent page requests.

To migrate this across to the server environment, I have simply transferred the 
stack script into a DocLogin.lc library file, replacing the final 'return “token”’ 
with put tToken into gData[“doc_token”] I may have misunderstood the revIgniter 
docs that this is the way to get the data ‘back’ to the controller, rather than use 
the desktop-style function do & return to a library (or stack) file?

A DocLogin.lc controller file then attempts to call the above library and open a 
view file to check that the token is available via [[gData[“doc_token"] ]]

The controller is opening the view but the token merge field is not shown and 
adding the generic rigShowError “message” alerts that the library couldn’t be 
loaded.

I’d appreciate a steer as I’ve a feeling my approach here is fundamentally 
wrong for the LCS + revIgniter way of working.
Thanks
Keith
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Safari vs Browser Widget

2018-11-30 Thread Andre Alves Garzia via use-livecode

Dan,

I am not expert in the widget but I do know quite a lot about browsers. 
Those APIs are restricted access API which usually require some sort of 
configuration on the browser library you're using when building your 
product, which is a convoluted way to say that LiveCode HQ proabably 
needs to set something on libbrowser for this to work out of the box.


I have checked the LC source code and found that the browser 
initialization depends on some factory called `MCBrowserFactoryRef` 
which is an abstraction on the browser engine being used. In your macOS 
case, I don't know if it is using CEF or WebKit but it if is CEF then 
there is a "enable-media-stream" argument that is usually passed via 
command-line parameters but in our case it probably need to be passed 
via `t_args` in the calls to `CefExecuteProcess()`. I am sure there is a 
corresponding WebKit thing to do but I am not sure what.


These kind of switches are needed because Camera APIs are sensitive and 
can lead to privacy abuse and security exploits, so they tend to be 
disabled by default unless configured or asken for permission. In case 
of embeddable browser libraries, they usually lack the UI elements to 
ask for permission, so in their case it is is usually something you 
configure in code.


You might ask HQ to add the CEF param as a property for the widget. It 
might be easy to add.


On 30/11/2018 00:04, Dan Friedman via use-livecode wrote:

Greeting!  I am hoping someone has an answer for this…

I am working on a HTML5 web page that accesses the device's camera.  When I 
open the url in Safari (on my Mac or iOS device), I am asked if it's ok to use 
the camera and everything works perfectly!   However, if I load this same url 
in the Browser Widget (or a plain native browser), it doesn’t ask to use the 
camera and it all fails.   Is this a limitation of the implementation of the 
browser in LiveCode, or is there a setting I have to set?

Thank you!
-Dan
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Troubleshooting revIgniter library functions

2018-11-30 Thread Keith Clarke via use-livecode
Folks,
I’m struggling to get my head around revIgniter / MVC concepts and map basic LC 
desktop concepts to the right places in LCS + revIgniter. (I’m still searching 
for a 'Rosetta Stone’ to translate between these two worlds!)  

My use case is to share public FAQs from specific pages designated as public in 
our knowledge base. I have a basic LC desktop prototype that I’m migrating to 
LCS + revIgniter. The desktop stack includes a single function stack script 
that logs into the KB server as a proxy ‘public user' and returns an access 
token string for subsequent page requests. 

To migrate this across to the server environment, I have simply transferred the 
stack script into a DocLogin.lc library file, replacing the final 'return 
“token”’ with put tToken into gData[“doc_token”] I may have misunderstood the 
revIgniter docs that this is the way to get the data ‘back’ to the controller, 
rather than use the desktop-style function do & return to a library (or stack) 
file?

A DocLogin.lc controller file then attempts to call the above library and open 
a view file to check that the token is available via [[gData[“doc_token"] ]] 

The controller is opening the view but the token merge field is not shown and 
adding the generic rigShowError “message” alerts that the library couldn’t be 
loaded. 

I’d appreciate a steer as I’ve a feeling my approach here is fundamentally 
wrong for the LCS + revIgniter way of working.
Thanks
Keith
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode