Hi, I have problem about Lianja App Builder.
Sometimes to often my App Builder stop working immediately after changing my python file a switching from Apps to Pages.
I'm using Windows 7 32 bit and Lianja full download with all services, but Trial.
I'm going to add some code below to check if my code isn't bad.
Before my Lianja stopped working, I had the following code:
Code:
#
# Lianja custom Python section "page1_section1"
#
import Lianja
#--------------------------------------------------------------------------
# Step 1: Define the classes we need
# Note that all Lianja UI Framework classes can be subclassed in Python
class mySection(Lianja.Section):
def add(self):
Lianja.showMessage("add() was called")
def delete(self):
Lianja.showMessage("delete() was called")
def first(self):
Lianja.showMessage("first() was called")
def previous(self):
Lianja.showMessage("previous() was called")
def next(self):
Lianja.showMessage("next() was called")
def last(self):
Lianja.showMessage("last() was called")
def refresh(self):
pass
def search(self):
pass
def watch(self):
Lianja.showMessage("watch() was called")
def edit(self):
Lianja.showMessage("edit() was called")
def save(self):
Lianja.showMessage("save() was called")
def cancel(self):
Lianja.showMessage("cancel() was called")
#--------------------------------------------------------------------------
# Note how the click() event handler for the ListBox is defined in Python
class myListbox(Lianja.Listbox):
def click(self):
ui_grid.clear( )
# Note how the AddItems method of Grid, ListBox and ComboBox can take
# a SQL SELECT statement as an argument
if ui_listbox.text == "All":
ui_grid.additems('select * from southwind!example where last_name != " "')
else:
ui_grid.additems('select * from southwind!example where upper(left(last_name,1)) \
= "' + ui_listbox.text + '"')
ui_grid.refresh( )
This works when I changed from Apps to Pages.
But when I added following lines of code, my Lianja stop working, and after restart I cannot access my App, It stop working again and again..
Code:
# Step 2: Create the Section object
# Note that the CreateObject() method needs two args: objectname, classname
oSection = Lianja.createObject("oSection", "mySection")
oSection.backcolor = "lightgreen"
oSection.caption = "This is a custom Python section
Stop working means Windows pop-up dialog stop working, and just one way is to close the app.
Bookmarks