Script problem
Thierry Douez
th.douez at gmail.com
Thu Oct 25 10:06:07 EDT 2012
2012/10/25 charles61 <cszasz at mac.com>:
> Thierry,
>
> Thanks for your suggestion! I do have a cr after each string for each uMyLabel so when it is inserted into my scrolling field the checkbox labels are separated by a cr. I would expect this only to affect the subsequent checked checkbox after the initial checked checkbox. This was not a problem in my sample test stack which had about 40-50 checkboxes. I did not encounter any blank lines before any checkbox uMyLabels were inserted in my field, which is intended for printing.
>
> As you can see from my script, only checked checkboxes on marked cards are inserted in the scrolling field. If only one checkbox is checked, there are five blank lines before the checkbox label in my actual project. So I am still at a loss on what is going on. I have checked my settings for scrolling field for simple answer but found nothing.
Well, for me I think your script is allright.
I still suspect your datas are not, but this is a guess.
If you feel so, send me your stack and I can have a quick look.
HTH,
Thierry
>
> You might be wondering why I am using this code. I am trying to set up so that only checked checkboxes are printed in a print out of recommendations list selected by the user. My original version of my project printed all of the checkboxes regardless of whether they were selected by the user.
>
> Again, thanks for your ideas and suggestions!
>
> Sent from my iPad
>
> On Oct 25, 2012, at 5:56 AM, "Thierry Douez [via Runtime Revolution]" <ml-node+s278305n4656635h14 at n4.nabble.com> wrote:
>
>> 2012/10/25 Ben Rubinstein <[hidden email]>:
>> > On 25/10/2012 04:08, Charles Szasz wrote:
>> >>
>> >> I also again went through each of the more than 800 checkboxes in my
>> >> project and did not find any missing strings. So, I don't know what is
>> >> accounting for the five blank lines in my field "recommendations".
>> >> ...
>> >> If you have more ideas or suggestions, please share them with me.
>>
>> Hi,
>>
>> my script was a start to search the culprits...
>>
>> What could happen is to have invisible chars, tab, cr or white spaces.
>> So, I would check for all these chars...
>>
>> HTH
>>
>> Thierry
>>
>> >
>> > Perhaps some of the strings contain leading or trailing returns - so you're
>> > not collecting empty values, but when you put them all in a list you end up
>> > with some blank lines.
>> >
>> > So yet another variation might collect this information
>> >
>> >> repeat with y = 1 to the number of cards of stack "MyStack"
>> >> if the mark of card y of stack "MyStack"= true then
>> >> put the number of buttons of card y of stack "MyStack"into nbr
>> >> repeat with n = 1 to nbr
>> >> if the style of button n of card y of stack "MyStack" is "checkbox"\
>> >> and the hilite of button n of card y of stack "MyStack" then
>> >>
>> > put the uMyLabel of button n of card y of stack "MyStack" into
>> > tName
>> > if tName contains cr then
>> > put y && n & cr after theList
>> > end if
>> > -- temporarily suppress normal data collection
>> > -- put the uMyLabel of button n of card y of stack "MyStack" iinto
>> > tName
>> > -- put tName & cr after theList
>> >> end if
>> >> end repeat
>> >> end if
>> >> end repeat
>> >
>> > ... or if you just want to suppress it from your output, and don't care
>> > where it is, replace
>> >
>> > put tName & cr after theList
>> >
>> > with
>> > put line 1 of tName & cr after theList
>> >
>> > HTH
>> >
>> > Ben
>> >
>> > _______________________________________________
>> > use-livecode mailing list
>> > [hidden email]
>> > Please visit this url to subscribe, unsubscribe and manage your subscription
>> > preferences:
>> > http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>>
>> If you reply to this email, your message will be added to the discussion below:
>> http://runtime-revolution.278305.n4.nabble.com/Script-problem-tp4656616p4656635.html
>> To unsubscribe from Script problem, click here.
>> NAML
>
>
>
>
> --
> View this message in context: http://runtime-revolution.278305.n4.nabble.com/Script-problem-tp4656616p4656636.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list