bobs at twft.com
Tue Jul 27 12:34:46 CDT 2010
Make the student files only accessible after going to the student section of the app. Do the same for the Adult files. (I assume you mean "Teachers").
Barring that, does your app actually do the opening? Then create a command that opens the file, determines if it is a student or "adult" file, and sets the menu's accordingly.
Without actually seeing the app, that's all I can offer. I don't think there is a system message that gets fired off when you open a file.
On Jul 27, 2010, at 10:16 AM, charles61 wrote:
> 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.
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the use-livecode