XmString to C string in performer

New Message Reply Date view Thread view Subject view Author view

David Chan (tfchan++at++cs.cuhk.hk)
Wed, 2 Oct 1996 00:58:08 +0800 (HKT)


Hi,
        I have problem with string in performer 2.0, my code is follow:
                ..........
                char* query;
                ...........
                ViewState->query = (char *)malloc(sizeof(char)*100);
                ...........
                strcpy(ViewState->query,"\0");
                XmStringGetLtoR(xm_string1,XmSTRING_DEFAULT_CHARSET,&ViewState->query);
                printf("in motif: %s\n",ViewState->query);
                ..........
                pfNotify(PFNFY_INFO,PFNFY_PRINT,ViewState->query);

        the problem is the printf() work well, but pfNotify() can't print the
string . And the string size in xm_string1 is smaller than 100.

        Any suggestion are welcom, Thanks very much.

                Bye!

                David

=======================================================================
List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/
            Submissions: info-performer++at++sgi.com
        Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:53:42 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.