02-08-2013 05:03 AM - edited 02-08-2013 05:04 AM
how can i go from using this (works as a context action)
InvokeActionItem {
title: "Share Message"
id: shareInvoke
query {
mimeType: "text/plain"
data: application.getByteArray(myTextArea.text);
invokeActionId: "bb.action.SHARE"
}
onTriggered: {
data = myTextArea.text;
}
}to something that will work without a context action menu, action menu, any default menu....
I got this below to populate the share menu, howver the text is not transferred like it was with the invoke action item
Button {
text: "Settings"
attachedObjects: [
Invocation {
id: invoke
query: InvokeQuery {
mimeType: "text/plain"
data: application.getByteArray(myTextArea.text)
}
}
]
onClicked: {
invoke.trigger("bb.action.SHARE")
}
}If possible i would still like to avoid C++ methods
... I had to create my own menu in order to instantly open it instead of the delay that context actions have, It's working great however the most important option doesnt ![]()
02-08-2013 06:15 AM
02-08-2013 10:07 AM
that worked amazingly well, & I would have never though of it.... Thanks a million ![]()
02-15-2013 09:46 PM
for some reason i cant get it to transfer the text without calling trigger("bb.action.SHARE") in the onArmed: signal
Button {
attachedObjects: [
Invocation {
id: invoke
query: InvokeQuery {
id: invokeQuery
mimeType: "text/plain"
}
onArmed: {
invoke.trigger("bb.action.SHARE");
}
}
]
onClicked:{
invokeQuery.data = myTextArea.text;
invokeQuery.updateQuery();
}
}the only issue with this is it pops up the share screen as soon as the app opens
onClicked:{
invoke.trigger("bb.action.SHARE");
invokeQuery.data = myTextArea.text;
invokeQuery.updateQuery();
}removing on armed & placing invoke inside onClicked causes the app to freeze & crash. but if i remove any reference to updateQuery() it will bring up the target list, only it does not carry the data from my text area
02-16-2013 12:02 PM - edited 02-16-2013 12:05 PM
it was allowing me to use it
Button {
attachedObjects: [
Invocation
{
id: invoke
query: InvokeQuery
{
id: invokeQuery
invokeActionId: "bb.action.SHARE"
mimeType: "text/plain"
onQueryChanged: updateQuery()
data: appName.getByteArray(myTextArea.text)
}
}
]
onClicked: {
invoke.trigger("bb.action.SHARE")
}
}but for some reason it won't allow me to use it without calling onArmed & it launching with my app if i delay on armed by placing it inside onClicked
onClicked: {
invoke.onArmed = invoke.trigger("bb.action.SHARE");
}it delays the launch until clicked however it will not transfer or update the text from my text area