| 243 | } |
| 244 | |
| 245 | void CtrlrLuaMethodManager::addMethod (ValueTree groupToAddTo, const String &methodName, const String &initialCode, const String &linkedToProperty, const Uuid methodUid, const bool forceIfAlreadyExists) |
| 246 | { |
| 247 | ValueTree group; |
| 248 | |
| 249 | if (groupToAddTo.isValid()) |
| 250 | group = groupToAddTo; |
| 251 | else |
| 252 | group = managerTree; |
| 253 | |
| 254 | if (group.getChildWithProperty(Ids::uuid, methodUid.toString()).isValid() && forceIfAlreadyExists) |
| 255 | { |
| 256 | group.removeChild (group.getChildWithProperty(Ids::uuid, methodUid.toString()), nullptr); |
| 257 | } |
| 258 | |
| 259 | group.addChild (getDefaultMethodTree (methodName, initialCode, linkedToProperty, methodUid), -1, nullptr); |
| 260 | |
| 261 | // Notify the panel about the modification |
| 262 | owner.getOwner().luaManagerChanged(); |
| 263 | } |
| 264 | |
| 265 | void CtrlrLuaMethodManager::addMethodFromFile (ValueTree groupToAddTo, const File &fileToUse, const Uuid methodUid) |
| 266 | { |
no test coverage detected