Browsing this Thread:
1 Anonymous Users
Zune related questions |
||
|---|---|---|
|
Joined:
2012/1/16 5:57 Group:
Member Posts:
170
![]() |
Hello,
I have a couple of questions about Zune: can anybody help me? * RadioGroups: is there a possibility out-of-the-box to have radio buttons mutually exclusive? I managed such a feature using a group of items with MUIA_InputMode set to MUIV_InputMode_Immediate. Upon MUIA_Selected event, I manually set MUIA_Selected,FALSE to all the other children of that group. But that's a kludge. * How do I read keystrokes? * How do I associate a modifier (CTRL, ALT) to the MUIA_ControlChar parameter of an object? Example: CTRL+t, ALT+1 and so on. * When I dinamically add items to a group through OM_ADDMEMBER and the new buttons contains a longer text the whole group is correctly resized. However if I use the opposite method OM_REMMEMBER the buttons are not resized back. I attach a sample src code to show what I mean. * Can anybody explain (or point me to some explaination) on what is the effect of these parameters in my DoMethod() listeners: MUIV_Notify_Self MUIV_Notify_Window MUIV_Notify_Application MUIV_Notify_Parent I understand what they're supposed to do, but I could not verify any difference. * Is there an out-of-the-box facility to know if an item is already inside a group without invoking MUIA_Group_ChildList and manually parsing all the List object returned? Thanks a lot for the info.
Posted on: 2012/8/24 14:22
|
|
Transfer
|
||
Re: Zune related questions |
||
|---|---|---|
|
Joined:
2011/6/30 19:50 Group:
Member Posts:
1648
![]() |
Hi jman,
as frustrating it might perhaps be, but have you looked into the mui developer docs already ? It is what zune is based on and therefore applies. Regarding radiobuttons/groups, i would suggest taking a look into this source as well. I admit, not much on radio class but still enough to get some things going. Quote: Can anybody explain... In the developer docs of domethod() macro i read:
DestObj
Are you sure you really understand what they are suppose to do ? For example if you would use MUIV_Notify_Application you would trigger an applications method if wanted. Nothing applies to _your_ object other than your object notifies the application object. same applies for MUIV_Notify_Window but for the window object. I take it you can guess what MUIV_Notify_Self does ![]() I've to admit that MUIV_Notify_Parent puzzles me also. It seems new for aros (perhaps it was needed for some (later) classes) but i could not find _any_ program in the aros source-tree using it. Therefore i could not find any documentation/workings as well. It could be the parent class, parent window, parent group. Perhaps it isn't even implemented. I really can't tell. I am aware this might not be an answer you might be expecting, but i do hope it will get you going a bit further. Perhaps someone else can shed more detailed light on your questions. regards,
Posted on: 2012/8/24 17:09
|
|
Transfer
|
||
Re: Zune related questions |
||
|---|---|---|
Joined:
2005/5/13 15:23 Group:
Member Posts:
47
![]() |
Quote:
It is same as MUIA_Parent. Useful if you have to notify your parent group object but you dont know what your parent group is. NAME MUIA_Parent -- (V11) [..G], Object *, 0x8042e35f FUNCTION Get a pointer to the parent object of the current object. The parent object is always the group/family object which contains the current object. If an object has no parent group, this attribute will be NULL.
Posted on: 2012/8/25 2:13
|
|
Transfer
|
||
Re: Zune related questions |
||
|---|---|---|
Joined:
2005/5/13 15:23 Group:
Member Posts:
47
![]() |
Quote:
You insert MUIM_Window_AddEventHandler to your window and overload MUIM_HandleEvent in your UI object. Remember to call MUIM_Window_RemEventHandler before your UI object is disposed. It is little illogical call MUIM_Window_AddEventHandler on window object to get events to UI object class. It is one of those AmigaOS legacy things. Quote:
Control char is standardized way to have a key shortcut to MUI objects and its behaviour can't be changed. So answer is, you don't. You can use event handlers to have customized shortcut keys. Perhaps have it centralized in your master group class containing all objects in your window. Quote:
See MUIA_Parent attribute.
Posted on: 2012/8/25 2:26
|
|
Transfer
|
||
Re: Zune related questions |
||
|---|---|---|
|
Joined:
2012/1/16 5:57 Group:
Member Posts:
170
![]() |
@magorium
thanks for the reply. I was prepared to any "RTFM" kind of reply ![]() Yes, I've checked quite all I could find about MUI/Zune, so either I'm blind or just plain dumb ![]() Quote:
The source file you mention (which I've checked too) apparently does not manage mutually exclusive radio buttons. Quote:
Perhaps the "Destobj" parameter is useful if you're not invoking a callback? I don't take much into account whatever I put into the "Destobj" parameter because in the DoMethod() I often use a MUIM_CallHook, passing a pointer to all the objects I need to modify because of that button that has been triggered, for example:
DoMethod(button_obj, MUIM_Notify, MUIA_Pressed, FALSE,
In the above example, maybe "app_obj" could be anything, Im just not using it anyway.
Posted on: 2012/8/25 2:26
|
|
Transfer
|
||
Re: Zune related questions |
||
|---|---|---|
Joined:
2005/8/17 16:00 From Germany
Group:
Member Posts:
1950
![]() |
Quote:
Functions for callback hooks usually have this signature: void btnFunc(struct Hook *h, Object *o, Msg msg) What you use as DesObj is forwarded to "o" parameter so you can use what makes most sense within your function.
Posted on: 2012/8/25 7:46
|
|
|
_________________
AROS - Make code, not war
|
||
Transfer
|
||
Re: Zune related questions |
||
|---|---|---|
|
Joined:
2011/6/30 19:50 Group:
Member Posts:
1648
![]() |
@jman
Quote: I was prepared to any "RTFM" kind of reply I am far of the person who could say such a thing as i find it hard to grasp myself. Sometimes it needs multiple reads to fully understand what is written ![]() Quote: I'm blind or just plain dumb Your words. please don't let me choose ![]() Quote: The source file you mention (which I've checked too) apparently does not manage mutually exclusive radio buttons. then i believe we have a different understanding of the word mutual exclusive . Because no matter how hard i try, i can only get one radio-button selected at a time. (and i do believe that is called mutual-exclusive ).red: I have a 'tests/zune' drawer (in my work: disk) in my icaros installation. There is a file called test. Fire it up and please do tell/show me how you managed to get two radio-buttons selected within a group ![]() red: ps: a smaller example can be found in a test called settings which i found at work:tests/zune/settings. Same mutual exclusivity applies ![]() @itix/mazze thank you guys for the explanantions . especially about the MUIV_Notify_Parent.regards,
Posted on: 2012/8/25 20:24
Edited by magorium on 2012/8/25 22:50:15
|
|
Transfer
|
||
Re: Zune related questions |
||
|---|---|---|
Joined:
2005/5/13 15:23 Group:
Member Posts:
47
![]() |
Quote:
This is not what radio buttons are supposed to do. It can be implemented by using two separate radio button objects (please dont) but perhaps you should use checkmark objects instead.
Posted on: 2012/8/26 0:51
|
|
Transfer
|
||
Re: Zune related questions |
||
|---|---|---|
|
Joined:
2011/6/30 19:50 Group:
Member Posts:
1648
![]() |
Hi Itix,
Quote: This is not what radio buttons are supposed to do. You are ofcourse perfectly correct. But according to jman radio buttons are not mutual exclusive. Quote: jman wrote: So we have: A) a misunderstanding about the word mutual exclusive or B) something went wrong in jmans code that he was not able to produce mutual-exlusivity within a radio-group so.... what would be the verdict ![]() That's why i suggested looking into examples i mentioned and to show me how it is not mutual exclusive and to see how such a thing would be programmed. That way jman is able to see for himself what went wrong in his code... at least i hope that to be the case ![]() regards,
Posted on: 2012/8/26 1:05
|
|
Transfer
|
||
Re: Zune related questions |
||
|---|---|---|
|
Joined:
2012/1/16 5:57 Group:
Member Posts:
170
![]() |
Quote:
The verdict is that there's always a third possibility beyond being blind or dumb: a software bug. I think we're all on same track defining that "mutually exclusive" mean that if you click one button of a defined set the other buttons belonging to that set get automatically "unclicked". I had run the test and settings sample files you mention on an Aros Linux hosted (compiled by me last February), and they do show radio buttons that are not mutually exclusive. Please have a look here for proof. I swear it is not 'shopped ![]() http://img441.imageshack.us/img441/3587/arosv.jpg I tried running the very same executable on a build of around mid May and the issue does not show up! Lesson learned: I shall use recent builds ![]() -- Thanks to everyone for the suggestions!
Posted on: 2012/8/26 1:19
|
|
Transfer
|
||
You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.


Transfer


then i believe we have a different understanding of the word mutual exclusive
. Because no matter how hard i try, i can only get one radio-button selected at a time. (and i do believe that is called mutual-exclusive
).
. especially about the MUIV_Notify_Parent.






