Re: Problem an Repeat Loop

2020-09-28 Thread Sannyasin Brahmanathaswami via use-livecode
Yes! I was thinking of a one card, Sheesh
It all worked!

Paul Dupuis wrote:

set the itemDelimiter to “|”
repeat with x = 2 to sTotalSceneCount
set the filename of img "slideImage" of card x to line x of sImageList
set the text of fld "mainText" of card x to item x of of sQuoteList
end repeat

 Brian Milby wrote:

image “slideImage” of cd x
fld “mainText” of cd x

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Problem an Repeat Loop

2020-09-28 Thread Brian Milby via use-livecode
The long ID of the image will be different for each card, so this loop won’t 
work as expected.

Also, do you really need to go to the card?  You probably could build the 
object reference to include the card.  So you would use:

image “slideImage” of cd x
fld “mainText” of cd x

Sent from my iPhone

> On Sep 28, 2020, at 8:43 AM, Sannyasin Brahmanathaswami via use-livecode 
>  wrote:
> 
> I use the long name of the image
> 
> local sStoryImage
> put the long id of img "slideImage" into sStoryImage
> 
> still:
> 
> # for development
> local tPath
> repeat with x = 2 to sTotalSceneCount
> 
> put line x of sImageList into tPath
>go to card x
> set the filename of sStoryImage to tPath
> set the itemDelimiter to “|”
> put item x of sQuoteList into fld “mainText”
> end repeat
> 
> # I get a full line 
> 
> stack “makeStoryFromDisk”: execution error at line 68 (Chunk: error in 
> object expression), char 1
> 
> It is exactly the same as in input for behavior_story except that
> do not work a repeat loop?
> 
> 
>  Tore Nilsen wrote:
> 
>You do not refer to any object type when you try to set the fileName of 
> what should possibly be an image. 
> 
>Try this:
>Set the fileName of image sStoryImage to tPath
> 
>Best regards 
>Tore Nilsen
> 
> 
> 
> ___
> use-livecode mailing list
> use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Problem an Repeat Loop

2020-09-28 Thread Paul Dupuis via use-livecode

On 9/28/2020 8:42 AM, Sannyasin Brahmanathaswami via use-livecode wrote:

  repeat with x = 2 to sTotalSceneCount

put line x of sImageList into tPath
go to card x
 set the filename of sStoryImage to tPath
 set the itemDelimiter to “|”
put item x of sQuoteList into fld “mainText”
  end repeat


something like this? It might be easier to help if you explained what 
you are trying to do. Have all the cards in this stack been created 
already? i.e. do you have sTotalSceneCount cards? Does each card contain 
a field called "mainText" and an image called "slideImage"?


set the itemDelimiter to “|”
repeat with x = 2 to sTotalSceneCount
   set the filename of img "slideImage" of card x to line x of sImageList
   set the text of fld "mainText" of card x to item x of of sQuoteList
end repeat


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Problem an Repeat Loop

2020-09-28 Thread Sannyasin Brahmanathaswami via use-livecode
I use the long name of the image

local sStoryImage
 put the long id of img "slideImage" into sStoryImage

still:

 # for development
 local tPath
 repeat with x = 2 to sTotalSceneCount

put line x of sImageList into tPath
go to card x
 set the filename of sStoryImage to tPath
 set the itemDelimiter to “|”
put item x of sQuoteList into fld “mainText”
 end repeat

 # I get a full line 
 
 stack “makeStoryFromDisk”: execution error at line 68 (Chunk: error in 
object expression), char 1
 
 It is exactly the same as in input for behavior_story except that
 do not work a repeat loop?
 

 Tore Nilsen wrote:

You do not refer to any object type when you try to set the fileName of 
what should possibly be an image. 

Try this:
Set the fileName of image sStoryImage to tPath

Best regards 
Tore Nilsen



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Problem an Repeat Loop

2020-09-27 Thread Tore Nilsen via use-livecode
You do not refer to any object type when you try to set the fileName of what 
should possibly be an image. 

Try this:
Set the fileName of image sStoryImage to tPath

Best regards 
Tore Nilsen

> 28. sep. 2020 kl. 03:47 skrev Sannyasin Brahmanathaswami via use-livecode 
> :
> 
> # for development
> local tPath
> repeat with x = 2 to sTotalSceneCount
>   put line x of sImageList into tPath
>   go to card x
>set the filename of sStoryImage to tPath
>set the itemDelimiter to “|”
>   put item x of sQuoteList into fld “mainText”
> end repeat
> 
> # I get a full line 
> 
> stack “makeStoryFromDisk”: execution error at line 68 (Chunk: error in object 
> expression), char 1
> 
> It is exactly the same as in input for behavior_story except that
> do not work a repeat loop?
> 
> BR
> 
> ___
> use-livecode mailing list
> use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Problem an Repeat Loop

2020-09-27 Thread Sannyasin Brahmanathaswami via use-livecode
# for development
 local tPath
 repeat with x = 2 to sTotalSceneCount
put line x of sImageList into tPath
go to card x
 set the filename of sStoryImage to tPath
 set the itemDelimiter to “|”
put item x of sQuoteList into fld “mainText”
 end repeat

# I get a full line 

stack “makeStoryFromDisk”: execution error at line 68 (Chunk: error in object 
expression), char 1

It is exactly the same as in input for behavior_story except that
do not work a repeat loop?

BR

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode