Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #13065
| Path | csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail |
|---|---|
| From | "Wolfgang Riedmann" <wriedmann@gmail.com> |
| Newsgroups | comp.lang.clipper.visual-objects |
| Subject | Re: IVarList sort in natural order / as per class definition |
| Date | Sat, 5 Sep 2020 09:53:22 +0200 |
| Lines | 44 |
| Message-ID | <hrguflFu13vU1@mid.individual.net> (permalink) |
| References | <40414534-8edf-4756-82eb-f35545c4cb60o@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| X-Trace | individual.net EVBUgA75ByE0qfuv90rQUA4P1OJOQFqJJEEcxkc57R4iW6fPg= |
| Cancel-Lock | sha1:TO9Vm6pWCSvxDJyRAZF58NbXtvQ= |
| User-Agent | XanaNews/1.18.1.6 |
| Xref | csiph.com comp.lang.clipper.visual-objects:13065 |
Show key headers only | View raw
Hi Robert,
you can't either. If you need the same order every time you need to
sort it yourself.
And compile time symbols are case independent - so no chance to get
back the original case from symbols.
Wolfgang
Robert Pope wrote:
> Does anyone know if there is a way to get IVarList() (or another
> similar function) to return its array output in the same order as
> they were defined in the class? For example, if I have:
>
> CLASS MyClass
>
> EXPORT MyVar1 AS STRING
> EXPORT MyVar2 AS STRING
> EXPORT MyVar3 AS STRING
> EXPORT MyVar10 AS STRING
> EXPORT MyVar4 AS STRING
>
> Then I would like IVarList to return {#MyVar1, #MyVar2, #MyVar3,
> #MyVar10, #MyVar4}.
>
> IVarList seems to be a bit random with its sorting. For example I
> might get {#MyVar2, #MyVar1, #MyVar3, #MyVar10, #MyVar4} as its
> output. That random order seems to be maintained until the next
> compile, where it might shuffle again slightly.
>
> The object I am actually trying to encode has about 20 exports (some
> of them are references to other objects / arrays).
>
> Bonus points if you can get the elements in their original case too.
> IVarList returns an array of symbols, so my mixed case names are
> being lost too.
>
> Cheers!
--
Back to comp.lang.clipper.visual-objects | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
IVarList sort in natural order / as per class definition Robert Pope <cooeee@gmail.com> - 2020-09-04 06:30 -0700
Re: IVarList sort in natural order / as per class definition "Wolfgang Riedmann" <wriedmann@gmail.com> - 2020-09-05 09:53 +0200
Re: IVarList sort in natural order / as per class definition Jafar <jafar@marti-orbak.nl> - 2020-09-07 01:59 -0700
Re: IVarList sort in natural order / as per class definition Robert Pope <cooeee@gmail.com> - 2020-09-07 02:58 -0700
Re: IVarList sort in natural order / as per class definition Jafar <jafar@marti-orbak.nl> - 2020-09-07 03:25 -0700
Re: IVarList sort in natural order / as per class definition Robert Pope <cooeee@gmail.com> - 2020-09-07 04:18 -0700
csiph-web