Palette Form event OnClose problem

Started by garcigj, October 08, 2008, 04:12:26 AM

Previous topic - Next topic

garcigj

No data are saved to dictionaries with vlax-ldata-xxx onclose during the event at kind FORM PALETTE. Perhaps this document readOnly during the event ...?

OpenDcl Version: 5.0.0.25
Form: Palette
Event Invoke Form: 0 - Keep Focus OR 1 -Allow (Command)
Autocad versión: 2008

(defun c:EspaciosTiempos_EP-FechasPKs_OnClose ( / TabAct)
  (Setq TabAct (dcl_Tab_GetCurSel (vl-doc-ref 'EspaciosTiempos_EP-FechasPKs_TabControl1)))
  (ET-SaveValTabs TabAct)
  (Vlax-ldata-put "ET_FECHAS&PKS" "TabActive" TabAct)
  (dcl_MessageBox (strcat "OnClose event does not save data dictionary vlax-ldata-xxx \n\n"))
  (princ)
)

After Collapse:

(Vlax-ldata-get "ET_FECHAS&PKS" "TabActive") == NIL
José Luis García Galán
Hispacad.com - Expertos en CAD 
Madrid (Spain)

Fred Tomke

Hello garcigj

1.

Don't use Ldata. Ldata may destroy your drawing. Some developers got many problems cause they have used LDATA.
See here: http://ww3.cad.de/foren/ubb/Forum145/HTML/001629.shtml#000005
. If you want to have secure access to the data use real dictionaries for huge data structures or EED for short data (for instance keys).

2.

When we have used LDATA a long time ago, we've found out that LDATA could not be written until the drawing was saved the first time.

3.

Try to write EED's instead of LData. Maybe that will work.

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

BazzaCAD

Great looking form garcigj.
Do you think you can post a still screen shot of it here:
http://www.opendcl.com/forum/index.php?topic=416.0

So I can show it at AU.
a.k.a.
Barry Ralphs
barryDOTralphsATgmailDOTcom