Properties
Similar Topics
Statistics
Comments
3
Participants
2
Subscribers
0
Votes
1
Views
1023
Share
Answered
Hi!
I have an object in A1, and the script OnClick B1 = If [B1 == 0,1,0]. I would like to have a similar relationship between A2 and B2, A3 and B3, etc.
In total, it is always a few dozen objects. Copy the script is very labor intensive. Is there a faster way?
Thanks for your help.
- GeoGebra
- Help
- Partners
-
Contact us
- Feedback & Questions
- This email address is being protected from spambots. You need JavaScript enabled to view it.
- +43 677 6137 2693
© 2023 International GeoGebra Institute
Hi,
An example in the attachment.
For adapt for your problem:
- copy the global javascript (allow to read or write all properties of objects)
- adapt and rename object "ScriptB". In this script-list is the sample for all scripts there must be executed.
the first command in "ScriptB" is fix. He need the Object "row",
"row" is a variable for the next command(s) in "ScriptB"
command 2 and higher is what you want change in the Table
you can adress a cell relativ to the actual click (or update)
Example: "C"+row+""
- adapt the script in the button:
Table-Column with the generated scripts in Line 2: Example "B"
Type of objects in Line 4: Example "point"
Name of script-list in Line 5: Example "ScriptB"
Type of the script in Line 6 (3.parameter): "val" for "OnClick" or "onUpdate" for "OnUpdate"
Raymond
Note:
An improved version is under development (about 1 day).
In this version, no changes in the java-script will be necessary.
https://ggbm.at/565501
Hi
As attachment the improved version of 'D1'.
The documentation is included in the file.
Raymond
Change 15.02.14 Version D to D1
https://ggbm.at/565519
THANKS ;-D
Comments have been locked on this page!