Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 10:03
    natiki commented #4070
  • 04:51
    fabriciomurta commented #4070
  • Oct 21 21:44
    natiki commented #4070
  • Oct 21 14:32
    mrmiguu opened #4075
  • Oct 19 12:09
    TriEdgeAI opened #4074
  • Oct 18 22:02
    natiki commented #4070
  • Oct 18 00:08
    geoffreymcgill milestoned #4073
  • Oct 18 00:08
    geoffreymcgill labeled #4073
  • Oct 17 21:02
    mozsakalli opened #4073
  • Oct 17 20:25
    geoffreymcgill edited #4072
  • Oct 17 20:13
    shonk-msft commented #4072
  • Oct 17 20:12
    shonk-msft commented #4072
  • Oct 17 20:09
    shonk-msft commented #4072
  • Oct 17 20:04
    shonk-msft commented #4072
  • Oct 17 20:00
    geoffreymcgill edited #4072
  • Oct 17 20:00
    geoffreymcgill commented #4072
  • Oct 17 19:57
    geoffreymcgill commented #4072
  • Oct 17 19:50
    shonk-msft commented #4072
  • Oct 17 19:47
    geoffreymcgill edited #4072
  • Oct 17 19:46
    geoffreymcgill milestoned #4072
Samuel
@samuelGrahame
if (!String.prototype.startsWith) {
    String.prototype.startsWith = function(searchString, position){
      position = position || 0;
      return this.substr(position, searchString.length) === searchString;
  };
}
https://stackoverflow.com/questions/36213455/add-startswith-in-ie-11
should be able to inject before bridge is loaded.
adaris
@MarcoTheFirst
cool @samuelGrahame Thanks a lot
alanmodikwa
@alanmodikwa
Screenshot 2019-07-29 at 17.57.45.png
I seem to get errors after adding my Bridge.net package on my library, how can i solve this problem?
eggsa
@eggersa
Hello. I came across a strange bug with asynchronous code together with TaskCompletitionSource: https://deck.net/c35900a154d976dd1aba7bf66e6928e1
I am looking for a workaround
adarisGmbH
@adarisGmbH
@geoffreymcgill if you could help us urgently with the problem @eggersa reported, we‘d appreciate it... we have a release tonight depending on it. Thanks !
Fabrício Zimmerer Murta
@fabriciomurta
@alanmodikwa: what are your project targetted against? Should be something betwee .NET Framework 4 to 4.8.0. .NET Standard or .NET Core won't do.
Fabrício Zimmerer Murta
@fabriciomurta
@eggsa, I think there's a mixup in the C# async tasks with jQuery's javascript async task, and they won't be interoperable like that.
The asynchronous paradigm with TaskCompletionSource follows C#'s System.Threading.Tasks which, even though it is mapped to run in javascript when translated, wouldn't just mingle up with Bridge.jQuery2's asynchronous paradigm (which is native JavaScript).
That code should be rewritten either as a fully jquery-targetted asynchronous task, or fully C#-targetted asynchronous task.
eggsa
@eggersa
@fabriciomurta Is there a way to properly map a jQuery Promise to a Task.
We tried Task.FromPromise before. But there where Issues too
Fabrício Zimmerer Murta
@fabriciomurta
I've tried a few things with little luck to setting the process' error state... but if I just call its SetResult(), it goes fine. Just not nice exception handling, I guess...

https://deck.net/381c3253bf979e9e2bf9fb3b6112e565

Notice (at least on chrome) this will never return the result, as the XHR request goes to a non-https endpoint -- and if you try to switch the endpoint to https, it'll fail due to faulty SSL certificate.

Evan Tobin
@evantobin
Before I make a pull request, is this a valid issue or is there some reason for having non-static versions of IndexOf? https://forums.bridge.net/forum/bridge-net-pro/bugs/6258-indexof-and-lastindexof-shouldn-t-be-instance-methods
Fabrício Zimmerer Murta
@fabriciomurta

@eggsa: although not a solution yet, I think I could narrow down your use case for this:
https://deck.net/f442867ddbc8cd6fb18cee6817a33b86

Although the code looks longer, I added comments and wrapped unit test class so I could write the code close to what it would look within our Bridge unit tests.
There are good chances this issue is tied to an unfortunate limitation in Bridge though.

Fabrício Zimmerer Murta
@fabriciomurta
@eggsa: the issue you are facing, after reducing it not to use Bridge.jQuery2, really looks like this reported issue: #4002
eggsa
@eggersa
@fabriciomurta Thank you very much for your help!
Fabrício Zimmerer Murta
@fabriciomurta
Maybe this helps you deal with your original deck. As suggested by the issue #4002's reporter, handling the exception outside makes it handle it nicely:
https://deck.net/4344fbc32483a758fcb3ec67069a2782
Fabrício Zimmerer Murta
@fabriciomurta

@evantobin: you make a great point with the "extra" behavior Bridge supports. Where it does not really mean a "bug" (because it supports what .NET does -plus- this instance call), it could mean nevertheless a smaller footprint for Bridge code. As it is by nature introducing a breaking change, we'll only be able to merge that up on a minor version release (currently next possible would be 17.10.0), which tends to be the case anyway.

Notwithstanding, I believe your contribution to this would be very appreciated by us!

And if/while you're into it, please log an issue in github before you send the pull request -- so we can bind the pr to the issue and give it the deserved "breaking-change" tag. Issues get to be our way of recording the changelog, that's why it'd be important part of the merge process.

It would also be very likely to break several other stuff around Bridge, in special the frameworks and unit tests.

In case you're scratching your head about dragons and unit tests: https://github.com/bridgedotnet/Bridge/wiki/Build-&-run-Bridge-self-Tests
Evan Tobin
@evantobin
Beautiful! I was wondering where the unit test target was.
Evan Tobin
@evantobin
@fabriciomurta if you want to add the breaking-change tag to my issue it's at bridgedotnet/Bridge#4033. I also have a PR open with the changed code and fixed tests.
The frameworks are always using the static Array.IndexOf method and not using the instance method
julniter
@julniter
Hi how do i export the items inside my type definition file?
Fabrício Zimmerer Murta
@fabriciomurta
Hello @julniter! You have a public project you would want supported by Bridge via retyped? Unfortunately we couldn't get to a point retyped could be used in the community by demand to include new projects. If your project is publicly hosted, you can create an issue in the retyped repo and request for support, providing information how to get the typescript definition file, so that your project is included in a future retyped build.
Bartolomeus-649
@Bartolomeus-649
Can you compile the .NET BCL as a TypeScript/JavaScript module, so you could use it just as a class library on the client side in all existing TypeScript/JavaScript sites?
Fabrício Zimmerer Murta
@fabriciomurta
BCL?
Bartolomeus-649
@Bartolomeus-649
Fabrício Zimmerer Murta
@fabriciomurta
You mean, build the whole .NET sources with Bridge? Like we do with a subset of .NET (https://github.com/bridgedotnet/Bridge/tree/master/Bridge/System )?
If I understand well, the problem about building everything is that some code is platform-specific, and most times we need some Bridge-specific attributes (like in https://github.com/bridgedotnet/Bridge/blob/master/Bridge/System/Action.cs)
Bartolomeus-649
@Bartolomeus-649
@fabriciomurta But is not the whole point of the bcl not to be platform dependant?
With each new release of .Net Standard, all of its functionality must be implemented on any platform who wants to support the new version.
And since it's supposed to be running just about everywhere, they cant depend on specific platform features.
So, by picking one of the first versions, there really should not be very much platform stuff at all.
Bartolomeus-649
@Bartolomeus-649
Here is 1.0:
Anton Kononov
@stgolem

So, by picking one of the first versions, there really should not be very much platform stuff at all.

This! It would be the greatest thing in Bridge.Net!
Now we have to deal with different projects and share only files with classes between server and web.
With that we could share whole projects.

Also this is the only way to create possibility of using nuget packages the right way.
And it even possible to do IL to JS compile for external packages with that api support.
Anton
@Redoxee_twitter
Hello
This is my first time using gitter so sorry if I missed a post mentioning my very issue.
I started making a library for a personal project and I wanted to test it using bridge.
I've seen on the forum that you can't use straight dll since it has to be compiled using the bridge libraries.
Is there a way to add a bridge profile option to a project so I can change the profile without maintaining two projects ?
I'm not good with Visual Studio so I don't know how to phrase my problem correctly.
Doc-Saintly
@Doc-Saintly
Is it possible to reference a .Net core library in a bridge.net app? I want to test sharing the same class definitions between my back end code and my front end code being compiled with bridge.net
Anton
@Redoxee_twitter
this looks like a better wording of my question :)
Doc-Saintly
@Doc-Saintly
I tried and got and error. After searching that error I found a post saying that you simply can't reference classes from projects that are not build in Bridge.net
So then I guess the question is if you can move your classes to your bridge.net project and reference from your main dot net library.
Anton
@Redoxee_twitter
I think it won't work either. from my understanding, in order to transpile, bridge is using a custom core lib.
This makes bridge project incompatible with core lib
I could be wrong though.
Samuel
@samuelGrahame
You can use linked files. That way those files/cs are in a shared project. Then your project you want the code. Add existing add as existing item as linked. It is very common to have 3 projects for server and client. The server has the core library as a reference. Then the client. Just make a folder for all the linked files. Then put all objects in the core Library. That way if you want to change the client. It is as simple as adding that reference with all your objects to a new project
also you can use references. It just want build if that reference has something that is not implemented/supported. For instance adding winforms.
Samuel
@samuelGrahame
Also with the issue of having to manually link all new files to that project. There is a way to auto link based off the folder and file type.
Doc-Saintly
@Doc-Saintly
@samuelGrahame how are the using statements managed for these files if they are included as is for both applications? Do you have a sample?
Anton
@Redoxee_twitter
@samuelGrahame Thank you very much for your response, a quick test on my end seems to fit exactly what I wanted to do !