Unique problem

charles61 cszasz at mac.com
Tue Jul 27 13:16:43 EDT 2010


I have developed an app that deals with student files and adult files. When
the user goes to the student section, the file menu items for adults is
disabled. And, when the user goes to the adult section, the file menu items
for students is disabled. I set up my app like so that the user would not be
able to create a student file and then save it by accident as an adult file
and visa vera. 

Here is my unique problem: When I save a student file and then later
reopened it in the student section of the app, the adult menus items are not
disabled. I used a preOpenCard handler:

on preopenCard
   mark this card
   enable menuItem 1 of button "File" of group "menubar 1" -->Student
   disable menuItem 2 of button "File" of group "menubar 1" -->Adult
   enable menuItem 3 of button "File" of group "menubar 1" -->Student
   disable menuItem 4 of button "File" of group "menubar 1" -->Adult
   enable menuItem 5 of button "File" of group "menubar 1" -->Student
   disable menuItem 6 of button "File" of group "menubar 1" -->Adult
end preopenCard

I understand why the script doesn't work because I am not opening a card
when I open a file. This is verified when I go back through the file and
then come back to the card. The menuitems are disabled as expected.  I don't
have a clue how to handle this problem! So, script suggestions will be
welcomed with open arms!
-- 
View this message in context: http://runtime-revolution.278305.n4.nabble.com/Unique-problem-tp2303870p2303870.html
Sent from the Revolution - User mailing list archive at Nabble.com.



More information about the use-livecode mailing list