URGENT-How to add "New Card" button/menu to stack
mpetrides at earthlink.net
Wed Jun 23 15:47:57 CDT 2004
Ok, one final correction.
That should be
not shutdownRequest (which does not work properly).
Also a few refinements to the handler
Answer "Save stack first" with "No" or "Yes"
--creates a dialog with yes as default answer
If it is "Yes" then
save this stack
You piqued my curiosity, so I put together a very simple address book
stack to test this method and it works fine. Email me off list if you
would like me to email you the Address Book Demo I put together along
with the uncompiled version of the starter standalone (when compiled to
standalone it becomes 3.4 meg in size).
On Jun 23, 2004, at 3:34 PM, Marian Petrides wrote:
> Ah, good point, Jim. I had momentarily forgotten the inability to save
> to standalone when I suggested using doMenu.
> Okay, Dan. Try this:
> 1) Modify your address book stack as mentioned in my previous
> email--incorporating doMenu-- and save it. Say it is named
> You will also have to create some way to SAVE the stack once modified.
> Simplest way to do this is to create a prompt as whenever you try to
> quit (by clicking the close box):
> Add a line to the stack script which says
> on shutdownRequest
> Answer "Save stack first" with "No" or "Yes"
> --creates a dialog with yes as default answer
> If it is "Yes" then
> save this stack
> close this stack
> End if
> end shutdownRequest
> You may have to put a similar handler in other locations if you have
> alternative ways to quit from the stack (e.g. command-key equivalent).
> For commandKey equivalents, the handler would be on commandKeyDown
> (or on ControlKeyDown --if you are on a PC.
> Save this modified AddressBook stack. Do not make it a standalone.
> 2) Create a very simple stack named SplashScreen which has one card
> that simply says "Loading AddressBook"
> 3) Put the following into the Stack script of SplashScreen:
> On OpenStack
> go to card 1 of stack "AddressBook.rev
> close stack "SplashScreen"
> --assuming you have no need for SplashScreen to stay open once
> AddressBook is launched
> End OpenStack
> (could also be done as an openCard handler in the card script instead)
> 4) When done, build SplashScreen into a standalone.
> Now, when you double-click on SplashScreen, it will briefly display
> the "Loading AddressBook" card, then open AddressBook and quit
> itself. The button you created in step 1, when pressed, should
> execute the doMenu command and create a new card. Whenever you try to
> quit, the Answer dialog should get evoked, giving you an opportunity
> to save the stack with the new card(s).
> I think this should do the trick.
> On Jun 23, 2004, at 3:11 PM, Jim MacConnell wrote:
>>> I assist a professor at my university and have imported his old
>>> HyperCard Address Book stack into Revolution. I then saved it as a
>>> standalone application. I need to figure out how to add a "add new
>>> card" button, like his old HyperCard stack had.
>> Everyone else will probably chime in soon with numerous ways to clone
>> create cards, etc.
>> The thing that I still struggle to remember though (as a relative
>> newbie) is
>> that you can't save changes to a standalone. So if you make a new card
>> (however you like) then quit.. The card won't be there when you open
>> standalone next time. The easiest answer is to make a little stack
>> screen) that opens the address book stack for you (or your professor).
>> So.. build a nice little stack that can even have a single field
>> "Opening Address book for you...". In that stack have a script
>> handler that
>> says "open stack "Address Book" or whatever you've called it. Then
>> when you
>> close/quit the address book standalone, it will properly save changes
>> asking you of course?).. Or do you need to say Save stack(?).. Now I'm
>> getting confused...
>> Doesn't matter.... Again someone will chime in soon on the various
>> ways to
>> do this also. I just wanted to let you know that you may be doing
>> fine from a HyperCard perspective and yet not getting what you
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
> use-revolution mailing list
> use-revolution at lists.runrev.com
More information about the use-livecode