Re: Mysterious new MetaCard file

2017-07-08 Thread Richard Gaskin via use-livecode

Mark Schonewille wrote:

> I got it running in 5 minutes. The guy who uploaded it says he has
> removed all references to passwords. I have no idea why this was a
> problem for him, but it is nice that he returned the modified files
> as required by the oss licence.

Depends on the license.  And in this case the code wasn't 
password-protected so that was never a concern at all.


The thread Mark linked to has the full backstory, but to address those 
two points here:


- MC IDE was released by MetaCard Corp. under the MIT License, which is 
not only GPL-compatible but also allows use in proprietary works.  We 
felt that was a good choice in case someone might want to use some of 
the IDE components, and since the "Ask Dialog" and other resources could 
be copied into a standalone it would be a necessity in such cases. GPL 
compatibility was just a nice extra; MC IDE went open source about a 
decade before the LC Community edition was announced, so of course we 
had know way to know that GPL compatibility would one day also be useful 
for running with that engine.


- The code was open; we were encrypting data.  We were storing prefs 
data in a stack file, and had a longer-term strategy of allowing plugins 
to use the same API.  Since it's possible some data might be sensitive, 
it made sense to at least encrypt that data stack file on disk so other 
programs wouldn't be able to read it easily.


What Bogs encountered wasn't locked code, just an error thrown by the LC 
Community engine when it encountered the line that set the password of 
the data stack.  Since all scripts are open, he was able to just remove 
that and now, as you've seen, it works well.


Of course today we have the encrypt and decrypt commands, so if I were 
doing that now I'd store an encrypted serialized array instead.


In fact, now that arrays can be serialized (added late in the game for 
us graybeards in v3.5 ) I rarely use stack files for storing data 
anymore, except in the rare cases where I need to store LC objects.


--
 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: Group does not exist after "copy to this card"

2017-07-08 Thread Alex Tweedly via use-livecode
I have "not a clue", but it looks like no-one else had any good ideas, 
so instead I'll make a couple of suggestions :-)


Try either of the following and see if it tells you anything.

command sivasiva_Share
   put sConfigA["shareControl"] into tShareControl
   put the name of the last control
   copy tShareControl to this card # it works! buttons fire, behavior triggers 
Wow
   put the name of the last control
end sivasiva_Share

or

command sivasiva_Share
   put sConfigA["shareControl"] into tShareControl
   put the number of controls
   copy tShareControl to this card # it works! buttons fire, behavior triggers 
Wow
   put the number of controls
end sivasiva_Share

If those don't help - try

command sivasiva_Share
   put sConfigA["shareControl"] into tShareControl
   put exists(group "shareUI") # false
   copy tShareControl to this card # it works! buttons fire, behavior triggers 
Wow
   wait for 0 millisecs with messages   -- if this is safe in your environment 
!!
   put exists(group "shareUI") #  ???
end sivasiva_Share

Alex.

On 07/07/2017 20:18, Sannyasin Brahmanathaswami via use-livecode wrote:

I doing this thing of saving a custom control in the loader stack on card 
4..but it's behavior is text only stack on external to the stack

group "shareUI""

then I have a new init handler that adds the long id's of these controls

global sConfigA

to then it is super easy to do this anywhere anytime, on other stacks and 
modules (loader stack is always present in memory and these controls are not 
overloaded with images so they don't take up a lot of RAM in the app package)

copy sConfigA["shareContro"] to this card

the control copies and appears and it has a behavior that fires,

so far this is all very cool "brilliant" in fact…  a new world of view 
object/classes opens up! wow..

but after the copy is done, the engine still doesn't acknowledge that the grp 
exists

command sivasiva_Share
  put sConfigA["shareControl"] into tShareControl
put exists(group "shareUI") # false
copy tShareControl to this card # it works! buttons fire, behavior triggers Wow
put exists(group "shareUI") #  oops: still returns false
end sivasiva_Share

so there is no way to prevent the instantiation of multiple copies of the 
custom control…

I *could* copy this particular control to *all* stack on preopenstack and then assume it 
is present, but there are caveats there… and I want to stay on this path of dynamic 
instantiation of view "classes" as needed. It has so much potential.  I could 
also do the things of setting flags… but this adds complexity to what should be simple

if not [some control exists]
   create it by copying the template
else
assume its already there, ready to go
end if



So we *do* need to know if the control actually copied and is now present on 
the card, albeit in an unsaved state.

BR
___
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: Mysterious new MetaCard file

2017-07-08 Thread Richmond Mathewson via use-livecode



On 7/8/17 10:17 pm, Mark Wieder via use-livecode wrote:

On 07/08/2017 11:51 AM, Mark Schonewille via use-livecode wrote:
I got it running in 5 minutes. The guy who uploaded it says he has 
removed all references to passwords. I have no idea why this was a 
problem for him, but it is nice that he returned the modified files 
as required by the oss licence.


The forum post has the details, but the tl;dr is that the community 
build of LiveCode doesn't (can't) support password-protected stacks.


I'm not really worried about that at all as I am 100% content with the 
LC IDE (well, the 7.1.4 one anyway), and just want to show the

MetaCard IDE to my Summer programming pupils.

Richmond.

___
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: Mysterious new MetaCard file

2017-07-08 Thread Mark Wieder via use-livecode

On 07/08/2017 11:51 AM, Mark Schonewille via use-livecode wrote:

I got it running in 5 minutes. The guy who uploaded it says he has removed all 
references to passwords. I have no idea why this was a problem for him, but it 
is nice that he returned the modified files as required by the oss licence.


The forum post has the details, but the tl;dr is that the community 
build of LiveCode doesn't (can't) support password-protected stacks.


--
 Mark Wieder
 ahsoftw...@gmail.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: Mysterious new MetaCard file

2017-07-08 Thread Mark Schonewille via use-livecode
I got it running in 5 minutes. The guy who uploaded it says he has removed all 
references to passwords. I have no idea why this was a problem for him, but it 
is nice that he returned the modified files as required by the oss licence.

⁣Verzonden door BlueMail ​

Op 8 jul. 2017 19:40, om 19:40, Richmond Mathewson via use-livecode 
 schreef:
>I have just received a note that a new file has been uploaded to
>the MetaCard Yahoo group:
>
>https://groups.yahoo.com/neo/groups/MC_IDE/conversations/messages
>
>from an email address rdbar...@sbcglobal.net
>
>This purports to be a new version of the mchome file . . .
>
>However I feel uncomfortable about it for a number of reasons:
>
>1. Who is "rdbar814" ?
>
>2. Why is there no adequate explanation as to what it really does, 
>because as far as I know
>there is no way to get metaCard running with an LC 8 or 9 engine?
>
>I have downloaded the ZIP file onto my Macintosh, but seriously wonder
>about the wisdom of unzipping it.
>
>Richmond.
>___
>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: Mysterious new MetaCard file

2017-07-08 Thread Richmond Mathewson via use-livecode

OK: I'll give the thing a try.

Richmond.

On 7/8/17 9:23 pm, Mark Wieder via use-livecode wrote:

On 07/08/2017 10:49 AM, Richmond Mathewson via use-livecode wrote:
The backgroundInformation still does not explain where or who this 
new file comes from.


Well, yes. It does.
rdba...@sbcglobal.net is the new moderator of the MC group. Only the 
moderator(s) can post files in the group. Or, for that matter, post 
any messages to the group.
And as you might read in the forum post, the new MC build in the zip 
file works with LC8/9.
And given that this is the first new MC build in six years, this might 
be a Big Deal. As Richard Gaskin points out in the forum post, it's 
the only *real* alternative IDE for the LC engine.




___
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: Mysterious new MetaCard file

2017-07-08 Thread Mark Wieder via use-livecode

On 07/08/2017 10:49 AM, Richmond Mathewson via use-livecode wrote:
The backgroundInformation still does not explain where or who this new 
file comes from.


Well, yes. It does.
rdba...@sbcglobal.net is the new moderator of the MC group. Only the 
moderator(s) can post files in the group. Or, for that matter, post any 
messages to the group.
And as you might read in the forum post, the new MC build in the zip 
file works with LC8/9.
And given that this is the first new MC build in six years, this might 
be a Big Deal. As Richard Gaskin points out in the forum post, it's the 
only *real* alternative IDE for the LC engine.


--
 Mark Wieder
 ahsoftw...@gmail.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: Mysterious new MetaCard file

2017-07-08 Thread Richmond Mathewson via use-livecode
The backgroundInformation still does not explain where or who this new 
file comes from.


Richmond.

On 7/8/17 8:44 pm, Mark Wieder via use-livecode wrote:

On 07/08/2017 10:39 AM, Richmond Mathewson via use-livecode wrote:

I have just received a note that a new file has been uploaded to
the MetaCard Yahoo group:

https://groups.yahoo.com/neo/groups/MC_IDE/conversations/messages

from an email address rdbar...@sbcglobal.net

This purports to be a new version of the mchome file . . .

However I feel uncomfortable about it for a number of reasons:

1. Who is "rdbar814" ?

2. Why is there no adequate explanation as to what it really does, 
because as far as I know

there is no way to get metaCard running with an LC 8 or 9 engine?

I have downloaded the ZIP file onto my Macintosh, but seriously wonder
about the wisdom of unzipping it.


Well, I have to commend you on your caution.
But here's the background information:

http://forums.livecode.com/viewtopic.php?f=29&t=2051



___
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: Mysterious new MetaCard file

2017-07-08 Thread Mark Wieder via use-livecode

On 07/08/2017 10:39 AM, Richmond Mathewson via use-livecode wrote:

I have just received a note that a new file has been uploaded to
the MetaCard Yahoo group:

https://groups.yahoo.com/neo/groups/MC_IDE/conversations/messages

from an email address rdbar...@sbcglobal.net

This purports to be a new version of the mchome file . . .

However I feel uncomfortable about it for a number of reasons:

1. Who is "rdbar814" ?

2. Why is there no adequate explanation as to what it really does, 
because as far as I know

there is no way to get metaCard running with an LC 8 or 9 engine?

I have downloaded the ZIP file onto my Macintosh, but seriously wonder
about the wisdom of unzipping it.


Well, I have to commend you on your caution.
But here's the background information:

http://forums.livecode.com/viewtopic.php?f=29&t=2051

--
 Mark Wieder
 ahsoftw...@gmail.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: Division by Zero Error

2017-07-08 Thread Mark Wieder via use-livecode

On 07/08/2017 08:26 AM, Roger Guay via use-livecode wrote:

I am using the try/catch method you mention, but it doesn’t seem to work 
reliably.


That's a bit disturbing. Can you post your code?

--
 Mark Wieder
 ahsoftw...@gmail.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

Mysterious new MetaCard file

2017-07-08 Thread Richmond Mathewson via use-livecode

I have just received a note that a new file has been uploaded to
the MetaCard Yahoo group:

https://groups.yahoo.com/neo/groups/MC_IDE/conversations/messages

from an email address rdbar...@sbcglobal.net

This purports to be a new version of the mchome file . . .

However I feel uncomfortable about it for a number of reasons:

1. Who is "rdbar814" ?

2. Why is there no adequate explanation as to what it really does, 
because as far as I know

there is no way to get metaCard running with an LC 8 or 9 engine?

I have downloaded the ZIP file onto my Macintosh, but seriously wonder
about the wisdom of unzipping it.

Richmond.
___
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: Fat widgets

2017-07-08 Thread Kevin Miller via use-livecode
I haven't encountered this because our widgets are a library. But - I'm 
guessing - you could try the revert command?

Sent from my iPhone

> On 8 Jul 2017, at 15:49, Matthias Rebbe via use-livecode 
>  wrote:
> 
> Thank you very much. :)
> 
> This makes it so much easier to test stacks between 8 and 9.
> 
> I had to make some adjustments, because the source of my extensions is stored 
> somewhere else and the updateMessage is also not present.
> I get the widget recompiled when i load the stack, but the widget in the 
> stack still does not show up correctly. I have to unload and reload the stack 
> again.
> Can i somehow refresh the stack w/o having to unload and load again?


___
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: Fat widgets

2017-07-08 Thread hh via use-livecode
Thank you very much for that.

This solves the situation where the LC-8 version and the LC-9 version are the
same (have the same lcb file). 
Thus you can only have widgets that use LCB-syntax/features that are present
in both LC-8 and LC-9, especially no new/different LCB features from LC-9.

> Kevin wrote:
> I don¹t see why not:
> 
> on openStack
>-- Build widgets and libraries
>if the environment is "development" then
>   _checkExtension _rootFolder() & "/extensions/com.library.folder.here"
> -- insert any others here
> end if
> 
> end openStack
> 
> --
> -- Remove all the files with the extension pExtension in the
> -- current directory
> --
> command _removeExtension pExtension
>get "find . -depth 1 -name " & quote & "*." & pExtension & quote && "
> -exec rm {} \;"
>get shell(it)
> end _removeExtension
> --
> -- _checkExtension pFolder
> --
> -- Proceed to build and install the extension in pFolder if need be
> --
> command _checkExtension pFolder
>local tOldFolder, tFiles
>local tExtensionFolder
>
>set the itemDel to slash
>
>put item -1 of pFolder into tExtensionFolder
>
>put the defaultFolder into tOldFolder
>set the defaultFolder to pFolder
>
>put the detailed files into tFiles
>
>set the itemDel to comma
>
>local tPackageTime, tLcbTime, tPackageName
>
>repeat for each line tFile in tFiles
>   local tFilename
>   put urlDecode(item 1 of tFile) into tFilename
>   
>   if tFilename ends with ".lce" then
>  -- Get the last modification date of the package
>  put item 5 of tFile into tPackageTime
>  put urlDecode(tFilename) into tPackageName
>  
>   else if tFilename ends with ".lcb" then
>  -- LCB file we want to check
>  put item 5 of tFile into tLcbTime
>   end if
>end repeat
>
>-- Guess the extension name from the folder - only take the
>-- first 4 segments, as orientabletext folder, for instance,
>-- also has the version appended to the widget name
>local tExtensionName
>set the itemDel to "."
>put item 1 to 4 of tExtensionFolder into tExtensionName
>
>if tPackageTime is empty or tPackagetime < tLcbTime or \
>  tExtensionName is not among the lines of the loadedExtensions then
>   -- Missing or outdated extension package, or extension not loaded
>   updateMessage "Building and installing extension" && tExtensionFolder
>   
>   _removeExtension "lci"
>   _removeExtension "lce"
>   _removeExtension "lcm"
>   _removeExtension "xml"
>   
>   -- Make sure to remove the extension beforehand, installation does
> not
>   -- work properly if the extension already exists
>   revIDEDeveloperExtensionUninstall pFolder
>   
>   wait 500 milliseconds with messages
>   
>   revIDEDeveloperExtensionInstall pFolder
>   
>   load extension from file tPackageName
>   
>   -- Let the IDE load the extension
>   wait 500 milliseconds with messages
>end if
>
>set the defaultFolder to tOldFolder
> end _checkExtension
> 
> --
> -- _rootFolder
> --
> -- Return the root folder of the application
> --
> function _rootFolder
>if the environment is "development" then
>   set the itemDel to slash
>   return item 1 to -3 of the filename of me
>   
>else
>   return specialFolderPath("engine")
>end if
> end _rootFolder

___
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: Division by Zero Error

2017-07-08 Thread Roger Guay via use-livecode
Thanks very much Mark, Herman and Mike. I am using the try/catch method you 
mention, but it doesn’t seem to work reliably. I’m probably doing something 
else wrong . . . I’ll keep trying. Thanks again for your time.

Roger
___
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: Fat widgets

2017-07-08 Thread Matthias Rebbe via use-livecode
Thank you very much. :)

This makes it so much easier to test stacks between 8 and 9.

I had to make some adjustments, because the source of my extensions is stored 
somewhere else and the updateMessage is also not present.
I get the widget recompiled when i load the stack, but the widget in the stack 
still does not show up correctly. I have to unload and reload the stack again.
Can i somehow refresh the stack w/o having to unload and load again?

Matthias

Matthias Rebbe
+49 5741 31
‌matthiasrebbe.eu ‌

> Am 08.07.2017 um 15:43 schrieb Kevin Miller via use-livecode 
> mailto:use-livecode@lists.runrev.com>>:
> 
> I don¹t see why not:
> 
> on openStack
>   -- Build widgets and libraries
>   if the environment is "development" then
>  _checkExtension _rootFolder() & "/extensions/com.library.folder.here"
> -- insert any others here
> end if
> 
> end openStack
> 
> --
> -- Remove all the files with the extension pExtension in the
> -- current directory
> --
> command _removeExtension pExtension
>   get "find . -depth 1 -name " & quote & "*." & pExtension & quote && "
> -exec rm {} \;"
>   get shell(it)
> end _removeExtension
> --
> -- _checkExtension pFolder
> --
> -- Proceed to build and install the extension in pFolder if need be
> --
> command _checkExtension pFolder
>   local tOldFolder, tFiles
>   local tExtensionFolder
> 
>   set the itemDel to slash
> 
>   put item -1 of pFolder into tExtensionFolder
> 
>   put the defaultFolder into tOldFolder
>   set the defaultFolder to pFolder
> 
>   put the detailed files into tFiles
> 
>   set the itemDel to comma
> 
>   local tPackageTime, tLcbTime, tPackageName
> 
>   repeat for each line tFile in tFiles
>  local tFilename
>  put urlDecode(item 1 of tFile) into tFilename
> 
>  if tFilename ends with ".lce" then
> -- Get the last modification date of the package
> put item 5 of tFile into tPackageTime
> put urlDecode(tFilename) into tPackageName
> 
>  else if tFilename ends with ".lcb" then
> -- LCB file we want to check
> put item 5 of tFile into tLcbTime
>  end if
>   end repeat
> 
>   -- Guess the extension name from the folder - only take the
>   -- first 4 segments, as orientabletext folder, for instance,
>   -- also has the version appended to the widget name
>   local tExtensionName
>   set the itemDel to "."
>   put item 1 to 4 of tExtensionFolder into tExtensionName
> 
>   if tPackageTime is empty or tPackagetime < tLcbTime or \
> tExtensionName is not among the lines of the loadedExtensions then
>  -- Missing or outdated extension package, or extension not loaded
>  updateMessage "Building and installing extension" && tExtensionFolder
> 
>  _removeExtension "lci"
>  _removeExtension "lce"
>  _removeExtension "lcm"
>  _removeExtension "xml"
> 
>  -- Make sure to remove the extension beforehand, installation does
> not
>  -- work properly if the extension already exists
>  revIDEDeveloperExtensionUninstall pFolder
> 
>  wait 500 milliseconds with messages
> 
>  revIDEDeveloperExtensionInstall pFolder
> 
>  load extension from file tPackageName
> 
>  -- Let the IDE load the extension
>  wait 500 milliseconds with messages
>   end if
> 
>   set the defaultFolder to tOldFolder
> end _checkExtension
> 
> --
> -- _rootFolder
> --
> -- Return the root folder of the application
> --
> function _rootFolder
>   if the environment is "development" then
>  set the itemDel to slash
>  return item 1 to -3 of the filename of me
> 
>   else
>  return specialFolderPath("engine")
>   end if
> end _rootFolder
> 
> 
> Kind regards,
> 
> Kevin
> 
> Kevin Miller ~ ke...@livecode.com  ~ 
> http://www.livecode.com/ 
> LiveCode: Everyone can create apps
> 
> 
> 
> 
> On 08/07/2017, 14:30, "use-livecode on behalf of Matthias Rebbe via
> use-livecode"   on behalf of
> use-livecode@lists.runrev.com > wrote:
> 
>> Kevin,
>> 
>> is it possible to get that script or is it not for the public?
>> 
>> Regards,
>> Matthias
>> 
>> Matthias Rebbe
>> +49 5741 31
>> matthiasrebbe.eu  > >
>> 
> 
> 
> 
> ___
> 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: Fat widgets

2017-07-08 Thread Kevin Miller via use-livecode
I don¹t see why not:

on openStack
   -- Build widgets and libraries
   if the environment is "development" then
  _checkExtension _rootFolder() & "/extensions/com.library.folder.here"
-- insert any others here
end if

end openStack

--
-- Remove all the files with the extension pExtension in the
-- current directory
--
command _removeExtension pExtension
   get "find . -depth 1 -name " & quote & "*." & pExtension & quote && "
-exec rm {} \;"
   get shell(it)
end _removeExtension
--
-- _checkExtension pFolder
--
-- Proceed to build and install the extension in pFolder if need be
--
command _checkExtension pFolder
   local tOldFolder, tFiles
   local tExtensionFolder
   
   set the itemDel to slash
   
   put item -1 of pFolder into tExtensionFolder
   
   put the defaultFolder into tOldFolder
   set the defaultFolder to pFolder
   
   put the detailed files into tFiles
   
   set the itemDel to comma
   
   local tPackageTime, tLcbTime, tPackageName
   
   repeat for each line tFile in tFiles
  local tFilename
  put urlDecode(item 1 of tFile) into tFilename
  
  if tFilename ends with ".lce" then
 -- Get the last modification date of the package
 put item 5 of tFile into tPackageTime
 put urlDecode(tFilename) into tPackageName
 
  else if tFilename ends with ".lcb" then
 -- LCB file we want to check
 put item 5 of tFile into tLcbTime
  end if
   end repeat
   
   -- Guess the extension name from the folder - only take the
   -- first 4 segments, as orientabletext folder, for instance,
   -- also has the version appended to the widget name
   local tExtensionName
   set the itemDel to "."
   put item 1 to 4 of tExtensionFolder into tExtensionName
   
   if tPackageTime is empty or tPackagetime < tLcbTime or \
 tExtensionName is not among the lines of the loadedExtensions then
  -- Missing or outdated extension package, or extension not loaded
  updateMessage "Building and installing extension" && tExtensionFolder
  
  _removeExtension "lci"
  _removeExtension "lce"
  _removeExtension "lcm"
  _removeExtension "xml"
  
  -- Make sure to remove the extension beforehand, installation does
not
  -- work properly if the extension already exists
  revIDEDeveloperExtensionUninstall pFolder
  
  wait 500 milliseconds with messages
  
  revIDEDeveloperExtensionInstall pFolder
  
  load extension from file tPackageName
  
  -- Let the IDE load the extension
  wait 500 milliseconds with messages
   end if
   
   set the defaultFolder to tOldFolder
end _checkExtension

--
-- _rootFolder
--
-- Return the root folder of the application
--
function _rootFolder
   if the environment is "development" then
  set the itemDel to slash
  return item 1 to -3 of the filename of me
  
   else
  return specialFolderPath("engine")
   end if
end _rootFolder


Kind regards,

Kevin

Kevin Miller ~ ke...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps




On 08/07/2017, 14:30, "use-livecode on behalf of Matthias Rebbe via
use-livecode"  wrote:

>Kevin,
>
>is it possible to get that script or is it not for the public?
>
>Regards,
>Matthias
>
>Matthias Rebbe
>+49 5741 31
>matthiasrebbe.eu 
>



___
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: debugging a CEF browser instance

2017-07-08 Thread Matthias Rebbe via use-livecode
Bernard,

in case you are filing a bug report could you please post the bug id here?
I would like to add a comment with some websites urls i have problems with when 
using the widget /CEF browser.


Regards,
Matthias

Matthias Rebbe
+49 5741 31
‌matthiasrebbe.eu ‌

> Am 08.07.2017 um 14:59 schrieb Mark Waddingham via use-livecode 
> mailto:use-livecode@lists.runrev.com>>:
> 
> Hi Bernard,
> 
> There's no list, no. The widget is a reasonably thin wrapper around either 
> CEF or (on Mac, iOS and Android) the system provided WebView.
> 
> Without actually seeing cases to investigate which do not work as expected it 
> is hard to advise what the problem might be (although 'cross origin requests' 
> is one possibility).
> 
> Certainly as we discover such issues documenting them in the dictionary would 
> be useful.
> 
> As mentioned before if you could file a bug report so we can look into it, 
> that would be most helpful.
> 
> Warmest Regards,
> 
> Mark.
> 
> Sent from my iPhone
> 
>> On 8 Jul 2017, at 09:59, Bernard Devlin via use-livecode 
>> mailto:use-livecode@lists.runrev.com>> wrote:
>> 
>> Hi Mark,
>> 
>> I suspect this is the problem. Is there a list of things which the LC
>> embedded browser forbids? Is there an explanation of the rationale for the
>> embedded browser to behave differently from a default browser?
>> 
>> This should be noted in the Dictionary, perhaps in the top entry
>> of: com.livecode.widget.browser.  Those who try Livecode for the first time
>> and discover that the browser widget "doesn't work reliably" (which is how
>> it appeared to me) may simply give up on Livecode.  Indeed, it might be
>> better if a warning appears when a page attempts to do something that has
>> been restricted (assuming the browser widget throws an exception when such
>> things happen).
>> 
>> Regards
>> Bernard
>> 
>> On Fri, Jul 7, 2017 at 1:25 PM, Mark Waddingham via use-livecode <
>> use-livecode@lists.runrev.com > wrote:
>> 
>>> 
>>> 
>>> The fact it doesn't work in either Mac's WebView of CEF may suggest that
>>> the webpage
>>> is doing something which is 'not allowed' by default
>> ___
>> 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: Fat widgets

2017-07-08 Thread Matthias Rebbe via use-livecode
Kevin,

is it possible to get that script or is it not for the public?

Regards,
Matthias

Matthias Rebbe
+49 5741 31
‌matthiasrebbe.eu ‌

> Am 08.07.2017 um 12:32 schrieb Kevin Miller via use-livecode 
> mailto:use-livecode@lists.runrev.com>>:
> 
> What we do one one large project that uses widgets and moves between 8 and
> 9 is to automatically recompile them on startup using a script. The logic
> is simple - if a try determines the widget library functions are not
> running and available, uninstall the widget, recompile it and reinstall
> it. Its pretty much instant to do that and its mean that (in this project
> at least) we¹ve stopped thinking about this issue.
> 
> Kind regards,
> 
> Kevin
> 
> Kevin Miller ~ ke...@livecode.com  ~ 
> http://www.livecode.com/ 
> LiveCode: Everyone can create apps
> 
> 
> 
> 
> On 08/07/2017, 11:22, "use-livecode on behalf of hh via use-livecode"
>   on behalf of
> use-livecode@lists.runrev.com > wrote:
> 
>> This is the current situation:
>> [*] A stack that contains a widget that is compiled with LC 8.1.5
>> can not be used with any other LC version than LC 8.1.5,
>> [*] A stack that contains a widget that is compiled with LC 9.0.0
>> can not be used with any other LC version than LC 9.0.0
>> 
>> Mark Waddingham did recently already post thoughts to that here (see
>> below).
>> 
>> Option (1) below is the build of "fat widgets" that contain several
>> binaries,
>> one for each currently valid widget format. Would be great, thus one
>> could be
>> "downward compatible" in LC 8/9.
>> 
>> Is there any chance to enable such "fat widgets" in the short future?
>> [And how is this solved for the current company-widgets (Clock etc.)?]
>> 
>>> On Jun 16, 2017; 11:10 Mark wrote:
 [MatthiasRebbe wrote:] Mark,
 regarding to recompiling widget for newer LC version:
 If i use LC 8 and 9, do i have to recompile it every time i use the
 other version?
>>> 
>>> Right now - yes - the lcm (compiled LCB) formats are not compatible.
>>> 
>>> There are a couple of potential solutions:
>>> 
>>> 1) Make it so that multiple LCM versions can sit in the same extension.
>>> We can package up the lcb toolchain for each version as a distinct
>>> download to help with this.
>>> 
>>> 2) Have a plugin in the IDE which fetches a git repo containing a widget
>>> (or widgets) and compiles them locally. lc-compile is really lightweight
>>> and bundled into the IDE so doing this automatically is quite
>>> straight-forward.
>>> 
>>> Case (1) would work for people wanting to distribute lce files which
>>> people can just install on their machine. Case (2) is suitable
>>> particularly for community widgets - it would mean that anyone
>>> subscribing to a particular 'widget repo' could get updates as soon as
>>> they are pushed by the maintainer.
>>> 
>>> I think it is worth doing (1) regardless - it is a simple matter of
>>> having say 'module.8.lcm' and 'module.9.lcm' files. The 9 format is
>>> unstable until we go GM, but the 8 format is now 'stable' - i.e. won't
>>> change ever again.
>> 
>> ___
>> 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: debugging a CEF browser instance

2017-07-08 Thread Mark Waddingham via use-livecode
Hi Bernard,

There's no list, no. The widget is a reasonably thin wrapper around either CEF 
or (on Mac, iOS and Android) the system provided WebView.

Without actually seeing cases to investigate which do not work as expected it 
is hard to advise what the problem might be (although 'cross origin requests' 
is one possibility).

Certainly as we discover such issues documenting them in the dictionary would 
be useful.

As mentioned before if you could file a bug report so we can look into it, that 
would be most helpful.

Warmest Regards,

Mark.

Sent from my iPhone

> On 8 Jul 2017, at 09:59, Bernard Devlin via use-livecode 
>  wrote:
> 
> Hi Mark,
> 
> I suspect this is the problem. Is there a list of things which the LC
> embedded browser forbids? Is there an explanation of the rationale for the
> embedded browser to behave differently from a default browser?
> 
> This should be noted in the Dictionary, perhaps in the top entry
> of: com.livecode.widget.browser.  Those who try Livecode for the first time
> and discover that the browser widget "doesn't work reliably" (which is how
> it appeared to me) may simply give up on Livecode.  Indeed, it might be
> better if a warning appears when a page attempts to do something that has
> been restricted (assuming the browser widget throws an exception when such
> things happen).
> 
> Regards
> Bernard
> 
> On Fri, Jul 7, 2017 at 1:25 PM, Mark Waddingham via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> 
>> 
>> 
>> The fact it doesn't work in either Mac's WebView of CEF may suggest that
>> the webpage
>> is doing something which is 'not allowed' by default
> ___
> 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: Division by Zero Error

2017-07-08 Thread Mike Bonner via use-livecode
I use the try/catch/finally method mark mentions if there is a chance of
divide by 0 errors.  That way, no need to predict, just try it, and if
theres an error, respond accordingly.

On Sat, Jul 8, 2017 at 1:08 AM, hh via use-livecode <
use-livecode@lists.runrev.com> wrote:

> -- d0 is what you judge as "is at about zero" for your input
> -- select it such in size, that you don't get an "overflow" or
> -- such that 1/d0 is your max ± vertical plot value (= clipping)
>
> function f3 x
>local d0=0.001
>if abs(x-3) < d0 then
>   return empty -- don't plot in case of an empty return
>else return 1/(x-3)
> end f3
>
>
> ___
> 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: Fat widgets

2017-07-08 Thread Kevin Miller via use-livecode
What we do one one large project that uses widgets and moves between 8 and
9 is to automatically recompile them on startup using a script. The logic
is simple - if a try determines the widget library functions are not
running and available, uninstall the widget, recompile it and reinstall
it. Its pretty much instant to do that and its mean that (in this project
at least) we¹ve stopped thinking about this issue.

Kind regards,

Kevin

Kevin Miller ~ ke...@livecode.com ~ http://www.livecode.com/
LiveCode: Everyone can create apps




On 08/07/2017, 11:22, "use-livecode on behalf of hh via use-livecode"
 wrote:

>This is the current situation:
>[*] A stack that contains a widget that is compiled with LC 8.1.5
>can not be used with any other LC version than LC 8.1.5,
>[*] A stack that contains a widget that is compiled with LC 9.0.0
>can not be used with any other LC version than LC 9.0.0
>
>Mark Waddingham did recently already post thoughts to that here (see
>below).
>
>Option (1) below is the build of "fat widgets" that contain several
>binaries,
>one for each currently valid widget format. Would be great, thus one
>could be
>"downward compatible" in LC 8/9.
>
>Is there any chance to enable such "fat widgets" in the short future?
>[And how is this solved for the current company-widgets (Clock etc.)?]
>
>> On Jun 16, 2017; 11:10 Mark wrote:
>> > [MatthiasRebbe wrote:] Mark,
>> > regarding to recompiling widget for newer LC version:
>> > If i use LC 8 and 9, do i have to recompile it every time i use the
>> > other version?
>> 
>> Right now - yes - the lcm (compiled LCB) formats are not compatible.
>> 
>> There are a couple of potential solutions:
>> 
>> 1) Make it so that multiple LCM versions can sit in the same extension.
>> We can package up the lcb toolchain for each version as a distinct
>> download to help with this.
>> 
>> 2) Have a plugin in the IDE which fetches a git repo containing a widget
>> (or widgets) and compiles them locally. lc-compile is really lightweight
>> and bundled into the IDE so doing this automatically is quite
>> straight-forward.
>> 
>> Case (1) would work for people wanting to distribute lce files which
>> people can just install on their machine. Case (2) is suitable
>> particularly for community widgets - it would mean that anyone
>> subscribing to a particular 'widget repo' could get updates as soon as
>> they are pushed by the maintainer.
>> 
>> I think it is worth doing (1) regardless - it is a simple matter of
>> having say 'module.8.lcm' and 'module.9.lcm' files. The 9 format is
>> unstable until we go GM, but the 8 format is now 'stable' - i.e. won't
>> change ever again.
>
>___
>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


Fat widgets

2017-07-08 Thread hh via use-livecode
This is the current situation:
[*] A stack that contains a widget that is compiled with LC 8.1.5
can not be used with any other LC version than LC 8.1.5,
[*] A stack that contains a widget that is compiled with LC 9.0.0
can not be used with any other LC version than LC 9.0.0

Mark Waddingham did recently already post thoughts to that here (see below).

Option (1) below is the build of "fat widgets" that contain several binaries,
one for each currently valid widget format. Would be great, thus one could be
"downward compatible" in LC 8/9.

Is there any chance to enable such "fat widgets" in the short future?
[And how is this solved for the current company-widgets (Clock etc.)?]

> On Jun 16, 2017; 11:10 Mark wrote:
> > [MatthiasRebbe wrote:] Mark,
> > regarding to recompiling widget for newer LC version:
> > If i use LC 8 and 9, do i have to recompile it every time i use the
> > other version?
> 
> Right now - yes - the lcm (compiled LCB) formats are not compatible.
> 
> There are a couple of potential solutions:
> 
> 1) Make it so that multiple LCM versions can sit in the same extension.
> We can package up the lcb toolchain for each version as a distinct
> download to help with this.
> 
> 2) Have a plugin in the IDE which fetches a git repo containing a widget
> (or widgets) and compiles them locally. lc-compile is really lightweight
> and bundled into the IDE so doing this automatically is quite
> straight-forward.
> 
> Case (1) would work for people wanting to distribute lce files which
> people can just install on their machine. Case (2) is suitable
> particularly for community widgets - it would mean that anyone
> subscribing to a particular 'widget repo' could get updates as soon as
> they are pushed by the maintainer.
> 
> I think it is worth doing (1) regardless - it is a simple matter of
> having say 'module.8.lcm' and 'module.9.lcm' files. The 9 format is
> unstable until we go GM, but the 8 format is now 'stable' - i.e. won't
> change ever again.

___
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: debugging a CEF browser instance

2017-07-08 Thread Bernard Devlin via use-livecode
Hi Mark,

I suspect this is the problem. Is there a list of things which the LC
embedded browser forbids? Is there an explanation of the rationale for the
embedded browser to behave differently from a default browser?

This should be noted in the Dictionary, perhaps in the top entry
of: com.livecode.widget.browser.  Those who try Livecode for the first time
and discover that the browser widget "doesn't work reliably" (which is how
it appeared to me) may simply give up on Livecode.  Indeed, it might be
better if a warning appears when a page attempts to do something that has
been restricted (assuming the browser widget throws an exception when such
things happen).

Regards
Bernard

On Fri, Jul 7, 2017 at 1:25 PM, Mark Waddingham via use-livecode <
use-livecode@lists.runrev.com> wrote:

>
>
> The fact it doesn't work in either Mac's WebView of CEF may suggest that
> the webpage
> is doing something which is 'not allowed' by default
___
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: Division by Zero Error

2017-07-08 Thread hh via use-livecode
-- d0 is what you judge as "is at about zero" for your input
-- select it such in size, that you don't get an "overflow" or
-- such that 1/d0 is your max ± vertical plot value (= clipping)

function f3 x
   local d0=0.001 
   if abs(x-3) < d0 then
  return empty -- don't plot in case of an empty return
   else return 1/(x-3)
end f3


___
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: Division by Zero Error

2017-07-08 Thread Mark Schonewille via use-livecode

oh! denominator!

Kind regards,

Mark Schonewille
http://economy-x-talk.com
https://www.facebook.com/marksch

Buy the most extensive book on the
LiveCode language:
http://livecodebeginner.economy-x-talk.com

Op 08-Jul-17 om 09:03 schreef Mark Schonewille:

Usually, I can predict that a numerator is going to be 0, e.g. in
1/(x^2). I just check the value of the numerator before doing the division.

In rare cases, I can't predict the value of the numerator. In those
cases, I put a try control structure around the offending lines and some
code to clean up after the "final" line.

Kind regards,

Mark Schonewille
http://economy-x-talk.com
https://www.facebook.com/marksch

Buy the most extensive book on the
LiveCode language:
http://livecodebeginner.economy-x-talk.com

Op 08-Jul-17 om 05:35 schreef Roger Guay via use-livecode:

I often find that I have to deal with a division by zero error message
in plotting functions, solving equation etc. Are there methods or
techniques used to programmatically handle or work-around a possible
division by zero? e.g. If I want to evaluate y= 1/(x-3), what can I do
to deal with a possible x=3 situation?

Thanks for your help,

Roger
___
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: Division by Zero Error

2017-07-08 Thread Mark Schonewille via use-livecode
Usually, I can predict that a numerator is going to be 0, e.g. in 
1/(x^2). I just check the value of the numerator before doing the division.


In rare cases, I can't predict the value of the numerator. In those 
cases, I put a try control structure around the offending lines and some 
code to clean up after the "final" line.


Kind regards,

Mark Schonewille
http://economy-x-talk.com
https://www.facebook.com/marksch

Buy the most extensive book on the
LiveCode language:
http://livecodebeginner.economy-x-talk.com

Op 08-Jul-17 om 05:35 schreef Roger Guay via use-livecode:

I often find that I have to deal with a division by zero error message in 
plotting functions, solving equation etc. Are there methods or techniques used 
to programmatically handle or work-around a possible division by zero? e.g. If 
I want to evaluate y= 1/(x-3), what can I do to deal with a possible x=3 
situation?

Thanks for your help,

Roger
___
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