gdu
2007-07-16 09:54 UTC
i got one form, where i have 2 listboxes, is there is a selction made in listbox A, the selected elements of listbox B should not be highlighted. i tried it with
(defun c:ListBoxCopyPaste_Grenzkat_ListBox3_OnSelChanged (nSelection sSelText /)
(Odcl_ListBox_SetCurSel ListBoxCopyPaste_Grenzkat_ListBox4 -1)
)
but it doesn´t work.
any help welcome
gert
hope you know what i am supposed to do ;)
Kerry Brown
2007-07-16 21:47 UTC
gert,
I'd like to see a sample LSP and ODCL with a little better description og your question.
Thanks,
Kerry
gdu
2007-07-17 11:18 UTC
ok, maybe some pics make it clear, better than my english ;)
wrong
{2}
ok
{2}
ok too
{2}
So the problem is, if i make a selction in one listbox, i want to unselect (unhighlight) the selected items in the other listbox
owenwengerd
2007-07-18 02:07 UTC
author=gdu link=topic=18.msg85#msg85 date=1184671117 wrote:
So the problem is, if i make a selction in one listbox, i want to unselect (unhighlight) the selected items in the other listbox
I have attached a small test project that works the way you describe. Does that help?
[attachment deleted by admin]
Kerry Brown
2007-07-18 03:07 UTC
Thanks Owen.
It's lunch time (here) and I logged in to answer this while having munchies ...
gdu
2007-07-18 07:29 UTC
sorry, but i could not get your program to run
if i load the lisp, i get a no function def
dcl_project_load
but i use this line in my lsp for dcl too?!?
and i could not open the odcl to have a look at your example, odcl doesn´t open the odc programm, just odc, and renaming odcl in odc didn´t work ;D
but i see, that you solve the problem with
(defun c:Test_Form1_ListBox3_OnSelChanged (nSelection sSelText /)
(dcl_ListBox_SetCurSel Test_Form1_ListBox4 -1)
)
just like i posted in my first entry, so maybe i just have a mixup in my definition or i have to make it with a workaround... store all entries of a listbox in a list, clear the listbox, add the list to the listbox, force an update...
but thanks a lot for your time to give me some help...
mit freundlichem gruß
gert
edit:
i have just seen, that you use
(dcl_ListBox_SetCurSel
instead of
(Odcl_ListBox_SetCurSel
like i do
i use OpenDCL 4.0.1.8
Kerry Brown
2007-07-18 08:41 UTC
author=Kerry Brown link=topic=18.msg84#msg84 date=1184622420 wrote:
gert,
I'd like to see a sample LSP and ODCL with a little better description og your question.
Thanks,
Kerry
gert,
can you please attach a sample LSP and ODCL.
also, you may be best downloading and installing the most recent build from SourceForge. ... you are about 4 builds out of date.
regards
Kerry.
gdu
2007-07-18 09:52 UTC
ListBoxCopyPaste.odcl is a ListBoxCopyPaste.odc file, the only file my opendcl editor stores the files
maybe i try to update to the latest version, do my workaround or just ignore the cosmetic troubles
mit freundlichem gruß
gert
[attachment deleted by admin]
dkh007
2007-07-19 01:48 UTC
You need to download the latest OpenDCL (version 4.0.2.2)
{2} You are using an old beta and the problem you have may simply be related to the beta you are using.
gdu
2007-07-19 12:35 UTC
i have downloaded the 4.0.2.2 verion, unistalled the old version, installed the new 4.0.2.2 version, and nothing works ;)
so i had to.....
after the install, i haven´t found any arx in the install folder, looked at an example and it seems to be changed something at the (load runtime... stuff
i changed this so that my progromm now starts
than i had wrong function names, because all the names changed from
odcl_form_show
into
dcl_form_show
so i changed them automatically, but than there was a no funct def at
loaddclproj
which still is
loadodclproj
the new file extention is odcl, so i cant open my old odc files by clicking on them in the explorer, but i can open them when i select all files in the opendcl studio prog. than i can save them as odcl, which makes it possible to open them by clicking.
now everything seems to work, but my
(dcl_form_closeall 0)
which only works, after clicking it twice.... 1. click, you can see the window disapear for 1/100 of a second, than it is up again, click it once more, than it is gone.
gdu
2007-07-19 14:25 UTC
i am now on the newest version, and the problem remains the same, it only works, if selection style is "single" if it is multiple, the setcursel -1 does not work.
bazzacad
2007-07-19 17:42 UTC
author=gdu link=topic=18.msg95#msg95 date=1184848533 wrote:
i have downloaded the 4.0.2.2 verion, unistalled the old version, installed the new 4.0.2.2 version, and nothing works ;)
so i had to.....
after the install, i haven´t found any arx in the install folder, looked at an example and it seems to be changed something at the (load runtime... stuff
i changed this so that my progromm now starts
than i had wrong function names, because all the names changed from
odcl_form_show
into
dcl_form_show
so i changed them automatically, but than there was a no funct def at
loaddclproj
which still is
loadodclproj
the new file extention is odcl, so i cant open my old odc files by clicking on them in the explorer, but i can open them when i select all files in the opendcl studio prog. than i can save them as odcl, which makes it possible to open them by clicking.
now everything seems to work, but my
(dcl_form_closeall 0)
which only works, after clicking it twice.... 1. click, you can see the window disapear for 1/100 of a second, than it is up again, click it once more, than it is gone.
Most of these changes have been documented in the Help File:
{2} & on the SF site.
You can just rename your .odc files to .odcl in Win. Exp. you don't need to open them and resave them.
You can do a find and replace in any text editor to switch the "(odcl_" with "(dcl_" note "(" & "_" so you don't replace other functions that shouldn't be replaced.
Kerry Brown
2007-07-19 21:44 UTC
author=gdu link=topic=18.msg95#msg95 date=1184848533 wrote:
..................
the new file extention is odcl, so i cant open my old odc files by clicking on them in the explorer, but i can open them when i select all files in the opendcl studio prog. than i can save them as odcl, which makes it possible to open them by clicking.
now everything seems to work, .................
Have you tried setting your file associations ?
.. just choose one of your .ODC files ...
2 pictures..
[attachment deleted by admin]
Kerry Brown
2007-07-19 22:22 UTC
author=gdu link=topic=18.msg96#msg96 date=1184855134 wrote:
............... it only works, if selection style is "single" if it is multiple, the setcursel -1 does not work.
Perhaps Try this ..
;; assume the ARX is loaded.
;; load the ODCL
(DCL_PROJECT_LOAD "LB-Test" T)
;; ----------------------------
;; Define Events
(DEFUN c:LB-Test_Form1_DeSelect_OnClicked (/)
(SETQ
rValue (DCL_LISTBOX_GETSELECTEDNTHS LB-Test_Form1_ListBox-A)
)
(DCL_MESSAGEBOX (VL-PRINC-TO-STRING rValue)
"Items to Delelect"
2
2
)
(FOREACH item rValue
(DCL_LISTBOX_SETSEL LB-Test_Form1_ListBox-A item 0)
)
)
;; ------------
(DEFUN c:LB-Test_Form1_ListBox-A_OnSelChanged (nSelection sSelText /)
(FOREACH item
(DCL_LISTBOX_GETSELECTEDNTHS LB-Test_Form1_ListBox-B)
(DCL_LISTBOX_SETSEL LB-Test_Form1_ListBox-B item 0)
)
)
;; ------------
(DEFUN c:LB-Test_Form1_ListBox-B_OnSelChanged (nSelection sSelText /)
(FOREACH item
(DCL_LISTBOX_GETSELECTEDNTHS LB-Test_Form1_ListBox-A)
(DCL_LISTBOX_SETSEL LB-Test_Form1_ListBox-A item 0)
)
)
;; ----------------------------
;; Define Main Entry Point
(DEFUN c:test () (DCL_FORM_SHOW LB-Test_Form1))
;; ----------------------------
;; Run the routine
(c:test)
.. and attachments ..
[attachment deleted by admin]