[share] Page Indicator ui View
Phuket2 last edited by
just wanted to share this Page Indicator class. Even if the code is not great, still a good start.
Phuket2 last edited by
Hmmm, note to self. I have just started another indicator view I wanted to do. I can see that a many nice indicators could be done with primarily the draw function. With a some standard attrs. Min, max, increment etc. is sounding like a gauge or a ui.slider 😱
Would be great if one of the experts here put together a class using a Abstract Base Class. I understand the concepts, but that is far as I goes. All about the design.
Well, does not need to be one of the experts, you could come together as a group and do it 😬 But it would be great if the design was robust enough and rich enough that Pythonista coders would not consider another way when writing some form of ui indicator/gauge. I also think some self.restraint should be used. I mean in complexity. Ok, if the base class does some magic, but still should be aimed at the broad spectrum of users here, regards to experience. Just saying, with this audience sometimes better to be a little bit more verbose than 100% correct tightest code possible. If a base class like this is used, even if the interface is quite simple. The day will always come when it needs to be debugged by someone of vary experience levels.
So to be clear, I don't mean it should be dumbed down or a big performance hit. Just saying everything does not need to be in one statement just because it's the tightest code.
I think that leveraging the operator overloading is a great thing when it makes sense. I think that's a complexity all have to live with. As easy as it seems in theory to define iadd etc, to implement it without strange side effects are not that easy. At least at my level it's not. I also think str and repr in abc class should be leveraged. Even if it's just to pretty print the object with keys and values. Sorry, I have been talking about a class. The more I waffle on, I can see this is a module, not a class. But that's my inexperience.
I am not sure all I have said here is correct 100% technically, but I am sure the sentiment is.
If we get a Indictcator abc module, it's not a big leap to get a widget/gadget model thereafter 😱😳🆒
I have said it many times before, if I was competent enough to do it I would. But the sad truth is I am not.
Maybe this is the rantings of a mad man, or maybe not. I believe in what I have said at least