bList v0.9 (beta) released

D

Deleted member 103

Guest
Hi,

I tried to create a small example with "Visual Basic 2008" but, unfortunately it doesn't work.
Can you tell me why it doesn't work?


Ciao,
Filippo
 

Attachments

  • Basic4ppc.jpg
    Basic4ppc.jpg
    10.4 KB · Views: 63
  • Visual-Basic-2008.jpg
    Visual-Basic-2008.jpg
    13.9 KB · Views: 55

agraham

Expert
Licensed User
Longtime User
Can you tell me why it doesn't work?
Because it is not running under Basic4ppc! It needs some data from http://www.b4x.com/forum/code-samples-tips/4665-advanced-read-basic4ppc-thread-parameters.html that are not present, specifically fixX and fixY that are returning negative values and stopping it drawing itself. It also seems to need cPPC but I don't know why. You can fool it by adding the data slots.

B4X:
Imports System.Threading
...
Thread.SetData(Thread.GetNamedDataSlot("fixX"), CDbl(1))
Thread.SetData(Thread.GetNamedDataSlot("fixY"), CDbl(1))
Thread.SetData(Thread.GetNamedDataSlot("cPPC"), True)
list = New bList(Me)
...

@Arial - Blist.SuspendLayout and Blist.ResumeLayout are visible but not documented in the help.
 
D

Deleted member 103

Guest
Hi agraham,

many thanks, now works fine! :sign0060:
 

kohle

Active Member
Licensed User
Longtime User
Maybe you can integrate a second text line with an other font / fontsize.

So it would be possible to show for example in big font the "Name" and in the
second line "Small font" the address.
 

BjornF

Active Member
Licensed User
Longtime User
Errors in the bListItemFullDemo

This looks like a very nice library ! :)

However, when I run the demo file "bListItemFullDemo" I get a couple of different error messages. One when clicking on the "Images" cell (Error1.jpg), and another the "Separation" cell (Error2.jpg). The other cells I tried worked very well.

I haven't analysed it, and it is probably just an error in the demo program and not in the dll, but I thought you should know about it just in case.

all the best / Björn
 

kohle

Active Member
Licensed User
Longtime User
I started programming an application, and I found out that the behavior from blist between Destop and Device is different.

In a list my first item is without an image, than the next items of the list are with images.
This work on the desktop but not on the device I get an error, something like image missing. Of course there is a workaround, by adding an image to all images.
 

Ariel_Z

Active Member
Licensed User
Could you post the source?

EDIT:
The first two problems, shown by BjornF, is a bug in the sample program that demonstrates all features exposed by a bListItem. This is now fixed and should be uploaded in a few days. The first one is a bug with variable initialization, and the second one is a spelling mistake (it is now fixed and I expect some problems with it when I deploy the new dll - I'll explain it then)

Thank you for pointing them out - I really really appreciate it! :) There must be more bugs and I'd love to hear about them.


EDIT Oct. 30 2009:
Help file and the sample for the bListItem (Full Demo) is updated on the first thread: http://www.b4x.com/forum/official-updates/4881-blist-v0-9-beta-released.html.
Thanks to anyone who commented! :)
 
Last edited:

klaus

Expert
Licensed User
Longtime User
Hi Ariel,

I just tried the last update of the bList library and noticed that:
- the FeaturesIm.png file is missing.
- The error in line 329
list.SeparateItemsWithRectangle = Not(list.SeparateItemsWithRectangle)
still remains.
- in the help file
(list.SeparateItemsWithRectangle = Not(list.SeparateItemsWithRectangle
the bracket at the beginning should be removed but one is missing at the end.

I have also tested the library before the last version as promised in another thread.
My comments:
- Pretty nice object !
- I was confused with the labeling of ClickedItem and LastClickedIndex. I understood at first that LastClickedIndex was the previous one, but they are referring to the same item. Why not name it simply ClickedIndex or SelectedItem and SelectIndex as for ComboBox and ListBox controls?
- The images are not AutoScaled.
- I agree with kohle that a second text line would be useful
- From a visual point of view I would have seen the scrolling with whole itemheights, even if it wouldn't be that smooth. But this is just my feeling.

Best regards.
 

Ariel_Z

Active Member
Licensed User
Hi Klaus and Thank You!! :)

This is a very good feedback - I appreciate it a lot.
About the problems you mentioned:
1. Missing png - will be fixed - I've missed this. :(
2. Separation problem - I suspect there is a versioning problem somewhere, but basically what should be is a version WITH A SPELLING ERROR on my side. This is the beta, and it is fixed later on (on my computer). Accidentaly the version of the demo has it fixed with the "Separation" instead of the poorly spelled "Seperation". So in a short while I hope the right version with the wrong spelling is on the air.
3. Help file - the brackets jumped... since my computer has both writing direction (LTR and RTL) installed, brackets sometimes drive the HelpMaker crazy - I had many, thanks for noticing. Fixed, I think.
4. Naming: I agree. Maybe I'll add some more standard naming for API convenience.
5. Image AutoScale - will be fixed.
6. What do you mean, you would have seen the scrolling with whole itemheights?

Thank you,
Ariel
 

klaus

Expert
Licensed User
Longtime User
What I mean with I would have seen the scrolling with whole itemheights is the second image not the first one.
Same like in ListBoxes or Tables.

Hope this is clearer now, but as already said it's just my feeling.

It seems that the last demo code is more advanced than the library, lines 130 and 131.
B4X:
[FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]item.BackColor3 = color3 [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000]' the first color of the second gradient[/COLOR][/SIZE][/FONT]
[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][FONT=Courier New][SIZE=2][FONT=Courier New][SIZE=2]item.BackColor4 = color4 [/SIZE][/FONT][/SIZE][/FONT][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000][FONT=Courier New][SIZE=2][COLOR=#008000]' the second color of the second gradient[/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT][/COLOR][/SIZE][/FONT]
Backcolor3 and Backcolor4 are not yet known.

For certain parameters, like SeparateItemsWithRectangle and others, it would be interesting to specify in the help file the default values.

I tested the SeparateItemsWithRectangle parameter (with the wrong spelling) and found following on the desktop, I haven't tried it on the PPC yet:
- Separate1.jpg default
- Clicking on Separate, Separate2.jpg, there are still small lines visible
- Moving a bit Separate3.jpg the small lines diappear
There are also small lines on the left side, which disappear also when scrolling.

With the ImageStyles function
- Up/Left the image size becomes smaller
- Up/Middle normal image size
- Up/Right the image size is increased
I don't see the logic behind.

Best regards.
 

Attachments

  • Scrolling1.jpg
    Scrolling1.jpg
    20 KB · Views: 69
  • Scrolling2.jpg
    Scrolling2.jpg
    19.5 KB · Views: 56
  • Separate1.jpg
    Separate1.jpg
    14.7 KB · Views: 52
  • Separate2.jpg
    Separate2.jpg
    16 KB · Views: 34
  • Separate3.jpg
    Separate3.jpg
    14.9 KB · Views: 28
  • ImageStyles.jpg
    ImageStyles.jpg
    15.1 KB · Views: 40
Last edited:

Ariel_Z

Active Member
Licensed User
Thank you very much again Klaus. Invaluable feedback.

1. Scrolling - I see what you mean now - you would have preferred that the minimal scrolling will always be item height. I thought about it and I consider adding a boolean property to control it (ScrollWholeItem or something like this). It's a bit complex - I will have to slowly decrease the speed when the item reaches the right point. I also consider allowing scrolling just one item at a time - I need to figure out what is the best API. This will ease the implementation of photo albums, where each item is one photo.
2. Backcolor3 - There was a versioning problem - I accidentaly uploaded a development version rather than the correct one - now it's fixed (it was there for a couple of hours during which you downloaded it). These properties are intended to allow 4 color gradient (see modern UIs in different OSs).
3. Indicating defaults - you are right. I'll add it.
4. Bug with separation - known bug on this version, I hope it is fixed next version.
5. Images size: this just demonstrates how to change the image size. It is on purpose and of course can be cancelled by setting this height/width of the image to -1 when adding it (see line 187 on the current zip file for example).


Thank you again,
and I do hope to hear when you think of things you might need from this control in the future - the purpose was to create a usefull, easy to work with, and beautiful control for modern UI, so it should be useful for you...
Ariel
 

klaus

Expert
Licensed User
Longtime User
Hi Ariel.

Concerning:
1. The scrolling could be smooth but at least at the end of scrolling the top of the list should begin with a whole item. I don't know which one is easier.
5. I didn't notice that a Width and a Height of -1 means displaying the image with original size. Could you please at this in the help file for the CreateNew2 method.

Best regards.
 

kohle

Active Member
Licensed User
Longtime User
OutofMemoryExeption on my device

Hi,

when I add a image taken from htc touch 3g (2048 x 1536)
then I get an outofmemory exection error.

When I change the size with paint to 1024 x 768 and try again (device)
than it works.

Must I create first thumbnail files to use blist with bigger images ?
Some new phones have cameras with 5 or more mpixels.

I do this :

item.ImageLeft = 2
item.ImageHeight = list.ItemHeight - 4
item.ImageWidth = (list.ItemHeight - 4) * 1.5
item.SetImageFromFile(nfile)
 

kohle

Active Member
Licensed User
Longtime User
the first image I add with 2048 x 1536 brings the error.
When I add 10 pics with 1024 x 768 , no problem.
 
Top