Skip to content
This repository has been archived by the owner on Feb 14, 2023. It is now read-only.

Update GenericItem docs #51

Open
jimtng opened this issue Nov 19, 2022 · 2 comments
Open

Update GenericItem docs #51

jimtng opened this issue Nov 19, 2022 · 2 comments
Milestone

Comments

@jimtng
Copy link
Collaborator

jimtng commented Nov 19, 2022

I noticed several attributes aren't just read-only. They are actually read/write. For example, GenericItem#label= can be used to set the label.

Opening this issue to remind myself.

@ccutrer
Copy link
Owner

ccutrer commented Nov 19, 2022

there are actually quite a few things that are read/write, but only documented as read. both core wrapper stuff, and dsl stuff (for example Timer#id is actually r/w, so that TimerManager#schedule can twiddle with the id of an already created timer). things like GenericItem#label= need investigated on if it's kosher to call that method (like if the item is from anything besides a manageditemprovider). GenericItem#state= is also a thing, but I'm pretty sure it bypasses the entire event infrastructure. I use it in Items::Builder, specifically for that reason.

@jimtng
Copy link
Collaborator Author

jimtng commented Nov 19, 2022

Currently I'd have to do Item.add_tag 'tagname' and Item.add_group_name 'anothergroup'. We could make it so this can be done by Item.tags += ['NewTag'] and Item.groups += [AnotherGroup]` and variations thereof.

Item.label= I believe translates to set_label.

@ccutrer ccutrer added this to the 5.1 milestone Nov 26, 2022
ccutrer added a commit that referenced this issue Jan 9, 2023
refs #51

and add #modify method to update them in batch (or to override the
provider check)
ccutrer added a commit that referenced this issue Jan 9, 2023
refs #51

and add #modify method to update them in batch (or to override the
provider check)
ccutrer added a commit that referenced this issue Jan 9, 2023
refs #51

and add #modify method to update them in batch (or to override the
provider check)
ccutrer added a commit that referenced this issue Jan 9, 2023
refs #51

and add #modify method to update them in batch (or to override the
provider check)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants