just now I fell again in this trap. ...and found a solution:
place the script in the "on open" script of a button, and it works, you get the value on the form....
but! don't hide the button under another field, it would not work.But if you want that the button not to be visible in the form, you can place it "out" of the form.
Je la 06/12/2007 11:53-------- Origina mesag^o-------- Robert Leleu skribis (esperanto estas la unua internacia lingvo):
the following script datafield=hk_thisform.get_pyvisible("champ_2") datafield.set_value("erty") in the on_click of a button does write "erty" in the lineedit field "champ_2" (see in help the chapter : How to load a file content into a field using a filedialog) ...but the same script in the on-open of the lineedit field or of the form did not succeed Of course you should calculate a string variable of ore:minuti you want to write, and then call it to be fed to the lineeditfield. The trick is in the get_pyvisible contialdo skribis :Hi, sorry.... my script is so trivial that I did not think it could help... minuti=hk_thisreport.datasource().column_by_name("durata").asinteger() ore=minuti/60 hk_this.set_value(XXX) I tried several things instead of XXX, but nothing worked. And I could not find any document describing how to pass arguments to the set_value function (my fault, I am sure). In the form I have simply %VALUE% in the value field. I still have to make some more trivial computation, but I have not finished, as I could no find the way of printing both ore and minuti in the same field, or in two different ones, if that helps. I wish I could have some more documents and or examples. I have been using the three examples I found and those have been really useful. Anybody can share anything out there? Regards, Aldo------------------------------------------------------------------------- SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 _______________________________________________ Hk-classes-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/hk-classes-discuss
------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today. http://p.sf.net/sfu/beautyoftheweb
_______________________________________________ Hk-classes-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/hk-classes-discuss
