Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This!

I usually praise Apple's UI for often being intuitive and elegant. But it looks like, in this specific case, there is a problem only outsiders can see clearly: ctrl+clicking an icon to an UI gadget is neither discoverable nor intuitive!

When I improved the Anjuta-Glade integration, I made some effort to do something simpler:

  - Open the .ui then the corresponding (by marker comments that are automatically created when the project is created) .c and .h files... boom! They are automatically associated.

  - Add an ID to a widget you want to access programmatically, double-click it on the inspector... boom! Code for accessing it as a member of the "private" struct is automatically created.

  - Add an onClicked signal to a button (which already has an ID), double click it... boom! Code for the callback is automatically created.
It is a shame Anjuta+Glade never became as popular as they could.


Didn’t Delphi/Visual Studio do this as well when using corn designer / property inspector?


Last time I tried, Delphi had no concept of "outlet", every widget is accessible by the form class that contains it. On the Anjuta+Glade integration, you double click the widget on the inspector to add it to "private" struct, so you can access it on the callbacks.

I know that because I implemented it: https://gitlab.gnome.org/GNOME/anjuta/-/commit/5abe8fd3a97d8...


Yes - Delphi and C++Builder's Object Inspector still does this. Double-click a control, and the default event handler (OnClick) will be created. There's a link auto-set between the button instance's event handler (method pointer) and the method, which is auto-created in the form the button belongs to.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: