TheSwamp

Code Red => AutoLISP (Vanilla / Visual) => Visual DCL Programming => Topic started by: Dream.Fei on April 27, 2007, 06:35:36 AM

Title: Questiont about ComboBox
Post by: Dream.Fei on April 27, 2007, 06:35:36 AM
 :cry:
:cry:
My question is : how can I get the currently string of the combobox ?
use "getcursel" will return index -1. but I want to get the string not index .
use "getEditsell" will return a list ,not string yet.

My intent: get the string. if isn't in the combobox list , add it and return index . else return the index.

Another question:  the methods of "onkillfoucs".
 I have defun "DclFormName_ComboboxName_Onkillfoucs", in the defun only one process "(alert "\nJust test of KillFoucs")". when Load and Show the DclForm , this alert is show before the DclForm ,  how can i make it later DclForm?

anybody can help me?
Title: Re: Questiont about ComboBox
Post by: Dream.Fei on April 27, 2007, 07:45:25 AM
I'm sorry. I have find the methods for get string , use "GetTBText".

but the other question about "KillFocus" I have't find answer
Title: Re: Questiont about ComboBox
Post by: Kerry on April 27, 2007, 07:48:58 AM
Another question:  the methods of "onkillfoucs".
 I have defun "DclFormName_ComboboxName_Onkillfoucs", in the defun only one process "(alert "\nJust test of KillFoucs")". when Load and Show the DclForm , this alert is show before the DclForm ,  how can i make it later DclForm?

anybody can help me?

Please post your ODC and LSP file ... I'm not sure what you want .. can you reword the question ?
Title: Re: Questiont about ComboBox
Post by: Kerry on April 27, 2007, 08:04:19 AM
How about this
Code: [Select]
;; Project-02.lsp

;; Ensure the OpenDCL.##.ARX is loaded.
(OR (VL-SYMBOL-VALUE 'ODCL_GETVERSIONEX)
    (AND (SETQ tmpfn (FINDFILE "OpenDCL_ARXLoader.LSP"))
         (LOAD tmpfn (STRCAT "Failed to load :- " tmpfn))
    )
    (ALERT (STRCAT "Failed to load OpenDCL_ARXLoader.LSP"))
    (EXIT)
)

(PROMPT (STRCAT "\n CommandLine : < test >  [Build 20070427 kwb] "
                "ODCL.Ver:"
                (ODCL_GETVERSIONEX)
                " \n"
        )
)
;;-------------------------------------------------------------
(DEFUN c:test ()
   ;;------------
   ;; main
   ;;------------
   ;; Reload flag used for testing only ..
   (OR (ODCL_PROJECT_LOAD "Project-02" T) (EXIT))
   (ODCL_FORM_SHOW Project-02_Form1)
)
;;-------------------------------------------------------------
(DEFUN c:Project-02_Form1_ComboBox2_OnKillFocus (/)
   (ALERT "\nJust test of KillFoucs")
)

;;-------------------------------------------------------------
(DEFUN c:Project-02_Form1_TextButton4_OnClicked (/)
   (ALERT "\nButton Clicked")
)

The ODC is in the ZIP file ..
Title: Re: Questiont about ComboBox
Post by: Dream.Fei on April 28, 2007, 04:01:32 AM
I can't use you Lisp file on CAD2007, when I load it , CAD will close.

My odc file is made by ObjectDcl V3.0 for CAD2007, I can't open you file in this.

I don't know how to description my question. I show it and upload the lisp and odc file.

Code: [Select]
;;_this is the KillFocus
  (defun c:DclForm1_ComboBox1_OnKillFocus ()
     (alert "\n Test for onkillfoucs")
    )
Title: Re: Questiont about ComboBox
Post by: Kerry on April 28, 2007, 04:11:20 AM
Where did you get the ObjectDCL2007.ARX  ("ObjectDcl V3.0 for CAD2007")?

What did you build the ODC file from.

I have no problem opening your ODC in the OPENDCL Editor.
Title: Re: Questiont about ComboBox
Post by: Dream.Fei on April 28, 2007, 04:28:45 AM
The ObjectArx2007.arx and ObjectDclV3.0 is get from XDCAD : http://www.xdcad.net/forum (cn)

Before you can use ObjectV3.0 for Autocad2007, you must instal objectDclV3.0 for Autocad2004 first.
 
If you need ,I can give you the installler file of all ObjectDclV3.0 and Arx for CAD2004 CAD2007(other version I din't have).

where I can get the OpenDcl? I can't open you odc file.
Title: Re: Questiont about ComboBox
Post by: Kerry on April 28, 2007, 04:30:17 AM
I have opened your ODC in the OpenDCL editor without problem

I have executed your lisp file and ODC in ACAD2008 with the OpenDCL17.arx (not your ARX)

The OnKillFocus Event  for the ComboBox1 is correct. The Event fires when the ComboBox loses focus, that is, when you select ANY OTHER CONTROL on the dialog.

The reason it SEEMS to be showing your alert dialog when you FIRST select a control is because the control has focus when the dialog opens because it is First in your ZOrder list.

By my understanding, it is doing exactly what you have designed.

Perhaps I misunderstand what you mean ...

For My Interest, Why do you want an Event on the KillFocus .. ?
Title: Re: Questiont about ComboBox
Post by: Kerry on April 28, 2007, 04:33:53 AM
.................
where I can get the OpenDcl? I can't open you odc file.

https://sourceforge.net/project/showfiles.php?group_id=187950

...................
Before you can use ObjectV3.0 for Autocad2007, you muse instal objectDclV3.0 for Autocad2004.

If you need , my QQ:7686599 ,I can give you the installler file of all ObjectDclV3.0 and Arx for CAD2004 CAD2007(other version I din't have).
...............

Thanks for the offer, but I don't need to load your ARX.


Title: Re: Questiont about ComboBox
Post by: Dream.Fei on April 28, 2007, 04:47:17 AM
Code: [Select]
Why do you want an Event on the KillFocus .. ?
because
Code: [Select]
get the string. if isn't in the combobox list , add it and return index . else return the index
I want this event is hapend when the combobox lost foucs.

but later, I find I can write it in the dilaog close . so , the KillFoucs is just a test .

In my computer(ObjectDclV3.0 + CAD2007), the alert is show before thd dialog . in you reply, you mean's Zorder . but how can I get the Zorder of this dialog?
Title: Re: Questiont about ComboBox
Post by: Kerry on April 28, 2007, 04:49:31 AM
Have a look at this ... see how the focus is on the first ComboBox when the DCL opens .. when the ComboBox loses focus, the Event fires and your Alert displays ...

See the Movie ..
Title: Re: Questiont about ComboBox
Post by: Kerry on April 28, 2007, 04:56:42 AM
...............

In my computer(ObjectDclV3.0 + CAD2007), the alert is show before thd dialog . in you reply, you mean's Zorder . but how can I get the Zorder of this dialog?

This is the ZOrder List shown in my editor ..
Title: Re: Questiont about ComboBox
Post by: Dream.Fei on April 28, 2007, 05:05:43 AM
I know what's the KillFoucs . but I don't know why it hapend before the Dialog . Look in my computer:
Title: Re: Questiont about ComboBox
Post by: Kerry on April 28, 2007, 05:11:16 AM
This will get the value of the selection in focus ..

Code: [Select]
(Setq rValue (Odcl_ComboBox_GetTBText Dream_DclForm1_ComboBox1))
Title: Re: Questiont about ComboBox
Post by: Kerry on April 28, 2007, 05:13:17 AM
I know what's the KillFoucs . but I don't know why it hapend before the Dialog . Look in my computer:

Sorry, I can't help with your ARX .. you will need to talk to the developer of the program. The Code is incorrect.
How much did you pay for the Update ?
Title: Re: Questiont about ComboBox
Post by: Dream.Fei on April 28, 2007, 05:17:41 AM
Thank you very much. when I changed the ComboBox1's Zorder. no Problem!
Code: [Select]
How much did you pay for the Update ?  :wink:
Is free~
Title: Re: Questiont about ComboBox
Post by: Kerry on April 28, 2007, 06:15:18 AM
Dream.Fei ,

You may want to talk to the people you got the file from.

There can be no 'ObjectDcl' V3.0 for CAD2007

V3.0 was for Acad2004 and the ObjectDCL name is Copyright to another firm.


Title: Re: Questiont about ComboBox
Post by: Dream.Fei on April 28, 2007, 06:40:58 AM
I can't understand what's your mean. (My english too....)

I haved down the OpenDcl , but I didn't have  OpenDCL17.arx  , where can I get it?

OpenDcl and ObjectDcl for 2007:

Title: Re: Questiont about ComboBox
Post by: Kerry on April 28, 2007, 06:55:41 AM
The OpenDCL.17.ARx in in the OpenDCL Folder
...
Title: Re: Questiont about ComboBox
Post by: Kerry on April 28, 2007, 07:01:10 AM
I can't understand what's your mean. (My english too....)


You should find someone to translate my message. It is very important.
Quote
您应该找到某人翻译我的消息。这非常重要。


Quote
您可以想要与您得到文件从的人民谈话。 那里可能是没有' ObjectDcl ' V3.0 为CAD2007 V3.0 是为Acad2004 并且ObjectDCL 名字是版权对其它企业 。
Title: Re: Questiont about ComboBox
Post by: Dream.Fei on April 28, 2007, 07:10:35 AM
Quote
It is very important.
Is mean this post?
Quote
You may want to talk to the people you got the file from.

There can be no 'ObjectDcl' V3.0 for CAD2007

V3.0 was for Acad2004 and the ObjectDCL name is Copyright to another firm.
I know what's you mean~
Title: Re: Questiont about ComboBox
Post by: Kerry on April 28, 2007, 07:11:00 AM
yes
Title: Re: Questiont about ComboBox
Post by: Dream.Fei on April 28, 2007, 07:16:40 AM
I'll try to do it~