jacobclarke92 / TouchOSC-Script-Injector

12 stars 2 forks source link

Script doesn't get injected if only one object in template #2

Open kmitch95120 opened 11 months ago

kmitch95120 commented 11 months ago

While looking at another issue, I stumbled upon this one.

  1. Create a new template called test.tosc
  2. Create a button called 'button1'
  3. Create a scripts folder
  4. Create a file called button1.lua and put something in it.
  5. Pass the template to the injector and you'll see '! name: button1 - 0 injected'
  6. Add a second object of any type and save the template and you'll see '! name: button1 - 1 injected'

From this point on the injector will work as expected. if you delete the second object and save the template, the problem will return.