Hey Chris,
thanks for your reply.
But unfortunately the "getName" was just an example.. I have various
getters like getSalutation, getZipcode and so on and the problem is
occuring throughout them all.
Just to clarify: I'm not using any properties! the getter returns the
values of the textfields directly and the names of the textfields are
exactly the same in both of the navigationpage-classes. But they are all
marked as private (__variableName).
2014-02-03 Christopher Zündorf <[email protected]>:
> Hi Tobias,
>
> i think it is because the property "name" of the mobile Widget:
>
>
> http://demo.qooxdoo.org/current/apiviewer/#qx.ui.mobile.core.Widget~getName!method_public
>
> Just give you property and getter a different property name, and
> everything should work fine.
>
> And: Please make sure to call this.base(arguments) inside your
> NavigationPage's constructor.
>
> Greetz Christopher
>
>
> Am 03.02.2014 um 09:59 schrieb Tobias Roeder <[email protected]>:
>
> Hello folks,
>
> everything that follows is regarding qooxdoo mobile 3.5
>
> I'm facing a rather weird problem at the moment and therefore I would
> need some help.
> I have 2 qooxdoo classes.. One with a registration form and another one
> with a "myData" form, which is displaying the personal data of a already
> registered user.
> Both of these classes have textfields and other formelements (declared
> private with __name) with the same names! Normally, to my understanding,
> not a problem.
> When i initialize these form elemente in both objects, i use "__name = new
> formelement(); "(formelement being a textfield, button, label etc..
> standard qooxdoo classes).
>
> Now i noticed, that when i create my objects, and call the getter for,
> lets say, the phone number, i only receive the value of the last
> initialized object.. no matter whose getter I call..
>
> To make this a little clearer:
>
> __registrationPage = new myproject.views.registrationPage();
> __myDataPage = new myproject.views.myDataPage();
> (both of them being own classes extending NavigationPage)
>
> __registrationPage.initialize();
> __myDataPage.initialize();
> (making the view available before calling the .show() method)
>
> __registrationPage.getName(); <-- returns the value of the textfield
> name in MYDATA-PAGE, which is just WRONG
> __myDataPage.getName(); <-- returns the value of the textfield name in
> MYDATA-PAGE, which is correct.
>
> The getters aren't standard property getters, but selfcoded getter which
> return the value of the corresponding private textfield of the
> navigationpage.
>
> I figure i might have to declare the instance variables differently..
> maybe involving the THIS operator somehow? I just cant seem to find the
> correct way..
>
> Somewhere along the line qooxdoo overrides the (to my understanding
> private) variables and doesnt treat them as two different things (which
> they were supposed to be).
>
> I'm most likely going to use properties for this particular matter to
> avoid the problem but it worries me that I am obviously declaring instance
> variables in a wrong way, since they are overridden no matter what class
> they belong to.
>
> Any ideas? It is most likely just a small alteration...
> Thanks in advance!
>
>
> Greetz,
> Tobias
>
>
> ------------------------------------------------------------------------------
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk_______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
>
>
> ------------------------------------------------------------------------------
> Managing the Performance of Cloud-Based Applications
> Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
> Read the Whitepaper.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121051231&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel