Issue 120772 - IDE Watch window does not display all fields in user defined types.
Summary: IDE Watch window does not display all fields in user defined types.
Status: CLOSED FIXED
Alias: None
Product: App Dev
Classification: Unclassified
Component: scripting (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Normal
Target Milestone: 4.2.0
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-31 05:17 UTC by andrew
Modified: 2017-05-20 09:32 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Proposed patch to check the object has Dbg_XXX properties for watching (945 bytes, patch)
2014-12-29 06:43 UTC, hanya
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description andrew 2012-08-31 05:17:35 UTC
Originally noted here:
http://www.oooforum.org/forum/viewtopic.phtml?p=516942

Enter the code below and then watch the TestRecord. The last three fields are not available in the watch window.

Type JobRecord
   JobNumber As String
   JobDescription As String
   ClientRef As String
   Hours As Single
   ChargeRate As Single
   Cost As Single
   GST As Single
   MaterialsETC As Single
   TotalCost As Single
   OrderReceived As String
   InvoiceNumber As Single
   AmountReceived As Single
   InvoiceSent As Date
   PaymentReceived As Date
End Type

Sub Main
   Dim TestRecord As New JobRecord
   TestRecord.AmountReceived = 7
End Sub

I verified that reordering the fields changes what is visible, so it seems to be related to the number of fields. 

Note that the original was report on Windows with AOO 3.4, and I verified on Linux using 3.4.1.
Comment 1 hanya 2012-08-31 11:26:40 UTC
Just as reminder.
In WatchTreeListBox::RequestingChilds method, last three properties are ignored 
to hide three Dbg_XXX properties and they are not shown in the watching window.
Comment 2 Johann Schmidt 2014-12-28 17:17:51 UTC
I could reproduce this error with various other userdefined types everytime the last 3 fields are not displayed. If you add any thre fields before the end of the type definition all fields of interest will be displayed.

Type JobRecord
   JobNumber As String
   JobDescription As String
   ClientRef As String
   Hours As Single
   ChargeRate As Single
   Cost As Single
   GST As Single
   MaterialsETC As Single
   TotalCost As Single
   OrderReceived As String
   InvoiceNumber As Single
   AmountReceived As Single
   InvoiceSent As Date
   PaymentReceived As Date
   dmy1 as byte
   dmy2 as byte
   dmy3 as byte
End Type

Sub Main
   Dim TestRecord As New JobRecord
   TestRecord.AmountReceived = 7
End Sub

... the type of the the dummy fields does not matter --- they simply have to be there.
Comment 3 hanya 2014-12-29 06:43:48 UTC
Created attachment 84326 [details]
Proposed patch to check the object has Dbg_XXX properties for watching

SbUnoObject class is not there in public include file, therefore there is no way to 
know the object that is going to be watch its property value, is instance of UNO 
object or instance of user defined type. 
To check the number of properties of the object and check Dbg_XXX properties are 
added to the end of the array of property names is the proposed solution.
Comment 4 SVN Robot 2015-01-12 14:39:40 UTC
"hanya" committed SVN revision 1651106 into trunk:
#i120772# do not ignore last three properties when special properties not fou...
Comment 5 hanya 2015-01-12 14:41:52 UTC
Fixed on trunk.