Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
175 user(s) are online (155 user(s) are browsing Forums)

Members: 0
Guests: 175

more...

Support us!

Headlines

 
  Register To Post  

[SOLVED] Listbrowser inplace editable nodes
Quite a regular
Quite a regular


See User information
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 '?').

As instructed in the autodoc I set :
LISTBROWSER_EditableTRUE,
LISTBROWSER_ShowSelectedTRUE,


to the Listbrowser itself, and
LBNCA_CopyTextTRUE,
LBNCA_EditableTRUE,


to the nodes.

The result is similar when I double click the node or when I use LISTBROWSER_EditNode + LISTBROWSER_EditColumn tags.

The list browser is in a page Layout which is part of a Clicktab gadget.

Any suggestion ?


Edited by abalaban on 2010/11/9 10:33:56
Back to a quiet home... At last
Go to top
Re: Listbrowser inplace editable nodes
Amigans Defender
Amigans Defender


See User information
@abalaban

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.

The Rear Window blog

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
Go to top
Re: Listbrowser inplace editable nodes
Just can't stay away
Just can't stay away


See User information
@abalaban

Quote:
LBNCA_CopyText, TRUE,

Maybe that CopyText is the problem. I guess it uses an internal buffer of fixed size.

Rock lobster bit me - so I'm here forever
X1000 + AmigaOS 4.1 FE
"Anyone can build a fast CPU. The trick is to build a fast system." - Seymour Cray
Go to top
Re: Listbrowser inplace editable nodes
Quite a regular
Quite a regular


See User information
@TSK

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.

Back to a quiet home... At last
Go to top
Re: Listbrowser inplace editable nodes
Just popping in
Just popping in


See User information
@abalaban

What did you set for LBNCA_MaxChars ?

Go to top
Re: Listbrowser inplace editable nodes
Just can't stay away
Just can't stay away


See User information
@abalaban

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.

These are the tags I use for the editable column:
LBNA_Column,    1,
LBNCA_Text,    "",
LBNCA_CopyText,    TRUE,
LBNCA_Editable,    TRUE,
LBNCA_MaxChars,    30,

Go to top
Re: Listbrowser inplace editable nodes
Quite a regular
Quite a regular


See User information
@salass00

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 ?


Edited by abalaban on 2010/11/9 8:25:57
Back to a quiet home... At last
Go to top
Re: [SOLVED] Listbrowser inplace editable nodes
Just popping in
Just popping in


See User information
@abalaban

Quote:

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 ?

So true...

Go to top
Re: Listbrowser inplace editable nodes
Amigans Defender
Amigans Defender


See User information
@abalaban

Quote:

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.

The Rear Window blog

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
Go to top
Re: Listbrowser inplace editable nodes
Just popping in
Just popping in


See User information
@trixie

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.

Go to top
Re: Listbrowser inplace editable nodes
Quite a regular
Quite a regular


See User information
@gregthecanuck

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.

Back to a quiet home... At last
Go to top
Re: Listbrowser inplace editable nodes
Just popping in
Just popping in


See User information
@gregthecanuck

Several AOS functions already use SetIOErr() for this purpose (not sure for reaction classes though).

Go to top
Re: Listbrowser inplace editable nodes
Just popping in
Just popping in


See User information
@abalaban/centaurz

I don't code for OS4 at the moment so my suggestion was totally out of left field.

Sometimes there is no good solution but if there was a way to make the control more robust then there is an opportunity for improvement.

Cheers!

P.S. I work with the win32 listview control extensively so I know what fun these things can be to get working the way you want.

Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 3 ( 0 members and 3 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project