Down a leafy lane or up queer street?

Tore Nilsen tore.nilsen at me.com
Sun Apr 29 14:28:21 EDT 2018


If route66 is declared as a local variabel in the card script (and it must be declared outside any handlers), then all other scripts that uses this variabel must reside in the card script as well. If it is declared as a global variabel, it must be declared in all scripts that uses this variabel.

Tore Nilsen

> 29. apr. 2018 kl. 20:15 skrev Richmond Mathewson via use-livecode <use-livecode at lists.runrev.com>:
> 
> OK: finally I have sorted out the problem.
> 
> It seems that IFF I have this in my cardScript:
> 
> globalroute66
> 
> onpreOpenCard
> 
> putspecialFolderPath("resources") & "/assets/img/" intoroute66
> 
> everything works.
> 
> What I would like to know is:
> 
> Why does THAT script & the declaration of a global NOT work when it resides in the stackScript?
> 
> Richmond.
> 
> 
> On 29/4/2018 8:56 pm, Richmond Mathewson wrote:
>> So, I have corrected the specialFolderPath as per your instructions.
>> 
>> But I am still going wrong as my source for the imgData of img "p1" is still
>> listed asroute66p1.png . . .
>> 
>> Richmond.
>> 
>> On 29/4/2018 8:01 pm, J. Landman Gay via use-livecode wrote:
>>> In the IDE, specialFolderPath("resources") points to the folder containing the working stack. In a standalone it points to the folder containing files you've included in the Copy Files pane of the standalone builder.
>>> 
>>> Therefore, there will never be a folder specialFolderPath("resources") & "/Desktop/..." unless you have created a Desktop folder inside the one holding your stack. The correct path would be specialFolderPath("resources") & "/Obfuscated/May 2018/assets/img/"
>>> 
>>> -- 
>>> Jacqueline Landman Gay | jacque at hyperactivesw.com
>>> HyperActive Software | http://www.hyperactivesw.com
>>> On April 29, 2018 11:27:39 AM Richmond Mathewson via use-livecode <use-livecode at lists.runrev.com> wrote:
>>> 
>>>> I am being extremely stupid, and am getting so desperate I don't mind
>>>> admitting it.
>>>> 
>>>> I have a stack containing a series of images that are 'empty' images
>>>> with their
>>>> sources set to an external folder.
>>>> 
>>>> Now in my stackScript I have this:
>>>> 
>>>> |global route66 on preOpenStack put specialFolderPath("resources") &
>>>> "/Desktop/Obfuscated/May 2018/assets/img/" into route66 go to card
>>>> "TITLE" end preOpenStack|
>>>> 
>>>> and in my cardScript I have this:
>>>> 
>>>> |on preOpenCard set the lockScreen to true -------- set the filename of
>>>> img "p1" to empty ------- set the filename of img "p1" to (route66 &
>>>> "c1.png") set the blendlevel of img "p1" to 0 -------- wait 3 ticks set
>>>> the lockScreen to false end preOpenCard so, WHY cannot I see the target
>>>> image, merely a horrible grey square? Richmond. |
>>>> 
>>>> 
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> 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
>>> 
>>> 
>>> 
>>> 
>>> _______________________________________________
>>> use-livecode mailing list
>>> 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
>> 
> 
> _______________________________________________
> use-livecode mailing list
> 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