NavigationPane - why is this going to work?
I'm frustrated by NavigationPane do not behave as I would expect when you press the pages of recursively. I have three files QML. MyNavPane.qml, MyFirstPage.qml, and MySecondPage.qml, and suppose that MyFirstPage.qml looks like this:
Page { property NavigationPane mainNavPane attachedObjects: [ MySecondPage { id: mySecondPage } ] function pushSecondPage() { mainNavPane.push( mySecondPage ); } }
.. .While that MyNavPane.qml is as follows:
NavigationPane { id: myNavPane attachedObjects: [ MyFirstPage { id: myFirstPage mainNavPane: myNavPane } ] function pushFirstPage() { push( myFirstPage ); } }
Now the execution of pushFirstPage() works fine and pushes the first page in the navigation stack, however, pushSecondPage() runs without error, but the second page is not pressed. Debugging indicates that mainNavPane correctly to the main NavigationPane.
If I change MyFirstPage.qml to this:
Page { property NavigationPane mainNavPane function pushSecondPage() { mainNavPane.pushSecondPage(); } }
... and MyNavPane.qml to this:
NavigationPane { id: myNavPane attachedObjects: [ MyFirstPage { id: myFirstPage mainNavPane: myNavPane }, MySecondPage { id: mySecondPage } ] function pushFirstPage() { push( myFirstPage ); } function pushSecondPage() { push( mySecondPage ); } }
... it works as expected.
I tried to do that too, but that didn't work either, the second page has not pushed, but no error was reported:
Page { property NavigationPane mainNavPane attachedObjects: [ MySecondPage { id: mySecondPage } ] function pushSecondPage() { mainNavPane.pushPage( mySecondPage ); } } NavigationPane { id: myNavPane attachedObjects: [ MyFirstPage { id: myFirstPage mainNavPane: myNavPane } ] function pushFirstPage() { push( myFirstPage ); } function pushPage( page ) { push( page ); } }
Why only the second method, where the two sheets to be pushed to the NavigationPane itself works, while the other two don't? What Miss me?
UPDATE: I decided that I needed to know if change the parent of the page to be pushed would work, and it does!
The first thing I had to do was make a way to change the parent of a QML object, which you can not do normally. I created a new function Q_INVOKABLE on my main user interface class, called changeParent():
void MyApp::changeParent( QObject* object, QObject* newParent ) { object->setParent( newParent ); }
Then, I changed the function pushPage() in one of my previous examples:
Page { property NavigationPane mainNavPane attachedObjects: [ MySecondPage { id: mySecondPage } ] function pushSecondPage() { mainNavPane.pushPage( mySecondPage ); } } NavigationPane { id: myNavPane attachedObjects: [ MyFirstPage { id: myFirstPage mainNavPane: myNavPane } ] function pushFirstPage() { push( myFirstPage ); } function pushPage( page ) { app.changeParent( page, myNavPane ) push( page ); } }
... and now the page pushes perfectly, even though he did not initially belong to the NavigationPane. I also tried to change the parent to zero and that works too, but I felt more comfortable never leave the page hanging out without a parent. Memory leaks can be insidious.
I also tried to change the parent in creationCompleted Manager, but that properly compiled it screwed up of access to the MySecondPage object in other code. Since mainNavPane have a value during execution of the creationCompleted Manager, QML am confused and thought that mySecondPage no longer exists when I put this code:
Page { property NavigationPane mainNavPane attachedObjects: [ MySecondPage { id: mySecondPage onCreationCompleted: { app.changeParent( mySecondPage, mainNavPane ) } } ] function pushSecondPage() { mainNavPane.pushPage( mySecondPage ); } }
Change this to set the new parent to zero instead of mainNavPane works but is dangerous since mySecondPage will be orphaned until you call pushSecondPage at least once. If you run never push that will leave you mySecondPage when you destroy What's new, which is a memory leak.
Of course, you can do it instead:
Page { property NavigationPane mainNavPane attachedObjects: [ MySecondPage { id: mySecondPage } ] onMainNavPaneChanged: { app.changeParent( mySecondPage, mainNavPane ) } function pushSecondPage() { mainNavPane.pushPage( mySecondPage ); } }
in this case you need not change the parent again whenever you press the page, probably a better solution.
Anyway, thanks again for pointing me in the right direction and I hope that it will be useful to others.
Tags: BlackBerry Developers
Similar Questions
-
I have Sony Ericsson Xperia X 10 mini and WOULD like Firefox Mobile on it. However, for now, Firefox is only compatible with the Xperia X 10. Why is this and it will be fixed?
This is due to the processor that uses the X 10 mini. Mobile Firefox requires a processor that supports the ARMv7 architecture, but the processor in the X 10 mini supports ARMv6 architecture.
For some time Mozilla developed a version which worked on processors who use ARMv6, but currently stopped because there were bugs that caused his accident ever. Mozilla peut start developing for ARMv6 processors once again, but right now they are not actively working on it.
-
I copy student PS CS6 which works fine except when I'm disconnected from online, why is this and what can I do to make this work if the connection is lost. In addition, everything will work OK if I update to Windows 8 for windows 10?
Yes, Photoshop should work fine without the internet connection, as this is the standalone version.
-
When I am in fact and I play my video is going really slow why is this and how to fix that?
When I am in fact and I play my video is going really slow why is this and how to fix that?
You've probably used uncompressed default rendering parameters.
FAQ: What is the best format for rendering and exporting from After Effects?
FAQ: Why my huge output file, and why didn't he play back smoothly in a media player?
-
I have creative cloud. The Acrobat Reader will convert my PDF to Docx. Why is this? How can I gewt it works again?
You write that you have creative cloud. Which means that you have Acrobat Pro installed.
Use Acrobat Pro to convert, not Adobe/Acrobat Reader.
-
I subscribe to the student package and I also received a confirmation SMS saying that the sum was deducted. But when I connect through creative cloud, it shows that I'm still working on a trial version. Why is this?
Log, activation, or connection errors. CS5.5 and later, Acrobat DC
Mylenium
-
Why is this work not running?
Why is this work not running?
This work follow these steps:SQL> BEGIN 2 DBMS_SCHEDULER.RUN_JOB('EXCHANGE_PART_JOB'); 3 END; 4 / BEGIN * Error in line 1: ORA-00911: invalid character. ORA-06512: in "SYS.DBMS_ISCHED", line 150 ORA-06512: in "SYS.DBMS_SCHEDULER", line 441 ORA-06512: in line 2
Use the following program:CREATE OR REPLACE PROCEDURE Exchange_Partition IS Sql_Exchange VARCHAR2(2000); BEGIN Sql_Exchange := 'ALTER TABLE HR.GPS_LOG_HIS EXCHANGE PARTITION '|| 'udp_part'||TO_CHAR(SYSDATE-1/24,'YYYYMMDDHH24') ||' WITH TABLE HR.GPS_LOG'; EXECUTE IMMEDIATE Sql_Exchange; END; /
Use the following code to create the work:BEGIN DBMS_SCHEDULER.create_program ( program_name => 'exchange_part_prog', program_type => 'STORED_PROCEDURE', program_action => 'EXCHANGE_PARTITION', --Use a database directory to replace the OS directory. number_of_arguments => 0, enabled => TRUE, comments => 'Program to exchange partitions for hr.gps_log_his table or other tables use a shell script.'); END; /
BEGIN DBMS_SCHEDULER.create_job ( job_name => 'exchange_part_job', program_name => 'exchange_part_prog', schedule_name => 'exchange_part_hourly_schedule', enabled => TRUE, auto_drop => false, comments => 'Job defined to exchange partitions for gps_log_his table or orhter tables.'); END; /
Ok
ORA-14099: all rows in the table are not eligible for the specified partition
Cause: There is at least one line in the non-partitioned table which does not qualify for the partition specified in the PARTITION of EXCHANGE ALTER TABLE
Action: Ensure that all the lines in the segment qualify for the partition. Perform the operation table alter with the NO CHECK option. Run ANALYZE table VALIDATE on that partition, namely the invalid rows and delete them.I think you should check the data in gps_log, some lines must belog to another partition?
Concerning
Peter -
Why doesn't my password work?
I signed up for an account in the last 30 minutes. I chose a password and confirmed. Then I went to the Android store to download Firefox for Android on my phone - and it has worked successfully. But when I tried to login, my password was rejected. I checked to make sure it was the same thing, and it is. Why doesn't my password work? Oh, and it is 9 characters long with two digits.
In addition, I tried to change my password of Firefox on my desktop PC to be rejected for the same problem. So I can't even change my password (it takes the old password).
Password for what?
This forum?
The synchronization service account of Firefox?
Or? -
I'm trying to follow the instructions of the Firefox Help. Step 2 to import bookmarks is to select the option "Import data from another browser" in history-library-import and backup. However, this option is grayed out for me and I can't select it. Why is this grayed out? How can I make this?
Make sure that you do not use Firefox mode of private - browsing using Firefox without saving history .
- To view the history settings and cookies, choose: Firefox > Options > privacy, choose the setting Firefox will: use the custom settings for the story of
- : Uncheck the [] "always use the private browsing mode.
Now do-> Import Favorites to Internet Explorer
Check and tell if its working.
Not related to your problem, but your Plugins are out of date
- Update all of your Firefox Plugins-> https://www.mozilla.org/en-US/plugincheck/
- During the installation of the Plugins download files hotfix, remove the check mark to download any other software options with your Plugins (for example, toolbars, McAfee, Google Chrome, etc.)
-
X3650M5 does support stop automatically if this server has worked in the temperature of overheating?
Hello
Basically, Yes to your question.For more details;
IMM2 Web GUI access via browser and see environmental specifications tab in the server properties menu.
There are two types of threshold, "Higher criticism" and "upper Fatal".If goes on "Higher criticism", then a soft stop will be initiated, where the next depends on your operating system of his behavior causing shutdown graceful or not progressive.
If more higher jumps "Upper Fatal", then a hard stop will be engaged, which is not a normal shutdown of the typical operating system perspective.Kind regards
-
My phone won't let me download music on the cloud, it says I have to wait 25 days until I can download and listen to it, why is this? It makes me very angry.
Looks like you were using a different iTunes on that account the iPhone and now you UM wait to use another. This is how it works if you try to use different accounts.
Is that what happened?
-
HP Deskjet 1010: Why HP 61xl will not work in HP dj1010?
Why the HP61xl does not work in my printer HP1010?
The HP SureSupply site here says the right cartridge for the 1010 Deskjet is 61, it seems that this printer does not support the 61xl.
-
Why used my lifecam vx5500 work? XP - sp3 and ati 2400
Why used my lifecam vx5500 work? XP - sp3 and ati 2400
Hello
1 how long have you been faced with this problem?
2. don't you make changes on the computer before this problem?
3. do you get an error message?Step 1: Try to run the fix it tool to the article below and check.
Hardware devices do not work or are not detected in Windows
http://support.Microsoft.com/mats/hardware_device_problems/Step 2: Download and install the drivers for the webcam using the link below.
Drivers, software and documentation of your product
http://www.Microsoft.com/hardware/en-us/d/LifeCam-VX-5500 -
I have Microsoft Windows Vista Home premium, Version 6.0 (Build 6002: Service Pack 2), was Norton Internet Security. Cursor autour breaks and clicks in the Middle words or a page, when you type, selects areas of the document when writing and by typing the following key, all this goes away. Perhaps because of my attempts to resolve this issue, some of my PC system has had problems, it became unstable, I've had several accidents that I got Norton 360, but it don't did me not the solution and stops working, I re installed Norton Internet Security. Please give some answers and advice on how to solve this problem, thank you.
Hello
You use a desktop or laptop computer?
Is the mouse a mouse wired or wireless?
What is the brand and model of the computer and the mouse?
If you are using a laptop, I suggest to change the sensitivity of the mouse pad.
If this is a wireless mouse it might be interference from another close to the mouse. Make sure that speech recognition is not enabled.
-
Why CRYSTAL_REPORT program does not work with windows Vista? __
Why CRYSTAL_REPORT program does not work with windows Vista?
http://www.Microsoft.com/Windows/compatibility/Windows-Vista/default.aspx
Windows Vista Compatibility Center
First thing to do is to check its Vista compatibility at the link above, and if not to see what patches/solutions are available from its manufacturer...
http://www.howtogeek.com/HOWTO/Windows-Vista/using-Windows-Vista-compatibility-mode/
If this is not Vista compatible, read the info on the link above.
It works for some programs, but not all.This applies to software programs, NOT hardware drivers.
If it's Vista compatible > uninstall it > Re-download/save to your desktop > right click on the setup.exe > run as admin.
See you soon.
Mick Murphy - Microsoft partner
Maybe you are looking for
-
Can I go down to 9 v? 10 v has too many bugs and security issues
the e-mail is accessible from the lock screen. Not sure! or private! Double tap to unlock does not. Repeatingly pressing the alarm can't she. Arrow upward into the Messaging key does not send the message. so many questions usung this version. How
-
How can I have 2 email accounts open at the same time using the apple mail icon?
How to open 2 e-mail accounts at the same time?
-
I get an unknown error while firefox is trying to synchronize. The newspaper is available at http://pastebin.mozilla.org/6474503 I have disconnected/reconnected, created a new profile, but the error persists. Thank you in advance!
-
I have windows xp, I keep getting alerts warnings that my anti-virus cannot be installed, I have the basics of microsoft security and it is up-to-date. How can I stop the alert message?
-
I have several updates to C++ and I was wondering if I could uninstall old updates without losing any additional protection? To be more clear, I ask if the latest updates cover everything that updates more older don't have / do?