comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: Class inheritance with CREATE_STRUCT?
items: Re: Class inheritance with CREATE_STRUCT?

Class inheritance with CREATE_STRUCT?
type: item
description: Hello, I am trying to create a new object class structure which inherits from IDL_Object. I want to use CREATE_STRUCT for this, but it seems like that is not possible. Am I stuck with the curly bracket struct creation? My minimal example (this fails with syntax error): pro teststruct__define ;void={teststruct, a:0, inherits IDL_Object} ; this works void = CREATE_STRUCT(NAME='teststruct', 'a', 0, inherits IDL_Object) ; syntax error end
creator: andre.waehlisch
date: 2017-07-05T23:15:07-00:00

Re: Class inheritance with CREATE_STRUCT?
type: item
description: I would say that you're stuck with the curly bracket notation. Create_struct() is meant for run-time definition of a structures and objects are typically static. Is this just an aesthetic problem or do you plan to dynamically create the structure of the object? However, if a dynamic object is what you really want, then you could use hashes and dictionaries in the structure definition (with curly brackets). Here are some useful object related links, in case you didn't come across these things: http://www.idlcoyote.com/tips/getproperty.html http://www.idlcoyote.com/code_tips/allprops.html I hope it helps, Helder On Thursday, July 6, 2017 at 1:15:11 AM UTC+2, andre.w...@web.de wrote: > Hello, > > I am trying to create a new object class structure which inherits from IDL_Object. I want to use CREATE_STRUCT for this, but it seems like that is not possible. Am I stuck with the curly bracket struct creation? > > My minimal example (this fails with syntax error): > > pro teststruct__define > ;void={teststruct, a:0, inherits IDL_Object} ; this works > void = CREATE_STRUCT(NAME='teststruct', 'a', 0, inherits IDL_Object) ; syntax error > end
creator: Helder Marchetto
date: 2017-07-06T07:16:56-00:00

Re: Class inheritance with CREATE_STRUCT?
type: item
description: On Thursday, July 6, 2017 at 1:15:11 AM UTC+2, andre.w...@web.de wrote: > Hello, > Use curly braces in create_struct : void = CREATE_STRUCT(NAME='teststruct', 'a', 0, {IDL_Object}) regards, Lajos > I am trying to create a new object class structure which inherits from IDL_Object. I want to use CREATE_STRUCT for this, but it seems like that is not possible. Am I stuck with the curly bracket struct creation? > > My minimal example (this fails with syntax error): > > pro teststruct__define > ;void={teststruct, a:0, inherits IDL_Object} ; this works > void = CREATE_STRUCT(NAME='teststruct', 'a', 0, inherits IDL_Object) ; syntax error > end
creator: Lajos Foldy
date: 2017-07-06T09:07:03-00:00

Re: Class inheritance with CREATE_STRUCT?
type: item
description: On Thursday, July 6, 2017 at 11:07:06 AM UTC+2, fawltyl...@gmail.com wrote: > Use curly braces in create_struct : > > void = CREATE_STRUCT(NAME='teststruct', 'a', 0, {IDL_Object}) I had more time to test this, and it does not work. The structure members are copied as expected, but the inheritance info is lost. regards, Lajos
creator: Lajos Foldy
date: 2017-07-06T17:17:41-00:00