I'm starting to convert a large VBA project into OOBasic, and it mostly looks
straightforward; however, i've hit a stumbling block because I have a number
of structures declared with arrays in them, and the OO compiler says I can't
have arrays inside of structs. So I'm not at all sure how to work around
this. 

For example, I have these structures: 

Type FieldPairType 
fieldName As String 
fieldValue As String 
End Type 


Type FieldsListType 
fieldCnt As Integer 
fieldsAllocated As Integer 
fields() As FieldPairType 
End Type 

And I dynamically resize (ReDim) the fields array as required when working
with this type. The compiler won't allow me to declare fields() inside the
structure. There's got to be a way around this, but I don't see it yet. I
guess i can turn FieldPairType into a class and then make fields a linked
list of objects, but I've got more than a few structures that work this way,
and that means a lot of extra work. 

Is there an easier way to handle a dynamically sized 'array' of values
inside a structure in OO Basic?

-- 
View this message in context: 
http://www.nabble.com/Declare-fields-in-a-structure-tp25097508p25097508.html
Sent from the openoffice - api dev mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to