Re: Image control in a Background

2014-06-26 Thread Simon
Hi Vaughn,
I'm glad to hear you got it working.

The following is opinion and you may ignore it.

I think you could benefit by going to Jacque's site and reviewing the
stacks:
http://www.hyperactivesw.com/revscriptconf/scriptingconferences.html


There are also the forums:
http://forums.livecode.com/index.php
Which are better suited for questions like this one, here they mostly go on
about increasing the decimal point accuracy of liveCode to surpass the 16
digit limit and stuff like that.  Scott and Jacque are a couple of the most
sought-after/expensive liveCode minds. But of course, either place is fine
for you to ask questions. 

Lots of great material here:
http://lessons.runrev.com/

Regards,

Simon




--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Image-control-in-a-Background-tp4680553p4680685.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
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: Image control in a Background

2014-06-26 Thread Vaughn Clement
Hi Simon

This is a real pleasure to say it is working as designed now. Your a real
wizard at scripting.
Looking at this from start to finish I can say I have learned a lot about
the image control, but more over I have a better perspective on how to work
to find solutions in scripting. Thanks for your time and effort!!!

Thank you

Vaughn Clement

Apps by Vaughn Clement (Support)
*http://www.appsbyvaughnclement.com/tools/home-page/
<http://www.appsbyvaughnclement.com/tools/home-page/>*
Skype: vaughn.clement
https://secure.join.me/appsbyvclement
FaceTime: vclem...@gmail.com
LogMeIn also avaialble
Call on "ooVoo" at address:  vaughnclement or 9282549062
Ph. 928-254-9062



On Thu, Jun 26, 2014 at 3:28 PM, Simon  wrote:

> Yes, if there is no file "thePath"
> And I think we've discussed enough why this happens.
>
> So to fix it so that it doesn't show an image at all if there is no file
> "thePath":
>
> if there is a file the short id of this card then
> put (specialFolderPath ("documents") & "/photos/" & the short ID of this
> card) into thePath
> set the filename of image "imageField1" of this card to thePath
> else ---here is a new line
> set the filename of image "imageField1" of this card to "" ---here is a new
> line
> end if
>
> Update your openCard script
>
> Simon
>
>
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/Image-control-in-a-Background-tp4680553p4680681.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> ___
> 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: Image control in a Background

2014-06-26 Thread Simon
Yes, if there is no file "thePath"
And I think we've discussed enough why this happens.

So to fix it so that it doesn't show an image at all if there is no file
"thePath":

if there is a file the short id of this card then 
put (specialFolderPath ("documents") & "/photos/" & the short ID of this
card) into thePath 
set the filename of image "imageField1" of this card to thePath 
else ---here is a new line
set the filename of image "imageField1" of this card to "" ---here is a new
line
end if

Update your openCard script

Simon



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Image-control-in-a-Background-tp4680553p4680681.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
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: Image control in a Background

2014-06-26 Thread Vaughn Clement
Hi Simon

I used the script in a button a aligned and edited as shown:

The image was added from the button to the image control. But all the cards
in the stack now have the last added image. This is where I was a few days
ago where the script did this same thing?
Did I edit it wrong?

*on* mouseUp

   *--/ the image from mobilePickPhoto uses the template image construct*

   *--set it off screen so we don't see ift flash /*

   *--set the loc of the templateImage to -1,-1*

   *set* the vis of the templateImage to false *--NEWLINE*

   *--delete file (specialFolderPath("documents") & "/photos/" & the short
ID*

*--of this card)*

*set* the filename of image "imageField1" of this card to  ""
*--NEWLINE*

   *--/choose a photo/*

   mobilePickPhoto "library"

   *lock* screen

   *if* the result <> "cancel" *then*

  *--/ make the filepath to save the chosen image/*

  *put* (specialFolderPath ("documents") & "/photos/" & the short ID of
this card) into thePath

  *--/ put the image into a file in the photos folder /*

  *put* the text of the last image of this card into URL("binfile:" &
thePath)

  *--/set the loc of image 1 to the loc of group "picgroup' so it will
align/*

  *--set the loc of  image "imageField1" to the loc of group "picgroup"*

  *--/ show the image on the card /*

  *set* the filename of image "imageField1" of this card to thePath

  *--/ destroy the image imported from the library /*

  *delete* the last image of this card

   *end* *if*

   *unlock* screen

*end* mouseUp

Thank you

Vaughn Clement

Apps by Vaughn Clement (Support)
*http://www.appsbyvaughnclement.com/tools/home-page/
<http://www.appsbyvaughnclement.com/tools/home-page/>*
Skype: vaughn.clement
https://secure.join.me/appsbyvclement
FaceTime: vclem...@gmail.com
LogMeIn also avaialble
Call on "ooVoo" at address:  vaughnclement or 9282549062
Ph. 928-254-9062



On Thu, Jun 26, 2014 at 12:35 PM, Simon  wrote:

> Yep
>
> on mouseUp
>--/ the image from mobilePickPhoto uses the template image construct
>--set it off screen so we don't see ift flash /
>--set the loc of the templateImage to -1,-1
>set the vis of the templateImage to false --NEWLINE
>--delete file (specialFolderPath("documents") & "/photos/" & the short
> ID
> of this card)
> set the filename of image "imageField1" of this card to  "" --NEWLINE
>--/choose a photo/
>mobilePickPhoto "library"
>lock screen
>if the result <> "cancel" then
>   --/ make the filepath to save the chosen image/
>   put (specialFolderPath("documents") & "/photos/" & the short ID of
> this card) into thePath
>   --/ put the image into a file in the photos folder /
>   put the text of the last image of this card into URL("binfile:" &
> thePath)
>   --/set the loc of image 1 to the loc of group "picgroup' so it will
> align/
>   set the loc of  image "imageField1" to the loc of group "picgroup"
>   --/ show the image on the card /
>   set the filename of image "imageField1" of this card to thePath
>   --/ destroy the image imported from the library /
>   delete the last image of this card
>end if
>unlock screen
> end mouseUp
>
> There is another change I made in there as well.
>
> Simon
>
>
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/Image-control-in-a-Background-tp4680553p4680671.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> ___
> 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: Image control in a Background

2014-06-26 Thread Vaughn Clement
Hi Simon

OK, thanks for the assistance. I will try the script in a button on the
card.

Thank you

Vaughn Clement

Apps by Vaughn Clement (Support)
*http://www.appsbyvaughnclement.com/tools/home-page/
<http://www.appsbyvaughnclement.com/tools/home-page/>*
Skype: vaughn.clement
https://secure.join.me/appsbyvclement
FaceTime: vclem...@gmail.com
LogMeIn also avaialble
Call on "ooVoo" at address:  vaughnclement or 9282549062
Ph. 928-254-9062



On Thu, Jun 26, 2014 at 2:29 PM, Simon  wrote:

> Hi Vaughn,
> Nope I don't need to see the stack.
> Everything is running correctly here.
>
>
> Simon
>
>
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/Image-control-in-a-Background-tp4680553p4680678.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> ___
> 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: Image control in a Background

2014-06-26 Thread Simon
Hi Vaughn,
Nope I don't need to see the stack.
Everything is running correctly here.


Simon



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Image-control-in-a-Background-tp4680553p4680678.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
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: Image control in a Background

2014-06-26 Thread Vaughn Clement
Hi Simon

The original email had a on OpenCard Stack script and a script in the image
control to manage the card image..
 The button on the buyer's order "Button" is my script test. The black
buttons are the main buttons.

If you send me an email address I will send you the stack.

Thank you

Vaughn Clement

Apps by Vaughn Clement (Support)
*http://www.appsbyvaughnclement.com/tools/home-page/
<http://www.appsbyvaughnclement.com/tools/home-page/>*
Skype: vaughn.clement
https://secure.join.me/appsbyvclement
FaceTime: vclem...@gmail.com
LogMeIn also avaialble
Call on "ooVoo" at address:  vaughnclement or 9282549062
Ph. 928-254-9062



On Thu, Jun 26, 2014 at 1:04 PM, Simon  wrote:

> Vaughn Clement wrote
> > Hi Simon
> > I aasume that the current stack script is replaced with your card script?
>
> errr... you are confusing me, I don't have a card script. I posted a button
> script.
> Your original card script was ok.
>
> Simon
>
>
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/Image-control-in-a-Background-tp4680553p4680674.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> ___
> 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: Image control in a Background

2014-06-26 Thread Simon
Vaughn Clement wrote
> Hi Simon
> I aasume that the current stack script is replaced with your card script?

errr... you are confusing me, I don't have a card script. I posted a button
script.
Your original card script was ok.

Simon



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Image-control-in-a-Background-tp4680553p4680674.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
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: Image control in a Background

2014-06-26 Thread Vaughn Clement
Hi Simon

I aasume that the current stack script is replaced with your card script?

On Thursday, June 26, 2014, Vaughn Clement  wrote:

> Hi Simon
>
> Let me try this to test my stack for errors.
>
> On Thursday, June 26, 2014, Simon  > wrote:
>
>> Yep
>>
>> on mouseUp
>>--/ the image from mobilePickPhoto uses the template image construct
>>--set it off screen so we don't see ift flash /
>>--set the loc of the templateImage to -1,-1
>>set the vis of the templateImage to false --NEWLINE
>>--delete file (specialFolderPath("documents") & "/photos/" & the short
>> ID
>> of this card)
>> set the filename of image "imageField1" of this card to  "" --NEWLINE
>>--/choose a photo/
>>mobilePickPhoto "library"
>>lock screen
>>if the result <> "cancel" then
>>   --/ make the filepath to save the chosen image/
>>   put (specialFolderPath("documents") & "/photos/" & the short ID of
>> this card) into thePath
>>   --/ put the image into a file in the photos folder /
>>   put the text of the last image of this card into URL("binfile:" &
>> thePath)
>>   --/set the loc of image 1 to the loc of group "picgroup' so it will
>> align/
>>   set the loc of  image "imageField1" to the loc of group "picgroup"
>>   --/ show the image on the card /
>>   set the filename of image "imageField1" of this card to thePath
>>   --/ destroy the image imported from the library /
>>   delete the last image of this card
>>end if
>>unlock screen
>> end mouseUp
>>
>> There is another change I made in there as well.
>>
>> Simon
>>
>>
>>
>> --
>> View this message in context:
>> http://runtime-revolution.278305.n4.nabble.com/Image-control-in-a-Background-tp4680553p4680671.html
>> Sent from the Revolution - User mailing list archive at Nabble.com.
>>
>> ___
>> 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
>>
>
>
> --
> Thank you
>
> Vaughn Clement
>
> Apps by Vaughn Clement (Support)
> *http://www.appsbyvaughnclement.com/tools/home-page/
> <http://www.appsbyvaughnclement.com/tools/home-page/>*
> Skype: vaughn.clement
> https://secure.join.me/appsbyvclement
> FaceTime: vclem...@gmail.com
> 
> LogMeIn also avaialble
> Call on "ooVoo" at address:  vaughnclement or 9282549062
> Ph. 928-254-9062
>
>
>

-- 
Thank you

Vaughn Clement

Apps by Vaughn Clement (Support)
*http://www.appsbyvaughnclement.com/tools/home-page/
<http://www.appsbyvaughnclement.com/tools/home-page/>*
Skype: vaughn.clement
https://secure.join.me/appsbyvclement
FaceTime: vclem...@gmail.com
LogMeIn also avaialble
Call on "ooVoo" at address:  vaughnclement or 9282549062
Ph. 928-254-9062
___
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: Image control in a Background

2014-06-26 Thread Vaughn Clement
Hi Simon

Let me try this to test my stack for errors.

On Thursday, June 26, 2014, Simon  wrote:

> Yep
>
> on mouseUp
>--/ the image from mobilePickPhoto uses the template image construct
>--set it off screen so we don't see ift flash /
>--set the loc of the templateImage to -1,-1
>set the vis of the templateImage to false --NEWLINE
>--delete file (specialFolderPath("documents") & "/photos/" & the short
> ID
> of this card)
> set the filename of image "imageField1" of this card to  "" --NEWLINE
>--/choose a photo/
>mobilePickPhoto "library"
>lock screen
>if the result <> "cancel" then
>   --/ make the filepath to save the chosen image/
>   put (specialFolderPath("documents") & "/photos/" & the short ID of
> this card) into thePath
>   --/ put the image into a file in the photos folder /
>   put the text of the last image of this card into URL("binfile:" &
> thePath)
>   --/set the loc of image 1 to the loc of group "picgroup' so it will
> align/
>   set the loc of  image "imageField1" to the loc of group "picgroup"
>   --/ show the image on the card /
>   set the filename of image "imageField1" of this card to thePath
>   --/ destroy the image imported from the library /
>   delete the last image of this card
>end if
>unlock screen
> end mouseUp
>
> There is another change I made in there as well.
>
> Simon
>
>
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/Image-control-in-a-Background-tp4680553p4680671.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> ___
> 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
>


-- 
Thank you

Vaughn Clement

Apps by Vaughn Clement (Support)
*http://www.appsbyvaughnclement.com/tools/home-page/
<http://www.appsbyvaughnclement.com/tools/home-page/>*
Skype: vaughn.clement
https://secure.join.me/appsbyvclement
FaceTime: vclem...@gmail.com
LogMeIn also avaialble
Call on "ooVoo" at address:  vaughnclement or 9282549062
Ph. 928-254-9062
___
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: Image control in a Background

2014-06-26 Thread Simon
Yep

on mouseUp 
   --/ the image from mobilePickPhoto uses the template image construct 
   --set it off screen so we don't see ift flash / 
   --set the loc of the templateImage to -1,-1 
   set the vis of the templateImage to false --NEWLINE
   --delete file (specialFolderPath("documents") & "/photos/" & the short ID
of this card)
set the filename of image "imageField1" of this card to  "" --NEWLINE
   --/choose a photo/ 
   mobilePickPhoto "library" 
   lock screen 
   if the result <> "cancel" then 
  --/ make the filepath to save the chosen image/ 
  put (specialFolderPath("documents") & "/photos/" & the short ID of
this card) into thePath 
  --/ put the image into a file in the photos folder / 
  put the text of the last image of this card into URL("binfile:" &
thePath) 
  --/set the loc of image 1 to the loc of group "picgroup' so it will
align/ 
  set the loc of  image "imageField1" to the loc of group "picgroup" 
  --/ show the image on the card / 
  set the filename of image "imageField1" of this card to thePath 
  --/ destroy the image imported from the library / 
  delete the last image of this card 
   end if 
   unlock screen
end mouseUp 

There is another change I made in there as well.

Simon



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Image-control-in-a-Background-tp4680553p4680671.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
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: Image control in a Background

2014-06-26 Thread Vaughn Clement
Hi Simon

Is this the email:
Hi Vaughn,
Aside from a spelling mistake just add parentheses around all the folder
paths
e.g.
 put (specialFolderPath("documents") & "/photos/" & the short ID of this
card) into thePath

and then delete the current filename
on mouseUp
   --/ the image from mobilePickPhoto uses the template image construct
   --set it off screen so we don't see ift flash /
   set the loc of the templateImage to -1,-1
set the filename of image "imageField1" of this card to  ""

Thank you

Vaughn Clement

Apps by Vaughn Clement (Support)
*http://www.appsbyvaughnclement.com/tools/home-page/
<http://www.appsbyvaughnclement.com/tools/home-page/>*
Skype: vaughn.clement
https://secure.join.me/appsbyvclement
FaceTime: vclem...@gmail.com
LogMeIn also avaialble
Call on "ooVoo" at address:  vaughnclement or 9282549062
Ph. 928-254-9062



On Thu, Jun 26, 2014 at 12:11 PM, Simon  wrote:

> Hi Vaughn,
> You did see that I posted everything was working after a few small changes
> in your original script?  I never received an answer that you tested it and
> it didn't work for you.
>
> Simon
>
>
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/Image-control-in-a-Background-tp4680553p4680668.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> ___
> 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: Image control in a Background

2014-06-26 Thread Simon
Hi Vaughn, 
You did see that I posted everything was working after a few small changes
in your original script?  I never received an answer that you tested it and
it didn't work for you.

Simon



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Image-control-in-a-Background-tp4680553p4680668.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
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: Image control in a Background

2014-06-26 Thread Vaughn Clement
Hi Simon

I really don't understand the image control in a background group yet. I
just added a new blank card with the background group and it opened with
the last image that was edited on an existing card. I am just not grasping
the group and control logic to make it do what I am trying to do?

Thank you

Vaughn Clement

Apps by Vaughn Clement (Support)
*http://www.appsbyvaughnclement.com/tools/home-page/
<http://www.appsbyvaughnclement.com/tools/home-page/>*
Skype: vaughn.clement
https://secure.join.me/appsbyvclement
FaceTime: vclem...@gmail.com
LogMeIn also avaialble
Call on "ooVoo" at address:  vaughnclement or 9282549062
Ph. 928-254-9062



On Thu, Jun 26, 2014 at 11:45 AM, Vaughn Clement  wrote:

> Hi Simon
>
> I was testing to see what might work to finish adding the image without
> having to leave the card and return to trigger the openCard script again? I
> thought a button script "Update Image" button might trigger the update? I
> used a portion of the open card script thinking it would work.
>
> Since the image was added to the photos subfolder "thePath" reloading it
> again might be a way to update the image in the control while not leaving
> the card? It did not have any effect, so I am not sure how to make it
> update the image without leaving the card.
> - I not only have to leave the card, but open another card and return to
> have it update the image now.
> - I thought to move to another card and then return, but I trapped myself
> by using a datagrid to select the card to be opened, and a simple goto card
> and return script messes up the datagrid row update. I have a button to
> close the card now and return to the datagrid. This allows me to select
> another card in the datagrid to view, and then I must return to the grid
> when finished. The process of going back to the datagrid and then returning
> to the same card will not update the image. But going to a different card,
> returning, and then opening the original card does update the image as you
> would expect when the open card script is triggered.
>
> On Thursday, June 26, 2014, Simon  wrote:
>
>> Hi Vaughn,
>> Still not clear on what you are doing because it looks like you are just
>> repeating the openCard script from your original posting, so...
>> on mouseUp
>> openCard
>> end mouseUp
>>
>> You should not see anything happen because it just loads the same image
>> in.
>>
>> Unless I read this too quickly.
>>
>> Simon
>>
>>
>>
>> --
>> View this message in context:
>> http://runtime-revolution.278305.n4.nabble.com/Image-control-in-a-Background-tp4680553p4680665.html
>> Sent from the Revolution - User mailing list archive at Nabble.com.
>>
>> ___
>> 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: Image control in a Background

2014-06-26 Thread Vaughn Clement
Hi Simon

I was testing to see what might work to finish adding the image without
having to leave the card and return to trigger the openCard script again? I
thought a button script "Update Image" button might trigger the update? I
used a portion of the open card script thinking it would work.

Since the image was added to the photos subfolder "thePath" reloading it
again might be a way to update the image in the control while not leaving
the card? It did not have any effect, so I am not sure how to make it
update the image without leaving the card.
- I not only have to leave the card, but open another card and return to
have it update the image now.
- I thought to move to another card and then return, but I trapped myself
by using a datagrid to select the card to be opened, and a simple goto card
and return script messes up the datagrid row update. I have a button to
close the card now and return to the datagrid. This allows me to select
another card in the datagrid to view, and then I must return to the grid
when finished. The process of going back to the datagrid and then returning
to the same card will not update the image. But going to a different card,
returning, and then opening the original card does update the image as you
would expect when the open card script is triggered.

On Thursday, June 26, 2014, Simon  wrote:

> Hi Vaughn,
> Still not clear on what you are doing because it looks like you are just
> repeating the openCard script from your original posting, so...
> on mouseUp
> openCard
> end mouseUp
>
> You should not see anything happen because it just loads the same image in.
>
> Unless I read this too quickly.
>
> Simon
>
>
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/Image-control-in-a-Background-tp4680553p4680665.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> ___
> 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: Image control in a Background

2014-06-26 Thread Simon
Hi Vaughn,
Still not clear on what you are doing because it looks like you are just
repeating the openCard script from your original posting, so...
on mouseUp
openCard
end mouseUp

You should not see anything happen because it just loads the same image in.

Unless I read this too quickly.

Simon



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Image-control-in-a-Background-tp4680553p4680665.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
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: Image control in a Background

2014-06-26 Thread Vaughn Clement
Hi

This morning I did some testing to address the image updating in the
current card in the image control and did not come up with a solution that
worked.

I have the On OpenCard script that is working to add the image to the image
control, and as before the on OpenCard script cannot update the image field
in the open card because the script has already triggered.

I tried to use a button on the card to refresh the image field to display
the last edited image, but everything I tried had no effect?
I tried to have the image assigned to the card id to reload using this in
the button:

*on mouseUp*

*if* the number of this card >1 *then*

  *set* the defaultfolder to specialFolderPath ("documents") &
"/photos/"

 *if* there is a file the short id of this card *then*

*put* specialFolderPath ("documents") & "/photos/" & the short
ID of this card into thePath

*set* the filename of image "imageField1" of this card to
thepath

 *end* *if*

  *end* *if*

*end mouseUp*

I am I totally off base trying to use this approach?

Thank you

Vaughn Clement

Apps by Vaughn Clement (Support)
*http://www.appsbyvaughnclement.com/tools/home-page/
*
Skype: vaughn.clement
https://secure.join.me/appsbyvclement
FaceTime: vclem...@gmail.com
LogMeIn also avaialble
Call on "ooVoo" at address:  vaughnclement or 9282549062
Ph. 928-254-9062



On Wed, Jun 25, 2014 at 5:34 PM, J. Landman Gay 
wrote:

> That's good to know.  My app is desktop only and it must be different
> there.  Thanks for the heads up.
>
> On June 25, 2014 4:51:44 PM CDT, Simon  wrote:
> >Hi Jacque,
> >"But for image objects it isn't needed, and you can omit that
> >instruction."
> >Actually it was the only way to get the script to work on mobile when I
> >actually put it on my device.
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com
>
> ___
> 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: Image control in a Background

2014-06-25 Thread J. Landman Gay
That's good to know.  My app is desktop only and it must be different there.  
Thanks for the heads up. 

On June 25, 2014 4:51:44 PM CDT, Simon  wrote:
>Hi Jacque,
>"But for image objects it isn't needed, and you can omit that
>instruction."
>Actually it was the only way to get the script to work on mobile when I
>actually put it on my device. 
-- 
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
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: Image control in a Background

2014-06-25 Thread Vaughn Clement
Hi

So many great suggestions, I am pleased to see the variety of solutions.
Scott pointed out that LC has many ways to be coded and it is the designers
choice. Now I need to finish testing to see if I can get the desired result.

I have a lot to consider and to try each suggestion to see what works best.

Thank you

Vaughn Clement

Apps by Vaughn Clement (Support)
*http://www.appsbyvaughnclement.com/tools/home-page/
<http://www.appsbyvaughnclement.com/tools/home-page/>*
Skype: vaughn.clement
https://secure.join.me/appsbyvclement
FaceTime: vclem...@gmail.com
LogMeIn also avaialble
Call on "ooVoo" at address:  vaughnclement or 9282549062
Ph. 928-254-9062



On Wed, Jun 25, 2014 at 2:51 PM, Simon  wrote:

> Hi Jacque,
> "But for image objects it isn't needed, and you can omit that instruction."
> Actually it was the only way to get the script to work on mobile when I
> actually put it on my device.
> You are correct in that aside from the small errors the code should run
> perfectly.  I figured it had something to do with coming out of the photo
> library.
>
> The first time you add/change the photo it works as it should but if you
> decide that you don't like that photo and try to change it then it gets all
> frumpy and throws all it's toys out of the cradle -set the filename of
> image
> "imageField1" of this card to  ""- does the trick.
>
> One other improvement I found
> set the loc of the templateImage to -1,-1
> Makes it very slow in coming out of the photo library
> set the vis of the templateImage to false
> Is much much faster. Both of these things are mobile related only.
>
> Or... it's just me.
>
> Simon
>
>
>
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/Image-control-in-a-Background-tp4680553p4680640.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> ___
> 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: Image control in a Background

2014-06-25 Thread Simon
Hi Jacque,
"But for image objects it isn't needed, and you can omit that instruction."
Actually it was the only way to get the script to work on mobile when I
actually put it on my device.
You are correct in that aside from the small errors the code should run
perfectly.  I figured it had something to do with coming out of the photo
library.

The first time you add/change the photo it works as it should but if you
decide that you don't like that photo and try to change it then it gets all
frumpy and throws all it's toys out of the cradle -set the filename of image
"imageField1" of this card to  ""- does the trick.

One other improvement I found
set the loc of the templateImage to -1,-1 
Makes it very slow in coming out of the photo library
set the vis of the templateImage to false
Is much much faster. Both of these things are mobile related only.

Or... it's just me.

Simon




--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Image-control-in-a-Background-tp4680553p4680640.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
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: Image control in a Background

2014-06-25 Thread J. Landman Gay

On 6/25/2014, 9:56 AM, Vaughn Clement wrote:


Very interesting link you included.
The stack is another great reference material that is undocumented.


The User Guide is often overlooked. A pretty good explanation of groups 
and backgrounds, and their differences and behavior, begins on page 107 
of the guide. The User Guide can be accessed from either the Help menu 
or from the Resources icon in the toolbar.



  Please clarify why this line is used: set the filename of image
"imageField1" of this card to  ""  ("" is
shorthand for empty)

  Where in the script are you using this to empty the image control. And why
would you empty the image control?


This may be superstitious behavior based on an occasional delay when 
loading multimedia into player objects. In a player, it is sometimes 
necessary to set the filename to empty before resetting it to a 
different video. But for image objects it isn't needed, and you can omit 
that instruction.


I have a stack that does exactly what you're doing; it loads a different 
image into a grouped image object every time the card changes. It works 
fine by just replacing the content with a new image.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
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: Image control in a Background

2014-06-25 Thread Vaughn Clement
Hi Simon

If you read the reply to Scott you will see the full description of the
solution I am trying to come up with.

On Wednesday, June 25, 2014, Simon  wrote:

> Here:
> "on mouseUp
>--/ the image from mobilePickPhoto uses the template image construct
>--set it off screen so we don't see ift flash /
>set the loc of the templateImage to -1,-1
> set the filename of image "imageField1" of this card to  "" "
>
> Now as to why that works I didn't test if it was a screen refresh problem
> which is what it appears to be.  The test would have been to throw in a
> "wait 1 (or can it be 0?) milliseconds with messages" into that script.
>
> Simon
>
>
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/Image-control-in-a-Background-tp4680553p4680632.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> ___
> 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
>


-- 
Thank you

Vaughn Clement

Apps by Vaughn Clement (Support)
*http://www.appsbyvaughnclement.com/tools/home-page/
<http://www.appsbyvaughnclement.com/tools/home-page/>*
Skype: vaughn.clement
https://secure.join.me/appsbyvclement
FaceTime: vclem...@gmail.com
LogMeIn also avaialble
Call on "ooVoo" at address:  vaughnclement or 9282549062
Ph. 928-254-9062
___
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: Image control in a Background

2014-06-25 Thread Simon
Here:
"on mouseUp 
   --/ the image from mobilePickPhoto uses the template image construct 
   --set it off screen so we don't see ift flash / 
   set the loc of the templateImage to -1,-1 
set the filename of image "imageField1" of this card to  "" "

Now as to why that works I didn't test if it was a screen refresh problem
which is what it appears to be.  The test would have been to throw in a
"wait 1 (or can it be 0?) milliseconds with messages" into that script.

Simon



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Image-control-in-a-Background-tp4680553p4680632.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
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: Image control in a Background

2014-06-25 Thread Vaughn Clement
Hi Simon

Very interesting link you included.
The stack is another great reference material that is undocumented. It only
took me about three minutes to understand what he was trying to accomplish
here. I did a version similar to this in FileMaker while back so that I
could do quick searches by a word or phrase to  find answers to my
scripting tasks. I offered it to of the developers not knowing that this
stack was available.
This is the kind of thing that needs to be developed and updated by LC for
all developers. I have an issue with LC in that they want to sell
instruction at pretty high cost when it should be included in the product
documentation. I understand they're trying to use this to raise capital to
keep the business running, but it also doesn't help to retain new users who
struggle to learn live code and to afford the expensive instructional
content offered by LC. The latest example was a summer school. I'm not
saying that this is not good for people that have in less money to spend.
Most new developers simply can't afford to spend hundreds if not thousands
of dollars a year to learn LC.  For example; Apple just released a new
programming language for Xcode swift, and they supplied a 600 page PDF
document defining how to use swift to design ISO apps. In addition to that
they have an online help system that has heaps of technical assistance
available to all users. One caveat about the help is that it does include
developer support for general questions at no cost. They also include many
PDFs and instructional videos. Obviously the user base is a lot larger than
live code, but if you're going to provide a product like live code at a
minimum you need to provide adequate instructional media. Looking at the
how-to forum is clear that there are endless questions by developers but
cannot find the proper instructional media.
Enough preaching most new developers understand by now the shortfall in
instructional media.

I just answered Scott Rossi's email that describes the issue, and some
questions and comments. Please refer to that in this how-to email.

Your comment:
Now you could continue doing it the way you have it setup in your openCard
script and in the mouseUp, just make sure to;
 set the filename of image "imageField1" of this card to  ""  ("" is
shorthand for empty)
Where I mention it in the above post.
Trust me I had your script running with only removing the "then" correcting
the spelling and that line.

 Please clarify why this line is used: set the filename of image
"imageField1" of this card to  ""  ("" is
shorthand for empty)

 Where in the script are you using this to empty the image control. And why
would you empty the image control? Sorry for the novice question, but not
to ask the question doesn't help to get the answer.

Thank you

Vaughn Clement

Apps by Vaughn Clement (Support)
*http://www.appsbyvaughnclement.com/tools/home-page/
<http://www.appsbyvaughnclement.com/tools/home-page/>*
Skype: vaughn.clement
https://secure.join.me/appsbyvclement
FaceTime: vclem...@gmail.com
LogMeIn also avaialble
Call on "ooVoo" at address:  vaughnclement or 9282549062
Ph. 928-254-9062



On Tue, Jun 24, 2014 at 6:03 PM, Simon  wrote:

> Hi Vaughn,
> First off
> "The answer I get is it just takes a long time to learn?"
> No, but I understand that if you have been a programmer using another
> language then it is more difficult.  Lots of times I just think of a word
> to
> describe what I want to do and there it is in the dictionary.
> This plugin helps things even further;
> http://bjoernke.com/?target=bvgdocu
>
> Now to the problem at hand.
> To make things clear when you say "...group background..." you mean a group
> who's "background behavior is set to true" and in that case if the image
> control is in that group it will be the same on all pages with that group.
>
> Now you could continue doing it the way you have it setup in your openCard
> script and in the mouseUp, just make sure to;
>  set the filename of image "imageField1" of this card to  ""  ("" is
> shorthand for empty)
> Where I mention it in the above post.
> Trust me I had your script running with only removing the "then" correcting
> the spelling and that line.
>
> Now I'm not sure what impact on performance of using it when all the images
> get updated but it probably doesn't matter as I think the things like that
> are only set when the card opens.
> If it does then yes, you have to break the image out of the group.
>
> Simon
>
>
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/Image-control-in-a-Background-tp4680553p4680627.html
> Sent from the R

Re: Image control in a Background

2014-06-24 Thread Simon
Hi Vaughn,
First off
"The answer I get is it just takes a long time to learn?"
No, but I understand that if you have been a programmer using another
language then it is more difficult.  Lots of times I just think of a word to
describe what I want to do and there it is in the dictionary.
This plugin helps things even further;
http://bjoernke.com/?target=bvgdocu

Now to the problem at hand.
To make things clear when you say "...group background..." you mean a group
who's "background behavior is set to true" and in that case if the image
control is in that group it will be the same on all pages with that group.

Now you could continue doing it the way you have it setup in your openCard
script and in the mouseUp, just make sure to;
 set the filename of image "imageField1" of this card to  ""  ("" is
shorthand for empty)
Where I mention it in the above post.
Trust me I had your script running with only removing the "then" correcting
the spelling and that line.

Now I'm not sure what impact on performance of using it when all the images
get updated but it probably doesn't matter as I think the things like that
are only set when the card opens.
If it does then yes, you have to break the image out of the group.

Simon



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Image-control-in-a-Background-tp4680553p4680627.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
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: Image control in a Background

2014-06-24 Thread Scott Rossi
Vaughn:

I can't tell if you understand the basics of groups/backgrounds, so
apologies if this is redundant for you.

First, try to forget anything Hypercard related and start over.  In fact,
it will probably help you ignore the term "background" and consider groups
only (the terms "group" and "background" are synonymous in most cases).

A group, regardless of what you might associate with the name, can consist
of a single object.  You can group an image for example, and that single
image is now contained within a group object.

The group can exist on one card, or can be placed on multiple cards.  If
the group appears on multiple cards, that same image will appear on all
cards that contain the group.  This implementation is where you can start
using a group as a background object for multiple cards.

LiveCode doesn't have any designated object that automatically sits behind
everything on every card in a stack.  The above mentioned group is how you
create this result.  You create a group, and you *place* that group (as
opposed to paste) on every card where you want the same image to appear.
This is how you display a single image (or any objects) efficiently across
multiple cards.

If you want a different image to appear on every card in your stack, the
most straightforward method is to import or paste an image on every card.
There's no need to use a group.

But using a group can display the images more efficiently, depending on
how you're able to deliver your stack.  If you can include an external
folder of images (JPEGs, for example) along with your stack, you can use
the grouped image option mentioned above and simply change the fileName of
the grouped image to the file path of the external image that is needed
upon opening a card.

The benefit of this method is that only one image is loaded in memory at
any given time, instead of loading all the needed images at once (if they
were all imported into the stack).  The one image still appears on all
cards, but the user only sees one card at a time, and the image is updated
each time the user navigates to a new card.

Last, keep in mind that with groups, "place" is different than "paste".
If you place a group on a card, you are creating an instance of a group
that already exists in the stack.  If you copy and paste a group, you are
creating an entirely new group object with its own id, and you now have
two separate groups in your stack, each with their own contained objects.

Once you get the hang of this, you'll understand that groups are really
useful objects.

Hope this helps.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design




On 6/24/14 3:23 PM, "Vaughn Clement"  wrote:

>Hi
>
>Your comments:
>
>The "then" is superfluous, so its removal shouldn't affect anything. A
>"then" can only occur at the end of a line that begins with "if". The
>engine must be ignoring the extra "then" because it isn't throwing an
>error. At any rate, you don't need it.
>Question:
>Not new to coding but new to LiveCode scripting, I have a don't ask
>questions approach to code suggestions from other scripters. I've seen a
>lot of odd behavior in scripts within live code. For some a nude live
>code,
>it was nothing like coding I've done before and I go all the way back to
>the first basic on XT computers. It appeared to me that when I removed the
>then from line of script it had an effect on the image control. I am not
>questioning which are telling me, I just found it interesting that it had
>an effect on the way the script ran.
>
>Previously I believe you had the image in a background group with "act
>like
>a background" turned on, which means the same image will appear on every
>card that contains that background. I think you've changed that now by
>turning off "act like a background" or by moving the image out of the
>group. That is why only one card updates now.
> Question:
>I used HyperCard in the old days, and I recognize that live code manages
>backgrounds differently. I have never fully understood the limits about
>background objects and the settings. This is a good example of that where
>a
>group of objects included the image control so that each new card created
>would include the image control. The gray area I have at this point is,
>how
>to manage an image control where it needs to be on each card, but not
>contain the same image when it is edited and replaced on all cards. I
>think
>it's an interesting result that a image control cannot display a different
>image on each new card. I haven't seen this limitation referenced anywhere
>until now in this email. If I read what you're telling me correctly, if I
>include the image control in the group background in acts differently? Is
>it possible to have a image control separate from the group background?
>This would mean I should include a separate image control in its own
>background? And that background settings would be different in that it
>would not act like a background?
>Or, using scripting I wou

Re: Image control in a Background

2014-06-24 Thread Vaughn Clement
Hi

Your comments:

The "then" is superfluous, so its removal shouldn't affect anything. A
"then" can only occur at the end of a line that begins with "if". The
engine must be ignoring the extra "then" because it isn't throwing an
error. At any rate, you don't need it.
Question:
Not new to coding but new to LiveCode scripting, I have a don't ask
questions approach to code suggestions from other scripters. I've seen a
lot of odd behavior in scripts within live code. For some a nude live code,
it was nothing like coding I've done before and I go all the way back to
the first basic on XT computers. It appeared to me that when I removed the
then from line of script it had an effect on the image control. I am not
questioning which are telling me, I just found it interesting that it had
an effect on the way the script ran.

Previously I believe you had the image in a background group with "act like
a background" turned on, which means the same image will appear on every
card that contains that background. I think you've changed that now by
turning off "act like a background" or by moving the image out of the
group. That is why only one card updates now.
 Question:
I used HyperCard in the old days, and I recognize that live code manages
backgrounds differently. I have never fully understood the limits about
background objects and the settings. This is a good example of that where a
group of objects included the image control so that each new card created
would include the image control. The gray area I have at this point is, how
to manage an image control where it needs to be on each card, but not
contain the same image when it is edited and replaced on all cards. I think
it's an interesting result that a image control cannot display a different
image on each new card. I haven't seen this limitation referenced anywhere
until now in this email. If I read what you're telling me correctly, if I
include the image control in the group background in acts differently? Is
it possible to have a image control separate from the group background?
This would mean I should include a separate image control in its own
background? And that background settings would be different in that it
would not act like a background?
Or, using scripting I would need to address a on closeCard script to manage
what is saved to the image control. These questions may sound naïve, but I
can imagine that all new users have questions just like this.

The reason you need to leave the card and return in order to see the new
image content is because you have placed the command in an openCard
handler, which only triggers when you arrive at the card. Leaving and
returning to the card will cause an openCard message to be sent, which
updates the image content.
Question:
To be honest, every time I start building a new script to perform a task, I
need to start searching for syntax reference, or examples. Unlike a lot of
the seasoned developers like my friend John Dixon who can pull scripts out
of the air, it takes me quite a bit longer to pull together the script
structure. That being said, that is why I was creating my own app
dictionary where I could search a word or phrase that would give me script
structures that could work to perform tasks. I often ponder how seasoned
developers of liveCode learned liveCode. The answer I get is it just takes
a long time to learn?
This doesn't solve the current issue though carrying on a conversation
about my learning curve.
So based on your comments in this email, I either need to include in on
closeCard script, or to change the way the image control works within the
background.
Frankly I don't see why standard items like an image control doesn't
include the ability to save different images in a grouped background. This
seems to be a logical feature that should be included in the image control
settings.
You might be able to tell by my comments that I am clueless as to the next
step to correct the image control to save different images on each card.
 It appears to me that the reference script data I included in the first
email is close to what I need to correct the image editing and saving on
each card? But it would help if you could suggest the next steps I need to
take to solve the image control issue.

Thank you

Vaughn Clement

Apps by Vaughn Clement (Support)
*http://www.appsbyvaughnclement.com/tools/home-page/
*
Skype: vaughn.clement
https://secure.join.me/appsbyvclement
FaceTime: vclem...@gmail.com
LogMeIn also avaialble
Call on "ooVoo" at address:  vaughnclement or 9282549062
Ph. 928-254-9062



On Tue, Jun 24, 2014 at 2:41 PM, J. Landman Gay 
wrote:

> On 6/24/2014, 10:35 AM, Vaughn Clement wrote:
>
>> I am somewhat closer to the solution? I tested the correction that J.
>> Landman Gay suggested where I remove the "then" at the end of the this
>> line:  "set the defaultfolder to specialFolderPath ("documents") &
>> "/photos/" then <--"
>> This had the effect o

Re: Image control in a Background

2014-06-24 Thread J. Landman Gay

On 6/24/2014, 10:35 AM, Vaughn Clement wrote:

I am somewhat closer to the solution? I tested the correction that J.
Landman Gay suggested where I remove the "then" at the end of the this
line:  "set the defaultfolder to specialFolderPath ("documents") &
"/photos/" then <--"
This had the effect of not updating the image in any card. When I added it
back in, the image control will not change all of the cards now, but it
will not update the current image either until I go to a different card and
return to find the image then updated to the correct image.


The "then" is superfluous, so its removal shouldn't affect anything. A 
"then" can only occur at the end of a line that begins with "if". The 
engine must be ignoring the extra "then" because it isn't throwing an 
error. At any rate, you don't need it.


Previously I believe you had the image in a background group with "act 
like a background" turned on, which means the same image will appear on 
every card that contains that background. I think you've changed that 
now by turning off "act like a background" or by moving the image out of 
the group. That is why only one card updates now.


The reason you need to leave the card and return in order to see the new 
image content is because you have placed the command in an openCard 
handler, which only triggers when you arrive at the card. Leaving and 
returning to the card will cause an openCard message to be sent, which 
updates the image content.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
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: Image control in a Background

2014-06-24 Thread Vaughn Clement
Hi

I am somewhat closer to the solution? I tested the correction that J.
Landman Gay suggested where I remove the "then" at the end of the this
line:  "set the defaultfolder to specialFolderPath ("documents") &
"/photos/" then <--"
This had the effect of not updating the image in any card. When I added it
back in, the image control will not change all of the cards now, but it
will not update the current image either until I go to a different card and
return to find the image then updated to the correct image. The script now
does not change all of the cards, it just does not update while the image
control is being edited. As I found out the update only occurs after I
return to the edited card. It seems that the script is not making the image
control update at the time of the edit. Can you suggest a correction?

Thank you

Vaughn Clement

Apps by Vaughn Clement (Support)
*http://www.appsbyvaughnclement.com/tools/home-page/
*
Skype: vaughn.clement
https://secure.join.me/appsbyvclement
FaceTime: vclem...@gmail.com
LogMeIn also avaialble
Call on "ooVoo" at address:  vaughnclement or 9282549062
Ph. 928-254-9062



On Fri, Jun 20, 2014 at 12:13 PM, J. Landman Gay 
wrote:

> On 6/20/2014, 10:23 AM, Vaughn Clement wrote:
>
>  The image control is supposed load when the card opens and the last photo
>> is to be displayed?
>>
> >
>
>> *on*  openCard
>>
>> *set*  the defaultfolder to specialFolderPath ("documents") &
>> "/photos/"
>>
>> *--answer the files*
>>
>> *if*  the number of this card >1*then*
>>
>>*set*  the defaultfolder to specialFolderPath ("documents") &
>> "/photos/"*then*
>>
>>   *if*  there is a file the short id of this card*then*
>>
>>  *put*  specialFolderPath ("documents") & "/photos/" & the
>> short
>>
>> ID of this card into thePath
>>
>>  *set*  the filename of image "imegeField1" of this card to
>> thepath
>>
>>   *end*  *if*
>>
>>*end*  *if*
>>
>> *end*  openCard
>>
>
>
> Is this a direct copy/paste? This line is malformed:
>
>  set the defaultfolder to specialFolderPath ("documents") & "/photos/"
> then <--
>
> Remove the trailing "then". Also, the image name is misspelled as
> "imegeField1" ("e" rather than "a") which is more likely the reason for the
> problem.
>
> --
> Jacqueline Landman Gay | jac...@hyperactivesw.com
> HyperActive Software   | http://www.hyperactivesw.com
>
> ___
> 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: Image control in a Background

2014-06-23 Thread Simon
Hi Vaughn,
Did you get this sorted out?
>  When I edit the script to add the " EXAMPLE; put url ("file:" & 
> specialFolderPath("engine") & slash & "foo.txt") into tFileContents 
foo.txt has to be in the Copy Files of the standalone settings. (We're
talking mobile right?)

"...why would it replace all of the images in all of the cards?"
if it's in a group who's "behave like background" it true then that's what
happens to all the cards that group was placed on.

"- Can the image control be used in a group background?"
Yes, if it's the lowest layer control. Since you create a new image from the
templateImage it's the top control.  
Not sure on how you have things set up but I think you should be saving the
last image to the documents folder and set the filename of the image already
in the group to that name then "delete last image". Ah wait.. since it's a
standalone the last image wont be saved anyways so no need to delete.

"- Is there a special way to Set the image from the Photos folder in the
script?"
You'll have to copy the image over to specialFolderPath("documents") and
read it from there.

Maybe I'm misunderstanding all this.

Simon



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Image-control-in-a-Background-tp4680553p4680606.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
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: Image control in a Background

2014-06-23 Thread Vaughn Clement
Hi

I am trying to understand the usage of a image control when it is used in a
group background:

The issue: when I add a image from the IOS library to the BG image control
in the background it replaces the current card image and all other images
in all card backgrounds in the stack that uses that image control.

So, here is my question; when I set the special folder path and the card id
and put the last image in the control of that card ID on openCard, why
would it replace all of the images in all of the cards?
- Is there a special way to Set the image from the Photos folder in the
script?
- Can the image control be used in a group background?
- It was suggested to use a custom property to set the image for the image
control. But, I cannot find any examples of where to script the custom
control for this purpose.
- I read about the custom control, searched the dictionary, viewed all of
the RunRev lessons on using the image control, and the User Guide, the IOS
reference document. I still have not found the answer to the issue I need
to solve.

Thank you

Vaughn Clement

Apps by Vaughn Clement (Support)
*http://www.appsbyvaughnclement.com/tools/home-page/
<http://www.appsbyvaughnclement.com/tools/home-page/>*
Skype: vaughn.clement
https://secure.join.me/appsbyvclement
FaceTime: vclem...@gmail.com
LogMeIn also avaialble
Call on "ooVoo" at address:  vaughnclement or 9282549062
Ph. 928-254-9062



On Sat, Jun 21, 2014 at 5:41 PM, Vaughn Clement  wrote:

> Hi Simon
>
> I found the following in the dictionary:
>
> iOS Note: iOS imposes strict controls over what you can and cannot
> access. Each application in iOS is stored in its own 'sandbox' folder
> (referred to as the home folder). An application is free to *read* and
> *write* files within this folder and its descendants, but it is not
> allowed to access anything outside of the 'sandbox'.
>
>
> *Examples: *
>
> specialFolderPath("Preferences")
>
>
> set the defaultFolder to specialFolderPath("desktop")
>
>
> put specialFolderPath("asup") into appSupportFolder
>
>
> put url ("file:" & specialFolderPath("engine") & slash & "foo.txt") into
> tFileContents
>
>
> set the folder to specialFolderPath("engine") & slash & "myimages"
>
> put the files into tMyImages
>
>
>
> Use the *specialFolderPath* function to place preferences in the
> Preferences folder, save files to the Documents folder, find out which
> files are installed in the System or Fonts folders, and so on.
>
> *Parameters:*
>
> folderIdentifier - One of the items below.
>
>
>  When I edit the script to add the " EXAMPLE; put url ("file:" &
> specialFolderPath("engine") & slash & "foo.txt") into tFileContents
>
>  the script gives and error.
>
> *
> J. Landman Gay
> I edited the spelling error, and the image is now retained in the group
> image control for the card it was added too. The problem is all of the
> cards now have the same image that was added on the first card? The image
> on each card background needs to retain the one that was added on that
> card. Is the a setting or a script issue?
>
> Thank you
>
> Vaughn Clement
>
> Apps by Vaughn Clement (Support)
> *http://www.appsbyvaughnclement.com/tools/home-page/
> <http://www.appsbyvaughnclement.com/tools/home-page/>*
> Skype: vaughn.clement
> https://secure.join.me/appsbyvclement
> FaceTime: vclem...@gmail.com
> LogMeIn also avaialble
> Call on "ooVoo" at address:  vaughnclement or 9282549062
> Ph. 928-254-9062
>
>
>
> On Fri, Jun 20, 2014 at 12:16 PM, Simon  wrote:
>
>> Hi Vaughn,
>> Aside from a spelling mistake just add parentheses around all the folder
>> paths
>> e.g.
>>  put (specialFolderPath("documents") & "/photos/" & the short ID of this
>> card) into thePath
>>
>> and then delete the current filename
>> on mouseUp
>>--/ the image from mobilePickPhoto uses the template image construct
>>--set it off screen so we don't see ift flash /
>>set the loc of the templateImage to -1,-1
>> set the filename of image "imageField1" of this card to  ""
>>
>> Simon
>>
>>
>>
>> --
>> View this message in context:
>> http://runtime-revolution.278305.n4.nabble.com/Image-control-in-a-Background-tp4680553p4680559.html
>> Sent from the Revolution - User mailing list archive at Nabble.com.
>>
>> ___
>> 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: Image control in a Background

2014-06-21 Thread Vaughn Clement
Hi Simon

I found the following in the dictionary:

iOS Note: iOS imposes strict controls over what you can and cannot access.
Each application in iOS is stored in its own 'sandbox' folder (referred to
as the home folder). An application is free to *read* and *write* files
within this folder and its descendants, but it is not allowed to access
anything outside of the 'sandbox'.


*Examples: *

specialFolderPath("Preferences")


set the defaultFolder to specialFolderPath("desktop")


put specialFolderPath("asup") into appSupportFolder


put url ("file:" & specialFolderPath("engine") & slash & "foo.txt") into
tFileContents


set the folder to specialFolderPath("engine") & slash & "myimages"

put the files into tMyImages



Use the *specialFolderPath* function to place preferences in the
Preferences folder, save files to the Documents folder, find out which
files are installed in the System or Fonts folders, and so on.

*Parameters:*

folderIdentifier - One of the items below.


 When I edit the script to add the " EXAMPLE; put url ("file:" &
specialFolderPath("engine") & slash & "foo.txt") into tFileContents

 the script gives and error.

*
J. Landman Gay
I edited the spelling error, and the image is now retained in the group
image control for the card it was added too. The problem is all of the
cards now have the same image that was added on the first card? The image
on each card background needs to retain the one that was added on that
card. Is the a setting or a script issue?

Thank you

Vaughn Clement

Apps by Vaughn Clement (Support)
*http://www.appsbyvaughnclement.com/tools/home-page/
<http://www.appsbyvaughnclement.com/tools/home-page/>*
Skype: vaughn.clement
https://secure.join.me/appsbyvclement
FaceTime: vclem...@gmail.com
LogMeIn also avaialble
Call on "ooVoo" at address:  vaughnclement or 9282549062
Ph. 928-254-9062



On Fri, Jun 20, 2014 at 12:16 PM, Simon  wrote:

> Hi Vaughn,
> Aside from a spelling mistake just add parentheses around all the folder
> paths
> e.g.
>  put (specialFolderPath("documents") & "/photos/" & the short ID of this
> card) into thePath
>
> and then delete the current filename
> on mouseUp
>--/ the image from mobilePickPhoto uses the template image construct
>--set it off screen so we don't see ift flash /
>set the loc of the templateImage to -1,-1
> set the filename of image "imageField1" of this card to  ""
>
> Simon
>
>
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/Image-control-in-a-Background-tp4680553p4680559.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> ___
> 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: Image control in a Background

2014-06-20 Thread Vaughn Clement
Hi

Thanks for the help, my dyslectic eyes are subject to misspelling and not
even able to see the error. Great for scripting right! I've lived with it
all my life?

Thank you

Vaughn Clement

Apps by Vaughn Clement (Support)
*http://www.appsbyvaughnclement.com/tools/home-page/
<http://www.appsbyvaughnclement.com/tools/home-page/>*
Skype: vaughn.clement
https://secure.join.me/appsbyvclement
FaceTime: vclem...@gmail.com
LogMeIn also avaialble
Call on "ooVoo" at address:  vaughnclement or 9282549062
Ph. 928-254-9062



On Fri, Jun 20, 2014 at 12:16 PM, Simon  wrote:

> Hi Vaughn,
> Aside from a spelling mistake just add parentheses around all the folder
> paths
> e.g.
>  put (specialFolderPath("documents") & "/photos/" & the short ID of this
> card) into thePath
>
> and then delete the current filename
> on mouseUp
>--/ the image from mobilePickPhoto uses the template image construct
>--set it off screen so we don't see ift flash /
>set the loc of the templateImage to -1,-1
> set the filename of image "imageField1" of this card to  ""
>
> Simon
>
>
>
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/Image-control-in-a-Background-tp4680553p4680559.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> ___
> 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: Image control in a Background

2014-06-20 Thread Simon
Hi Vaughn,
Aside from a spelling mistake just add parentheses around all the folder
paths
e.g.
 put (specialFolderPath("documents") & "/photos/" & the short ID of this
card) into thePath 

and then delete the current filename
on mouseUp 
   --/ the image from mobilePickPhoto uses the template image construct 
   --set it off screen so we don't see ift flash / 
   set the loc of the templateImage to -1,-1 
set the filename of image "imageField1" of this card to  ""

Simon



--
View this message in context: 
http://runtime-revolution.278305.n4.nabble.com/Image-control-in-a-Background-tp4680553p4680559.html
Sent from the Revolution - User mailing list archive at Nabble.com.

___
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: Image control in a Background

2014-06-20 Thread J. Landman Gay

On 6/20/2014, 10:23 AM, Vaughn Clement wrote:


The image control is supposed load when the card opens and the last photo
is to be displayed?

>

*on*  openCard

*set*  the defaultfolder to specialFolderPath ("documents") & "/photos/"

*--answer the files*

*if*  the number of this card >1*then*

   *set*  the defaultfolder to specialFolderPath ("documents") &
"/photos/"*then*

  *if*  there is a file the short id of this card*then*

 *put*  specialFolderPath ("documents") & "/photos/" & the short
ID of this card into thePath

 *set*  the filename of image "imegeField1" of this card to
thepath

  *end*  *if*

   *end*  *if*

*end*  openCard



Is this a direct copy/paste? This line is malformed:

 set the defaultfolder to specialFolderPath ("documents") & "/photos/" 
then <--


Remove the trailing "then". Also, the image name is misspelled as 
"imegeField1" ("e" rather than "a") which is more likely the reason for 
the problem.


--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software   | http://www.hyperactivesw.com

___
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


Image control in a Background

2014-06-20 Thread Vaughn Clement
Hi All

I asked this question recently and I did not get any responses.

I have a substack with a background group where there is an Image Control
is being populated using the

mobilePickPhoto "library"

The image is added to the control correctly and displays, but if I leave
the card and return the image is gone.

To solve this the image is stored in the folder on in the app as per this
script:


*on* mouseUp

   /* the image from mobilePickPhoto uses the template image construct

   set it off screen so we don't see ift flash */

   *set* the loc of the templateImage to -1,-1

   /*choose a photo*/

   mobilePickPhoto "library"

   *lock* screen

   *if* the result <> "cancel" *then*

  /* make the filepath to save the chosen image*/

  *put* specialFolderPath("documents") & "/photos/" & the short ID of
this card into thePath

  /* put the image into a file in the photos folder */

  *put* the text of the last image of this card into URL("binfile:" &
thePath)

  /*set the loc of image 1 to the loc of group "picgroup' so it will
align*/

  *--set the loc of  image "imageField1" to the loc of group "picgroup"*

  /* show the image on the card */

  *set* the filename of image "ImageField1" of this card to thePath

  /* destroy the image imported from the library */

  *delete* the last image of this card

   *end* *if*

*end* mouseUp

The image control is supposed load when the card opens and the last photo
is to be displayed?


*on* openCard

   *set* the defaultfolder to specialFolderPath ("documents") & "/photos/"

   *--answer the files*

   *if* the number of this card >1 *then*

  *set* the defaultfolder to specialFolderPath ("documents") &
"/photos/" *then*

 *if* there is a file the short id of this card *then*

*put* specialFolderPath ("documents") & "/photos/" & the short
ID of this card into thePath

*set* the filename of image "imegeField1" of this card to
thepath

 *end* *if*

  *end* *if*

*end* openCard

Several different changes were tried and the image still will not load into
the card as scripted above.


Can anyone reference the information or see what might cause this issue?


Thank you

Vaughn Clement

Apps by Vaughn Clement (Support)
*http://www.appsbyvaughnclement.com/tools/home-page/
*
Skype: vaughn.clement
https://secure.join.me/appsbyvclement
FaceTime: vclem...@gmail.com
LogMeIn also avaialble
Call on "ooVoo" at address:  vaughnclement or 9282549062
Ph. 928-254-9062
___
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