<div dir="ltr"><div>Hello,</div><div><br></div><div><br></div><div> I  struggle a bit to make my problem clear, so forgive me if I write too much text.</div><div><br></div><div>To better understand how to build User Interfaces in an Object Oriented environment, I did some searching on the internet. I stumbled upon an article of Martin Fowler on the different GUI architectures. To help me understand what I was reding, I tried to build the UI that was used as an example. I did this with Morphic Designer, and building the UI went fine. <br></div><div><br></div><div>Next, I had to write some methods, to get the UI displayed on the screen. Still no big problems. <br></div><div><span style="font-family:monospace,monospace"><br></span></div><div><span style="font-family:arial,helvetica,sans-serif">But then I needed to add some logic to use the value that was selected in a combobox widget to edit a lineEdit widget.:  I connected its signal </span><span style="font-family:monospace,monospace"><span style="font-family:monospace,monospace">#currentIndexChanged:text:</span> </span><span style="font-family:arial,helvetica,sans-serif">to the method </span><span style="font-family:monospace,monospace"> #fill </span><span style="font-family:arial,helvetica,sans-serif">that initializes a textbox <span style="font-family:monospace,monospace">edtStationId</span> with the value that was selected from the combobox..</span></div><div><span style="font-family:monospace,monospace"><br></span></div><div><u><span style="font-family:arial,helvetica,sans-serif">connecting the signal:</span></u><span style="font-family:monospace,monospace"> <br></span></div><div><span style="font-family:monospace,monospace"></span></div><div><span style="font-family:monospace,monospace">self connect:  self ui cmbStations signal: #currentIndexChanged:text:  toSelector: #fill.<br></span></div><div><span style="font-family:monospace,monospace"><br></span></div><div><span style="font-family:monospace,monospace"><br></span></div><div><span style="font-family:monospace,monospace"><u>the method #fill: </u> </span></div><div><span style="font-family:monospace,monospace"><br></span></div><div><span style="font-family:monospace,monospace">self ui edtStationId theText: <b>self ui cmbStations currentText.</b><br></span></div><div><span style="font-family:monospace,monospace"><br></span></div><div><span style="font-family:arial,helvetica,sans-serif"></span></div><div><span style="font-family:arial,helvetica,sans-serif">This works, but it feels like cheating: I had hoped to be able to use the parameters from the signal to initialize the textfield, instead of having to reread this value explicitly with the <span style="font-family:monospace,monospace">currentText</span> method from the comboBox. Also, I think this will only work when my fill method is defined in the same class where the comboBox is used.As I see how the interface should interact with the rest of the application, this should not be the case as it seems its better to decouple the UI from the application. <br></span></div><div><span style="font-family:monospace,monospace"><br></span></div><div><span style="font-family:monospace,monospace"></span></div><div><span style="font-family:monospace,monospace"> </span><span style="font-family:arial,helvetica,sans-serif">Is there a way to use the parameters of the signal directly instead of going back through the comboBox to get the selected values.</span></div><div><span style="font-family:arial,helvetica,sans-serif"><br></span></div><div><span style="font-family:arial,helvetica,sans-serif">Hope that I was clear enough in my explications, and thanks already, <br></span></div><div><span style="font-family:arial,helvetica,sans-serif"><br></span></div><div><span style="font-family:arial,helvetica,sans-serif">Edwin Ancaer.<br></span></div><div><span style="font-family:arial,helvetica,sans-serif"><br></span></div><div><span style="font-family:monospace,monospace"></span></div><span style="font-family:monospace,monospace"></span></div>