In one of my projects I want to test usage of the inplace node editing feature of the Listbrowser. Problem is that when I start editing an existing node the actual text is replaced by junk: either some consistent data from other running programs (for exemple HTML code when OWB was running) either plain junk (like a set of '?').
I've recently used this listbrowser feature, and it worked fine so there's no bug in the gadget. Sorry I can't help at the moment, I'm away from my SAM and won't be around for five days.
It seems to me that the Autodocs are explicitely stating this is a requirement for the edit feature to work.
The junk is only displayed when I'm actually editing the node not when I exit the edition. For example if my node is having values 'new', 'new', 'new' and 'new' for each of his columns the values are always correctly displayed except when I'm trying to edit it and it get back to normal if I exit the edit mode (without modification, didn't tried to edit).
@trixie
Yes I'm also convince about that, that's something I don't do or not correctly because the Listbrowser sample from the Reaction example drawer of the SDK is working correctly. The only difference I can see is that I have multiple columns where the sample only have one.
I use LBNCA_Editable in AminetReadme without any problems (it's also a multicolumn list). You're not using the LBNCA_CopyText on its own, are you? Without a LBNCA_Text tag there is nothing for listbrowser to copy into its internal buffer so using it without also specifying LBNCA_Text doesn't make any sense at all.
Of course I'm passing a LBNCA_Text for my columns, I was just quoting the extra tags I was setting to enable the in place edition. But see below the solution to my problem has been found.
@centaurz
thank you that was it: I completely forgot to set it !!
EDIT: thinking again about it I'm wondering if it would not be a good idea to have a default value for that tag rather than potentially crashing ?
thinking again about it I'm wondering if it would not be a good idea to have a default value for that tag rather than potentially crashing ?
A default value for LBNCA_MaxChars should really exist. (Maybe it does but misbehaves in a situation like the one you describe.) PM Rigo about that, he has always been listening to my ReAction gripes and bugreports.
One of the things that Windows has is a "GetLastError" function for calls that don't really have a good way of returning an error code.
Perhaps something like this could exist for some of the calls into ReAction? For example, if a control creation/function fails, there would be some sort of call to get more diagnostic information. Even better if this could log in debug mode.
The problem here is not to have an error code because here it works but using junk which means the listbrowser is pointing to random memory position, fortunately up to now for me it was pointing to allowed positions but this means it can potentially crash without even the chance to get back a return code.
Even if it was written that LBNCA_MaxChars is required for LBNCA_Editable to work, in case the programmer forget it (after all we are just poor humans) it would be better if it would provide a default value to prevent potential crash.