Move to the points

Richmond richmondmathewson at gmail.com
Wed Jul 27 09:57:20 EDT 2016


Usual nonsense: replying to my own postings:

The problem lies in my relying on put (KOUNT * 10) into LYNE

to supply me with continuous line numbers for my listField, now sorted out:

on mouseUp
    put empty into fld "f1"
    put 0.1 into KOUNT
    put 1 into LYNE
    repeat until KOUNT > 12.6
       put ( ( ((sin (KOUNT)) * (cos (KOUNT)) ) * 300) + 400) into LR
       put ((((cos (KOUNT)) ) * 300) +400) into TB
       put (LR & "," & TB) into line LYNE of fld "f1"
       add 0.1 to KOUNT
       add 1 to LYNE
    end repeat
    set the points of grc "c1" to fld "f1"
end mouseUp

The IDE did not help with its cryptic message.

R.


On 27.07.2016 16:46, Richmond wrote:
> Of course part of this could be the problem that my initial curve 
> generation script leaves empty lines in
>
> the listField that contains the points of the curve.
>
> R.
>
>
> On 27.07.2016 16:44, Richmond wrote:
>> So I have a graphic object generated like this:
>>
>> on mouseUp
>>    put empty into fld "f1"
>>    put 0.1 into KOUNT
>>    repeat until KOUNT > 12.6
>>       put (KOUNT * 10) into LYNE
>>       put ( ( ((sin (KOUNT)) * (cos (KOUNT)) ) * 300) + 400) into LR
>>       put ((((cos (KOUNT)) ) * 300) +400) into TB
>>       put (LR & "," & TB) into line LYNE of fld "f1"
>>       add 0.1 to KOUNT
>>    end repeat
>>    set the points of grc "c1" to fld "f1"
>> end mouseUp
>>
>> (where grc "c1" is a pre-existing graphic)
>>
>> and a button containing this:
>>
>> on mouseUp
>>    move grc "g1" to the points of grc "c1" in 10 seconds
>> end mouseUp
>>
>> and all should be fine, but it isn't, because on attempted execution 
>> of the button I get this:
>>
>> "button "GO": execution error at line 2 (move: end point is not a 
>> point), char 21".
>>
>> All very mysterious, Richmond.
>>
>> P.S. Before Mark, Jacque or Richard try it; there is a comma before 
>> my name!
>>
>





More information about the use-livecode mailing list