-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make Block Class Public #11
Comments
The issue here is not the access modifier, but instead it's because the block class is not static. At the end of the error it says I will look at the code later today to see if it would make sense to make the class static however. |
Ahh. I see, I did take notice to this earlier and tried to write the same block of code you have put in the last comment and failed and lead myself down the wrong diagnosis, but I see the correct way to do it now. Thanks, as far as making that class static, I don't see a reason to not have it static considering it does not depend on anything within the the Pixy2CCC class instance. Additionally a weak reason to have to have it separate is just how the community tends to organize classes is by putting them in their own files, not saying correct or wrong its just what is commonly seen. |
The new version 1.4 makes these classes static, as like you said, they do not reference anything non-static and are not tied to the specific instances of their respective container classes. I also added some other changes I had fixed to to keep the API as similar as possible to the original C++ Pixy2 API. Thanks for your help! |
When making some helper functions to adjust some of the values of the Block Instance, I got an error when trying to make a new instance of the Block Object.
Here is the error I get from the IDE (VS Code) about creating a new Instance of Block.
Yes I do see that this is related to issue #4 but I feel that this is a good reason to expose this class as public.
Here is some of the code that I can using to create a new instance and if interested later on in the season I could make a pull request to add in features from what I have added here.
The text was updated successfully, but these errors were encountered: