my client would like to ‘lock’ a form, under certain circumstances.
my first thought was to just disable all the fields on the form,
but there are actually several forms (8 at the moment) and
most of them have a lot of fields; so i’ts starting to turn into
a big job.
could anyone suggest a way to lock out all the fields on a specific form
with “one fell swoop”, while still allowing the user to view the
data in the fields?
I believe the built-in security options are granular down to forms, fields, and tables, although I have not fully tested them. Try going to Tools/Security and setting up user accounts with the security limitations you need.
that sounds like it might do the trick, but it’s not in my list
of methods in the method editor.
i’m running b276, and can’t change right now (because the
project is late and the client is testing, and we don’t have
any spare time in our schedule). is the readOnly() method
somethat that was added after build 276?
IT2BE:
I can’t think of any reason why you can’t use 2.0…
i tried once, a month ago to upgrade to a newer version of servoy, and
was unalble to open my solution. i didn’t have (and still don’t have) time
to work with it yet, since we’re so overdue on this project.
i’ll bet i’m missing out on a lot of great new features!
that sounds like it might do the trick, but it’s not in my list
of methods in the method editor.
my mistake! it’s there as a property; i was looking for it as a method.
now, it seems to do exactly what i want, but with one problem:
some of the items on my forms, a few comboboxes, don’t actually
get disabled when setting the controller to readonly;
the behavior is very strange; when setting the readonly property,
a few of the combos change in appearance from having two arrows,
one pointing up and one pointing down, to having just one arrow
pointing down; and, they’re not disabled!
now here’s something even more strange: i just copied and pasted one
of these combobox fields, and switched back to “run” mode, and the
copied version works perfectly! but the original does not.
i keep thinking of servoy versions in terms of build numbers;
i’m currently using build #276.
when you say “use RC2” or something like that, how does that
translate into a build #?
and, does anyone know if this problem with combos can be worked-around?
i need to deliver something with the ‘disabled’ feature in place in
a few days, and i have to find a way to make this work reliably.
well, your build/version issue is something I can’t help you with.
What you can do with the combo’s is see what happens with controller.enabled instead of controller.readonly.
Other than that Jan Aleman posted somewhere a loop (don’t know where and when anymore) that showed how to do that conviently with elements[index].readOnly…