|
| 1 widget on 2 different dashboards |
| Iniciado por guest, 12,sep. 2015 17:52 - 3 respuestas |
| |
| | | |
|
| |
| Publicado el 12,septiembre 2015 - 17:52 |
Hi,
I have a couple of dashboards that uses the same internal window (widget) that works fine until I send an event.
I would expect both internal windows to react on the same event, but it seems only one of them do? (First loaded internal window gets the event?)
If I Remove the internal window from one dashboard, the second intrenal window reacts on the event (as it`s alone)
I thought I could do a controlclone(IW_1,IW_2), dashaddwidget(DASH1,"iw_2","Some text") but no, the controlclone tells me that IW_1 do not exist (it do however in my project, it`s just not been loaded anywhere yet)?
Any tips on how to solve this without making 2 identical windows would be nice 
Cheers Tor-Bjarne |
| |
| |
| | | |
|
| | |
| |
| Publicado el 15,septiembre 2015 - 06:32 |
| |
| |
| | | |
|
| | |
| |
| Publicado el 15,septiembre 2015 - 17:22 |
Hi DarrenF,
I also use planes, but an example of what I`m doing is this:
Win_Main..Plane=1 is a Dashboard, Win_Main..plane=2 is also a dashboard.
Now I can "Draw" a table object internal window on the dashboard on plane 1, on the dasboard on plane 2 I can "Draw" a "Form Update" internal window.
Or I can draw both on the same dashboard,this way I let the user decide how the user interface should look.
I have a class that lets "Internal-window" objects subscribe on different events, the table object post an event on a new selection, the "Form update" (objects if there are several) receives the "change" event and redraws their controls.
I`n my current app I have a Flights Table on one dashboard(plane1) this objects sends message "Flight changed" to all "objects that needs to know", I got a ULD_Pr_Flight Widget, a AWB_Pr_Flight widget, a ULD_Built widget (That updates the FLight widget) and so forth that can be placed anywhere - resized and shaped as the customer like.
Cheers Tor-Bjarne |
| |
| |
| | | |
|
| | |
| |
| Publicado el 15,septiembre 2015 - 17:40 |
Hi,
Forgot to mention that my project is WinDev 20
After a time consuming debug, I think I found a (the) bug or unsuspected behavior regarding IW_ Widgets.
In 2 different internal windows (Widgets on dashboards) I use the same name on a edit control for example EDT_Flight.
In my 2 compleatly different windows there are also different selection procedures to select Flights but some places in the code there is typical a EDT_Fligh = mesh.wMes.sMessage (or something)
I have to prefix the edit control with the internal window/widget name or WinDev is using the the "same-name" control in a internal window that is not suppose to do anything for the moment, and code that checks the value is also broken (since it "can" take the value from my other Internal-window/Widget`s control)
in other words:
Procedure xx (in IW_Win1)
IW_Win.EDT_Fligh = mesh.wMes.sMessage (or something) //Works as espected
EDT_Fligh = mesh.wMes.sMessage (or something) // Can fail if no prefix in procedure yy IW_Win2)
Procedure yy (in IW_Win2)
iw_win2.EDT_Fligh = mesh.wMes.sMessage (or something) //Works as espected
EDT_Fligh = mesh.wMes.sMessage (or something) // Can fail if no prefix in procedure xx IW_Win1)
Just wanted to let everybody that codes widgets/dashboards to know. This is also true for listboxes.
Cheers Tor-Bjarne |
| |
| |
| | | |
|
| | | | |
| | |
|