Add attributes to subs, properties, ... to select an icon for intellisense ? RRS feed

  • General discussion

  • Here's a proposal for the attribute :

    <SmallBasicIcon(SmallBasicIcons.NormalProperty)> _ 
    <SmallBasicIcon(SmallBasicIcons.VisualProperty)> _
    <SmallBasicIcon(SmallBasicIcons.ComportementProperty)> _
    <SmallBasicIcon(SmallBasicIcons.ConstantProperty)> _

    <SmallBasicIcon(SmallBasicIcons.NormalSub)> _
    <SmallBasicIcon(SmallBasicIcons.VisualSub)> _


    And the intellisense would react to this attribute and display an icon that really match the type of the member

    What do you think of something like that ?
    Fremy VB & C#
    Sunday, December 28, 2008 3:30 PM

All replies

  • Nice idea, Fremy.  I'm afraid, especially for beginners, having so many categories of properties and operations might confuse them. 

    Sunday, December 28, 2008 8:15 PM
  • You're right.

    If we do something like that, - it's in fact not needed at all, - we need to be careful and not confuse the user.
    But a good image can sometimes help the beginner to understand what does something (I'm french, and my brother that didn't have done any programmation as of now have tested Small Basic under my injunction, and I quite loved it, so I'll ask his thought about that)

    For exemple, I was a little surprised when I saw that Math.PI as an icon representing a palette, it's quite confusing too, I think.
    At opposite, when the same icon is used for BrushColor, it's very good.

    Maybe we need to find a good middle between the two. The icons of each category of elements (properties, subs, ...) should never differ at a point that make unpossible or difficult to detect they are of the same type. It's not possible to reach that, then we need to forget this idea because it will cause more bad than good.
    Fremy VB & C#
    Sunday, December 28, 2008 9:54 PM
  • Good point.  I'd love to explore new ideas for the property icon.  I remember picking the paint palette because I couldn't come up with a better one.  All ideas are welcome.
    Sunday, December 28, 2008 10:16 PM
  • Here's some proofs of icons that can be used for Small Basic (if you think it's clear for the user and good enough [i'm not an expert in design], I can send you some versions as .PDN format with layers, transparency, ...)


    My main ideas when I was painting :

    - What's the difference, for the beginner, between a variable, a constant (Math.PI) and a property ?
    For me, the beginner don't see the difference between them because GraphicsWindow.BrushColor is only a variable contained in a namespace. So, the icons should reflect this similarity, and also clearly show the diffenrences they are between thems.
    ==> For the application / For an object
    ==> ReadWrite / ReadOnly (or WriteOnly)

    - How can we "describe" a property / a variable ?
    It's a REFERENCE to an object that can be SETTED and GETTED during the application's time.
    While a VARIABLE is GLOBAL or local, an PROPERTY is LOCALIZED TO AN OBJECT, and can thus be 'transported' around the program by the containing object, what the variable can't (a variable can't be maintained by an object, in theory)

    ==> I used the two arrows to describe the principe of 'GETTING/SETTING'. I think it's the best image I know to explain that.
    ==> I used the 'STOP' board to show that a specific property don't support a way of the normal procedure
    ==> I used the center of the two arrows to put another image : an object (for property) or an application (for variables)

    - How to personalise the icon to make it clear and easy to understand with the image ?
    It's the most difficult question I behaved. My response is not irrevocable, but I tend to think that you can't put more than 2/3 informations in a 24*24 icon, and I already have 3 things to show (arrows + localised/global + read/write state). So, in my mind, we don't need to add anything for these small icons. But, for the 'big' icon that is shown in the documentation pane, it's possible to use a more descriptive icon with a small 32*32 overlay at bottom-right (the 24*24 icon used in the intellisense). If no icon is proposed using an attribute on the property/sub, then a 'standard' icon should be used instead (it's the normal case for a sub/function, but not for a property)

    It's only my analyse of the problem, and it's possible that some people wil not share it, so I think we should ask the mind of more poeple before doing anything, but at least, it's an idea that can help you finding a better solution that the palette icon for each property ;-)

    Fremy VB & C#
    Tuesday, December 30, 2008 2:01 PM
  • Thanks for the effort Francois.  They look nice.  I'll try to get others' opinions on this too.
    Tuesday, December 30, 2008 5:20 PM
  • Good ideas Fremy.
    I suggest for the Read/Write indicator, to remove the arrow instead of placing a minus sign.
    It would be easier to see.
    Tuesday, January 6, 2009 6:10 PM
  • Good idea. Another solution is also putting the arrow in gray and light (disabled).
    Fremy VB & C#
    Tuesday, January 6, 2009 6:59 PM