property myreloader: class "Reloader"
property apostolis: missing value
on callthem()
set myreloader to apostolis's alloc()'s init()
myreloader's menuaction()
end callthem
but I get:
-[Reloader alloc]: unrecognized selector sent to instance 0x600000038160 (error -10000)
Either you add a blue cube in interface builder, set the class to Reloader and connect it to a “missing value” property,
then the object is already instantiated and you can use the instance methods directly.
Or you instantiate an object in code then you have to alloc/init the class or an variable containing the class object.
set classReloader to class "Reloader"
set myreloader to classReloader's alloc()'s init()
Option 1.
I dont understand what exactly I have to do. I have two blue cubes already, one is class Reloader and the second is class ASOC. I have an outlet in the ASOC called maction. Where I have to connect it? I tried to connect it to the Reloader but it doesn’t connect it with the handler menuaction.
Could you make your method a class method? Then in ASOC you can call it but don’t have to alloc/init. Depends on what you need to do with the method of course.