[Gambas-user] Getting an objects handler
Fabien Bodard
gambas.fr at gmail.com
Sat Mar 4 05:47:52 CET 2023
Do as if the handler and the name was the same.
In the ide it go in this way.
Le ven. 3 mars 2023 à 19:36, Bruce Steers <bsteers4 at gmail.com> a écrit :
>
>
>
> On Fri, 3 Mar 2023, 15:05 Bruce Steers, <bsteers4 at gmail.com> wrote:
>
>>
>>
>> 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
>>
>
> To elaborate....
>
> I have a few programs that i have made custom menu creators for. like the
> new Desktop-ish launcher that is highly customizable. (i attached a snap of
> the custom menu editor)
>
> I want to just Menu.Save(sFileName) and save the menu to file then just as
> easily restore it.
> Hmm, actually, thinking about it, I may not need to save the handler name
> as it will probably be handled inside the program the same. :-\
> I got a Menu.Save(Path) method working pretty well. Had to make an
> addition to Picture.class though, A Picture.Path property that stores the
> file Path when an image is loaded.
> i can save mostly all the menu data including pictures. (just got to
> work on Tag variants)
>
> For some reason I though having the handler name would be useful. 🤔
>
> Respects
> BruceS
>
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230304/aa5815c4/attachment.htm>
More information about the User
mailing list