Best Practices for ControlDelegates and ComponentDefinitions
I'm fighting to use ControlDelegates and ComponentDefinitions. My problem with ControlDelegates is that all actions must be attached to the page. Delegate control is also attached to the page for any function names or id in the page loaded qml are lost to you because of the scope.
So I thought to use just ComponentDefinition load but won't have a chance. Here is my code, I am using:
NavigationPane { id: navPaneid Page { id: pageid Container { id: rootContainer attachedObjects: [ ImagePaintDefinition { id: backgroundPaint imageSource: "asset:///images/Tile_nistri_16x16.amd" repeatPattern: RepeatPattern.XY } ] Label { id: labelID text: "test" } } onCreationCompleted: { cd_testshow.delegateActive = true cd_slidetip.delegateActive = true var createdControl = compDef.createObject(); pageid.add(createdControl);// navPaneid doesn't have any effect either } actions: [ ActionItem { id: playid title: "Play" ActionBar.placement: ActionBarPlacement.OnBar onTriggered: { navPaneid.push(testshow) } imageSource: "images/playimage.png" objectName: "Play" }, ActionItem { title: "Quit" ActionBar.placement: ActionBarPlacement.OnBar onTriggered: { navPaneid.push(slidetip) } imageSource: "images/xdarkimage.png" }, ActionItem { title: "CompDef" ActionBar.placement: ActionBarPlacement.OnBar onTriggered: { navPaneid.push(compDef) // Nothing happens } imageSource: "images/xdarkimage.png" } ] } attachedObjects: [ Page { id: testshow objectName: "testshow" ControlDelegate { id: cd_testshow source: "testshowPages/testshowCont.qml" delegateActive: false } actions: [ ActionItem { title: "Hyperout" ActionBar.placement: ActionBarPlacement.OnBar onTriggered: { animslide.hyperout() } imageSource: "images/stamps/Columbus_Thumb.png" }, ActionItem { title: "Change" ActionBar.placement: ActionBarPlacement.OnBar onTriggered: { } objectName: "Change" } ] }, testshowPage { id: slidetip objectName: "slidetip" }, ComponentDefinition { id: compDef source: "testshowPage.qml" } ] }
I have 3 buttons on the page to try all 3 methods. The method of testshowPage but I lose the benefits of preloading everything. The ControlDelegate method does not work because it does not recognize the animslide variable - located at testshowPage.qml. I can't get the componentDefinition to work. Not sure if I tie properly.
Here is a piece of code that works - pages allowing you to dynamically push load both a Menu and an action bar.
import bb.cascades 1.0 //-- introduce custom C++ object registered in app.cpp NavigationPane { id: navPaneid Menu.definition: MenuDefinition { // Add a Help action helpAction: HelpActionItem { // do something there onTriggered: { } } actions: [ ActionItem { id: play1id title: "Play" onTriggered: { var page = getSecondPage(); console.debug("pushing detail " + page) navPaneid.push(page); } imageSource: "images/playimage.png" objectName: "Play" } ] } Page { id: pageid Container { Label { text: "testing" } } actions: [ ActionItem { id: playid title: "Play" ActionBar.placement: ActionBarPlacement.OnBar imageSource: "images/playimage.png" objectName: "Play" onTriggered: { var page = getSecondPage(); console.debug("pushing detail " + page) navPaneid.push(page); } } ] } property Page secondPage function getSecondPage() { if (! secondPage) { secondPage = secondPageDefinition.createObject(); } return secondPage; } attachedObjects: [ ComponentDefinition { id: secondPageDefinition source: "DetailsPage.qml" } ]}
Tags: BlackBerry Developers
Similar Questions
-
Best practices for storage and backups on internal and external drives
Hello
I have a Mac laptop and I would like your advice on how to organize the storage of files on internal and external drives and how optimizes it the backup plan.
From now on, my organization of file storage is:
I keep my most important files on the internal disk of SSD encrypted and less critical files on an encrypted external drive (format ExFAT). This external hard drive was errors, so I bought a new Laetitia 2 Tb drive that I formatted in Mac OS journaled with encryption instead of ExFAT, to replace.
For backups, I do not use Time Machine, but I use an application that synchronizes files between two disks. By using this application, I first sync the essential document on the SSD files internal to the external drive, and then I synchronize all the external drive to another external drive.
My question is, if I keep this Organization of file storage or I should, for example just move all my files, critical and non-critical for the internal SSD (I could make enough room for that) and then backup up the whole Mac with Time Machine? Or there is a better way to organize files in this scenario?
The second question is, if it is better to keep the Organization as it split storage (internal, less critical on external criticism) is what would be the best way to back up everything?
Thanks in advance for all contributions.
First of all, to the ExFAT is the problem, I suggest that the reader will just physically hurt. ExFAT is perfectly acceptable as a format where Mac and PC can read/write. You may have reacted a little leaving ExFAT for HFS, but you have made your choice and adapts to it.
Here is how I operate my backups:
I use CCC (CarbonCopyClone, $40, bombich.com). It copies the boot sectors, drive, mapping, recovery Partition (these three are 'invisible' to DiskUtility for most) as well as system partitions and data records 'other'. These other disks may be internal for clone-to-test-new-OSX in multi-disc systems or external for backup purposes. The beauty is that you can start an external clone in a system crash, then CCC will be re - copy the active external clone on a new/fixed internal drive.
Encryption isn't something I know, but... If only the content of the system partition and data is encrypted, it * could * be OK for clone-back to partition-as-encrypted partitions. If you clone internal external the external partition is active and copy the 'encrypted plan', while small adjustments are made so that the race could be bad. Copy of the files on my partitions unencrypted change interrupt because they are individual files.
As an alternative, you could have a system drive that does CCC charge, let the clone encrypted and encrypted internal idle and just copy the entire map with the 'third system' active.
-
best practices for OBIEE and Bi Publisher?
Hello
1. What is the best way to implement BI Publisher with OBIEE?
2 is it better to instal Bi Publisher on OBIEE servers group or keep in a separate machine and integration with clustered servers?
3. the intended use of OBIEE is areas of the RPD as well as our other databases. Are there licensing issues for installing BI Publisher on a separate machine?
Thank you.BI Publisher is a license no matter where use you it outside of the EBS, either as stand-alone or bolted in OBIEE. A benefits of the independent, it's that you can use against any source of data/database.
http://www.Oracle.com/corporate/pricing/technology-price-list.PDF
-
Best practices for backup and restore
Hello!
I couldn't find any recommended official VMware to backup/restore the components of vCenter: vCenter, SSO, Update Manager, heartbeat...
Anyone provide any doc where it should be mentioned?
Thank you.
Discover this for SSO. VMware KB: backup and restore of the configuration of VMware vCenter Single Sign-On 5.5
Thank you
DJ
-
HTML and CSS best practices for Eloqua?
Hello Topliners community,
My name is Ben and I am a Web Designer. Currently looking for guidance on best practices in HTML and CSS when you work with Eloqua. I am interested in best practices for email and landing pages.
Thank you
Ben
For landing pages, you can use a bit of HTML, CSS, and Javascript like on any other page. For example, we use the Bootstrap on a couple of our Eloqua landing pages.
Support for HTML and CSS is much more limited. It is one of the best resources I've seen for CSS support:
-
Best practices for vsphere 5.1
where can I find the doc more up-to-date about berries EQL configuration / best practices with vmware vsphere 5.1
Hello
Here is a link to a PDF file that covers best practices for ESXi and EQL.
Best EqualLogic practices ESX
en.Community.Dell.com/.../20434601.aspx
This doc mentions specifically that the storage Heartbeat VMKernel port is no longer necessary with ESXi v5.1. VMware has corrected the problem that made it necessary.
If you add it to a 5.1 system it will not hurt. It will take an IP address for each node.
If you upgrade 5.0 to 5.1, you can delete it later.
Here is a link to VMware which addresses this issue and has links to other Dell documents which confirm also that it is fixed in 5.1.
Kind regards
-
best practices for backup of bi
Hello
Who can suggest me best practices for backup and restore of dashboard reports integer bi, permissions and etc.?
Ed,Hello
If you want to move entire dashboards, reports, permissions
Zip the *Web / catalog folder and move new environment. In new relax unwind this catalogue and Instanceconfig.xml mention the path for this new catalogue. If you want to move a few reports or dashboads, do so by Catalog Manager.
Thank you.
-
Thank you for taking the time to read this. I would like to know the "best practices" for unplugging my computer permanently to the internet and other updates. I thought I would do a clean install of Windows XP, install my Microsoft Works again and nothing else. I would like to effectively transforming my computer into a word processor. He continues more and more slow. I get blue screen errors, once again. I received excellent Microsoft Support when it happened before, but since my computer is around 13 years, I think it is not worth the headache to try to remedy. I ran the Windows 7 Upgrade Advisor, and my computer would not be able to upgrade. Please, can someone tell me how to make it only a word processor without updates or internet connection? (I already have a new computer with Microsoft Windows 7 Home Premium, it's the computer that I use. The old computer is just sitting there and once a week or so I updates.) I appreciate your time, thank you!
original title: old computer unstablehttp://Windows.Microsoft.com/en-us/Windows-XP/help/Setup/install-Windows-XP
http://www.WindowsXPHome.WindowsReinstall.com/sp2installxpcdoldhdd/indexfullpage.htm
http://aumha.NET/viewtopic.php?f=62&t=44636
Clean install XP sites
You can choose which site to reinstall XP.Once it is installed, then you do not have to connect what anyone, however, some updates may be required to perform the work, test this by installing work and see if you get an error msg. Except that you should be fine.
-
Best practices for managing exceptions and success messages.
Hey people,
These days I've been shooting packages to clean my application. And question came to my mind, ' should I treat my exceptions the right way?
So I want to ask you met guys, what is the best practice for this? (I want to learn it until it's too late )Currently I have a function that returns "OK" if all goes well.
return('OK');
Can I manage my exceptions like this
EXCEPTION WHEN OTHERS THEN ROLLBACK; RETURN (SQLERRM);
At THE SUMMIT, I have a process that calls the function and then checks if the function returned "OK".
IF cRet not LIKE 'OK%' THEN RAISE_APPLICATION_ERROR(-20000,cRet); END IF;
And in 'process Error Message' I put "#SQLERRM_TEXT #" so that I can see what error occurred.
Question aside, how do you manage your messages of success?
Currently in 'process success Message' put something along the lines "Action completed successfully". What to do about all the processes.
Do you want to do differently?
I really want to hear what you have to say since I'm tired of feeling like this is a terrible way to manage these things.
Hi Para,
Para wrote:
I don't know of situations where my service throw exceptions like no_data_found.
and I need to know that the process is not so I can get to see my # #SQLERRM_TEXT.
I got this by increasing the error in the application (which I think is a bad way to go) if the return is anything other than 'OK '. I get my application error in the process of the apex, and not in my service.
And I want to show the inline error in the notification. (Which I am currently with my approach).You can use APEX_ERROR. ADD_ERROR in your PL/SQL process to throw exceptions in Oracle APEX.
Reference: Re: Re: error in the processing of the page management
Kind regards
Kiran
-
What are the best practices for creating only time data types, and not the Date
Hi gurus,
We use 12 c DB and we have a requirement to create the column with datatype of time only, if someone please describe what are the best practices for the creation of this.
I would strongly appreciate ideas and suggestions.
Kind regards
RanjanHello
How do you intend to use the time?
If you are going to combine with DATEs or timestamps from a other source, then an INTERVAL DAY TO SECOND or NUMBER may be better.
Will you need to perform arithmetic operations on time, for example, increase the time to 20%, or take an average? If so, the NUMBER would be preferable.
You are just going to display it? In this case, DAY INTERVAL in SECONDS, DATE or VARCHAR2 would work.
As Blushadow said, it depends.
-
What is the best practice for a 'regular' Server VMware and VDI environment?
What is the best practice for a "regular" VMware Server and VDI environment? A single environment (ESXi and SAN) can accommodate two if it is a whole new configuration? Or even better to keep separate?
Enjoying inputs.
Quick and dirty answer is that "it depends."
serioulsy, it depends really two things budget and IO. If you had the money for two without then buy two and don't have to host your server environment and the other for VDI desktop, their IO profiles are completely different.
If this is not the case, try to keep each type of use for their own dedicated LUN.
-
best practices for the storage of the vm and vhd
no doubt this question has been answered not once... Sorry
I would like to know the best practice for the storage of the vm and its virtual hard disk to a SAN.
Any show advantage does make sense to keep them on separate LUNS?
Thank you.
It will really depend on the application of the virtual machine - but for most of the applications no problem by storing everything on the same data store
-
I'm using an EOS 7 d for 1080 p HD video shooting. New to SLR camera and digital video. I have watched several tutorials but do not yet have a good understanding of what the best practices for the development.
If I put the camera in AI Servo it will auto focus if the subject is moving away or toward me with depress me back AF-ON or the shutter button? Or should I press one of these buttons to make the camera continues to focus?
You know tutorials or video lessons that cross using update with the video?
Thanks in advance!
I don't know any tutorials, but more serious videographers say it is best to use only the manual focus.
Trial and error is a good teacher, when it comes to video DSLR. You'll quickly learn that video Auto Focus is really bad with the 7 d and most of the people do not use it all together.
The method that works for me is to use AF before the filming of the video and then adjust manually if you want to you to shoot the video. With the help of f/8 or f/11 to keep everything in short without having to keep the setting.
More recent Canon DSLR's like the T4i, T5i, 70 d and SL1 have a "hybrid AF" that does a much better job of AF during video, but it is not yet as good as a camcorder
-
HP stream 11-d008tu: best practices for migrating to Windows 10?
Hey there, I have a HP flow 11-d0008tu and received the notification I can upgrade to Windows 10. I want to do a clean install with a downloaded ISO but knowledge first of all, it is better to upgrade so that you get the activation done.
Can someone give me some ideas on best practices for the upgrade? The stream has only 30GB HD so I have no recovery disk, I'll just do a recovery later on USB or SD card. When I do the upgrade can deselect recovery option or delete?
Also, any other suggestions appreciated, especially which helps make effective for small HD
See you soon
Hi, I posted an installation procedure for Windows 10 fresh for the Tablet HP Stream here. Also, I have a laptop 11 flow but do not have that yet. I think it must be the same because they both the same drive of mem 32 GB Hynix. A change would you probably want to use the 64-bit instead of 32-bit Windows 10 ISO file, the Tablet has only 1 GB of RAM.
-
Just improved m tips on best practices for sharing files on a Server 2008 std.
The field contains about 15 machines with two domain controllers, one's data is the app files / print etc... I just upgraded from 2003 to 2008 and want to get advice on best practices for the establishment of a group of file sharing. Basically I want each user to have their their own records, but also a staff; folder. Since I am usually accustomed to using windows Explorer, I would like to know if these actions can be done in the best conditions. Also I noticed on 2008 there is a feature of contacts. How can it be used? I would like to message or send an email to users their file locations. Also, I want to implement an admin at a lower level to handle the actions without making them far in on the server, not sure.
I read a certain bbut I don't like test direct more because it can cause problems. So basically a way short and neat to manage shares using the MMC, as well as the way that I approach their mail from the server of their actions. Maybe what kind of access cintrol or permissions are suitable also for documents. Also how can I have them use office templates without changing the format of the model.
THX
g
Hello 996vtwin,
Thank you for visiting the Microsoft Answers site. The question you have posted is related to Windows Server and would be better suited to the Windows Server TechNet community. Please visit the link below to find a community that will support what ask you:
http://social.technet.Microsoft.com/forums/en-us/category/WindowsServer
Hope this helps J
Adam
Microsoft Answers Support Engineer
Visit our Microsoft answers feedback Forum and let us know what you think
Maybe you are looking for
-
G2 600 SFF: Question on Windows 7 Pro + license 600 G2 LTS Pro Windows 10
Hi, I recently bought a 600 SFF G2 which was provided with Win7 - 64 Pro, but which was supposed to include a license to win 10 Pro. The device comes with a DVD of Win7 and a HP DVD driver, but instead of a Win10 DVD or license, they included a phamp
-
Problems with multiple worksheets XY plotting (program generates repeated data)
Hello I want to make a small program that will reduce the amount of time to go forward with the measurement data. I get data into .dat format, where all the files consist of frequency measurement with an X and a Y column. The problem is that I made 4
-
HP Pavilion notebook e117dx 17: PC runs is not on and isn't showing any signs of slot voltage
Hey all! It's my first day here, so I apologize if my question format is incorrect. The other day, my laptop does not turn on and showed no sign of slot voltage. I contacted customer support, and the issue has been resolved. That night, I closed the
-
How can I change the username for my windows?
How can I change the username
-
I uninstalled Norton, and since then I can't go to Internet. There is an error code 31 for Teredo Tunneling and I can't reinstall / restart the driver. You have the problem with the default gateway after diagnosed. Please help.