Short list of imperfections

Started by krunch, March 02, 2011, 06:12:10 AM

Previous topic - Next topic

krunch

Hello
I've found some new imperfections..
Regards


Not clean (ControlBar/Palette) : Opening an "undocked" ControlBar or Palette
Opening a ControlBar/Palette with coordinates seems to open it first as docked, before positioning it in the specified position (can see it for a split second)

> Please open "cropped!.odcl" and keep an eye on the left side :
(defun c:go ()
  (command "OPENDCL")
  (dcl_Project_Load "cropped!" T)
  (dcl_Form_Show cropped!_Form1 '10 10) ; ControlBar
  (dcl_Form_Show cropped!_Form2 '10 10) ; Palette
  (princ)
)


Display problem (ControlBar) : Resizing a ControlBar (AllowResizing=T) crops controls

> Please see text in the ControlBar (Form1) in "cropped!.odcl"


Incohérence (ControlBar) : resizing handles appear while Resizing=nil
Resizing-handles (horizontal/vertical double arrows) re-appear after the ControlBar has been moved, or its docked state changed. Handles are displayed while resizing isn't possible

> Please change AllowResizing (to nil) in cropped!_Form1, save, re-open, Move the ControlBar and place the cursor on one of the borders


Update problem (ControlBar/Palette) : AutoCad is not updated from "undocked" Dialog
The sample below (Update!.odcl) deletes entities of the current selection set
If the Dialog isn't docked AutoCad is updated by (dcl_SetCmdBarFocus)
If the Dialog is docked AutoCad is updated when mouse moved off the dialog (dcl_SetCmdBarFocus doesn't works)

> Please open "Update!.odcl" select something and press DELETE :

(defun c:go ()
  (command "OPENDCL")
  (dcl_Project_Load "Update!" T)
  (dcl_Form_Show Update!_Form1) ; ControlBar
;;;  (dcl_Form_Show Update!_Form2) ; Palette
;;;  (dcl_Form_Show Update!_Form3) ; Modeless
  (princ)
)
(defun c:Update!_Form1_TextButton1_OnClicked (/ sel cnt)
  (setq sel (cadr (ssgetfirst))
   cnt (sslength sel))
 
  (repeat cnt
    (setq cnt (1- cnt))
    (setq obj (vlax-ename->vla-object (ssname sel cnt)))
    (vla-delete obj)
    (dcl_SetCmdBarFocus) ; Updates only if "undocked" Dialog
  )
)


"Save changes ?" alert is not fired (Interface)
This happens only with new and freshly saved files, it doesn't happen with opened and modified files.

> Open DCLstudio, add a dialog, and save it. Now properties and events modifications (I have not tried other) doesn't fire the alert



krunch

ToolTip of Labels are not displayed
Tested in Modal Modeless and ControlBar

Fred Tomke

Quote from: krunch on March 07, 2011, 03:58:59 PM
ToolTip of Labels are not displayed
Tested in Modal Modeless and ControlBar

Hi krunch,

I believe that they are not displayed as long the palette/dockable/modeless form does not keep focus (I mean property KeepFocus of the form). I could reproduce this in my palette made in C# .NET.

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

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

velasquez

Quote from: Fred Tomke on March 08, 2011, 11:22:37 AM
Quote from: krunch on March 07, 2011, 03:58:59 PM
ToolTip of Labels are not displayed
Tested in Modal Modeless and ControlBar

Hi krunch,

I believe that they are not displayed as long the palette/dockable/modeless form does not keep focus (I mean property KeepFocus of the form). I could reproduce this in my palette made in C# .NET.

Regards,
Fred

Hello Fred,

Can you show me a picture of the palette you have created with C #.NET?

Thanks

Fred Tomke

Hi, velasquez,

Quote from: velasquez on March 10, 2011, 03:25:17 AM
Can you show me a picture of the palette you have created with C #.NET?

Sure I can but it is not so impressive like yours ;) .
It contains drawing data linked with a database from a COM-Server to get out information where the user produced semantic or geometric errors.
The layout of the palettes does not say anything about the code behind to analyze or modify the drawing objects or export information to clipboard, textfile, Excel or OpenOffice.

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

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

velasquez

Quote from: Fred Tomke on March 10, 2011, 03:42:29 AM
Hi, velasquez,

Quote from: velasquez on March 10, 2011, 03:25:17 AM
Can you show me a picture of the palette you have created with C #.NET?

Sure I can but it is not so impressive like yours ;) .
It contains drawing data linked with a database from a COM-Server to get out information where the user produced semantic or geometric errors.
The layout of the palettes does not say anything about the code behind to analyze or modify the drawing objects or export information to clipboard, textfile, Excel or OpenOffice.

Regards, Fred

Thank you Fred,
Once I could see what you got work with vertical TabStrip.
Can you show me how it looks when it docked?

Regards, Velasquez

Fred Tomke

Quote from: velasquez on March 10, 2011, 04:10:06 AM
Once I could see what you got work with vertical TabStrip.
Can you show me how it looks when it docked?

Hi, velasquez, since there are 22 listview columns in the listview, the form was set that docking is not allowed. It would look like any other Autodesk palette sets with multiple palettes.

You cannot compare the OpenDCL palette with the AutoCAD "palette":
If you want to define a "palette" in C# you have to define a new class which creates a new instance from the Autodesk.AutoCAD.Windows.PaletteSet class. Then you create a custom control in you project with the whole content of the palette. Then you add an instance of you custom control to the paletteset. For an other tab of your C# palette you either add an other instance of your custom control or you create another custom control and then you add it to the paletteset, too. And so on. That's why the number of tabs in the object properties manager differ from AutoCAD base product to the verticals.

In OpenDCL it seems for me that you just define the content for the first palette of the palette set.

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

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

krunch

QuoteQuote from: krunch on March 07, 2011, 04:58:59 PM
ToolTip of Labels are not displayed
Tested in Modal Modeless and ControlBar

Hi krunch,

I believe that they are not displayed as long the palette/dockable/modeless form does not keep focus (I mean property KeepFocus of the form). I could reproduce this in my palette made in C# .NET.

Regards,
Fred

Hi Fred
I've tried with KeepFocus=T (ControlBar) but the tooltips still doesn't appear on Label
Regards

krunch

Display problem (ControlBar - AllowResizing=nil) : cropped when opened without argument

The ControlBar (AllowResizing=nil) are cropped if opened by (dcl_Form_Show) without X Y position arguments
See sample below

Code (autolisp) Select
(defun c:go ()
  (command "OPENDCL")
  (dcl_Project_Load "cropped2!" T)
  (dcl_Form_Show cropped2!_Form1)            ; ControlBar    cropped!
  (dcl_Form_Show cropped2!_Form2)            ; Palette       ok
;;;  (dcl_Form_Show cropped2!_Form1 0 0)     ; ControlBar    ok
;;;  (dcl_Form_Show cropped2!_Form2 0 0)     ; Palette       ok
  (princ)
)

krunch

Stacked ControlBar and Palette (AllowResizing=nil)
Just another little thing with ControlBar and Palette (AllowResizing=nil) when "docked" (floating=nil) and stacked with another dialog (here with the standart Properties Palette).

In this case we can expand the dialog but not reduce it, by moving the border..
But when I attempt to reduce it, the 2nd DialogBox seems to be cropped.
On this screenshoot I move the right border to the left :

krunch


I've found a solution for one of my previous remark : Update problem...

This problem concerns updates of the drawing and the graphic screen, such as vla-delete, vla-highlight, grvecs...*, when called by a click on a Button or a Picture* : the update is made (visible) only when the cursor looses focus (* I haven't tried other)

It can be solved by adding a (princ) ! Note that (princ "something") doesn't work : only (princ) !

To see that, run the sample below :
- select objects and click on the Button/Picture > objects are deleted
- now disable the (princ) and try again             > the operation is updated when the cursor moves off the dialog box (when lost focus ?)


Code (autolisp) Select
(defun c:go ()
  (vl-load-com)
  (command "OPENDCL")
  (dcl_Project_Load "Update!" T)
  (dcl_Form_Show Update!_Form1) ; ControlBar (docked)
  (dcl_Form_Show Update!_Form2) ; Palette (docked)
  (dcl_Form_Show Update!_Form3) ; Modeless
  (princ)
)
(defun c:main_OnClicked (/ sel cnt)
  (setq sel (cadr (ssgetfirst))
    cnt (sslength sel))
 
  ; vla-delete the current selection set
  (repeat cnt
    (setq cnt (1- cnt))
    (setq obj (vlax-ename->vla-object (ssname sel cnt)))
    (vla-delete obj)
  )
 
  (princ) ; < THE princ !
)

krunch

A strange and vicious thing with Application bar + OnKillFocus..

This is a strange behavior concerning the Application window main bar (above) : in some cases the Application window is reduced when you click on the main bar

Please see the sample below..

Apparently this problem occurs :
- if the TextBox triggers a OnKillFocus function
- if this function contains an OpenDCL property (/method /function ?) to evaluate
- if the TextBox looses focus when you click on the main bar..

owenwengerd

It would be easier to address each of your issues one by one, but this is difficult when they are all in one post, and some have since been superseded.  In the future, please create separate threads for unrelated problems.  I think I will start at the end and work backward for the other problems, but first I can dispense with the first issue in the first post: this is a known problem with no known solution.

owenwengerd

Quote from: krunch on March 16, 2011, 04:28:36 AM
A strange and vicious thing with Application bar + OnKillFocus

Good catch. That is indeed a strange one. I can reproduce the problem in any version of AutoCAD (on Windows 7), but I'm not sure what causes it. It seems like AutoCAD sends the "left button clicked" a second time when it appears that the first time got sidetracked, but the second message then gets interpreted as a double click. I tried some things to see if I could fix the problem, but I did not find any solution. The problem goes away when Keep Focus is disabled.

This should be added to the bug tracker on SourceForge to ensure that it is logged for future fixing.

owenwengerd

Quote from: krunch on March 16, 2011, 03:39:52 AM
It can be solved by adding a (princ) !

I suspect that (dcl_SetCmdBarFocus) would work also.