Page 2 of 2

Re: Shao Sean's Calendar Object

Posted: Wed Nov 10, 2010 2:02 am
by bn
Hi Dan,
Perhaps I should try to build a project that would show how messages work. That might help me understand. Any ideas?
I made a small stack with 1 card on that card is a button within a group. The button has a mouseUp handler that puts a message in a field if he gets the message. The mouseUp message is then passed and on each level there is a mouseUp handler that adds an entry into the field, who he is and who called.

In that way you see the message hierarchy in action and you could try your own messages in a similar way. Maybe this helps more than a long explanation.

regards

Bernd

Re: Shao Sean's Calendar Object

Posted: Thu Nov 11, 2010 4:36 pm
by shaosean
moo

Re: Shao Sean's Calendar Object

Posted: Thu Nov 11, 2010 4:43 pm
by shaosean
Check out Fourth World's message path information (it helped me out when I was starting)..

Re: Shao Sean's Calendar Object

Posted: Fri Nov 12, 2010 12:52 am
by urbaud
Hi Bernd and Shao,

Thank you both for your replies. Shao, I don’t know if you read the rest of the posts on this topic, but I’m sorry I didn’t realize who you are. I feel honored that you replied to my Rev newbie post and I love your explanation of messages and passing them. Reminds me of a cocktail party where the same “game” is played, but of course everyone has been drinking and that certainly changes the dynamics and what the message is at the beginning versus how it gets changed by the end.

The calendar works great, once Bernd told me to comment out the code: “pass calendar….” -- pass for developer trapping. I don’t understand why, especially given the story mentioned above.

Bernd, thanks for the stack. It has given me an idea about how I might be able to build a stack that will help me understand the concept. However, I need to ask, how did you put the ONE pager button into a group? The button has a mouseUp handler, the card has a mouseUp handler and the stack has a mouseUp handler. Doesn’t there have to be 3 buttons-each being a mouseUp handler, in order to form a group? I’m not aware of any other control that causes a mouseUp handler. I looked in the application browser and it just shows the two buttons, Pager and the Clear Field, so I’m confused, were you able to hide the other two buttons somehow? I know groups have “background” behavior, but I’m not sure that applies here. I’m sure there’s probably an easy explanation for how you did it. Bernd and Shao, if I’m able to build the stack I’ll share it with you.

Anyway, thanks again to both of you for trying to help me understand.
Dan

Re: Shao Sean's Calendar Object

Posted: Fri Nov 12, 2010 9:47 am
by urbaud
Hi Bernd and Shao,

I was playing around with what you had said in your posts and I just realized that you don’t need an actual button control to have a mouseUP handler. As long as there is a mouseUP handler written at a particular level, ie. Card or stack, the code in it will be executed, regardless of whether there is a button attached to it. Obviously the message has to start out as a mouseUP handler from a button, but there doesn’t have to be any other buttons. As the message is passed along the path, whenever “it” sees a mouseUP handler (with or without a button) it will execute the code in that handler. Now I see what you did Bernd. You didn’t hide two other buttons. Up until now I had always assumed a mouseUP handler was attached to a button, but it doesn't have to be.... So, one could activate other parts of a program with one mouse click if the PASS command was invoked. Thanks for helping me get this insight.


Dan

Re: Shao Sean's Calendar Object

Posted: Mon Nov 15, 2010 2:47 pm
by shaosean
moo

Re: Shao Sean's Calendar Object

Posted: Tue Nov 16, 2010 4:53 am
by urbaud
Hi Shao,
Thanks for the updated calendar. The problem is you're communicating with a dummy. Where do I put the code: convert the date to dateItems
set the currentMonth of control "ssCalendar" to it -- it will contain today's date items? Could you please be a bit more specific about how I get it to work? Thanks so much.
Dan

Re: Shao Sean's Calendar Object

Posted: Tue Nov 16, 2010 8:56 am
by shaosean
moo

Re: Shao Sean's Calendar Object

Posted: Tue Nov 16, 2010 6:15 pm
by urbaud
Hi Shao,

Thanks, the button makes it work great.

Dan