Calling on GHI!

Hello,
Since the netmf is limited on certain functions, i was wondering if it is too hard for GHI to include such limitation in their own firmware build…

my requests.:
custom Attributes… can’t live without them; not sure how you can :wink:
PropertyInfo support just like in Full net… again i can’t live without them… being able to use reflection to drill down on an object’s property.
include the missing enum functions Ex: Parse, GetString, and so on…
Resources: also are missing some very useful functions such as GetString() which would allow you to pass a string Key to the function and get it’s value from resources at Run-Time… this is great for localizing message for example.

Or am i barking on the wrong tree here?

thank you.
Jay.

Resources you already can call in run-time:


Resources.GetString(Resources.StringResources.some_string_name)

Yah where you have to pass in a StringResources ID (enum).
what is missing is passing in a STRING instead of a StringResource ID(enum) to get it’s value… great for runtime use.


Resources.ResourceManager.GetString("myStringName"); //should return the value.
or an Overload :
Resources.GetString("myStringName"); //should return the value.

your code would have worked great; only if the enum supported the parse function… so adding the enum.Parse would solve this issue… or at least be used internally to extend the resource class…


//if enum.Parse was supported i could do this:

Resources.ResourceManager.GetString((Resources)Enum.Parse(typeof(Resources), "myStringID"));


Hope it makes sense.

Jay.

I have also got stuck in this problem, how to select a resource at runtime.

Is there any enum.Parse extension out there?

Not at all,

If your purpose is to do some language translation for example, you should consider using xml, where it also enable to have multiple supported languages in the same file, and update it without having to recompile your code and embedded resources.