All Answers

0 votes

Hi Luca!

All clear, if Application is user/session relative.

And this Session.MyVar is extremely useful. Thanks for this tip!

Alex

PS. 21??!!! 🙂

  • Alex Prinias answered Jun 1, 2016 - 4:34 pm
0 votes
In reply to: FindPage method

“Statics” in a web application are always a concern, especially when migrating winforms code.

With Wisej you can move the equivalent of statics to session variables using Application.Session. It’s a dynamic object so you can:

Application.Session.myName = "Luca";

Application.Session.myAge = 21; // :)

No need to use strings and indexers and casting. It’s all automatic. You could also wrap all your app static in a single class, say Statics, and assign an instance of that class to Application.Session.

Best,

Luca

 

 

  • Luca answered Jun 1, 2016 - 4:00 pm
0 votes
In reply to: FindPage method

In the case of button A (a child of Page1), TopLevelControl will return Page1 since it’s the top level parent.

In the case of button B (a child of  Form1), TopLevelControl will return Form1, it’s top level parent.

There is no hierarchy or relation between Page1 and Form1: if you change the main page to Page2, you still have the forms on the screen.

If you are coding in the context of button B you have to use Application.MainPage to refer to the currently active page, if there is any. While if you are coding in the context of button A, use TopLevelControl to refer to its parent page. The page is simply a low z-order control that fills the browser. Any form will display in front of it.

Application refers to the session only. Different sessions can have different main page or main desktop, etc. Anything you change in Application is always relative to the user/session.

Best,

Luca

  • Luca answered Jun 1, 2016 - 3:56 pm
0 votes
In reply to: Browser Support

Hi Markus,

I’d like to refine my answer to: IE9 really doesn’t work well with Wisej. I just tried in IE9 mode and there are too many things that are not supported.

Best,

Luca

  • Luca answered Jun 1, 2016 - 3:47 pm
0 votes
In reply to: FindPage method

Hi Luca,

  1. Imagine the following scenario: A Page with a button A. Clicking button A opens a Window (Form) which has a button B in it. What I am asking is whether there is a single property for both buttons, A and B, pointing to the Page. As I understand, buttonA.TopLevelControl is the Page, but buttonB.TopLevelControl is the Window. Am I correct?
  2. Can I remind you the question in my original post “what will two different sessions return when they call Application.MainPage, if these two different sessions show two different pages at a certain point of time” ? Does “Application” refer to the web application running in the virtual directory of IIS? The reason I am asking is that once I had a terrible problem with application-level variables in a multi-tenant application which were meant to show different things for different tenants.

Best regards,

Alex

  • Alex Prinias answered Jun 1, 2016 - 3:46 pm
0 votes
In reply to: Browser Support

Wisej works also without WebSocket. It will detect the availability (or failure) of WebSocket automatically and use http(s) instead. You can also force WebSocket off in the application’s json config file.

Wisej uses the qooxdoo javascript framework which is a mature javascript library (the best IMO) that has a lot of browser shims and it was originally built to work even with IE8. However, it has evolved a lot and we added a lot of stuff that is not supported by IE8 and barely supported by IE9. Some controls, for example, are based on canvas (chartjs, progresscircle), some others used css3.

So, we “officially” start at IE10 and test also with Chrome, FireFox, Opera and Safari. For these ones it’s hard to pinpoint the minimum build since they update them quite frequently; we can safely say that we need html5 and css3 to take full advantage of Wisej.

Incidentally, I just noticed a problem with the newly added websocket compression and IE9 since it lacks ArrayBuffer but we don’t test. Will log as a bug.

There is a property in the application’s json config file “notSupportedUrl”, which defaults to a built-in page “NotSupported.html” that can be overridden by placing a NotSupported.html file in the root of the project. However, for now we only check if the browser supports XMLHttpRequest. When we are closer to wrapping this up, it will be more specific and you will be able to add a regex on the user agent to enforce the browser type for your app.

Best,

Luca

 

  • Luca answered Jun 1, 2016 - 2:08 pm
0 votes

Absolutely. We already have the TinyMCE almost ready to be uploaded in  the extensions. We may add others, but since it’s released with the source code it should be easy to change the javascript widget.

For the “built-in” RichTextBox, I’m not sure yet if/how we will provide a much simpler editor with some kind of RTF support, which is kind of obsolete but I’m sure there are projects out there with lots of RTF files that  would need it.

  • Luca answered Jun 1, 2016 - 1:53 pm
0 votes
In reply to: FindPage method

You can use this.TopLevelControl. It will return the very top level container, in the your scenario it’s the Page. You need to cast it.

FindForm() always finds that first container Form, even if it’s not the top level: it can be an mdi child, or an embedded child form. For example, an MdiChild is not a top level control, an Mdi Parent is. An embedded child form is not top level, etc.

Let me know if TopLevelControl works for you.

Best,

Luca

  • Luca answered Jun 1, 2016 - 1:50 pm
0 votes
In reply to: DataGridViewLinkColumn

Hi Luca,

I had used the AlwaysUnderline, with no effect, it does work with the the HoverUnderline. A minor effect I noticed here is that once you click on a link cell (which is underlined since you are over it) the underline doesn’t show again on that cell till you click in another row.

Best regards,
Alex

  • Alex Prinias answered Jun 1, 2016 - 7:02 am
0 votes
In reply to: DataGridViewLinkColumn

Yep. The theme definition for the link column wasn’t checked in. Will be in the next update.

If you use linkColumn1.LinkBehavior = LinkBehavior.AlwaysUnderline or LinkBehavior.HoverUnderline it should show the underlined link.

When you click it, you still get the CellClick event, it’s not a real link, it’s a cell renderer.

Best,

Luca

  • Luca answered May 31, 2016 - 11:59 pm
  • last active May 31, 2016 - 11:59 pm
0 votes

Thanks. Will investigate.

I’d suggest to remove as many font and custom color assignments as possible to let the themes handle that and be able to update your app just by changing the theme. In VWG the themes were kind of limited and very difficult to manage. Now you can give your web app a very modern look and use multiple themes without breaking the layout: i.e. the non client areas are recalculated, while VWG didn’t adapt the metrics to the theme.

  • Luca answered May 31, 2016 - 6:54 pm
0 votes

The font settings I found are:

My code
lblControlTitle.Font = new System.Drawing.Font(“Tahoma”, (float)11.00, System.Drawing.FontStyle.Bold);
lblControlTitle.Font = new System.Drawing.Font(“Tahoma”, (float)11.00, System.Drawing.FontStyle.Regular);

From Designer code
this.lnkSearch.Font = new System.Drawing.Font(“Microsoft Sans Serif”, 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(161)));

Alex

  • Alex Prinias answered May 31, 2016 - 6:50 pm
0 votes

It looks like it was related to an unexpected font setting. Could you check your Font = new Font() assignments and maybe send me some samples of the font settings to see what we had missed?

  • Luca answered May 31, 2016 - 6:14 pm
  • last active May 31, 2016 - 6:14 pm
0 votes

Hi Luca!

Yes! It is fixed! Thank you very much!

And I just saw in my browser part of my Visual WebGui solution converted to Wisej ! I think I have to work on the looks now, cause the “Vista” theme I was using was very Windows-Desktop-application-like and it look way different now! But it is promising!

Thanks again.
Alex

 

  • Alex Prinias answered May 31, 2016 - 6:10 pm
0 votes

Please try the update just posted.

Best,

Luca

  • Luca answered May 31, 2016 - 5:28 pm
0 votes
In reply to: Beta Updates

A new build with the following issues fixed has been uploaded.

 

Item Type Priority Severity Title Resolution
WJ-7293 Bug Low Trivial Can´t change forecolor of Upload control Complete
WJ-7304 Bug Medium Minor NullReferenceException when deleting a style or property in themebuilder and at runtime when using certain fonts. Complete
WJ-7294 Bug Low Trivial Window.Parent is always null Won’t Fix
WJ-7288 Task Medium Trivial Implement events and themeing for DataGridViewLinkColumn. Complete
WJ-7289 Bug Medium Minor DGV throws an exception when the data source is not sortable. Complete
WJ-7290 Bug Low Trivial DateTimePicker doesn’t received the CheckedChanged event. Complete
WJ-7297 Enhancement Medium Minor Set the default image size for controls that show an icon: buttons and label. Complete
WJ-7298 Regression High Show Stopper ComboBox and ListBox data binding is broken. Complete
WJ-7299 Bug Medium Major Toolbox button with style=DropDownButton cause a javascript error “Unsupported control: icon” Complete
WJ-7301 Bug Medium Minor KnobControl is broken, it shows property or method “getFamily” is not supported Complete
WJ-7302 Regression High Major ComboBox does not show items when dropping down Complete
WJ-7303 Bug Low Trivial ImageList doesn’t show the designer action icon. Complete
WJ-7282 Bug Low Trivial DataGridView.AutoGenerateColumns is missing in property browser Complete
WJ-7283 Bug Low Trivial DataGridView columns get confused when clearing and adding columns Complete
WJ-7285 Bug Low Trivial JustGage.ShowTitle = false does not hide it´s title. Complete
  • Luca answered May 31, 2016 - 5:27 pm
0 votes

Hi Luca, thanks for your answer.

Please keep in mind that I have not played with Themes/Builder at all. So I don’t know if my exception is related to yours, although you said it is “similar”.

Best regards,
Alex

  • Alex Prinias answered May 31, 2016 - 5:23 pm
0 votes

Yes, thank you. I was just about to write that we have a similar exception in Theme Builder and it’s caused by shared code. Should be fixed shortly. I will post the list of fixes soon.

  • Luca answered May 31, 2016 - 5:14 pm
0 votes

Hi Luca,

I’m sorry, I can’t send the code, it’s rather complicated depending on other projects etc. However, I made some progress: I had the “Just My Code” enabled, so exceptions coming from outside my code were ignored. Now that I disabled that, I get a NullReferenceException at Wisej.Core.dll, but then the debugger is trying to find the Wisej.Core.pdb file which is not present.  Below, I attach the Call Stack.

Best regards,

Alex

> Wisej.Core.dll!Wisej.Core.ClientThemeReader.IsThemeFont(System.Drawing.Font font) Unknown
Wisej.Core.dll!Wisej.Core.WisejSerializer.TranslateFont(System.Drawing.Font font) Unknown
Wisej.Core.dll!Wisej.Core.WisejSerializer.SerializeValue(Wisej.Core.WisejSerializer.JsonWriter writer, object value) Unknown
Wisej.Core.dll!Wisej.Core.WisejSerializer.SerializeField(Wisej.Core.WisejSerializer.JsonWriter writer, string name, object value, bool first) Unknown
Wisej.Core.dll!Wisej.Core.WisejSerializer.SerializeObject(Wisej.Core.WisejSerializer.JsonWriter writer, object value) Unknown
Wisej.Core.dll!Wisej.Core.WisejSerializer.SerializeValue(Wisej.Core.WisejSerializer.JsonWriter writer, object value) Unknown
Wisej.Core.dll!Wisej.Core.WisejSerializer.SerializeInternal(object value, Wisej.Core.WisejSerializerOptions options) Unknown
Wisej.Core.dll!Wisej.Core.WisejSerializer.Serialize(object value, Wisej.Core.WisejSerializerOptions options) Unknown
Wisej.Core.dll!Wisej.Core.ResponseManager.ResponseAction.Wisej.Core.IWisejSerializable.Serialize(System.IO.TextWriter writer, Wisej.Core.WisejSerializerOptions options) Unknown
Wisej.Core.dll!Wisej.Core.WisejSerializer.SerializeObject(Wisej.Core.WisejSerializer.JsonWriter writer, object value) Unknown
Wisej.Core.dll!Wisej.Core.WisejSerializer.SerializeValue(Wisej.Core.WisejSerializer.JsonWriter writer, object value) Unknown
Wisej.Core.dll!Wisej.Core.WisejSerializer.SerializeArray(Wisej.Core.WisejSerializer.JsonWriter writer, System.Collections.IEnumerable list) Unknown
Wisej.Core.dll!Wisej.Core.WisejSerializer.SerializeValue(Wisej.Core.WisejSerializer.JsonWriter writer, object value) Unknown
Wisej.Core.dll!Wisej.Core.WisejSerializer.SerializeInternal(object value, Wisej.Core.WisejSerializerOptions options) Unknown
Wisej.Core.dll!Wisej.Core.ResponseManager.SendActions() Unknown
Wisej.Core.dll!Wisej.Core.ResponseManager.ProcessResponse() Unknown
Wisej.Core.dll!Wisej.Core.ResponseManager.OnLoad(Wisej.Core.Session session, dynamic message) Unknown
[Lightweight Function]
Wisej.Core.dll!Wisej.Core.ResponseManager.ProcessRequest(Wisej.Core.ResponseManager.ServiceType service, dynamic message) Unknown
[Lightweight Function]
Wisej.Core.dll!Wisej.Core.HttpHandler.ProcessHttpAppRequest(System.Web.HttpContext context) Unknown
Wisej.Core.dll!Wisej.Core.HttpHandler.ProcessRequest(System.Web.HttpContext context) Unknown
Wisej.Core.dll!Wisej.Core.HttpHandlerAsyncResult..ctor.AnonymousMethod__0() Unknown
mscorlib.dll!System.Threading.Tasks.Task.InnerInvoke() Unknown
mscorlib.dll!System.Threading.Tasks.Task.Execute() Unknown
mscorlib.dll!System.Threading.Tasks.Task.ExecutionContextCallback(object obj) Unknown
mscorlib.dll!System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
mscorlib.dll!System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, object state, bool preserveSyncCtx) Unknown
mscorlib.dll!System.Threading.Tasks.Task.ExecuteWithThreadLocal(ref System.Threading.Tasks.Task currentTaskSlot) Unknown
mscorlib.dll!System.Threading.Tasks.Task.ExecuteEntry(bool bPreventDoubleExecution) Unknown
mscorlib.dll!System.Threading.Tasks.Task.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() Unknown
mscorlib.dll!System.Threading.ThreadPoolWorkQueue.Dispatch() Unknown
mscorlib.dll!System.Threading._ThreadPoolWaitCallback.PerformWaitCallback() Unknown
[Native to Managed Transition]

 

  • Alex Prinias answered May 31, 2016 - 5:11 pm
1 vote

Yes, correct. But you can use the owner. If you change the test like this:

new GrandChildWindow().Show(this);

...

var parentName = "null";
 if (this.Owner != null)
 parentName = this.Owner.ToString();

label2.Text = parentName;

 

You’ll get the owner of the grandchild form.

There is one aspect of the form ownership that is not working well, when a form is activated it should bring to top and in front of it the forms that it owns.

Also, a form can be created as a child control of another form. If you set the TopLevel property to false you can assign the Parent of a form and it will behave just like any child control.

When the form is an Mdi Child, the Parent property should refer to the MdiClient control, TopLevel  is still false in this case, but IsMdiChild is true.

Best,

Luca

  • Luca answered May 31, 2016 - 4:45 pm
Showing 11201 - 11220 of 11k results