Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
Who's Online
14 user(s) are online (10 user(s) are browsing Forum)

Members: 0
Guests: 14

more...

Browsing this Thread:   1 Anonymous Users



« 1 2 (3) 4 »


Re: Zune related questions

Joined:
2012/1/16 5:57
Group:
Member
Posts: 260
Offline
Quote:

You are confusing things. The window doesn't need to be - but the "conatiners" for the category/package lists would need to be or they could grow larger than the window can display/force the user to need a massive window to contain it all.


I just saw how many packages the new Icaros installer will show. I've suddenly realized that a fixed sized container is a stupid idea indeed

I'll experiment a bit also about how to enlarge an application window and keep proportions. I know so little about Zune...

But thanks for your time!

Posted on: 2012/9/11 13:33
Transfer the post to other applications Transfer


Re: Zune related questions

Joined:
2011/6/30 19:50
Group:
Member
Posts: 2501
Offline
Quote:
I've suddenly realized that a fixed sized container is a stupid idea indeed

therefore i found
Quote:
I need a volounteer for a simple LUA Zune application

a bit misleading as
Quote:
I know so little about Zune...

Is exactly my problem as well

If wish i could have more time to experiment with zua myself and give you a hand. Anyhow, good luck and don't hesitate to ask. There are more then enough people around who can help you in case of trouble.

And kudo's for trying ofcourse

regards,

Posted on: 2012/9/11 13:46
Transfer the post to other applications Transfer


Re: Zune related questions

Joined:
2012/1/16 5:57
Group:
Member
Posts: 260
Offline
Ok, so I got my nice checkboxes ("checkmarks" in MUI-ish dialect for those of you googling this page).

I need to uniquely identify this kind of object among various iteration (if item is a checkmark then do something, else skip iteration).

The code to generate the checkmark is copied and slightly modified from YAM:
Object *MakeCheck(BYTE statechar *label)
{
  return 
ImageObject,
           
ImageButtonFrame,
           
MUIA_Text_Contentslabel,
           
MUIA_InputMode   MUIV_InputMode_Toggle,
           
MUIA_Image_Spec  MUII_CheckMark,
           
MUIA_Background  MUII_ButtonBack,
           
MUIA_ShowSelStatestate,
           
MUIA_CycleChain  TRUE,
         
End;
}


The best I could figure out is getting the value from MUIA_Image_Spec attribute; it works but I don't like this too much.

Is there a way better to do this?

Thanks!


EDIT: I was so wrong, the MUIA_Image_Spec attribute behaves erratic. I had to resort to a evenworse hack: MUIA_ObjectID attribute set to a known value, "checkmark" for example. But that's so awful.

Posted on: 2012/9/19 13:05
Transfer the post to other applications Transfer


Re: Zune related questions

Joined:
2011/6/30 19:50
Group:
Member
Posts: 2501
Offline
Hi jman,

i have to guess here that you are still working on the same project ?

In that case maybe this might be helpfull. Everytime you create a checkmark it returns an object (pointer). all this pointers can be kept in a array for later reference.

If you keep the order of that array in sync with the visual oder you can use that array in order to check the checkmarks.

Even more so it should be possible to make it a 2d array that also holds the status of the checkmark. In that case if it gets visually changed you update the array and the status of the n-th checkmark.

Or is does this all sounds magic to you ?

regards,

P.S. kalamatee's solution (underneath) is more along the way it is suppose to be .

Posted on: 2012/9/19 14:21

Edited by magorium on 2012/9/19 14:52:06
Transfer the post to other applications Transfer


Re: Zune related questions

Joined:
2004/3/29 9:54
From Scotland "The Cold"
Group:
Member
Posts: 1677
Offline
I would use MUIA_UserData, to store a pointer to a private struct where IT store information that object/related code might need ... e.g pointers to paths/filenames, whatever you like really

Posted on: 2012/9/19 14:49
_________________
Click to see original Image in a new window
Transfer the post to other applications Transfer


Re: Zune related questions

Joined:
2012/1/16 5:57
Group:
Member
Posts: 260
Offline
Wow, MUIA_UserData looks exactly what I need.

Thanks to both (the temporary array will come in handy for another thing!).

Posted on: 2012/9/19 15:09
Transfer the post to other applications Transfer


Re: Zune related questions

Joined:
2012/1/16 5:57
Group:
Member
Posts: 260
Offline
@magorium

After some more time fiddling, I've realized that your proposal fits the need.

The thing is that I have these checkboxes nested in an unspecified level of groups, so I have to set them outside if I don't to want to iterate through an iteration of groups that iterates another set of groups, that .... etc. etc.

When instancing these checkboxes, I store the pointers in a list and then whatever happens to these checkboxes, I have the list automagically updated (the power of C pointers!). All without invoking any Zune method to trigger the update.

Well, that was just to thank you for this useful hint.

The MUIA_UserData "attachment" will be useful too, because I don't want to misuse other attributes.

Posted on: 2012/9/23 14:41
Transfer the post to other applications Transfer


Re: Zune related questions

Joined:
2011/6/30 19:50
Group:
Member
Posts: 2501
Offline
@jman

O-o, now you make me all starting to blush

The technique used is common practise in Objectpascal, when dealing with a visual representation of a virtual amount of whatever needs to be represented. So i think, whomever invented that, deserves the real credit here.

But you're more than welcome, and i am glad you actually understood what i was trying to say _and_ be able to put it to good use

I impatiently wait to see the final result in the new distro.

And ofcourse congratulation (and thank you) if it means you finished the assignment succesfully

I hope you enjoy(ed) programming for Aros. Next project ?

regards,


PS:
Quote:
The MUIA_UserData "attachment" will be useful too

When needed you could always use this pointer as integer-index to your list

Posted on: 2012/9/23 15:12
Transfer the post to other applications Transfer


Re: Zune related questions

Joined:
2012/1/16 5:57
Group:
Member
Posts: 260
Offline
Quote:

itix wrote:
Quote:

* How do I read keystrokes?


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.


I'm resurrecting this old thread because I'd like to get to the bottom of it, once and for all. I'm still confused on how to accomplish this.

The main question is: can I intercept events such as IDCMP_RAWKEY and/or IDCMP_VANILLAKEY without resorting to a custom MUI class?

Can I simply use the OVERLOAD() macro for MUIM_Setup and MUIM_Cleanup method (respectively for methods MUIM_Window_AddEventHandler and MUIM_Window_RemEventHandler)?

Thanks

Posted on: 2013/1/3 13:58
Transfer the post to other applications Transfer


Re: Zune related questions

Joined:
2012/1/16 5:57
Group:
Member
Posts: 260
Offline
self reply after some more study on the subject.

Answer is that, no, I can't catch input without creating a customclass.

I've found some interesting examples on how this works.
For the googlers landing on this, here are how to catch keystrokes in MUI/Zune overloading MUIM_HandleEvent method (belonging to Area.mui).

From noWinEd:
http://nowined.svn.sourceforge.net/vi ... ?revision=372&view=markup

From Stuntz's sample code: download "mui38dev.lha" from Aminet, look for the Class1.c examples (and following ones).

Posted on: 2013/1/9 14:57
Transfer the post to other applications Transfer



« 1 2 (3) 4 »



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.

[Advanced Search]


Search
Top Posters
1 paolone
paolone
3582
2 nikolaos
nikolaos
3442
3 phoenixkonsole
phoenixkonsole
2856
4 magorium
magorium
2501
5 deadwood
deadwood
2246
6 clusteruk
clusteruk
2051
7 mazze
mazze
2028
8 ncafferkey
ncafferkey
2021
9 damocles
damocles
1787
10 Kalamatee
Kalamatee
1677
© 2004-2013 AROS Exec