Fat widgets

Matthias Rebbe matthias_livecode_150811 at m-r-d.de
Sat Jul 8 10:49:52 EDT 2017


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 310000
‌matthiasrebbe.eu <http://matthiasrebbe.eu/>‌

> Am 08.07.2017 um 15:43 schrieb Kevin Miller via use-livecode <use-livecode at lists.runrev.com <mailto:use-livecode at 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 ~ kevin at livecode.com <mailto:kevin at livecode.com> ~ http://www.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" <use-livecode-bounces at lists.runrev.com <mailto:use-livecode-bounces at lists.runrev.com> on behalf of
> use-livecode at lists.runrev.com <mailto:use-livecode at 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 310000
>> matthiasrebbe.eu <http://matthiasrebbe.eu/> <http://matthiasrebbe.eu/ <http://matthiasrebbe.eu/>>
>> 
> 
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com <mailto:use-livecode at lists.runrev.com>
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode




More information about the use-livecode mailing list