-
Notifications
You must be signed in to change notification settings - Fork 52
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
arg type: change type of array arguments from [n]*type -> *[n]type #85
Conversation
imo it is more logical for programmers to say just &myArray than creating a new array with pointers to each element of our array reffer AllenDang#84
@gucio321 It's a intuition decision, DragInt2 works with two pointer values in an array, so should be []*int, rather than a *[]int. If you did some tests, say place dragin2 with few other widgets which requires pointer type binding in same window, and they work flawlessly, I think it's ok to change the type. |
The example should be modified to keep the same behavior as before: the DragInt and DragInt2 are no longer linked and r, g, b, a are no longer useful. The example itself demonstrates in my opinion that the change is good. |
@neclepsio it should work now @AllenDang it depends on how exactly user should store values passed to cimgui. Personally, after re-analysing the situation, I think that the current scenerio is good, but the second may be more universal.... I don't know what do do tbh 😄 @AllenDang you're the boss here, please, decide what to do 🙃 |
@gucio321 I agree your solution, *[]type is better |
ok, so lets go ahead and change this! |
okey, @AllenDang it is done now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
imo it is more logical for programmers to say just &myArray than creating a new array with pointers to each element of our array
reffer #84
@AllenDang let me know if there was any reason for doing it this way.