Non reliable cases with Slider

Started by Slavko Ivanovic, October 16, 2010, 06:00:24 PM

Previous topic - Next topic

Slavko Ivanovic


I have notice some things about slider.
Need opinion.
Copy this code and load.
Code (autolisp) Select

;; Events
(defun c:slider_Form1_Slider1_OnScroll (Value /)
(dcl_MessageBox
  "To Do: code must be added to event handler\r\nc:slider_Form1_Slider1_OnScroll"
  "To do"
)
)
(defun c:slider_Form2_Slider1_OnScroll (Value /)
(dcl_MessageBox
  "To Do: code must be added to event handler\r\nc:slider_Form2_Slider1_OnScroll"
  "To do"
)
)
(defun c:slider_Form1_OnInitialize (/) (dcl_Control_SetValue slider_Form1_Slider1 5))
(defun c:slider_Form2_OnInitialize (/) (dcl_Control_SetValue slider_Form2_Slider1 5))

;; Load and show
(dcl_project_import
'("YWt6A9MeAAC7eV1aBuKTJjURYjtugFi6lV9IdDQ+Byb/K3YefWWTtc/zenk+Nj48IFnGOhXR80mn"
"puydRvZ1eXBeDH53uvfhvi2cXw+aeknQNmJGXPt+WVDu5tEUWaWjy6gSQqCmVZpjsxIBLaNDQyMh"
"K4lJxSkR0FxHDemuOn0Lshx3RX6CSnaiswFPYOf6YitgrdIsO387Yh0X/NtUtVugUY7S3/wP6LTK"
"sGwxzrBi8WyB2Ret+dM08Z3SLR/hHOMe174M7xNUpB3zqMSIJpmvzLBYU7TmnMu8FXNNZr7uCmQP"
"3sUayoVuOUQAWh1hBmD1Atv1Yj0Cfce6bjfdhh39KXKA4KNZJlCPUbgAW75dTQZsgErg/QWIR+K6"
"fCCep75MseSoBf2LnCJqiITxB7SVeIH+Q8mgUQevhnIIvIW7Ech4UsGhRqGPYPmhbIXJcBWD0XOA"
"uJ7RcoCpQzFyj6Vmwvspmwdx+1AG6NEF99E0aYJmJm7xxOBhHjfjR/K6592o5/0Zw5dTC0SW1OfU"
"+L+NfwBOox+fzSRwQjW0U88w7TkCw0PIKJFJpc1sl9KCn87wkImIUsuOb62AsYgiypIVRgR5nMht"
"QlmBW+0ArJ/dHKEb4prvns6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dcl_MessageBox "Case two is same, but reversed" "Now")
(dcl_form_show slider_form2)


also, i find some very small cosmetics:
missing left parenthesis in copy-ready event in studio

Code (autolisp) Select

(defun c:slider_Form2_Slider1_OnReleasedCapture Value /)
  (dcl_MessageBox "To Do: code must be added to event handler\r\nc:slider_Form2_Slider1_OnReleasedCapture" "To do")
)



Slavko
***  siCAD Solutions for AutoCAD  ***
ArchiTools l ToolsPlus l LandTools l LBE

owenwengerd

Good catch. I've fixed the scroll event bug for beta 3, and added the missing parenthesis in the help file.
Owen Wengerd (Outside The Box) / ManuSoft