[Gambas-user] Getting an objects handler

BB adamnt42 at gmail.com
Fri Mar 3 13:36:14 CET 2023


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?

_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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230303/9a020a63/attachment.htm>


More information about the User mailing list