self usable to evt_tables and others.

Feature requests for future versions of Hollywood can be voiced here

self usable to evt_tables and others.

Postby Bugala » Sat Aug 12, 2017 11:58 am

So far I thought the usage of self is restricted only in evt_tables case, but now i noticed this same restriction is also when using SetInterval()

I can of course get around this problem using "userdata", but it does worry me a bit if it maybe gives me some hard to track problem at some point.

Hence to a wishlist a possibity to use self function in both evt_tables as well as setintervals and everywhere else too.

as example of how i want to be able to do is:
Code: Select all
SetInterval(1, MyFunction:SelfFunction, 100)
Bugala
 
Posts: 645
Joined: Sun Feb 14, 2010 8:11 pm

Re: self usable to evt_tables and others.

Postby airsoftsoftwair » Tue Aug 15, 2017 8:38 pm

Might be a useful addition. I'll think about it.
User avatar
airsoftsoftwair
 
Posts: 2343
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Re: self usable to evt_tables and others.

Postby Bugala » Tue Aug 15, 2017 11:16 pm

I believe it would result in more readable code, and current version could also result in need to make same function twice, for when using it for evt_table, you have to use it as table.function, instead of table:function, hence if you at some other point in code need to refer to that some function as table:function, that would mean you would need to make it twice, once for table.function and second for table:function, unless you manually add that userdata on that other call too, making code more messy again.
Bugala
 
Posts: 645
Joined: Sun Feb 14, 2010 8:11 pm


Return to Wishlist

Who is online

Users browsing this forum: No registered users and 2 guests