Incorrect Errors In VB10

6 posts, 0 answers
  1. Wes
    Wes avatar
    1 posts
    Member since:
    Apr 2011

    Posted 06 Apr 2011 Link to this post

    I looked around and didn't see anything regarding this, so I thought I'd check.  I just loaded up JustCode for the first time and the first thing I noticed is that it doesn't seem to correctly support the new line breaks for VB 10.  Am I doing something wrong or is this a bug?

    For example, I have the following statement:

    _ssDepartments(level.Item1.SchoolName) = _ssCourses.
        Where(Function(course) course.SchoolName.Equals(level.Item1.SchoolName)).
        Select(Function(course) course.Department).
        GroupBy(Function(dept) dept.DepartmentID).
        Select(Function(group) group.First()).
        ToList()

    And it's causing about 12 different JC errors.  Whereas if I place the underscore line ending after each line, all the errors go away.

    _ssDepartments(level.Item1.SchoolName) = _ssCourses. _
        Where(Function(course) course.SchoolName.Equals(level.Item1.SchoolName)). _
        Select(Function(course) course.Department). _
        GroupBy(Function(dept) dept.DepartmentID). _
        Select(Function(group) group.First()). _
        ToList()

    Thanks





  2. Dennis :: Dr. Code
    Admin
    Dennis :: Dr. Code avatar
    22 posts

    Posted 13 Apr 2011 Link to this post

    Hi Wes,

    Thanks for reporting. VB 10 line breaks are implemented but you found an issue with it in Linq expressions. We'll fix that. I've given you some Telerik points as well.

    In the general case VB 10 line breaks should work, e.g.:

    Public Module Module1
      
        Sub Main()
      
            Dim x as String
                "Hello" +
                10
      
        End Sub
      
    End Module






    Regards,
    Dennis :: Dr. Code
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. Bill
    Bill avatar
    28 posts
    Member since:
    Apr 2011

    Posted 28 Jul 2011 Link to this post

    I'm getting a "Field is never assigned" warning for the _Items field in this generic class example:

    Public Class JustCodeTest(Of T)
      
        Private _Items(7, 7) As T
      
        Default Public Property Item(row As Integer, column As Integer) As T
            Get
                Return _Items(row, column)
            End Get
            Set(ByVal value As T)
                _Items(row, column) = value
            End Set
        End Property
      
    End Class
  5. Dennis :: Dr. Code
    Admin
    Dennis :: Dr. Code avatar
    22 posts

    Posted 04 Aug 2011 Link to this post

    Hi Bill,

    the warning states that the field holding the array is never assigned, regardless whether elements of the array are assigned. However for VB the field is automatically assigned an array (different than C#). We'll fix this.

    Best wishes,
    Dennis :: Dr. Code
    the Telerik team
    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>
  6. Nick
    Nick avatar
    86 posts
    Member since:
    Mar 2008

    Posted 01 Nov 2011 Link to this post

    Looks like this still isn't fixed.  I have the following code:

    Dim retVal = From ct In returnXml.<PayloadContentType>
             Select New AimiContentType With {.Name = ct.<Name>.Value,
                                   .Description = ct.<Description>.Value}
     
    Return retVal.ToList()

    I have just downloaded and installed JustCode (2011.2.916.0) and it gives me the following errors:

    VisualBasic.Net: Unexpected end of block
    VisualBasic.Net: There is no applicable member of variable 'ct'
    VisualBasic.Net: There is no applicable member of variable 'ct'

    It's easier to see in the attached screen shot.

    Cheers,
    Nick
  7. Ivan
    Admin
    Ivan avatar
    106 posts

    Posted 07 Nov 2011 Link to this post

    Hi Nick,

    Thank you for your feedback. I reviewed it and found out that this is actually another issue that is related to the "XElement". Good-Code-Reds are of high priority for us and we are going to do our best to fix it as soon as possible.
    I created a PITS item for this issue so you can follow its progress and also added some Telerik Points to your account.
    As a temporary workaround you could use the old line breaks of VB or you could ignore the errors that JustCode is showing. Here is a demo how to do this : http://screencast.com/t/YXywEfmHu.
    Your help is highly appreciated!

    Kind regards,
    Ivan
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
DevCraft banner