Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

dusty-deck

2
Posts
1
Topics
A member registered 7 hours ago

Recent community posts

Thank you, your top code example contained a solution I was looking for.

I'm not certain what was confusing me, and attempting to explain my confusion might not be useful...

I guess I'd been stuck trying to reference a widget with the dot notation, e.g., home.widgets.canvas_8, not realizing that I should have been using the bracket notation, home.widgets["canvas_8"]. The latter is clearly happy with a string, while the former is not.

You have revived me from mental collapse, much appreciated!

from https://beyondloom.com/decker/lil.html :

"Types and Conversions

There are 8 types of value in Lil: numbers, strings, lists, dictionaries, tables, functions, interfaces, and the nil value.

"


I have a string type that I want to convert into a function call. How do I do it?

Starting with:

"canvas_16.paste[images_color.widgets.canvas_1.copy[]]"

How do I get:

canvas_16.paste[images_color.widgets.canvas_1.copy[]]

?


I've tried and failed with the following:

> eval["canvas_16.paste[images_color.widgets.canvas_1.copy[]]"]  # bugged.
> "canvas_16.paste[images_color.widgets.canvas_1.copy[]]"[0]     # "c". Not what I wanted.
> first "canvas_16.paste[images_color.widgets.canvas_1.copy[]]"  # "c". Not what I wanted.

select a canvas, e.g. canvas_16, then in listener:

> me.event["paste" "images_color.widgets.canvas_1.copy[]"]        # nil. (No event named "paste"?)


Help?