Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
85 user(s) are online (81 user(s) are browsing Forums)

Members: 0
Guests: 85

more...

Support us!

Headlines

 
  Register To Post  

Editing a struct list[SOLVED]
Home away from home
Home away from home


See User information
I'm having some problems being able to edit my listbrowser list. I can print out what i have in my struct list. But when i try to edit it,it all goes wrong and it hangs. Adding new lines is easy,but i have no idea how to make changes to an existing line. Anyone who can help me,please do. As i'm not smart.


Edited by Antique on 2010/11/28 23:32:01
X5000
Go to top
Re: Editing a struct list
Amigans Defender
Amigans Defender


See User information
@Antique

Are you detaching it from your listbrowser before you edit it?

Go to top
Re: Editing a struct list
Home away from home
Home away from home


See User information
@Chris

Yes,but it only adds a new line when i try to edit it. And then it hangs.

X5000
Go to top
Re: Editing a struct list
Amigans Defender
Amigans Defender


See User information
@Antique

Quote:

Antique wrote:
@Chris

Yes,but it only adds a new line when i try to edit it.

How exactly are you trying to edit the node? By calling SetListBrowserNodeAttrs(), or are you invoking the LBM_EDITNODE method via DoGadgetMethod()?

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: Editing a struct list
Home away from home
Home away from home


See User information
@trixie

AllocListBrowserNode....... Not the right thing???

X5000
Go to top
Re: Editing a struct list
Amigans Defender
Amigans Defender


See User information
@Antique

Surely not! AllocListBrowserNode() will allocate a new node for you, while you want to change an existing node! Therefore, you must use SetListBrowserNodeAttrs() to change the node attributes (node text is an attribute, too):

IListBrowser->SetListBrowserNodeAttrs(node,
LBNA_Column, 0, /* or whatever column you have */
LBNCA_Text, "New node text",
TAG_END );

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: Editing a struct list
Home away from home
Home away from home


See User information
@trixie

Thanks,now it's working like a charm.

X5000
Go to top
Re: Editing a struct list
Amigans Defender
Amigans Defender


See User information
@Antique

You're welcome, glad I could help!

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

  Register To Post

 




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




Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project