Amiga.org

Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: jahc on November 21, 2003, 01:02:37 PM

Title: help updating my listbrowser
Post by: jahc on November 21, 2003, 01:02:37 PM
-Edit- This is a better explanation of what I want to do.. old explanation deleted:


Hi, I'm writing a simple IRC client for my own use mainly, and I need
help with Reaction listbrowsers...

When my program recieves text, I want to test to see if the bottom node
in my listbrowser is visible, and if it is, then I want to add a new
node to the end, and make that node visible. And if the bottom node is
not visible, then I want to just add my new node to the bottom, and not
use makevisible at all. So that when new text comes in, you can see it,
but if you're reading the scrollback buffer, it wont interupt that...

Anyone got any ideas how this can be done?
Title: Re: help updating my listbrowser
Post by: Steady on November 21, 2003, 04:36:45 PM
Hi jahc,

   Sounds like a fun project you have going on. Maybe you'll make it available to play with when you're done.

Sorry for my useless reply to this question in an earlier thread. I'm kind of curious myself and will have a play on the weekend. If I find the answer, I'll let you know.
Title: Re: help updating my listbrowser
Post by: jahc on November 22, 2003, 02:49:52 AM
Quote
Sounds like a fun project you have going on. Maybe you'll make it available to play with when you're done.

Yes I will. :)

Quote
Sorry for my useless reply to this question in an earlier thread. I'm kind of curious myself and will have a play on the weekend. If I find the answer, I'll let you know.

Please do, I need to get this fixed.. otherwise its going to be very annoying.
Title: Re: help updating my listbrowser
Post by: itix on November 22, 2003, 06:43:09 PM
I don't have any experience with Reaction but you could check if the
slider for listview is on the 'most bottom' position. Reading
LISTBROWSER_Top could be some use.
Title: Re: help updating my listbrowser
Post by: jahc on November 22, 2003, 09:38:24 PM
Quote
I don't have any experience with Reaction but you could check if the
slider for listview is on the 'most bottom' position.
I dont know how to do that.

Quote
LISTBROWSER_Top could be some use.

I'm pretty sure LISTBROWSER_Top just tells you what listbrowser node is currently at the top of the listbrowser.
Title: Re: help updating my listbrowser
Post by: Steady on November 23, 2003, 09:06:01 PM
I didn't have time in the end to actually experiment, but I read the autodoc and can see two possibilities that might help you:

You need to know the order of your list for both these options.

1) Add LISTBROWSER_TotalVisibleNodes to LISTBROWSER_Top to give you the index of the last visible node.

2) More complex, but you may be able to use the LISTBROWSER_VProp#? collection of tags to calculate the number of visible nodes (starting from LISTBROWSER_Top) in the same way you would calculate this in basic Intuition. See the Libraries Amiga RKM for details.  I have an example of doing it in Intuition which should be a similar calculation, but I would go with option 1 if possible.
Title: Re: help updating my listbrowser
Post by: Menthos on November 23, 2003, 09:25:33 PM
How can I read back the information in a listbrowser node? Is there an easy way? I couldn't find out how to do this when I was playing with the listbrowser gadget... =(
Title: Re: help updating my listbrowser
Post by: jahc on November 25, 2003, 09:53:42 PM
@Menthos

Hey I replied to your questions on the amigaworld.net forums where you originally asked.. its in the OS 4.x development forum. If you still need help let me know!
Title: Re: help updating my listbrowser
Post by: jahc on November 25, 2003, 09:54:49 PM
Quote
I didn't have time in the end to actually experiment, but I read the autodoc and can see two possibilities that might help you:

You need to know the order of your list for both these options.

1) Add LISTBROWSER_TotalVisibleNodes to LISTBROWSER_Top to give you the index of the last visible node.

GREAT IDEA! I will try that when I get home in the next few days... thanks!!
Title: Re: help updating my listbrowser
Post by: jahc on November 30, 2003, 12:40:50 AM
Quote
1) Add LISTBROWSER_TotalVisibleNodes to LISTBROWSER_Top to give you the index of the last visible node.

Well, TotalVisibleNodes gives me a number that is equal to TotalNodes.. in my program, only half the nodes in the listbrowser can fit in the window at once.. and Top seems to be totally wrong. It says 8 when theres 16 nodes, and the top node is 13, and the bottom node is 16.

-Edit- just confirming, TotalVisibleNodes ALWAYS equals TotalNodes.. just added it to my client and those numbers are always the same.

Quote
2) More complex, but you may be able to use the LISTBROWSER_VProp#? collection of tags to calculate the number of visible nodes (starting from LISTBROWSER_Top) in the same way you would calculate this in basic Intuition. See the Libraries Amiga RKM for details. I have an example of doing it in Intuition which should be a similar calculation, but I would go with option 1 if possible.

I will look into this option a bit.
Title: Re: help updating my listbrowser
Post by: jahc on January 07, 2004, 10:29:06 PM
Quote
2) More complex, but you may be able to use the LISTBROWSER_VProp#? collection of tags to calculate the number of visible nodes (starting from LISTBROWSER_Top) in the same way you would calculate this in basic Intuition. See the Libraries Amiga RKM for details. I have an example of doing it in Intuition which should be a similar calculation, but I would go with option 1 if possible.

Hi, I've been working on other stuff since we've been talking... but yeah, I'm coming back to this problem now.

Can you paste your example to me? And explain it to me? Explain it like I'm an idiot, because most stuff I'm doing in my client, I'm doing for the very first time.. thanks for your help and patience.
Title: Re: help updating my listbrowser
Post by: Steady on February 09, 2004, 01:32:02 PM
Sorry, not been about for the last 5 weeks.

Will find the example and see if I can explain it. Need to remember first, though.  ;-)
Title: Re: help updating my listbrowser
Post by: jahc on February 18, 2004, 02:08:14 AM
Thanks Steady. Since we've been talking I've decided to use MUI for my client instead of Reaction (bit of a rewrite coming up!) but a friend of mine is going to continue developing the current Reaction version too.. so any help you could give us would be great. Thanks. :)
Title: Re: help updating my listbrowser
Post by: Steady on February 18, 2004, 10:26:56 AM
Quote

jahc wrote:
...Since we've been talking I've decided to use MUI for my client instead of Reaction (bit of a rewrite coming up!) but a friend of mine is going to continue developing the current Reaction version too..


I noticed you seemed to have switched to MUI, which I know nothing about. The example I had was Intuition, not Reaction but I expect the concept to be the same. I will try to post it in the next week.
Title: Re: help updating my listbrowser
Post by: jahc on February 21, 2004, 06:17:28 AM
thanks!!