Just popping in
Joined: 2008/3/1 9:53 Last Login
: 2012/8/25 7:43
Group:
Registered Users
|
@trixie Quote: Tags should describe object properties, not invoke function calls - that's what methods are for. So the introduction of the child removing method was the right step, in line with OOP principles.
Uhm... Quote: if(LayoutBase->lib_Version>=53) { IIntuition->IDoMethod((Object *)mommy, LM_REMOVECHILD, inst->Win, ubrow->buttons[j], TAG_DONE); } else // Use fallback function. Note, this function may deadlock { IIntuition->RefreshSetGadgetAttrs(mommy, NULL, NULL, LAYOUT_RemoveChild, ubrow->buttons[j], TAG_DONE); }
I believe LM is for LayoutMethod, so here is used a method which is called on object mommy and take a window and the object to remove (a button). On MUI you does: Quote: DoMethod(group, MUIM_Group_InitChange); DoMethod(group, OM_REMMEMBER, button); DoMethod(group, MUIM_Group_ExitChange);
You tell to MUI you are doing a change(s) into a group and then you make your changes, in this case you remove a button from a group with BOOPSI method OM_REMMEMBER. From programming POV is better the new LM_REMOVECHILD (from this little example code) because system takes care about the state of objects, while in MUI way user have to take care of state of object to change with IntiChange/ExitChange.
|