Problem with ListView displaying differently on different OS's

Started by jrupert, February 06, 2014, 09:32:44 AM

Previous topic - Next topic

jrupert

I have a listview residing in a tabbed page of the main form.
Code has been written that when tab is selected, the listview column headers are created.
Other events on the form fill the listview.

The problem that I amhaving is that the form and lisp code was all developed on a Windows XP SP3 32-bit PC, and when trying to run on a Win-7 SP1 64-bit PC, the column headers text is not displaying, nor is the event that populates the list items working.

Is there some issue when attempting to run on different OS's that I may not be aware of?

Thanks in advance for any info!

owenwengerd

It's possible that OS differences are to blame, but most likely you're either seeing some differences in the timing of events firing due to different hardware or system configuration. If you can describe exactly what is not working (i.e. what does the code do, what do you expect to happen, and what actually happens), someone may be able to suggest a solution.
Owen Wengerd (Outside The Box) / ManuSoft

Fred Tomke

Hello jrupert, can you repoduce this in a small sample which you can upload so we can test it, too?
I used many listviews in the past and I cannot remember that I had such problem.
Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

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

jrupert

Here is thecode that is in question...

Code (autolisp) Select
(defun c:GBSCC_FormGBSCC_TabStrip1_OnChanged (ItemIndex /)
    (if (= ItemIndex 0) ()) ;COSMETIC
    (if (= ItemIndex 1) ()) ;Export DXF
    (if (= ItemIndex 2) ()) ;FOOD CRAFT
    (if (= ItemIndex 3) ()) ;TOLERANCE
    (if (= ItemIndex 4) (ClearGBSPNOpenText)) ;Open GBS P/N
    (if (= ItemIndex 5) ()) ;MISC
    (if (= ItemIndex 6) (NDIStampTab)) ;NDI
    (if (= ItemIndex 7) ()) ;OPERATION
    (if (= ItemIndex 8) ()) ;PLOT
    (if (= ItemIndex 9) ()) ;SHEET NOTE
    (if (= ItemIndex 10) ()) ;TUBE LASER
)

(DEFUN NDIStampTab ()
    (SETQ pcuser (GETENV "username"))
    (dcl_Control_SetText GBSCC_FormGBSCC_CBoxProcess "")
    (dcl_Control_SetText GBSCC_FormGBSCC_CBoxType "")
    (dcl_Control_SetEnabled GBSCC_FormGBSCC_CBoxType T)
    (dcl_Control_SetText GBSCC_FormGBSCC_CBoxMaterial "")
    (dcl_ComboBox_Clear GBSCC_FormGBSCC_CBoxMaterial)
    (dcl_Control_SetText GBSCC_FormGBSCC_CBoxThickness "")
    (dcl_ComboBox_Clear GBSCC_FormGBSCC_CBoxThickness)
    (dcl_Control_SetText GBSCC_FormGBSCC_TBGBSPN "")
    (dcl_Control_SetText GBSCC_FormGBSCC_TBRevisionLevel "")
    (dcl_Control_SetText GBSCC_FormGBSCC_TBQtyPerParent "")
    (dcl_Control_SetEnabled GBSCC_FormGBSCC_BTNYes nil)
       
    (GetUserInitials pcuser)

    ;CALCULATE REQUIRED COLUMN WIDTHS OF ListView1 IN NDI STAMP
    (setq Col0Width (dcl_ListView_CalcColWidth GBSCC_FormGBSCC_ListView1 "GBS PN          ")
          Col1Width (dcl_ListView_CalcColWidth GBSCC_FormGBSCC_ListView1 "Customer PN                    ")
          Col2Width (dcl_ListView_CalcColWidth GBSCC_FormGBSCC_ListView1 "Drawing Path                                                       ")
    )

    ;ADD COLUMNS OF THE CALCULATED WIDTHS IN NDI STAMP
    (dcl_ListView_AddColumns GBSCC_FormGBSCC_ListView1
                             (list (list "GBS PN" 0 Col0Width)
    (list "Customer PN" 0 Col1Width)
    (list "Drawing Path" 0 Col2Width)
     )
    )
)

Again, this runs well on XP PC , but on Win-7 PC, the text of the column Headers and the list items are not displayed.

I have attached both the LSP file and the ODCL in a ZIP.

jrupert

OK...I'm stupid...I had a error when processing GetUserInitials that was breaking the code, and I did not include a Try...Catch. 

The code works OK on both OS's.

owenwengerd

I'm glad you got it sorted. (BTW, I added code tags to your previous post.)
Owen Wengerd (Outside The Box) / ManuSoft