Are Cocoa Storage Modifiers ignorable on other platforms?

Just refer to this:
http://docs.elementscompiler.com/Hydrogene/LanguageExtensions/StorageModifiers/

Cocoa Only
Storage Modifiers are relevant and available on the Cocoa platform only. They can optionally be ignored on .NET and Java when Cross-Platform Compatibility Mode is enabled.

It seems Cross-Platform Compatibility Mode is obsoleted. So there’s no way to make __weak ignorable on other platforms?

It’s not obsolete. The link shows that way because the page it refers to hasn’t been written yet.

OK I’ve found the config item in the project’s property page. Thanks!

Oh…The Cross-Platform Compatibility Mode has a side-effect: method names will be case-insensitive.

This side-effect brings me some problems because I’m using the lower camel case (first letter is lowercase) for my method names that conflict with some names in .NET API, for example:
In my homemade List, List.add() conflicts with List.Add()(only define this for C# collection intializer syntax).

Is it possible to make Cocoa Storage Modifiers ignorable in normal mode? Those keywords are Cocoa use only, they will be erased on other platforms.

Hmm. That sounds like a bug. Cross-platform mode should not enable case insensitivity for C# and Swift. Can you send me a complete project that shows your issue?

Thanx.

Here’s two related test projects:

  1. Add conflicts with add on Android:
    org.me.androidapplication1.zip (39.0 KB)

  2. toString extension method conflicts with ToString on .NET:
    DotNetTest.zip (67.1 KB)

Thanks, logged as bugs://74196

Looks like we lost track of this one, sorry about that.

bugs://74196 got closed with status fixed.

Oke so strong/weak does NOT give an error anymore on .net and java. Instead it’s properly ignored.

Awesome!
As Elements was born for cross platform, the cross-platform compatibility should be solved by default.

1 Like