Page 1 of 1
imageSource
Posted: Mon Mar 12, 2012 10:10 am
by Nakia
Hi Again all,
what is the best way for me to do the following..
On my main card I need an image area which will display different graphics. I need to store these graphics on a card of an existing sub stack.
The trigger for the changing on the graphic will be using mouse up from some option buttons (located on the main card)
I have looked at the imageSource feature but cant seem to get the syntax correct.
I realize I am probably missing something really simple...
I have tried
--
set the imageSource of image/fld (tried both) "ImageArea" to "ImageName"
--
BTW, needs to be compatible with IOS
Re: imageSource
Posted: Mon Mar 12, 2012 1:01 pm
by Klaus
Hi Kia,
the dictionary entry is unambigious about this, you need to read more carefully!
...
Imagesource:
Specifies an image to be displayed in place of the specified character in a field.
...
Means:
...
set the imagesource of CHAR 1 OF FLD "XYZ" to "Name of image or ID"
...
Best
Klaus
Re: imageSource
Posted: Mon Mar 12, 2012 9:00 pm
by Nakia
Okay so what would you suggest for me to achieve my goal?
Re: imageSource
Posted: Mon Mar 12, 2012 9:29 pm
by Klaus
Hi Kia,
after re-reading your post I think that using a field and imagesource might not be the best way for this!
I would create an image object on the card (image "display" in my example code) and then simply "putting"
any desired image from your substack into that image:
...
## Somewhere in your menupick/mouseup script of your option button
put img "the one in the substack" of cd 1 of stack "substack with images in it here..." into img "display"
...
Et voila, clean and fast
Best
Klaus
Re: imageSource
Posted: Mon Mar 12, 2012 10:31 pm
by Nakia
Okay so when you say Image object you mean just drag an image area onto the card from the objects menu?
Re: imageSource
Posted: Mon Mar 12, 2012 10:37 pm
by jmburnod
Hi Nakia
just drag an image area onto the card from the objects menu?
Yes. From the tool palette
Best
Jean-Marc
Re: imageSource
Posted: Mon Mar 12, 2012 11:49 pm
by Nakia
Okay great thanks..
I will try this and report back if I have any issues
Re: imageSource
Posted: Tue Mar 13, 2012 12:54 am
by Nakia
On a side note..
I have a variable which has a text file stored in it.. Can I search this variable for a specific string (which will come from another variable) and if it's found then place the line number of the found string into a another variable?
Hope that makes sense.
Re: imageSource
Posted: Tue Mar 13, 2012 1:02 am
by sturgis
Yes. Look at lineOffset() in the dictionary.
Nakia wrote:On a side note..
I have a variable which has a text file stored in it.. Can I search this variable for a specific string (which will come from another variable) and if it's found then place the line number of the found string into a another variable?
Hope that makes sense.