The scripts (page or widget) are executed ONCE at the start?

Do you already know when your API-doc will be published?

As you remember, my problem with the designer in WIN7 to login for exporting, do you have a solution already?

What would be the best way to run a “initialization”-code, for example to load data from a text file to assign values to multiple widgets etc. on program-start? Such a script should run in the “page”-script-editor??

The scripts (page or widget) are executed ONCE at the start?

I have no idea yet how to code such logic (it has to be wrapped in an “item”-block ???) or implement object-based programming -> a few programming/scripting-examples for the designer (QtQuick basics are more/less familiar already) would be VERY HELPFUL!

Already published the initial API reference documents.

The Inspector documents contain the api usage examples. For example: https://docs.promultitouch.com/reference/inspector/geometry_inspector.html

All scripts are called every time a certain event is triggered. The initial settings are set in the Inspector. You can specify settings for the event, for example Project > Open.
In the new version the script system has been completely refactored and is more powerful.

Currently we can help you with your project if you describe in detail your issues.
I will send you the fixed version (login problem) tomorrow.

Could you please provide an example on how to use - let´s say the event “block.scriptAdaptor.eventItemClicked()” ?

In which scopes I can use the properties of the widgets? - in an “Item{}” ?

How can I access the properties of widgets like “text” for the article or the images for the gallery, filename for a moviefile?

A while ago you sent me the “drag_widgets.pma” (see attachment) as an example for constraining widgets position. The green “Drag me”-article-widget can be moved, the others follow. This works fine in the Designer when I drag the article with the mouse (allthough with a small delay because of the TIMER).

On my Touch-Device (SUR40) this works also, but:

When I touch with ONE finger, I can see the touch-trail but nothing happens, the widget can´t be moved. With TWO fingers the widget can be moved. While moving I can release one finger and moving still happens with the one remaining finger. Why does this happen?

The next problems which emerged are: Many properties of “widget” are NOT
ACCESSIBLE!!

For example: (Script in a Gallery-Widget, Interaction-Tab, User Code)


import QtQuick 2.0

Item
{
Component.onCompleted:
{
console.log(block.width)
console.log(block.style.blockOpacity)
}
}

CONSOLE OUTPUT:

200
a591b88c896837639a45ba348590e9fd.qml:9: TypeError: Cannot read property
‘blockOpacity’ of undefined

This also happens for “blockBackgroundMedia” and many other properties!!!

ALSO currentPage.childCount is undefined!! - So I can´t iterate through the
page!
BTW: Is there a method to access a widget from an other widget (not using the
hardcoded name like page.getBlockByName(“name”) (which is not described in your
doc), but like block.GetNext() / block.GetPrev() ??

PLEASE ALSO ANSWER my questions I´ve asked in my last two mails concering
ONE/TWO-touch problem (WHICH IS A MAIN PROBLEM!!!), how to implement and to use
Events (eventItemPressed, eventItemClicked) AND to access properties like the
text of an Article-Widget, the NAME of a widget (block.name ??->undefined),
MovieFilename etc.etc. => PLEASE READ MY LAST TO MAILS BELOW!

In your last answer, you wrote “All scripts are called every time a certain
event is triggered.”

  • Scripts in the Inspector (Interaction-Tab)?
  • WHAT certain events, how to implement, how to use, in which scopes (“Item{}”)
    ???

Other important question: How can I start an animation (opacity, scale,
position) from script??

Here is the new version, which contains a fix for the drag widget bug: https://s3-us-west-2.amazonaws.com/promultitouch/promultitouch_designer_1.5.1204.16.exe
The names of objects differ in an Action Editor and User Script. See the naming.pdf file. Take a look at the script.pma example, this explains how to use common scenarios.
You do not need to call the events directly. Use it in the Action Editor. Check the events.pma.


Back to Flipabit >
Copyright © 2018. Flipabit Team. All rights reserved.