[Gambas-user] Getting an objects handler

Bruce Steers bsteers4 at gmail.com
Fri Mar 3 16:05:37 CET 2023


On Fri, 3 Mar 2023, 12:37 BB, <adamnt42 at gmail.com> wrote:

>
> On 3/3/23 9:57 pm, Bruce Steers wrote:
>
> Is it possible to get the objects handler name?
>
> Ie. if i use...
>
> Dim m as Menu = New Menu(mParent) As "ThisMenu"
> m.Name = "This"
> m.Text = "This is a menu"
>
> I can read m.Name , m.Text, etc but can i get the "ThisMenu" reference?
>
> I've made a Menu.Save() Menu.Load() function to save/restore menus to disk
> It saves all the properties (except Tag yet) but i want to save the
> handler name too.
>
> Many thanks.
> BruceS
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
> For why?
>

For Object.Attach() was my thinking



*FThis*
>
> Dim m as Menu = New Menu(mParent) As "ThisMenu"
>
> *FThat*
>
> Dim m as Menu = New Menu(mParent) AsIf FThis.Menus["ThisMenu"] As
> "ThatMenu"
>
> Public Sub ThatMenu_or_maybe_ThisMenu_Click_Or_Clack_Maybe_Even_Cluck()
>
>     Keyborg.Send(3000kV)
>
>     Error.Raise("FATAL - Do not try and confuse me Earthbeing")
>
> End
>
> ???? 😉
>
> b
>
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230303/d5db9b1a/attachment-0001.htm>


More information about the User mailing list