OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: WolfgangGutke on August 06, 2008, 02:20:47 AM

Title: Methode auf Registerkartenelement (GERMAN)
Post by: WolfgangGutke on August 06, 2008, 02:20:47 AM
Hallo,
ich verwende sehr gerne globale Funktionen, um z.B. ListViews zu befüllen. Somit habe ich mir eine Funktion erstellt, der ich nur den Namen der ODCL, Form und dem Element übergeben (Bsp.: (ODCL:ListViewFill ( Odcl Form ListView Kopfzeile ShowList /)
Diese Funktion geht aber nur dann, wenn das ListView "direkt" auf dem Dialog liegt.

Sobald aber das ListView auf einer "verdeckten" Registerkarte liegt, kann ich mit solchen Funktionen nicht mehr arbeiten und muß somit leider die komplette Methode (dcl_ListView_Clear StromVerteilen_StromVerteilen_Belegung) anwenden - Schade, denn bei der 4er Version ging es noch  :(

Bekomme dabei folgende Fehlermeldung: Fehler bei ADS-Anforderung

Hat jemand zufällig ähnliche Probleme und kann mir hierbei weiterhelfen?

VG
Wolfgang
Title: Re: Methode auf Registerkartenelement
Post by: Fred Tomke on August 06, 2008, 11:26:16 PM
Hello,

in the moment I have no time to test, but maybe someone else will have the chance to test.

If I understood him right he meant that clearing a listview in a not selected tab does not work when adressing the control with strings ("myproject" "myform" "mycontrol") but it does actually work using the control's variable (myproject_myform_mycontrol). Adressing the listview using strings does only work if the listview is selected.

Is there somebody to reproduce this?

@Wolfgang: Try to use control's variablename in the future  ;). Another idea would be to have a control function to create control's variable. I use this very often in my code (when transforming older ObjectDCL code to OpenDCL code).

(defun control (strC) (eval (read (strcat "myproject_myform_" strC))))
...
;; later in the source
(dcl_listview_clear (control "mylistview"))


Fred
Title: Re: Methode auf Registerkartenelement
Post by: Fred Tomke on August 06, 2008, 11:32:26 PM
Hello Wolfgang,

I read your message anew and I ask you to create a small sample because I'm not sure anymore if I understood you right.

Fred