Page 1 of 1

Example on CalendarPane

Posted: Thu Dec 27, 2012 6:53 pm
by NigelS
I've been trying to get CalendarPane working for two days now and keep getting the following error. Can someone please advise what I'm doing wrong or can provide some simple example of how to put this together. This is the latest version from them. I've also attacted the instruction that came with the package.

Re: Example on CalendarPane

Posted: Thu Dec 27, 2012 8:13 pm
by sturgis
Just tried things here and it seems to work ok for me.

Can you provide the code line that attempts to create a calendar?

To get a very simple stack working, I placed the following in the card script of my stack (only 1 card, just seeing if it would work for me)

Code: Select all

local sCalendarId
on opencard
-- I set both stacks as substacks of my project stack so that they can be referenced without a path. 
   start using stack "lib_Rect" 
   start using stack "lib_CalendarPane"

-- creates a calendar pane at the topleft of the screen (0,0) 1 month, vertical. 
   get CalendarPane_CreateNew( (the short name of this stack),0,0,1,"Vertical")
   put it into sCalendarId --saved the returned id for other usage
end opencard

on closecard
   stop using stack "lib_Rect" -- remove them from memory
   stop using stack "lib_CalendarPane"
   
end closecard

More information on where it fails might help locate the issue.

Also, since I've not used it before I had to find calendarpane. For anyone else looking in to this, the library is here. http://www.rotundasoftware.com/livecode ... arPane.php

Re: Example on CalendarPane

Posted: Thu Dec 27, 2012 8:48 pm
by NigelS
On the MainStack in Stack script I've code code as shown below.

Code: Select all

on preOpenStack
   start using stack "lib_CalendarPane"
   start using stack "lib_Rect"
end preOpenStack

on closeStack
   close stack "lib_CalendarPane"
   close stack "lib_Rect"
end closeStack
then via a button option selected by the user another card is opened and in that card stack is the following code.

Code: Select all

on openCard
   get CalendarPane_CreateNew("PLNListingCard",0,0,1,"Vertical")
end openCard
I now get this error

Re: Example on CalendarPane

Posted: Thu Dec 27, 2012 8:59 pm
by sturgis
It requires the short stack name, not the card name. Switch to the card where you want the object, then pass the stack name as the argument, not the cardname and I believe you'll be good to go. Notice in the error message it says that is is copying the group to stack destinationstack where destination stack is the name of the stack where you wish it to appear.

And the error is "can't find stack". The property inspector image that you attached is showing information for a card not stack.

Re: Example on CalendarPane

Posted: Fri Dec 28, 2012 7:49 am
by NigelS
Okay I get it now. Thanks

Re: Example on CalendarPane

Posted: Sat Dec 29, 2012 7:06 am
by NigelS
I've now gotten the Calendar to popup at the right location.

I used this script on a button to achieve this

Code: Select all


get CalendarPane_CreateNew("PLNL Management",257,108,1,"Vertical")
put it into sCalendarID 

my question know is, how do I get the return value once I've clicked on the date or selected the date?

Re: Example on CalendarPane

Posted: Sat Dec 29, 2012 7:11 am
by NigelS
What I'm trying to achieve is allow a user to press a button upon which a calendar will popup and will allow a date to be selected.

Re: Example on CalendarPane

Posted: Sat Dec 29, 2012 1:14 pm
by NigelS
I've scrapped using CalendarPane, not because it don't work, but because I just cant to get to grips with the way it's suppose to be used. After trying flcDataPicker within a couple of minutes I had a functional calendar working the way I expected it too.

The only reason why I didn't try flcDataPicker was because of the price, not that for the US and Europe it's expensive but it sure is for us here in South Arica. Fortunately I hope to recoup the cost as the application that I'm currently working on will bring in some revenue be it only in 2 months time. Soon I'm going to have to purchase the professional version of LiveCode and that also is going to be a fair outlay, so I was trying to keep cost's down.

Re: Example on CalendarPane

Posted: Sat Dec 29, 2012 4:03 pm
by sturgis
Sorry for the delay getting back to you. I'm glad you found a way to get things working. I've never used calendarPane so i'm afraid my ability to help would be limited anyway. (There are other free alternatives out there, but the docs for those aren't always that clear either)

If you are looking for other information, tools, plugins, libraries.. (or just want to look at another calendar option) you can find some interesting stuff at http://www.troz.net/rev/index.irev
There is also droptools which is a handy plugin of pre-made custom controls. The controls can be seen at http://droptools.sonsothunder.com/all.irev Somewhere on the same site is the actual droptools plugin. also the sonsofthunder site has some really good stuff, the livecode specific stuff is at http://sonsothunder.com/devres/livecode/livecode.htm much of it is pretty old, but still valid.

I also don't know if you've yet been referred to:
http://lessons.runrev.com
http://www.runrev.com/developers/docume ... rs-course/
http://www.runrev.com/developers/lesson ... nferences/
http://livecode.byu.edu/indexgeneric.php
http://www.runrevplanet.com/free-downloads.html

Mark also has this site http://www3.economy-x-talk.com/index.php with lc information as well as a bunch of other stuff. Think some parts of the site require a donation (mainly to download the tools I believe, but I think the lc information portion is open)

Hopefully if you hit snags, or need to figure out a specific task or method, one of these links will point you in the right direction.

Re: Example on CalendarPane

Posted: Sun Dec 30, 2012 9:34 am
by NigelS
Thanks Sturgis for your response I certainly will avail myself to look around these site. I've been to some of them and found some useful information.
Time to get back to the work....

Re: Example on CalendarPane

Posted: Mon Jan 13, 2014 3:35 am
by LC4iOS
As always the info is here I just have to be able to find it.

Many thanks for this.

Code: Select all

on mouseUp
   dispatch "ReturnSelectedDate" to group CalendarPane    --as date serial
    answer the result
end mouseUp