$assigrow problem

Bastiaan Olij lists at basenlily.nl
Thu Apr 23 17:49:37 EDT 2009


Hi Jean Mark,

> To me, the build in table class works with any version of Studio (not
> sure for 1.0, I've never used it)
The build in one was always there but you always had to create a table
class and set $sqlclassname to the schema you wanted to use. What is new
in Studio 4.x is that there is a tick box on the schema class that lets
you define a list directly from the schema class without creating a
table class first. Before that version of Studio,if you used a schema
class you would get a list defined by the schema class but with no
database methods (so no $insert, $update, etc.)
> Brilliant, so simple, never thought about this but obvious when you
> read it
> Thank you for the tips, it is going to save me a lot of lines of code...
Mind you, the row approach is far from bad. When I have a list that I
use for selecting the row that I want to edit, I tent to only load a few
columns into that list to save on memory and bandwidth. Still, I would
have an instance list variable for selection, and an instance row
variable that has all the columns. When the user selects from the list,
I load the full row into my row variable (using $select and $fetch), let
the user do his/her thing, and then on save call the $insert/$update
directly on my row variable.

But when I have a list that already contains all my data and is defined
from the table class, I just do the $insert/$update on the list
directly. It will work on the current line of the list.

Greetz,

Bas



More information about the omnisdev-en mailing list