Down a leafy lane or up queer street?

Richmond Mathewson richmondmathewson at gmail.com
Sat Apr 28 14:18:09 EDT 2018


Thanks.

Richmond.

On 28/4/2018 9:11 pm, Tore Nilsen via use-livecode wrote:
> Ah, my bad!
>
> I always place all my script at the same level, normally the stack level. Then declaring the local variabel at the start of the script make them accessible to all handlers. You can solve this either by declaring the variabel global in all script where you will use it, or place the scripts that will use it at the same level.
>
> Regards Tore
>
>> 28. apr. 2018 kl. 20:05 skrev Richmond Mathewson via use-livecode <use-livecode at lists.runrev.com>:
>>
>> No joy.
>>
>> What happens then is that, on looking in the properties palette for an image ("p11")
>>
>> having had
>>
>> setthefileNameofimg "p11" tosFolderPath & "c11.png"
>>
>> in the openCard script
>>
>> I see that its source is listed as sFolderPathc11.png
>>
>> Richmond.
>>
>>
>> On 28/4/2018 8:55 pm, Tore Nilsen via use-livecode wrote:
>>> What I do in these situations is to use the path stored in the variable sFolderPath like this
>>>
>>> set fileName of image “whateverImage” to sFolderPath & “imageName”
>>>
>>> or
>>>
>>> put sFolderPath & “imageName” into tFilePath
>>>
>>> set fileName of image “whateverImage” to tFilePath
>>>
>>>
>>> Tore Nilsen
>>>
>>>> 28. apr. 2018 kl. 19:51 skrev Richmond Mathewson via use-livecode <use-livecode at lists.runrev.com>:
>>>>
>>>> In theory that should work . . .
>>>>
>>>> But what happens is that I end with a grey square rather than the actual picture.
>>>>
>>>> Richmond.
>>>>
>>>> On 28/4/2018 8:42 pm, Tore Nilsen via use-livecode wrote:
>>>>> Try this:
>>>>>
>>>>> local sFolderPath
>>>>>
>>>>> on preOpenStack
>>>>>
>>>>> put specialFolderPath("resources")&"/myCrap/rez/" into sFolderPath
>>>>>
>>>>> end preOpenStack
>>>>>
>>>>>
>>>>> specialFolderPath(“resources”) will point to the folder containing the stack when you are in the IDE, and to the resources folder of your compiled application
>>>>>
>>>>>
>>>>> Tore Nilsen
>>>>>
>>>>>> 28. apr. 2018 kl. 19:38 skrev Richmond Mathewson via use-livecode <use-livecode at lists.runrev.com>:
>>>>>>
>>>>>> Here I go agin, replying to my own posting:
>>>>>>
>>>>>> I have this script in the stack:
>>>>>>
>>>>>> onpreOpenStack
>>>>>>
>>>>>> setitemDelto"/"
>>>>>>
>>>>>> setthedefaultFoldertoitem 1 to-2 of(theeffectivefileNameofthis stack)
>>>>>>
>>>>>> endpreOpenStack
>>>>>>
>>>>>> but it ain't working.
>>>>>>
>>>>>> Richmond.
>>>>>>
>>>>>>
>>>>>> On 28/4/2018 8:34 pm, Richmond Mathewson wrote:
>>>>>>> Probably both . . .
>>>>>>>
>>>>>>> So, there I am opening an on-going project I have been "somewhat remiss" about of late
>>>>>>> what with one thing and another.
>>>>>>>
>>>>>>> Now this project has a ton of images made via the Object/New Control/Image menu
>>>>>>> and for their image data in their property panels are referred to a folder called "rez"
>>>>>>> that resides in the same folder as my stack.
>>>>>>>
>>>>>>> Now when I set up the stack the source field in the property panels went something
>>>>>>> like this:
>>>>>>>
>>>>>>> /Users/richmondmathewson/Desktop/myCrap/rez/c7.png
>>>>>>>
>>>>>>> and "everything worked perfectly" . . .
>>>>>>>
>>>>>>> on reopening the stack the image data does not show up
>>>>>>> and the source fields contain this sort of thing:
>>>>>>>
>>>>>>> rez/c7.png
>>>>>>>
>>>>>>> now this "just won't do" as the . . . well, never mind; probably that is too filthy a joke for the Use-List.
>>>>>>>
>>>>>>> So . . . presumably, I need a sort of 'set the default file path' script in my openScript thang?
>>>>>>>
>>>>>>> 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
>>> _______________________________________________
>>> 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