:getvalue() method - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: :getvalue() method (/showthread.php?tid=1697) |
:getvalue() method - buuuudzik - 06.11.2018 What are the methods of object found by grp.find method? Code: obj = grp.find('1/1/1') I've thinked that it has all grp methods but unfortunately not, e.g. there is no getvalue(). Maybe there is some description about its methods because when I log it I see only individual properties and no prototype's methods. RE: :getvalue() method - admin - 06.11.2018 You don't need getvalue() as value is already stored as obj.value Available methods: Code: read You can get object's meta-table (including meta-methods) like this: Code: log(getmetatable(obj)) RE: :getvalue() method - buuuudzik - 06.11.2018 (06.11.2018, 13:00)admin Wrote: You don't need getvalue() as value is already stored as obj.value Thanks. Yes, it is(it is something as screenshot). I've wanted stote the result of grp.find in a table and use this object later every 60s in Resident script and only use it via this methods. But while I want to use also updatetime then value update will be not enough. But I think you could add method like 'refresh' to not type again grp.find('1/1/1') but only e.g. obj.refresh() RE: :getvalue() method - CHOUAIBOU - 06.11.2018 (06.11.2018, 13:33)buuuudzik Wrote:(06.11.2018, 13:00)admin Wrote: You don't need getvalue() as value is already stored as obj.value Hi buuuudzik grp.find('alias') already return a table, why you cannot just write a function to perform some tests and make changes in this table ? I am not understanding what you need obj.refresh() as refresh also means update. B.R Chouaibou. RE: :getvalue() method - buuuudzik - 06.11.2018 This is an example: Code: -- WITHOUT .refresh() is: I know how to deal with this situation but I would like such method: Code: object:refresh() instead of: Code: object = grp.find(object.address) The name is not a case, this was only a suggestion. And I don't want add this method individually to every object but only to its prototype. And maybe not by me but by manufacturer to use it in further coding without requiring some package RE: :getvalue() method - CHOUAIBOU - 06.11.2018 (06.11.2018, 14:41)buuuudzik Wrote: This is an example: Hi, Now I better understand your aim. B.R, Chouaibou. |