How can I name my function within .idl file??


  • From this article http://msdn.microsoft.com/en-us/library/windows/apps/br230301(v=vs.85).aspx#PassingAndReturningWinRT

    It means that the uppercase letters of a member will become lowercase when using within Javascript.

    So if I write the function name to "MyFunction", it should be used as "myfunction" in Javascript.

    But I find that if I use "myfunction", it still can't access unless I rewrite the function name in the .idl files to "Myfunction" that only keep the first letter to uppercase or "myfunction" that all the letters are lowercase.

    Is this a issue or is there something I misunderstanding??

    Friday, December 16, 2011 3:01 AM


  • JavaScript uses CamelCase, so the first letter is expected to be lower case but new words in the middle would be upper case.  To follow that convention, "MyFunction" would be called "myFunction" in JavaScript.


    • Marked as answer by Bob_Bao Monday, January 2, 2012 9:55 AM
    Friday, December 16, 2011 3:30 AM