CDEFs (of which the Rad Slider control is) are interpreted as buttons once they
are created, rather than user items. It is possible to stuff a button number
into the control's refCon and then respond to it as if it were a button.
For the CDEFs that I use in my programs within PG, I have written uCods that
draw the control right within PG, and allow the user to specify (in the User
Object dialog) the necessary values, such as current (i.e., default) value--one
of the gObjUser# is used for the FB button number.
What I typically do is the following:
in the program (each of the CDEFs I use puts a .FLTR in auomatically)
in the _otherUserInit section of the .FLTR I create the control (usually via the
toolbox FN NewControl), and in here I set the refCon to be the FB button number:
CHndl& = FN NewControl(wndPtr&, gObjT, title$, _false, ctrlVal, 1, ctrlMax,
cdefProcID, 0)
LONG IF (CHndl&)
rfCon& = FN GETCREFCON(CHndl&)
' in this case, gObjUser3 is the button number
rfCon& = ((rfCon& AND &FFFF0000) OR (gObjUser3 << 16))
CALL SETCREFCON(CHndl&, rfCon&)
END IF
Then, in your window.FLTR or wherever you check for button clicks, you can react
accordingly just as if an FB button was pressed. You might also be able to use
FB's BUTTON statement to create the control to begin with.
hth
Chris
______________________________ Reply Separator _________________________________
Subject: [FB] Rad-Slider Questions or Options
Author: mdavey@...
Date: 1/28/98 9:46 AM
I have a project setup in Program Generator that I'd like to use
Rad-Sliders with. The sliders are working fine except for one thing, I'd
like to be able to update what the sliders control as soon as someone has
changed the slider.
It seems simple enough, just watch for an event of _otherUserClick. But
they never come, for some reason a click and move or just a click on the
slider never generates an event of _otherUserClick.
I've got Rad-Sliders 1.1, is there anything I'm missing or is this the way
it is? Are There any other options that would work?
Thanks for the help
mike
*****************************************************************
Mike Davey * Pisani Graphics, Inc * www.pisaninet.com
*****************************************************************
--
To unsubscribe, send ANY message to <futurebasic-unsubscribe@...>