I think you missed Thomas' post. You *CAN* keep your variables private, its just you have to use a different linker. Its just a minor change to your gwt.xml, and with that your entire script will be private.
-Sri On 18 June 2010 20:04, Shedokan <[email protected]> wrote: > So i'll guess I'll have to make my app completley in javascript, I > hope that someday in the future GWT would allow things like this. > In javascript it is possible to have a completley private variable, > like so: > > myApp = function(){ > var privateVariable = "private"; > > // Setter and getter > this.setPrivate = function(var){ > privateVariable = var; > }; > > this.getPrivate = function(){ > return privateVariable; > }; > }; > > and as far as I know there is no way to access the privateVariable > unless your'e using something that is not javascript. > > Well, thanks anyway. > > > On 17 יוני, 20:31, Stefan Bachert <[email protected]> wrote: > > Hi, > > > > probably not, I am quite sure that there is a way using (native) > > JavaScript. > > > > However, as long you only code in Java effectively it isprivate. > > And remember, even in Java it is possible to accessprivatevar from > > outside. > > Some OR-mapper doing so. Or your debugger. > > > > When your question is about security, never ever dream about that > > anything is secure in your browser code. > > Anything you give to a browser is open, at least for a professional. > > > > Stefan Bacherthttp://gwtworld.de > > > > On Jun 16, 11:23 am, Shedokan <[email protected]> wrote: > > > > > Hello, > > > I am looking at GWT's features and can't figure out weather a variable > > > declared in java asprivatewill stayprivateonce compiled in GWT. > > > ByprivateI mean unaccessible to anyone except for the constructor or > > > the construtors functions. > > > > > Thanks. > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-web-toolkit%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
