Page 2 of 3
Re: images din't appear when files transfered
Posted: Thu Apr 12, 2018 9:31 pm
by dunbarx
Hah.
i am old, and though I never saw those before, I got them. Of course I have millennial children.
I once texted my daughter:
wnjutfce?
She didn't get it.
Craig
Re: images din't appear when files transfered
Posted: Thu Apr 12, 2018 9:57 pm
by bogs
Me either, poor girl
![Mr. Green :mrgreen:](./images/smilies/icon_mrgreen.gif)
Re: images din't appear when files transfered
Posted: Fri Apr 13, 2018 3:14 am
by SparkOut
Why Not Just Use Telephone For Contacting Everyone?
Re: images din't appear when files transfered
Posted: Fri Apr 13, 2018 3:30 am
by dunbarx
Ha.
"Why Not Just Use First Characters EveryWhere"
Craig
Re: images din't appear when files transfered
Posted: Fri Apr 13, 2018 6:44 am
by SparkOut
Wow, I was being silly, I never expected the first 4 letters actually to be what I made up!
Re: images din't appear when files transfered
Posted: Fri Apr 13, 2018 7:29 am
by bogs
I think I'll make SparkOut my official translator for first letter speak
![Twisted Evil :twisted:](./images/smilies/icon_twisted.gif)
Re: images din't appear when files transfered
Posted: Sat Apr 28, 2018 6:44 pm
by richmond62
What's wrong with this:
Code: Select all
on preOpenStack
set itemDel to "/"
set the defaultFolder to item 1 to -2 of (the effective fileName of this stack)
end preOpenStack
'Cos when I have that in a stack it
DOES NOT subsequently push all my reffed
image data into image containers in my stack.
Re: images din't appear when files transfered
Posted: Sat Apr 28, 2018 6:55 pm
by richmond62
When I did this:
Code: Select all
on preOpenStack
put specialFolderPath("resources")&"/myCrap/rez/" into sFolderPath
end preOpenStack
I DID get dull, grey squares, but NOT the pictures I expected.
Re: images din't appear when files transfered
Posted: Sun Apr 29, 2018 12:10 pm
by jmburnod
Hi Richmond
Did you try to set the filename of img to empty before setting the filename of img ?
Best
Jean-Marc
Re: images din't appear when files transfered
Posted: Sun Apr 29, 2018 5:09 pm
by richmond62
Thanks Jean-Marc . . .
In my openStack script I have this:
Code: Select all
global route66
on preOpenStack
put specialFolderPath("resources") & "/Desktop/Obfuscated/May 2018/assets/img/" into route66
go to card "TITLE"
end preOpenStack
and in the cardScript of the cards where the images reside I have this:
Code: Select all
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
now, when I open the properties palette of image "p1" I see that the
source is listed as
route66p1.png
and, obviously, the image is rubbish.
Re: images din't appear when files transfered
Posted: Sun Apr 29, 2018 5:20 pm
by Klaus
Code: Select all
...
put specialFolderPath("resources") & "/Desktop/Obfuscated/May 2018/assets/img/" into route66
...
Sigh, really? When did you start to use LC, Richmond, a couple of minutes ago?
In the IDE -> specialFolderPath("resources") points to the folder with the current stack is in!
So if your images are in folder "img" inside that folder, this will do:
Code: Select all
...
set the filename of img "p1" to (specialfolderpath("resources") & "/img/c1.png")
...
Re: images din't appear when files transfered
Posted: Sun Apr 29, 2018 6:05 pm
by richmond62
When did you start to use LC, Richmond, a couple of minutes ago?
No,
as you well know.
BUT,
as you also know well, I do not make my living with
LiveCode, and like many
other
LiveCoders only work in areas of programming that directly impinge on my needs
and interests . . .
I have NEVER, EVER (well, hardly ever) had to work with image data
from outwith the stack I am working with.
So, until very recently, if you had said to me, "What's a
relative path?"
I would have told you it was a route through the garden where the paving stones
had been laid by my Uncle.
![Very Happy :D](./images/smilies/icon_biggrin.gif)
Re: images din't appear when files transfered
Posted: Sun Apr 29, 2018 7:10 pm
by richmond62
OK: finally I have sorted out the problem.
It seems that IFF I have this in my
cardScript:
Code: Select all
global route66
on preOpenCard
put specialFolderPath("resources") & "/assets/img/" into route66
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?
AND,
Klaus: Please cut out the unhelpful remarks, because the
documentation would have one set relative paths and so on in
the
stackScript, which, in this case, at least,
disnae wark forbye, an Ahm unco forfechit wi thy breengin.
It helps me, no more than Thee, that LiveCode is written in English:
that language being neither thy nor my calf language.
Allus raxin fae the sense o yin vocable, syne ilka thocht isnae aa that mensefu. ![Cool 8)](./images/smilies/icon_cool.gif)
Re: images din't appear when files transfered
Posted: Sun Apr 29, 2018 7:23 pm
by Klaus
In LC you need to declare a global variable in every script (not handler) you use it!
That's why this works:
Code: Select all
global route66
on preOpenCard
put specialFolderPath("resources") & "/assets/img/" into route66
...
And a heartfelt "aa that mensefu" to you, too, buddy!
![Very Happy :D](./images/smilies/icon_biggrin.gif)
Re: images din't appear when files transfered
Posted: Sun Apr 29, 2018 7:47 pm
by richmond62
Like David and Jonathan:
"such love . . ."
Thanks,
Klaus.