Author Topic: Object oriented implementation of instances within PI?????  (Read 2625 times)

Offline ftherrmann

  • PixInsight Enthusiast
  • **
  • Posts: 83
I am a newbie to PI. Still using the trial version.  However the implementation of instances is less than obvious some times.  Here's a problem I ran into that made me feel like pulling my hair out.

1 Opened the dynamic crop and executed a crop of an sub

2 Then dragged an instance of the crop to the workspace so I could crop my other subs

3 Dragged the instance to the other subs and NOTHING happened.  No crop, no error message

I later found out that some how the "execution" becomes a part of the instance and apparently trying to crop an image that was larger than the "resultant" crop executed breaks the instance.

If this were a basic script recorder it would make more sense, but in keeping with the object oriented method of PI it doesn't.  Why am I wrong?  What am I missing? If you were to change this to my way of thinking would it tear up something else in your implementation?

PS: I'm not a fan of object oriented programming and have always said a good C programmer can program C in any language.

PSS: "Familiarity breeds contempt" :-)

Offline sleshin

  • PixInsight Old Hand
  • ****
  • Posts: 431
Re: Object oriented implementation of instances within PI?????
« Reply #1 on: 2013 January 27 15:21:20 »
For the Dynamic Crop tool, save the instance for the tool after you have set the crop for the first image but BEFORE you execute the first crop. Then execute and close the DC dialog and use the saved instance on any other images and it will work. Should you forget to save the instance before the first crop,  all is not lost. Just open the History Explorer for the cropped image and the Dynamic Crop executed on that image is listed. You can double click on it to open it, or drag it to the desk top to create a new instance, or drag it directly to an image to execute it on that image. Give it a try.

For me, familiarity with PI's user interface breeds lots of pleasure. :)

Steve
Steve Leshin

Stargazer Observatory
Sedona, Arizona

Offline ftherrmann

  • PixInsight Enthusiast
  • **
  • Posts: 83
Re: Object oriented implementation of instances within PI?????
« Reply #2 on: 2013 January 27 15:29:58 »
Sleshin,

I understand that now, but I'd like to know why it's implemented that way.  Doesn't seem logical.