I have blown the dust off an older Livecode project that used some of the UI methods briefed by Scott Rossi back in 2014. Specifically how to blur the user interface while displaying a dialog.
Unfortunately the same code in HyperXtalk fails with an error message and the blur command is not listed in the dictionary. This page suggests that the command was added in Livecode V8 blur | LiveCode Documentation .
Has the command been removed on purpose?
command blurTheCard
local theImageData
if blurBusy then exit blurTheCard
put true into blurBusy
put the effectRate into ER
--set effectRate to 1000
local theNewImageData
reset the templateImage
wait 1 millisecs with messages
lock screen for visual effect
import snapshot from this cd
set the uBlurred of last img to true
set the name of last img to "BlurredCard"
put imageData of last img into theImageData
blur 30, "theImageData", width of last img, height of last img, "theNewImageData"
set imageData of last img to theNewImageData
unlock screen with visual "dissolve" very fast
put false into blurBusy
end blurTheCard
command unblurTheCard
lock screen for visual effect
if there is an image "BlurredCard" then
if the uBlurred of img "BlurredCard" then
delete img "BlurredCard"
end if
end if
unlock screen with visual "dissolve" very fast
set effectRate to ER
end unblurTheCard
I don’t think it’s ever been included. I went back to 0.9.6 and the entry is not included in the documentation. I’ll have a look at the code to see if it’s in the repo at all.
Here is the copyright from the version in the LC community edition. Obviously I have no idea what is involved to add it to HyperXtalk or it others think its worthy on inclusion.
Copyright (c) 2013 Trevor DeVore
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
So it looks like it’s just Intel code, as the version shipped with OpenXTalk does not run in the ARM build, but does run in the Intel build (through Rosetta)
Not quite there! I have just posted the following on the OpenXtalk forum:
Thanks for the updated blur.bundle. My installation was to just replace the old blur.bundle with the new. From there things are odd: The demo stack (which contains some very familiar scripts - thanks Scott R.) refuses to open in OXTLite v.1.15 but it does open in HyperXtalk. It refuses to find the blur command when run in HyperXtalk but if the field, the button and stack script are copied into a new OXTLite script and run in the IDE then the text does blur. However, once saved the stack file that OXTLite created refuses to load back into OXTLite but does load into HyperXtalk, its all rather confusing.
So in summary:
OxtLite - refuses to open the demo stack.
HyperXtalk - opens the demostack but throws an error when it hits the blur command.
Open both IDEs, copy the components from the demo stack open in HyperXtalk to a new stack created in OXTLite, then run - the text is blured o.k. Save the new stack and attempt to reload then OXTLite throws an error.
I’m attempting to load it as an external saved outside the IDE package. HyperXtalk finds it but the OS steps in and refuses to load it because it is unable to check for malware. I followed a tutorial from 2013 so there is every chance that this mechanism no longer works because of changes to the OS.
I have been able to get the updated blur.bundle to work in HyperXtalk.
I did a clean install of both OpenXtalk and HyperXtalk. Next I replaced the original blur.bundle with the new one in Tools/Ext/Blur version no/ inside OpenXtalk.
Tested that it worked.
The clean download of HyperXtalk lacks the Ext folder so I just copied it across from OXTLite and then deleted all the additions except for the blur folder.
Instead of messing with the application bundle, you can always put the external in your user external folder (~/Documents/HyperXTalk/Externals/) that way you don’t have to worry about the code-signing breaking or trying to work around it.
But not the whole folder, just the actual bundle file. Seems like the code needs some updating to me. Also does not look like docs ever adjust for externals.
Thanks for the steer. I am using this method as it means I can re-install HyperXtalk and not have to go through the hassle of running Terminal commands.
I’m guessing that these are others like me who are not familiar with using “externals” so here is what my personal folder of “User Extensions” looks like:
Note that the text file describes all the extensions in the folder, one per line with each line being name,bundleName.bundle. I believe that the “name” portion comes from the plist file inside the bundle (CFBundleName) and the part after the comma is the name of the bundle as the Finder displays it. This means the Finder display name can be changed by the user as long as the text file is updated.