-
FEATURED COMPONENTS
First time here? Check out the FAQ!
From the smalltalk by Bobzk, I tried his example with my database, it works. What If i want to do the thing then which part of the code should I modified?
Only python part or composer or both?
Did anyone experience in this?
Here is some code,
Could you please teach me to fill in the listbox model?
<?page title="zk Python test"?>
<window id="mywin" apply="pfactory.ComposerFactory" title="Book details" border="normal" width="600px">
<custom-attributes factory-class="BookCon" />
<listbox model="?" emptyMessage="No record found in the result">
<listhead sizable = "true" menupopup="auto">
<listheader sort="auto" label="Id" width="150px"/>
<listheader sort="auto" label="Subject" />
</listhead>
<template name="model">
<listitem>
<listcell label ="${each.id}" />
<listcell label ="${each.subject}" />
</listitem>
</template>
</listbox>
</window>
s it beneficial to use Python for desktop apps. There are rare breed of programs that are developed on desktop using Python and I was wondering about its main purpose in the tech world. But for start it is not easy to deal with the program without assistance. I found fantastic tutor for my self [url="http://http://pythontutors.com/"]My link[/url]! Python is also very popular in web development, though primarily on the 'back end' side. The combination of easy extensibility, good iteration time, and good integration with database and other web standards makes it a popular choice. I wish you luck in your endeavors!
Sorry, I don't really want to help you go down a dead end route. We tried stuff like this and it was too slow. Each time a new user came on, it had to fire up the Jython interpreter. Added 2-3 seconds or so to the initial page load for each user.
Go down the route as I describe in the third smalltalk and I'll help as much as I can.
I would not suggest doing it the way you have (using zscript) and that is not how we do it in the smalltalk.
Not sure it will work your way, but if it does it will be slow.
Go back to using the way the smalltalk says. Make sure you are reading the latest smalltalk. http://books.zkoss.org/wiki/SmallTalks/2011/December/PythonWithZKPart3
You need to change the Python code as your application requires and of course the ZUL code.
What you do not need to do is change any java code.
Of course you can copy and/or keep any of the Python code if it suits your application.
Let me know if you need more information.
Asked: 2013-04-24 05:39:29 +0800
Seen: 42 times
Last updated: Feb 01 '17
Hi Bobzk, I have just updated some code of my ZUL file. Does the composer can be use for every scenario?
sorry for poor english, and newbie @ zk and python
kimtch ( 2013-04-24 09:39:33 +0800 )editYes, I know part III is better than part I but I would like to ensure what should be the value of the model, trying to isolated the problem>_>
kimtch ( 2013-04-24 09:49:30 +0800 )edit