what is UUID?

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
davoodice2
Posts: 381
Joined: Tue Jun 15, 2021 1:14 pm

what is UUID?

Post by davoodice2 »

any help?
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
Stan
Posts: 199
Joined: Sun Apr 19, 2009 3:22 pm

Re: what is UUID?

Post by Stan »

________________________________________________________________________
https://mohoscripting.com/ - Unofficial Moho Lua scripting documentation
https://mohoscripts.com/ - The best place to publish and download scripts for Moho
User avatar
davoodice2
Posts: 381
Joined: Tue Jun 15, 2021 1:14 pm

Re: what is UUID?

Post by davoodice2 »

specifically in moho
GetLayerByUUID():
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
Stan
Posts: 199
Joined: Sun Apr 19, 2009 3:22 pm

Re: what is UUID?

Post by Stan »

The "regular" layer ID is just the ordinal number of the layer. It may change if you move the layer above or below other layers. And that's what is used by the MohoDoc:Layer(id) or MohoDoc:LayerByAbsoluteID(id).

Unlike that, the UUID is a unique identifier. You can use it to make sure the particular layer is the one you need regardless of its position in the document.

There's no GetLayerByUUID method though. However, the UUID is used in some rare cases. Take a look at this example: GroupLayer:GetLayerOrdering().
________________________________________________________________________
https://mohoscripting.com/ - Unofficial Moho Lua scripting documentation
https://mohoscripts.com/ - The best place to publish and download scripts for Moho
User avatar
davoodice2
Posts: 381
Joined: Tue Jun 15, 2021 1:14 pm

Re: what is UUID?

Post by davoodice2 »

Stan wrote: Thu Sep 02, 2021 4:06 pm The "regular" layer ID is just the ordinal number of the layer. It may change if you move the layer above or below other layers. And that's what is used by the MohoDoc:Layer(id) or MohoDoc:LayerByAbsoluteID(id).

Unlike that, the UUID is a unique identifier. You can use it to make sure the particular layer is the one you need regardless of its position in the document.

There's no GetLayerByUUID method though. However, the UUID is used in some rare cases. Take a look at this example: GroupLayer:GetLayerOrdering().
thanks.very clear description.
خیام اگر ز باده مستی خوش باش
با ماهرخی اگر نشستی خوش باش
چون عاقبت کار جهان نیستی است
انگار که نیستی چو هستی خوش باش
Post Reply