Re: Indirection

Jon Ogden <[email protected]> Wed, 16 Jan 2019 06:55:11 -0600
Newsgroups gmane.comp.lang.realbasic.user
Message-ID <[email protected]>
--Apple-Mail-58AC99AE-D12A-4672-9FD4-76B1895415FE
Content-Type: text/plain;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable

Probably because there are not too many of us left here any more, unfortunat=
ely. I know I didn=E2=80=99t know the answer to your question. Delegates mig=
ht work. There=E2=80=99s a bit of work to set them up but they are quite use=
ful. I haven=E2=80=99t used them too much as they still tend to confuse me a=
 bit. I use them in places where I want to be able to easily change an event=
 handler without having to use the Add/Remove Handler directive multiple tim=
es.=20


Sent from my iPhone

> On Jan 16, 2019, at 4:48 AM, Jean-Luc Arnaud <jean-luc-E/[email protected]> wr=
ote:
>=20
> Hi,
>=20
> On the 7th of December, I sent the below message, and got no reply.
>=20
> After seeking in Language Reference, forum and Internet, I think Delegate c=
ould be a solution.
> What's your opinion?
>=20
> TIA for any help.
> --=20
> Jean-Luc Arnaud
>=20
> -------------------------
>=20
> Hi all,=20
> Is there a way to use a kind of indirection, just like Dynamic strings and=
 #, but for other type of variable, in particular with arrays?=20
> Let say I have 3 arrays named "MyArray1", "MyArray2" and "MyArray3".=20
> I need to use them with indirection, something like:=20
>=20
>     Dim Name1 As String=3D"MyArray1"=20
>     Dim Name2 As String=3D"MyArray2"=20
>     Dim Name3 As String=3D"MyArray3"=20
>     If Value=3D1=20
>         Result=3D#Name1(0)=20
>     End If=20
>=20
>=20
> TIA for any help=20
>=20
> -- Jean-Luc Arnaud=20

--Apple-Mail-58AC99AE-D12A-4672-9FD4-76B1895415FE
Content-Type: text/html;
	charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html><head><meta http-equiv=3D"content-type" content=3D"text/html; charset=3D=
utf-8"></head><body dir=3D"auto">Probably because there are not too many of u=
s left here any more, unfortunately. I know I didn=E2=80=99t know the answer=
 to your question. Delegates might work. There=E2=80=99s a bit of work to se=
t them up but they are quite useful. I haven=E2=80=99t used them too much as=
 they still tend to confuse me a bit. I use them in places where I want to b=
e able to easily change an event handler without having to use the Add/Remov=
e Handler directive multiple times.&nbsp;<div><br><br><div id=3D"AppleMailSi=
gnature" dir=3D"ltr">Sent from my iPhone</div><div dir=3D"ltr"><br>On Jan 16=
, 2019, at 4:48 AM, Jean-Luc Arnaud &lt;<a href=3D"mailto:jean-luc@cdmultime=
dia.fr">jean-luc-E/[email protected]</a>&gt; wrote:<br><br></div><blockquote typ=
e=3D"cite"><div dir=3D"ltr">
 =20

    <meta http-equiv=3D"content-type" content=3D"text/html; charset=3DUTF-8"=
>
 =20
 =20
    Hi,<br>
    <br>
    On the 7th of December, I sent the below message, and got no reply.<br>
    <br>
    After seeking in Language Reference, forum and Internet, I think
    Delegate could be a solution.<br>
    What's your opinion?<br>
    <br>
    TIA for any help.<br>
    <pre class=3D"moz-signature" cols=3D"72">--=20
Jean-Luc Arnaud

-------------------------

</pre>
    <div class=3D"moz-text-flowed" style=3D"font-family: -moz-fixed;
      font-size: 12px;" lang=3D"x-unicode">Hi all,
      <br>
      Is there a way to use a kind of indirection, just like Dynamic
      strings and #, but for other type of variable, in particular with
      arrays?
      <br>
      Let say I have 3 arrays named "MyArray1", "MyArray2" and
      "MyArray3".
      <br>
      I need to use them with indirection, something like:
      <br>
      <br>
      &nbsp;&nbsp;&nbsp; Dim Name1 As String=3D"MyArray1"
      <br>
      &nbsp;&nbsp;&nbsp; Dim Name2 As String=3D"MyArray2"
      <br>
      &nbsp;&nbsp;&nbsp; Dim Name3 As String=3D"MyArray3"
      <br>
      &nbsp;&nbsp;&nbsp; If Value=3D1
      <br>
      &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; Result=3D#Name1(0)
      <br>
      &nbsp;&nbsp;&nbsp; End If
      <br>
      <br>
      <br>
      TIA for any help
      <br>
      <br>
      -- Jean-Luc Arnaud
      <br>
    </div>
 =20

</div></blockquote></div></body></html>=

--Apple-Mail-58AC99AE-D12A-4672-9FD4-76B1895415FE--