
Help with programming Gadgets?
Well, here I am trying to make my image processing code into a Gadgets-
using application, and I'm stuck. Perhaps someone can enlighten me as
to what I'm missing.
I have a nice Gadget that I've extended from the Skeleton example
that displays an image (sort of like the picture gadget) on the
screen. Thing is, the image is much larger than the gadget, so
I wanted to add a couple of attributes to the FrameDesc record to
hold the X&Y offset of the image and then when drawing the gadget use
these fields to offset the underlying image. OK?
Then, I planned on making a couple of scroll bars that could execute
the commands necessary to reset these offset attributes, and put them
next to the image gadget. Sounds good, eh? Trouble is, I'm stuck on
a couple of things:
1. How do I add a fully qualified attribute to the gadget? I've got
it to where I can get and change the attributes with Gadgets.Get/ChangeAttr,
but the Inspector doesn't see it. Can someone perhaps patch Skeleton.Mod
to add another integer attribute to it? I'm not sure if Attribute.Insert
is the appropriate thing to use here...
2. Lets assume I've got one of these gadgets in Test.Panel named MyWin.
Now, I know I can change the attributes of this thing if I select
it, doing something like
Gadgets.ChangeAttr Color 3
...but how can I change it without selecting it first? I want to
be able to put a command in the slider command field that will always
change a specific attribute on a specific gadget in the same panel,
but I'll be damned if I can see how. I've read the docs, but I don't
see anything like this as an example... Maybe I'll go read CAFE.Mod
again... :-)
I'm missing something obvious, I'm sure. Any suggestions?
-greg
---
Greg DeLozier/Senior Scientific Analyst/L{*filter*}Defense Systems