Unique problem
charles61
cszasz at mac.com
Tue Jul 27 13:39:15 EDT 2010
Hi Bob,
That is a good idea but I don't know how to script this in the open file menu.
Charles Szasz
cszasz at mac.com
On Jul 27, 2010, at 1:35 PM, Bob Sneidar-2 [via Runtime Revolution] wrote:
> 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.
>
> Bob
>
>
> 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
> > [hidden email]
> > Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-revolution
>
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
> View message @ http://runtime-revolution.278305.n4.nabble.com/Unique-problem-tp2303870p2303890.html
> To unsubscribe from Unique problem, click here.
>
--
View this message in context: http://runtime-revolution.278305.n4.nabble.com/Unique-problem-tp2303870p2303898.html
Sent from the Revolution - User mailing list archive at Nabble.com.
More information about the use-livecode
mailing list