custom skin - timepopupbutton error

8 posts, 0 answers
  1. Gompje
    Gompje avatar
    34 posts
    Member since:
    Aug 2006

    Posted 04 Jan 2008 Link to this post

    When I set a custom skin to my datetimepicker, I get the following error:

    [NullReferenceException: Object reference not set to an instance of an object.] Telerik.Web.UI.RadTimeView.GetProperWebResourceUrl(String webResourceName) +59
    Telerik.Web.UI.RadTimeView.GetImage(String fileName) +134 Telerik.Web.UI.TimePopupButton.GetImage(String imageName) +174 Telerik.Web.UI.TimePopupButton.get_ImageUrl() +63

    the code:
            With Me.MyDateTimePicker.TimePopupButton
                    .ImageUrl = Me.ControlFolder & .ImageUrl
            End With

    I do the exact same thing for the "DatePopupButton" and this works like expected.
    Am I missing something? :(
  2. Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 04 Jan 2008 Link to this post

    Hello Gompje,

    The issue should be addressed for the official Service Pack already scheduled for January 14. Please, find attached preliminary build and let us know if you need further assistance.

    Regards,
    Konstantin Petkov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Gompje
    Gompje avatar
    34 posts
    Member since:
    Aug 2006

    Posted 07 Jan 2008 Link to this post

    I've switched the dll's but the problem remains :(

    Me.MyDateTimePicker.TimePopupButton.ImageUrl
    and
    Me.MyDateTimePicker.TimePopupButton.HoverImageUrl

    are still giving the "object reference is not set to an instance of an object"

  4. Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 07 Jan 2008 Link to this post

    Hi Gompje,

    Unfortunately I cannot reproduce the problem with the hotfix I sent you. Can you please double-check you have updated Telerik.Web.UI successfully? You may have .refresh file in your bin folder which allows VS to get the old .dll.

    If that's not the problem, please open a formal support ticket where you can send a sample application reproducing the error. We will review the project and fix the error, thank you!

    Sincerely yours,
    Konstantin Petkov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. Gompje
    Gompje avatar
    34 posts
    Member since:
    Aug 2006

    Posted 07 Jan 2008 Link to this post

    I've tried the new dll with another simplified, fresh project and it seems it doesn't generate the error. I will recheck things in the main project, sorry about that :s

    But it looks like the path to the image of the clock is not changed, it still gets the image from the WebResources.

    tx for your help!

    this piece of code is executed when the skinname is changed of my custom server control:
            EnsureChildControls() 
     
            Me.MyDateTimePicker.Skin = "S1" 
            Me.MyDateTimePicker.EnableEmbeddedSkins = False 
     
            With Me.MyDateTimePicker.DatePopupButton 
                If Not .ImageUrl.Contains(Me.ControlFolder) Then .ImageUrl = Me.ControlFolder & .ImageUrl 
                If Not .HoverImageUrl.Contains(Me.ControlFolder) Then .HoverImageUrl = Me.ControlFolder & .HoverImageUrl 
            End With 
     
            'gave error: 
            With Me.MyDateTimePicker.TimePopupButton 
                If Not .ImageUrl.Contains(Me.ControlFolder) Then .ImageUrl = Me.ControlFolder & .ImageUrl 
                If Not .HoverImageUrl.Contains(Me.ControlFolder) Then .HoverImageUrl = Me.ControlFolder & .HoverImageUrl 
            End With 
     
            With Me.MyDateTimePicker.Calendar 
                If Not .NavigationNextImage.Contains(Me.ControlFolder) Then .NavigationNextImage = Me.ControlFolder & .NavigationNextImage 
                If Not .NavigationPrevImage.Contains(Me.ControlFolder) Then .NavigationPrevImage = Me.ControlFolder & .NavigationPrevImage 
                If Not .FastNavigationNextImage.Contains(Me.ControlFolder) Then .FastNavigationNextImage = Me.ControlFolder & .FastNavigationNextImage 
                If Not .FastNavigationPrevImage.Contains(Me.ControlFolder) Then .FastNavigationPrevImage = Me.ControlFolder & .FastNavigationPrevImage 
            End With 



  6. Konstantin Petkov
    Admin
    Konstantin Petkov avatar
    1911 posts

    Posted 08 Jan 2008 Link to this post

    Hello Gompje,

    Let us know if you can reproduce the error through a new project. In case you manage to do that, you can contact us via support ticket where you can send the application so that we can test it locally and pinpoint the source of the problem.

    Best wishes,
    Konstantin Petkov
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  7. Gompje
    Gompje avatar
    34 posts
    Member since:
    Aug 2006

    Posted 08 Jan 2008 Link to this post

    I've submitted a ticket
  8. Sebastian
    Admin
    Sebastian avatar
    9934 posts

    Posted 08 Jan 2008 Link to this post

    Hi Gompje,

    We will review the ticket and will get back to you with our findings.

    Best regards,
    Stephen
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Back to Top