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/ <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 <jac...@hyperactivesw.com> 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 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 > _______________________________________________ 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