05-13-2012 07:03 PM
I'm new to Cascades/NDK/C++, I've looked through samples and documentation but haven't found what I want to do.
Our app consists of many "pages" / screens for data entry. I'd like to use the NavigationPane method, and have an easy way for the employee to jump to a specific page. For instance, tapping the Page List button, then the full menu slides from the side into view, they choose the page there.
What I'd like to do is have one file that holds all my action items so that each page just pulls from there for the More Info, or even the whole ActionItem bar. Is this even possible? Any suggestions on where to start?
Hope I made this somewhat clear...
Solved! Go to Solution.
05-15-2012 11:29 AM
You have looked at the sample apps - did you look at the stamp collector. This seems to be close to what you are trying to do - if you click on a stamp it brings up the page for that stamp.
Is this similar to what you are trying to do? If not can you provide more information.
05-15-2012 05:01 PM
Thanks for the reply!
I'll try to do what I can to clear this up a bit. I'm working on our app (see a bit more on it here). Essentially, once the employee has selected a client to work with, there are 25-30 screens that contain the information. This will fluctuate over time, more will be added to the list, maybe reorganized. The ideal way we want to do this is under the "More" option from the Navigation Pane.
What I'm trying to do is avoid adding excessive code to each qml file containing the full list of ActionItems. So I was looking to prevent something like this:
actions: [
ActionItem {
title: ""
},
ActionItem {
title: "Save"
},
ActionItem {
title: ""
},
ActionItem {
title: "Client Info"
onTriggered: {
navigationPane.deprecatedPushQmlByString("evaluati ons/traditional/ClientInfo.qml");
}
},
ActionItem {
title: "House Info"
onTriggered: {
navigationPane.deprecatedPushQmlByString("evaluati ons/traditional/HouseInfo.qml");
}
}
]
etc.... and instead do something like this in each file:
actions: actionItemArray.xml
with all the actionItems in the xml file. Then I don't have to recreate the ActionItems on 30 files every time they decide to change the order or add another one.
Hope this helps clear it up a bit!
05-16-2012 01:51 AM
perhaps take a look at the weatherguesser sample:
the main.qml has a TabbedPane with a WeatherPage where this WeatherPage was defined in another QML file.
try to use an extra QML file for your ActionItems - then you can use this QML inside other QML's
only an idea - didn't tried your use-case
05-24-2012 02:05 PM
John, did you make any progress?
If so, we'd like to know the approach taken.
And if not we should revisit!
05-24-2012 10:36 PM
I have not made any progress with this, though I haven't tried anything new as life has been fairly busy.
05-25-2012 12:03 AM
I think you're running into one of the major problems with trying to do everything in declarative languages, namely that dynamic structure can be an exercise in frustration.
You might have more luck if you grab a reference to the ActionSet from the C++ side, and add the actions from there. Thankfully, the Cascades API makes it very easy to do this. Just make sure to set the "objectName" property for whatever UI component contains the ActionSet, and then call the "findChild<T>()" function from whatever contains it to get a pointer you can work with.
06-07-2012 09:37 AM
Hi,
Just wondering if you had resolved your problem or were still needing some support.
Graham