Page 1 of 1

Hiding info from users

Posted: Mon Mar 26, 2012 5:19 am
by AtoZ
I currently have some raw data stored on the last card of a stack I'm creating. The data is needed for the stack to work properly, but I do not want the user to be able to see or access it.

My first thought was that I would simply hide the card -- but apparently this is not possible in LiveCode -- in spite of the fact that the Dictionary entry for "visible" says the command applies to cards as well as stacks and objects.

I've thought of two alternatives:
  • I could move the data to a sub-stack that can be hidden (I believe).
OR
  • I could put the data on a card that I'm currently using for other purposes (such as a Title Card) and hide all the fields there. (While developing the stack, I would probably add a small temporary button that would to toggle between the info fields and whatever else is normally on the card.)
But I'm hoping that someone might have a better suggestion, or at least some thoughts on which of the two above alternative I should pursue.

Thanks in advance for your consideration.

Re: Hiding info from users

Posted: Mon Mar 26, 2012 9:22 am
by Dixie
Put your 'data' into a custom property... set the visible of the field that holds the 'data' to false...

Re: Hiding info from users

Posted: Mon Mar 26, 2012 3:11 pm
by AtoZ
Thanks, Dixie, for your excellent suggestion.

Yet another possibility has occurred to me, namely that one could essentially hide cards by not providing the user any way of navigating to them. This approach would require taking control of the navigation items in the menu (or blocking them completely). The same would apply to keyboard shortcuts. Does anyone see any problem with this approach (other than the extra time and effort required to implement it)?

Re: Hiding info from users

Posted: Mon Mar 26, 2012 3:55 pm
by Klaus
Hi AtoZ,

problems except the extra time and effort required to implement it?
No, just unneccessary work!

Use hidden fields or custom properties, believe us, we know what we're doing! :D


Best

Klaus

Re: Hiding info from users

Posted: Mon Mar 26, 2012 5:22 pm
by jacque
Also bear in mind that it is much slower retrieving data from a field than from a custom property. I go with the property in almost every case.