Welcome to %s forums

BrainModular Users Forum

Login Register

sdkDialogInputBox, proper way of getting back the user entered string?

Create your own modules in C++
Post Reply
23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 07 Jan 2018, 18:04

think the question/discuss fit better in this place..

im very excited by the new inputbox popup, but i tried all the afternoon varous cast wide_char/string ect and still fail :/

the most simple/ logical way for me to test at first was:

Code: Select all

    AnsiCharPtr test;
    test = sdkDialogInputBox("Enter value: ", "value:", "no name");   ///caption,prompt,dft
    sdkTraceChar(test);
could anyone find the trick? olivier heelllllllllllllllp ^^

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 07 Jan 2018, 22:18

still failing arf, did the following workaround by waiting enlights:

creating 'popup' datafield and/or textfields inputs parameters, and set them via iml queries from the module works, but less sexy ..

sdkSetModuleUserName("USER");
sdkSendUsineMsg("SET_TARGET_PATCH SENDER_PATCH");
sdkSendUsineMsg("INPUT_QUERY_VALUE 'Enter value: ' POPUPVALUE 50");
sdkSendUsineMsg("SET_VALUE USER popup POPUPVALUE");

sm_jamieson
Member
Posts: 551
Contact:

Unread post by sm_jamieson » 09 Jan 2018, 21:40

The new routine doesn't seem to work. After each query it returns an empty string, whether you enter anything in the box or not.
The returned pointer is different every time, but always points to a memory location with the NULL character ('') in it.
If it was returning Unicode like the new settings string does, you would at least see the first character.

So it might need to be a bug report.

23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 10 Jan 2018, 01:35

yes there was a hared memory problem, i saw with seno, fixed in next build

Post Reply

Who is online

Users browsing this forum: No registered users and 60 guests