1

I'm trying to import objects from an external file. The Object is not stored in Object map.

Definition:

    shutterMultiplier = waitForObject({"name": "UserVisible/Capturing 
    Settings/Basic/Shutter Multiplier.AHBox<int>.SpinBox", "type": "QSpinBox", 
    "visible": 1})

This is working correctly. However, when I try it with:

    shutterMultiplier = findObject({"name": name, "type": type, "visible": 1})

When

   name = UserVisible/Capturing Settings/Basic/Shutter Multiplier.AHBox<int>.SpinBox
   type = QSpinBox

I only get LookUpError about not recognized properties. I also tried the option with name and typed in "". The list of missing properties is not populated. Is there any way how to make this work?

Joel
  • 1,564
  • 7
  • 12
  • 20
Od1ne
  • 11
  • 6

2 Answers2

0

Try assigning properties for name as follows:

name = {"UserVisible/Capturing Settings/Basic/Shutter Multiplier.AHBox.SpinBox", "type": "QSpinBox", "visible": 1}

I believe visible:1 is occurrence of some sort, see if you can find alternative properties which can be robust.As you keep adding objects, your list gets bigger so does your occurrence.

  • define "name" on a separate global file and import this global file at the start of your program. – Santhosh Raman Nov 05 '18 at 19:08
  • Defining it in global file is the last option. Whole idea is to avoid definition in global files and be able to define objects by names provided from developers. Visible: 1 is property provided by Squish and is not required for functioning. Removing it does not affect functionality at all. – Od1ne Nov 06 '18 at 09:34
  • Squish's "visible" property is a boolean value in general, but needs to be encoded as an integer (depending on Squish edition), where 1 stands for "true", and 0 for "false". – frog.ca Dec 04 '18 at 16:43
0

Problem was not the syntax. Solution was to save correct syntax and kill the application and all created instances. Also there helped to make it strings without ".

    str(testData.field(sample, "name"))
Od1ne
  • 11
  • 6