I have no good solution for the last problem in this challenge

rami shared this question 10 months ago

1.) For all points with the prefix B and the sufix "_{nn}" a list should be created (dependet on points)

2.) Based on the above list, for a given point (A) with each list element a vector is to be created in an (additional) list.

3.) Points "B_{nn}" are to be

- renamed

- deleted

- moved

and the lists from point 1) and point 2) should be updated automatically.

The applet should be able to save and open again without problems.

The order within the construction protocol for the points B_{nn} should not have an influence in creating the list from point 1).

---------------------

All the above requirements are fulfilled except for deletion of a point B_{nn}

A solution is sought (possibly a very detailed error analysis)

Is the naming important? You could do this to solve the deleting problem:

* l1=A1:A100

* Polynomial(l1)

* rename each new point to eg A5

1

Please explain what problem you are trying to solve overall

1

I am looking for a general solution to extend point lists automatically.

The extension is done for points with a certain name and a following index.

The points list always contains the current values of his points.

1

```general solution to extend point lists automatically.
```

Why? To achieve what?

1

Example:

There is a polynomial with some points. The points have the names P_{1}...P_{nn}. A point P_{33} is created. The above functionality automatically extends the list needed for the polynomial.

If you do not consider the task to be meaningful (which I suspect you do), then I will tolerate your judgment (even without justification) without any problems.

1

How's that? https://www.geogebra.org/m/yar3rngq

You can add in a check for the point name being P_{xx}

1

Many thanks for the approach.

With JS it is easier to add to the point list. But that is not my problem.

Also in your version, deleting a point will delete the dependency (in this case the function). In your version, the list is also deleted (probably in mine too, but it is rebuilt immediately)

It might be helpful if you could mark a deletion, then update the list and finally really delete the item.

1

Is the naming important? You could do this to solve the deleting problem:

* l1=A1:A100

* Polynomial(l1)

* rename each new point to eg A5

1

good idea!, Thanks.

1

@ Michael Borcherds Your example doesn't work in the desktop version: 5.0.574. 0_d (Java 1.8.0:161-32bit, 247MB CAS)

1

yes, because registerADDlistener JS method only works online (see global Javascript in the file)

1
1

`desktop version: 5.0.574.0`

@jumera check v612 :)

https://wiki.geogebra.org/e...

2

@Michael : doesn't work with GG5v613 and GGB6v609 (on Mac)

@mathmagic : your file works fine offline ! (all files i did with listener before only work online)

why your file works and Michael's file doesn't work ?

1

1

This one works for me in v613. Does it work for you?

1

yes

but it didn't work before (i put the old one)

Edit : was problem line 23 ) instead of });

1

Anyway, thank's

I learned that listener works offline (is it a new feature or it has always work offline ?)

1

They've always worked offline (but only passing the function name as a string). Now both ways work :)

1

ok

`(but only passing the function name as a string)`

I didn't do that

Thank's

1

Thank you, now the applet works without problems in both versions!