Welcome to the CSC Q&A, on our server named in honor of Ada Lovelace. Write great code! Get help and give help!
It is our choices... that show what we truly are, far more than our abilities.

Categories

+12 votes

In ChatterBox, I have the edit popping up with the correct bot to edit; however, I can't figure out how to save the bot's new changes. Any suggestions?

asked in CSC 305 Fall 2024 by (4.9k points)

1 Answer

+1 vote
 
Best answer

Probably the simplest approach is:

IF you are editing a bot (as opposed to adding a new one), then:

  1. remove the bot that is being edited
  2. create a new bot (based on the settings the user chose) and add that to the bot list

It's not possible to simply change the data fields of the bot being edited, because if you change "personality type", then you have to switch to a different subclass of ChatBot, and you can't change the type of an object after it's been created.

answered by (5.7k points)
selected by
...