Author Topic: Windows Reflection Support  (Read 7199 times)

LoneCoder

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 1
  • Posts: 9
    • View Profile
Windows Reflection Support
« on: May 14, 2014, 01:16:44 PM »
So I'm well aware of the compile errors that we causing the windows store and windows phone builds to fail because of the reflection apis. Solution was to comment them out using #ifs.

But now the menus aren't working on these builds, as shown in the attached screenshot with console errors. The calls to the functions aren't getting their parameters.

Is there anything that can be done for this? Is there an alternative API that is available? Could you maybe add some #else sections to those #if sections?

Thanks.

Bryan

LoneCoder

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 1
  • Posts: 9
    • View Profile
Re: Windows Reflection Support
« Reply #1 on: May 14, 2014, 01:19:46 PM »
Looks like this page might have the answer for us: http://msdn.microsoft.com/en-us/library/hh535795(v=vs.110).aspx

Quote
Moreover, they do not use BindingFlags parameters for filtering. Instead, filtering takes place in user code, by using LINQ queries on the returned collections.

If I remember right the BindingFlags were missing, right?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Windows Reflection Support
« Reply #2 on: May 14, 2014, 11:51:30 PM »
Pretty much everything related to reflection doesn't work on WSA/WP8, and I'm not sure what can be done about it other than avoiding using callbacks with parameters when targeting those platforms.

On a completely unrelated note, that map looks simply fantastic. I must have spent 5 minutes sitting here analyzing it. Brings me back to the days of good ole RPGs.

LoneCoder

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 1
  • Posts: 9
    • View Profile
Re: Windows Reflection Support
« Reply #3 on: May 15, 2014, 02:29:13 AM »
Pretty much everything related to reflection doesn't work on WSA/WP8, and I'm not sure what can be done about it other than avoiding using callbacks with parameters when targeting those platforms.

Bah HUMBUG!  >:(

I went thru and fixed them for you. Attached is a version of EventDelegate and PropertyReference that has tested working reflection on WSA.  8)

Please integrate my changes into your main branch if you like them.

On a completely unrelated note, that map looks simply fantastic. I must have spent 5 minutes sitting here analyzing it. Brings me back to the days of good ole RPGs.

Thank you! That's the exact same effect it has on me. :) Good thing to have when I have to look at it every day. The game is progressing very quickly though and you can give it a try at http://legendstudio.com/FreeCellQuest

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Windows Reflection Support
« Reply #4 on: May 15, 2014, 11:41:54 AM »
Yay, thanks! :D

Your game doesn't get very far unfortunately. I can't get past the (what I assume to be) character selection.

LoneCoder

  • Newbie
  • *
  • Thank You
  • -Given: 4
  • -Receive: 1
  • Posts: 9
    • View Profile
Re: Windows Reflection Support
« Reply #5 on: May 22, 2014, 03:09:53 PM »
Yay, thanks! :D

Your game doesn't get very far unfortunately. I can't get past the (what I assume to be) character selection.

Sorry about that. The problems been fixed now if you'd like to give it another try.

http://legendstudio.com/FreeCellQuest

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Windows Reflection Support
« Reply #6 on: May 22, 2014, 04:14:25 PM »
Looked good, but then it turned into a card game. :P