[Gambas-user] Getting an objects handler
Bruce Steers
bsteers4 at gmail.com
Fri Mar 3 19:34:58 CET 2023
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230303/f35644e0/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Untitled.jpg
Type: image/jpeg
Size: 111467 bytes
Desc: not available
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20230303/f35644e0/attachment-0001.jpg>
More information about the User
mailing list