array of ANY possible?

Forums for specific tips, techniques and example code
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

array of ANY possible?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:36 pm

by CarlRanson >> Mon, 7 Jan 2002 20:57:03 GMT

Does anyone know a way to setup and array of ANY?

It seems to be impossible.
Cheers,
CR

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: array of ANY possible?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:36 pm

by nik >> Tue, 8 Jan 2002 10:14:49 GMT
Does anyone know a way to setup and array of ANY?

It seems to be impossible.

Carl,

You can't currently define an Array with a member type Any (I have heard there is a plot underway to support variable length String, Binary and Any arrays in a future JADE release, but don't tell anyone).

An alternative you can use today is to setup an array of 'container objects' to store the any values.

The attached sample schema demonstrates an implementation of Variant and VariantArray classes. The Variant class is used to contain an attribute of type Any. This indirection mechanism is also a good way to store arbitrary length string and binary data since JADE currently only supports fixed element size arrays.


Happy New Year
bok
Attachments
2086_1.scm
(3.6 KiB) Downloaded 169 times
Last edited by ConvertFromOldNGs on Fri Aug 07, 2009 3:59 pm, edited 1 time in total.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: array of ANY possible?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:36 pm

by CarlRanson >> Tue, 8 Jan 2002 22:18:27 GMT

In my version of jade at least (5.1.07) it doesn't seem possible to add an attribute of type Any. Did this become possible in a later version of Jade?

btw, your attachment didn't seem to make it to the newsgroup

Thanks,
CR

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: array of ANY possible?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:36 pm

by CarlRanson >> Wed, 9 Jan 2002 1:47:11 GMT

No worries, ive got the gist of it now.

Thanks, bok.
CR

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: OT - Newsgroup attachments

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:36 pm

by pfitchett >> Mon, 14 Jan 2002 4:45:24 GMT
btw, your attachment didn't seem to make it to the newsgroup

That seems to be a quirk of the new JADE news server - as far as I can tell attachments are not provided via the nntp interface. If you view the news groups via the web interface it provides a url link to the attachment.

Attachments now make the round trip using the nntp interface - a couple of small inconsistencies with software from our benevolent software supplier (no names, ...). Unfortunately, some attachments received in the last few months may be corrupted, with intermittent lost data. Please let us know if you notice any.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: array of ANY possible?

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:36 pm

by cnwdad1 >> Sun, 13 Jan 2002 2:03:44 GMT

For those who use CardSchema, it has an implementation of this in the form of the CnVariant (and CnVariantArray) class.

darrell.


Return to “Tips and Techniques”

Who is online

Users browsing this forum: No registered users and 31 guests