Shao Sean's Calendar Object

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

bn
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 4163
Joined: Sun Jan 07, 2007 9:12 pm

Re: Shao Sean's Calendar Object

Post by bn » Wed Nov 10, 2010 2:02 am

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
Attachments
WhoIsCalling.rev.zip
(1.21 KiB) Downloaded 303 times

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: Shao Sean's Calendar Object

Post by shaosean » Thu Nov 11, 2010 4:36 pm

moo
Last edited by shaosean on Fri Dec 03, 2010 2:05 am, edited 1 time in total.

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: Shao Sean's Calendar Object

Post by shaosean » Thu Nov 11, 2010 4:43 pm

Check out Fourth World's message path information (it helped me out when I was starting)..

urbaud
Posts: 120
Joined: Tue Feb 24, 2009 12:10 am

Re: Shao Sean's Calendar Object

Post by urbaud » Fri Nov 12, 2010 12:52 am

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
urbaud

urbaud
Posts: 120
Joined: Tue Feb 24, 2009 12:10 am

Re: Shao Sean's Calendar Object

Post by urbaud » Fri Nov 12, 2010 9:47 am

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
urbaud

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: Shao Sean's Calendar Object

Post by shaosean » Mon Nov 15, 2010 2:47 pm

moo
Last edited by shaosean on Fri Dec 03, 2010 2:05 am, edited 1 time in total.

urbaud
Posts: 120
Joined: Tue Feb 24, 2009 12:10 am

Re: Shao Sean's Calendar Object

Post by urbaud » Tue Nov 16, 2010 4:53 am

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
urbaud

shaosean
Posts: 906
Joined: Thu Nov 04, 2010 7:53 am

Re: Shao Sean's Calendar Object

Post by shaosean » Tue Nov 16, 2010 8:56 am

moo
Last edited by shaosean on Fri Dec 03, 2010 2:03 am, edited 1 time in total.

urbaud
Posts: 120
Joined: Tue Feb 24, 2009 12:10 am

Re: Shao Sean's Calendar Object

Post by urbaud » Tue Nov 16, 2010 6:15 pm

Hi Shao,

Thanks, the button makes it work great.

Dan
urbaud

Post Reply