[texworks] readFile() ... retVal["message"] = QVariant();

Paul A Norman paul.a.norman at gmail.com
Wed Dec 15 01:54:46 CET 2010


Sorr tried to use Crtl Drag in Chrome 10.0.607.0 canary build which
does not work in edit mode,
Should be


In //Q_INVOKABLE
QMap<QString, QVariant> TWScriptAPI::readFile(const QString& filename) const
{
       // relative paths are taken to be relative to the folder containing the
       // executing script's file
       QMap<QString, QVariant> retVal;

    retVal["message"]   = QVariant();

does this initially set   retVal["message"] to
    undefined
if not changed otherwise / assigned again later?

Paul
On 15 December 2010 13:49, Paul A Norman <paul.a.norman at gmail.com> wrote:
> Looking polease in,
>
> In //Q_INVOKABLE
> QMap<QString, QVariant> TWScriptAPI::readFile(const QString& filename) const
> {
>        // relative paths are taken to be relative to the folder containing the
>        // executing script's file
>        QMap<QString, QVariant> retVal;
>
>       = QVariant();
>
> does this initially set   retVal["message"] to
>     undefined
> if not changed otherwise / assigned again later?
>
> Paul
>
> On 15 December 2010 01:14, Stefan Löffler <st.loeffler at gmail.com> wrote:
>> Hi,
>>
>> On 2010-12-14 11:07, Paul A Norman wrote:
>>> With readFile(QString), is retVal["message"]  going to be stably
>>> available to TwScript please?
>>
>> That's my intention, anyway ;). Right now, there are no plans to change it.
>>
>> HTH
>> Stefan
>>
>



More information about the texworks mailing list