11 Replies - 4285 Views - Last Post: 20 June 2012 - 07:42 AM Rate Topic: -----

#1 Bort  Icon User is offline

  • Ill-informed Mongoloid
  • member icon

Reputation: 436
  • View blog
  • Posts: 3,066
  • Joined: 18-September 06

In order to evaluate an indexed property...

Posted 20 June 2012 - 03:54 AM

Hi guys,

I'm having a few problems converting some code into VB.NET from C#. Most of the translating is done, but I am getting errors when I try to run my code, and I can't figure out what is causing them. Here is the Sub I translated.

   Public Sub CreateWidget()

        Dim blue As LCDColor
        blue.Red = 0
        blue.Green = 0
        blue.Blue = 255
        blue.Alpha = 255
        'create a full screen widget text box with text
        Dim wg1 As New WidgetInfo()
        wg1.BgColor = blue
        wg1.Text = text
        wg1.WidgetID = 1
        wg1.WidgetType = WidgetType.TEXT
        wg1.FontID = CByte(FontID.SAN_B_24)
        wg1.FgColor.Red = 255
        wg1.FgColor.Green = 255
        wg1.FgColor.Blue = 0
        wg1.FgColor.Alpha = 255
        wg1.Effect = WidgetEffect.THREED
        wg1.Left = 10
        wg1.Top = 20
        wg1.Width = 525
        wg1.Height = 300
        Me.m_WaitingForWidgetEvent = True

        vision.Widgets.CreateWidget(wg1)

        Trace.WriteLine(frmDisplay.lblHeadlines.Text)
        Dim nRet As Integer = WaitForWidgetEvent(wg1.WidgetID, EventCode.CREATE_SUCCEED, EventCode.CREATE_FAILED)
        If nRet = 2 Then
            Throw New ePadException(HERROR.F_INTERNAL_ERROR)
        End If
        Trace.WriteLine("screen1 wg1 creating return " & nRet)
    End Sub



The error I receive on this line ("vision.Widgets.CreateWidget(wg1)") reads "In order to evaluate an indexed property, the property must be qualified and the arguments must be explicitly supplied by the user."

So, now I'm trying to work out which property the error is talking about.

Any advice offered would be appreciated.

Is This A Good Question/Topic? 0
  • +

Replies To: In order to evaluate an indexed property...

#2 Amrykid  Icon User is offline

  • 4+1=Moo
  • member icon

Reputation: 148
  • View blog
  • Posts: 1,589
  • Joined: 16-December 08

Re: In order to evaluate an indexed property...

Posted 20 June 2012 - 06:06 AM

What is the type of
 vision.Widgets




Also, try taking off the () on this line:
Dim wg1 As New WidgetInfo()



EDIT: After some googling, we may need to see more code than this.

This post has been edited by Amrykid: 20 June 2012 - 06:08 AM

Was This Post Helpful? 0
  • +
  • -

#3 _HAWK_  Icon User is online

  • Master(Of Foo)
  • member icon

Reputation: 1062
  • View blog
  • Posts: 4,142
  • Joined: 02-July 08

Re: In order to evaluate an indexed property...

Posted 20 June 2012 - 06:09 AM

What are the parameters for CreateWidget?
Was This Post Helpful? 0
  • +
  • -

#4 Bort  Icon User is offline

  • Ill-informed Mongoloid
  • member icon

Reputation: 436
  • View blog
  • Posts: 3,066
  • Joined: 18-September 06

Re: In order to evaluate an indexed property...

Posted 20 June 2012 - 06:25 AM

vision.Widgets



Is part of the SDK for an electronic signature pad called ePad-vision. If you want to take a look, visit www.epadsupport.com and download the Universal Installer, and IntegriSign Desktop. The UI contains the drivers for the ePad range, but also some source code applications. The problem is, the source code application I tried to translate this piece of code from is in C#, and somewhere down the line I've missed something or made a mistake. IntegriSign Desktop contains the rest of the SDK.

Basically, what I am trying to do is create a screen to display on the ePad that lists headlines from RSS feeds. The 'widget' is what gets displayed on the ePad.

I have the RSS feed completed and working (just displaying in a TextBox at the moment), but until I can get this widget working, my entire project may as well be on hold.

I tried removing the parenthesis as per your suggestion Amrykid, but it still did exactly the same thing.

View Post_HAWK_, on 20 June 2012 - 07:09 AM, said:

What are the parameters for CreateWidget?


It doesn't have any by default. It creates a widget out of scratch. It doesn't need any additional information to make it.

At least, that is how I believe it works. Certainly the C# project I translated this from didn't have any parameters for CreateWidget either.
Was This Post Helpful? 0
  • +
  • -

#5 _HAWK_  Icon User is online

  • Master(Of Foo)
  • member icon

Reputation: 1062
  • View blog
  • Posts: 4,142
  • Joined: 02-July 08

Re: In order to evaluate an indexed property...

Posted 20 June 2012 - 06:32 AM

Yeah, exactly the point - the error says that when you try to make one and none exist.
Was This Post Helpful? 0
  • +
  • -

#6 Amrykid  Icon User is offline

  • 4+1=Moo
  • member icon

Reputation: 148
  • View blog
  • Posts: 1,589
  • Joined: 16-December 08

Re: In order to evaluate an indexed property...

Posted 20 June 2012 - 06:33 AM

Then there must be a difference between your referenced libs in both projects.
Was This Post Helpful? 0
  • +
  • -

#7 Bort  Icon User is offline

  • Ill-informed Mongoloid
  • member icon

Reputation: 436
  • View blog
  • Posts: 3,066
  • Joined: 18-September 06

Re: In order to evaluate an indexed property...

Posted 20 June 2012 - 06:40 AM

View PostAmrykid, on 20 June 2012 - 07:33 AM, said:

Then there must be a difference between your referenced libs in both projects.


I just checked this. The references between the two projects are identical.
Was This Post Helpful? 0
  • +
  • -

#8 Bort  Icon User is offline

  • Ill-informed Mongoloid
  • member icon

Reputation: 436
  • View blog
  • Posts: 3,066
  • Joined: 18-September 06

Re: In order to evaluate an indexed property...

Posted 20 June 2012 - 06:46 AM

View Post_HAWK_, on 20 June 2012 - 07:32 AM, said:

Yeah, exactly the point - the error says that when you try to make one and none exist.


Even if I take away line creating the Widget and move it elsewhere, so the Widget is created on launch, and just the details are filled in here, I still get the same error.

I've probably missed something translating it from the C# project. I don't know C# at all, really, so who knows what I've missed.
Was This Post Helpful? 0
  • +
  • -

#9 _HAWK_  Icon User is online

  • Master(Of Foo)
  • member icon

Reputation: 1062
  • View blog
  • Posts: 4,142
  • Joined: 02-July 08

Re: In order to evaluate an indexed property...

Posted 20 June 2012 - 06:52 AM

Show us the code for the C#.
Was This Post Helpful? 0
  • +
  • -

#10 Bort  Icon User is offline

  • Ill-informed Mongoloid
  • member icon

Reputation: 436
  • View blog
  • Posts: 3,066
  • Joined: 18-September 06

Re: In order to evaluate an indexed property...

Posted 20 June 2012 - 07:16 AM

Rather than try to paste the entire C# code in here, I'll make life easier. Here is the entire C# project.

DropBox - ePad-vision C# Project

Please note that nothing in the project will work properly as one of its required references is a file in the GAC - ePadService.dll.

edit: The file ePadService.dl is installed on your PC if you download and install the Universal installer I mentioned in an earlier post.

This post has been edited by Bort: 20 June 2012 - 07:42 AM

Was This Post Helpful? 0
  • +
  • -

#11 Amrykid  Icon User is offline

  • 4+1=Moo
  • member icon

Reputation: 148
  • View blog
  • Posts: 1,589
  • Joined: 16-December 08

Re: In order to evaluate an indexed property...

Posted 20 June 2012 - 07:27 AM

View PostBort, on 20 June 2012 - 09:16 AM, said:

Rather than try to paste the entire C# code in here, I'll make life easier. Here is the entire C# project.

DropBox - ePad-vision C# Project

Please note that nothing in the project will work properly as one of its required references is a file in the GAC - ePadService.dll.

edit: The file ePadService.dl is installed on your PC if you download and install the Universal installer I mentioned in an earlier post.


Link is broken. Remove the trailing 'http://' from the end.

https://dl.dropbox.c...dvisionC%23.rar
Was This Post Helpful? 0
  • +
  • -

#12 Bort  Icon User is offline

  • Ill-informed Mongoloid
  • member icon

Reputation: 436
  • View blog
  • Posts: 3,066
  • Joined: 18-September 06

Re: In order to evaluate an indexed property...

Posted 20 June 2012 - 07:42 AM

Oops. Silly Copy/Paste.

Link fixed now.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1