OpenDCL Forums

OpenDCL => Studio/Dialog Editor => Topic started by: dsm_dude on August 27, 2015, 11:34:31 AM

Title: Slide Image
Post by: dsm_dude on August 27, 2015, 11:34:31 AM
I've gone through the tutorials and started venturing off on my own.

I have a slide image I want to use, but for the life of me I cant get the slide image to show when then dcl comes up.

I placed a slide view, dbl clicked it and then when to slide view > SlideImage > load
which gives me this:
Code (autolisp) Select
(dcl-SlideView-Load HelloWorld/Form1/SlideView1 Filename [as String] {ImageName [as String]})

My slide file is called test.sld

I keep getting an OpenDCL Runtime Error:
Error: NIL value not allowed
Function: dcl-slidview-load
Argument: 0
Title: Re: Slide Image
Post by: Fred Tomke on August 27, 2015, 01:17:24 PM
Hi, argument 0 is always the control entity.
The used variable is nil.
Do you have a type mismatch?
Is the form already active?
Do you use the OnInitialize event?
Fred
Title: Re: Slide Image
Post by: dsm_dude on August 27, 2015, 01:19:04 PM
This is what I have so far.

Code (autolisp) Select
(command "OPENDCL")
(defun c:Hello ()
(dcl_Project_Load "HelloWorld" T)
(dcl_Form_Show HelloWorld_Form1)
(princ)
)

(dcl-SlideView-Load HelloWorld/Form1/SlideView1 Filename [as String] {ImageName [as String]})
)
Title: Re: Slide Image
Post by: owenwengerd on August 27, 2015, 01:29:40 PM
You should call the dcl-SlideView-Load function from an event handler such as your form's OnInitialize event or a button's OnClicked event.
Title: Re: Slide Image
Post by: Fred Tomke on August 28, 2015, 01:03:16 AM
Hi, what Owen and I mean is this:

Check the Initialize event of the form in the events tab in OpenDCL Studio.
And then type code like this:

Code (autolisp) Select

(defun c:test (/ c:HelloWorld/Form1/OnInitialize)
  (command "OPENDCL")
  (dcl_Project_Load "HelloWorld")

  (defun c:HelloWorld/Form1/OnInitialize()
    (dcl-SlideView-Load HelloWorld/Form1/SlideView1 "c:/temp/slide.sld")
  ); c:HelloWorld/Form1/OnInitialize

  (dcl_Form_Show HelloWorld/Form1)
); test


Please, check the tutorial first.
Fred
Title: Re: Slide Image
Post by: dsm_dude on July 07, 2016, 11:55:03 AM
Its been a while sense I've had time to mess with this stuff.

I've decided to give it one last go. No where in the tutorials is there any information on Slide images.

Am I missing something?
Title: Re: Slide Image
Post by: velasquez on July 07, 2016, 01:54:23 PM
Quote from: dsm_dude on July 07, 2016, 11:55:03 AM
Its been a while sense I've had time to mess with this stuff.

I've decided to give it one last go. No where in the tutorials is there any information on Slide images.

Am I missing something?

What information do you need on Slide Image?
Regards
Title: Re: Slide Image
Post by: owenwengerd on July 07, 2016, 08:19:11 PM
Quote from: dsm_dude on July 07, 2016, 11:55:03 AM
I've decided to give it one last go. No where in the tutorials is there any information on Slide images.
Am I missing something?

I think Fred was referring to the beginner's tutorial (http://opendcl.com/wordpress/?page_id=10) to learn about OpenDCL forms and event handling in general, not specifically about working with slides. Once you understand how OpenDCL events work, the reference documentation about the slide functions and answers here will make more sense to you.