All Answers

0 votes

Hi Alex,

Global.asax.OnSessionStart is executed always when a new session is initialized. It’s the same as the start up method defined in Default.json – usually Program.Main. It is executed only when a new session is created for a client. There are no subsequent sessions for a client, it’s always the first one for that client.

Global.asa.OnApplicationStart is executed only once when the application is loaded. To run something only once when your application is loaded the first time you can use a static constructor for the start up class: static Program() { … }.

You can also define static members in Program or any other class in your app and share them across sessions.

If you want to identify a specific client, regardless of the session, you may have to store a cookie that survives the session, see Application.Cookies.

HTH

Best,

Luca

  • Luca answered Jul 25, 2016 - 12:15 am
0 votes

Hi,

So, if I want to do a “client-level” initialization, i.e. some code that runs only when the first session of a specific client starts, but not for the subsequent sessions, where do i put it?

I am looking for something like a Global.asax, OnSession_start, where I check if more sessions of this client have started and I do not run the code, or if this is the first session of this client  I run the code. Along these lines, in OnApplication_start I could run code for the initialization of all clients/all sessions.

Best,

Alex

  • Alex Prinias answered Jul 23, 2016 - 2:00 pm
0 votes

Hi Cris,

The size modes are still not completely implemented. They will be gradually updated in the upcoming builds.

Best,
Luca

  • Luca answered Jul 22, 2016 - 6:58 pm
0 votes

Logged as enhancement WJ-7440.

  • Luca answered Jul 22, 2016 - 6:18 pm
0 votes
In reply to: AutoScroll in Tabs

This was WJ-7433 fixed with the last update.

  • Luca answered Jul 22, 2016 - 6:14 pm
0 votes

Hi Alex,

This is a feature on the todo list, but it will most likely not get implemented before the first release.

The plan is to: a) add a Rows and Parent property to the DGV row class in order to behave like a tree node; b) add a Control property to the DGV cell class to let it host any control; c) add ColSpan and (maybe) RowSpan to the cell to span multiple cells.

We will also have a new RepeaterPanel extension control bound to a template control that will get repeated.

Best,
Luca

  • Luca answered Jul 22, 2016 - 6:14 pm
0 votes

Hi,

It seems that neither FormClosing or FormClosed events fire. I’ve seen it in MDI child forms, I don’t know if it is also a more general Form problem.

Alex

  • Alex Prinias answered Jul 21, 2016 - 11:16 pm
0 votes

Hi Luca,

It’s very informative and I appreciate it very much.

Thanks and regards.

 

  • Cris answered Jul 21, 2016 - 9:16 pm
0 votes

The comment is old, will fix. It was like that before we realized that the designer couldn’t really scan the full hard disk for .theme files. 🙂

And the exception should also be a bit more informative.

The warnings are coming from the theme engine when it cannot find a specific appearance key in the theme. They can be ignored unless you are looking for the reason why a child widget doesn’t appear themed, if it needed to be themed. Errors are logged in red and should not be there at all. If you set “debug”:true in the application’s json file you will also see all events and responses logged in the console.

Child widgets are internal components that make up a bigger widgets and their appearance key is the path to the topmost container. For example, you can see “statusbar/panel/label”, that is the appearance key for the label inside a panel inside a status bar, but the control in Wisej is only the panel.

That is the beauty of the qooxdoo framework. All widgets are a composition of simpler widgets and powerful layout engines. In fact one of the most basic widget is the Atom which is composed with an Image and a Label using different layouts.

  • Luca answered Jul 21, 2016 - 8:34 pm
0 votes

I love control freaks! In coding, that is, not in every aspect of life!

Having said that, I just discovered a workaround, I can use the form.Deactivate and the ParentForm.MDIChildActivated, which fire in the right order.

Best,
Alex

  • Alex Prinias answered Jul 21, 2016 - 8:31 pm
0 votes

Hi Alex,

We do have full control over the order of the events (and pretty much everything else in Wisej :)). And this seems to be a bug since the correct order is certainly Deactivate and the Activated. Will log and fix.

Best,
Luca

  • Luca answered Jul 21, 2016 - 8:22 pm
0 votes

Hi Luca,

When I was typing the code, the Intellisense for LoadTheme says “It can be a fullpath, a relative filename or an embedded resource.” Yes. It works now if I just type the file name and not include the path.

By the way, what are these warnings I got in Chrome console. I have seen these before, only didn’t have the chance to ask you what these are.

Regards.

  • Cris answered Jul 21, 2016 - 8:04 pm
0 votes

Hi,

Luca and Frank, thank you for the bug fixes! Especially because the control moved between mdi children is not a simple
TextBox but a much more complicated UserControl and moving it between Mdi children (and refilling it)
proved to be much faster than instanciating it and filling it every time a new mdi form opened !

Continuing in the mdi form … As I said, an mdi child form A has a usercontrol in it. The user control in the
current mdi child form has a state, let’s say background color = red. When I switch from child form A
to child form B, I would like to preserve the status it had by storing it in the A.Tag property (so that if I switch back
to form A in the future, I can restore the status of the control). So, I am trying to use the Form.Deactivate
and Form.Activated events.

In the FormA.Deactivate, I store the usercontrol’s status in FormA.Tag. In the FormB.Activated, I switch the
parent of the user control (i.e. FormB.Controls.Add(usercontrol) and then I grab the stored status from FormB.Tag
and reload it to the control. Or this is what I wish …

The problem is that when I switch mdi tab, the FormB.Activated event fires before the FormB.Deactivate event.
This means that the usercontrol is first loaded to Form B and has its status changed, so when the FormA.Deactivate
event fires, the usercontrol is not in FormA.Controls anymore and its status has been lost.

I don’t know whether you have control over the order these events are fired, but I would think that the FormB.Activated
should fire after FormA.DeActivate.

There are other ways to do it of course, (like storing the usercontrol’s status to its parent Form every time the status
changes, so that it is already stored when the switch happens) but they are more chatty and involve going back and forth
to the server. So, I thought worth asking.

All the best,
Alex

  • Alex Prinias answered Jul 21, 2016 - 7:36 pm
0 votes

STBS.theme? I just tried with your sample app, it works fine for me: changed the default to “Blue-1”, added two buttons to call Application.LoadTheme(“STBS”) and Application.LoadTheme(“Clear-2”). I also tried to call Application.LoadTheme(“STBS”) in Program.Main.

In Chrome, hit F12 and got Sources, then open “wisej.js” (should not be minimized in debug mode), then before loading the theme click the pause-looking button (should be blue) to enable “Pause on exceptions”, and then check the checkbox that says “Pause on caught exceptions”. Chrome should break when the exception is thrown and should show you the exact line and stack trace.

  • Luca answered Jul 21, 2016 - 7:19 pm
0 votes

Hi Luca,

It’s the theme I used in the sample I sent you in https://wisej.com/support/question/datagridview-linkcolumn-and-cellformatting.

Regards.

  • Cris answered Jul 21, 2016 - 6:13 pm
0 votes

Can you send the custom theme?

  • Luca answered Jul 21, 2016 - 6:06 pm
0 votes

Hi Luca,

Yes. It works when Autosize is set to false. I always overlook this property because I am only used to set Autosize to false when working with Label.

Thanks.

  • Cris answered Jul 21, 2016 - 4:59 pm
0 votes

Hi Cris,

It’s a regression with AutoSize. If you set it to false it works. Autosize for editable controls should only be applied to the height but with the latest changes it’s applied also to the width. It’s already fixed but didn’t make it into the last update. There will be a new update tonight. Autosizing has been consolidated into a single place to be consistent across controls.

Best,
Luca

  • Luca answered Jul 21, 2016 - 2:55 pm
0 votes

Hi Luca,

Thanks.

  • Diego answered Jul 21, 2016 - 11:36 am
0 votes

Hi Frank,

It’s fixed.

But can you not include a Position/Alignment property for a toolbarbutton which may be either Right or Left like in a Toolstrip control?

Thanks.

 

  • Cris answered Jul 21, 2016 - 5:00 am
Showing 10901 - 10920 of 11k results