Support for inline hosts?

classic Classic list List threaded Threaded
41 messages Options
123
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Support for inline hosts?

stevepiercy
Does Knop support inline hosts?

I did not see in the docs whether Knop supports inline hosts,
and I did not see anything in the source code.

--steve

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Support for inline hosts?

Johan Solve-2
It's not explicitly supported, unless "it just works".

At 11.18 -0800 2012-01-12, Steve Piercy - Web Site Builder wrote:

>Does Knop support inline hosts?
>
>I did not see in the docs whether Knop supports inline hosts, and I did not see anything in the source code.
>
>--steve
>
>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>Steve Piercy               Web Site Builder
>Soquel, CA
><[hidden email]>                  <http://www.StevePiercy.com/>
>
>
>--
>#############################################################
>This message is sent to you because you are subscribed to
>the mailing list <[hidden email]>.
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>
>List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
>Project homepage http://montania.se/projects/knop/
>Google Code has the latest downloads at http://code.google.com/p/knop/


--
     Johan Sölve    [FSA Member, Lasso Partner]
     Web Application/Lasso/FileMaker Developer
     MONTANIA SOFTWARE & SOLUTIONS
http://www.montania.se   mailto:[hidden email]
 (spam-safe email address, replace '-' with 'a')

--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Support for inline hosts?

stevepiercy
var('di' = knop_database(
         -host(array(
             -datasource='mysqlds',
             -name='localhost',
             -username=$u,
             -password=$p)),
         -database=$d,
         -table=$t));

Expected: end of tag but got: "("
at: /__knopinline.lasso on line 3 at position 7.

So the answer appears to be "nope".

Bummer.  Looks like I'll have to continue setting up Lasso
Security for databases, unless I want to modify Knop to use
inline hosts.

--steve


On 1/13/12 at 8:30 AM, [hidden email] (Johan Solve) pronounced:

>It's not explicitly supported, unless "it just works".
>
>At 11.18 -0800 2012-01-12, Steve Piercy - Web Site Builder wrote:
>>Does Knop support inline hosts?
>>
>>I did not see in the docs whether Knop supports inline hosts, and I did not see
>anything in the source code.
>>
>>--steve
>>
>>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>Steve Piercy               Web Site Builder
>>Soquel, CA
>><[hidden email]>                  <http://www.StevePiercy.com/>
>>
>>
>>--
>>#############################################################
>>This message is sent to you because you are subscribed to
>>the mailing list <[hidden email]>.
>>To unsubscribe, E-mail to: <[hidden email]>
>>Send administrative queries to  <[hidden email]>
>>List archive
>http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
>>Project homepage http://montania.se/projects/knop/
>>Google Code has the latest downloads at http://code.google.com/p/knop/
>
>
>--
>Johan Sölve    [FSA Member, Lasso Partner]
>Web Application/Lasso/FileMaker Developer
>MONTANIA SOFTWARE & SOLUTIONS
>http://www.montania.se   mailto:[hidden email]
>(spam-safe email address, replace '-' with 'a')
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Support for inline hosts?

Johan Solve-2
Try adding a = after -host ;)

At 00.14 -0800 2012-01-13, Steve Piercy - Web Site Builder wrote:

>var('di' = knop_database(
>        -host(array(
>            -datasource='mysqlds',
>            -name='localhost',
>            -username=$u,
>            -password=$p)),
>        -database=$d,
>        -table=$t));
>
>Expected: end of tag but got: "("
>at: /__knopinline.lasso on line 3 at position 7.
>
>So the answer appears to be "nope".
>
>Bummer.  Looks like I'll have to continue setting up Lasso Security for databases, unless I want to modify Knop to use inline hosts.
>
>--steve
>
>
>On 1/13/12 at 8:30 AM, [hidden email] (Johan Solve) pronounced:
>
>>It's not explicitly supported, unless "it just works".
>>
>>At 11.18 -0800 2012-01-12, Steve Piercy - Web Site Builder wrote:
>>>Does Knop support inline hosts?
>>>
>>>I did not see in the docs whether Knop supports inline hosts, and I did not see
>>anything in the source code.
>>>
>>>--steve
>>>
>>>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>Steve Piercy               Web Site Builder
>>>Soquel, CA
>>><[hidden email]>                  <http://www.StevePiercy.com/>
>>>
>>>
>>>--
>>>#############################################################
>>>This message is sent to you because you are subscribed to
>>>the mailing list <[hidden email]>.
>>>To unsubscribe, E-mail to: <[hidden email]>
>>>Send administrative queries to  <[hidden email]>
>>>List archive
>>http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
>>>Project homepage http://montania.se/projects/knop/
>>>Google Code has the latest downloads at http://code.google.com/p/knop/
>>
>>
>>--
>>Johan Sölve    [FSA Member, Lasso Partner]
>>Web Application/Lasso/FileMaker Developer
>>MONTANIA SOFTWARE & SOLUTIONS
>>http://www.montania.se   mailto:[hidden email]
>>(spam-safe email address, replace '-' with 'a')
>>
>
>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>Steve Piercy               Web Site Builder
>Soquel, CA
><[hidden email]>                  <http://www.StevePiercy.com/>
>
>
>--
>#############################################################
>This message is sent to you because you are subscribed to
>the mailing list <[hidden email]>.
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>
>List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
>Project homepage http://montania.se/projects/knop/
>Google Code has the latest downloads at http://code.google.com/p/knop/


--
     Johan Sölve    [FSA Member, Lasso Partner]
     Web Application/Lasso/FileMaker Developer
     MONTANIA SOFTWARE & SOLUTIONS
http://www.montania.se   mailto:[hidden email]
 (spam-safe email address, replace '-' with 'a')

--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Support for inline hosts?

stevepiercy
Gah.  Note to self: coding late at night is prone to dumb mistakes.

Even with correct syntax, inline hosts in Knop does not work.  I
get a "No permission" error.  Using the same connection
information in a normal Lasso inline host method instead of a
Knop object works.

--steve


On 1/13/12 at 10:02 PM, [hidden email] (Johan Solve) pronounced:

>Try adding a = after -host ;)
>
>At 00.14 -0800 2012-01-13, Steve Piercy - Web Site Builder wrote:
>>var('di' = knop_database(
>>-host(array(
>>-datasource='mysqlds',
>>-name='localhost',
>>-username=$u,
>>-password=$p)),
>>-database=$d,
>>-table=$t));
>>
>>Expected: end of tag but got: "("
>>at: /__knopinline.lasso on line 3 at position 7.
>>
>>So the answer appears to be "nope".
>>
>>Bummer.  Looks like I'll have to continue setting up Lasso Security for databases,
>unless I want to modify Knop to use inline hosts.
>>
>>--steve
>>
>>
>>On 1/13/12 at 8:30 AM, [hidden email] (Johan Solve) pronounced:
>>
>>>It's not explicitly supported, unless "it just works".
>>>
>>>At 11.18 -0800 2012-01-12, Steve Piercy - Web Site Builder wrote:
>>>>Does Knop support inline hosts?
>>>>
>>>>I did not see in the docs whether Knop supports inline hosts, and I did not see
>>>anything in the source code.
>>>>
>>>>--steve
>>>>
>>>>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>>Steve Piercy               Web Site Builder
>>>>Soquel, CA
>>>><[hidden email]>                  <http://www.StevePiercy.com/>
>>>>
>>>>
>>>>--
>>>>#############################################################
>>>>This message is sent to you because you are subscribed to
>>>>the mailing list <[hidden email]>.
>>>>To unsubscribe, E-mail to: <[hidden email]>
>>>>Send administrative queries to  <[hidden email]>
>>>>List archive
>>>http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
>>>>Project homepage http://montania.se/projects/knop/
>>>>Google Code has the latest downloads at http://code.google.com/p/knop/
>>>
>>>
>>>--
>>>Johan Sölve    [FSA Member, Lasso Partner]
>>>Web Application/Lasso/FileMaker Developer
>>>MONTANIA SOFTWARE & SOLUTIONS
>>>http://www.montania.se   mailto:[hidden email]
>>>(spam-safe email address, replace '-' with 'a')
>>>
>>
>>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>Steve Piercy               Web Site Builder
>>Soquel, CA
>><[hidden email]>                  <http://www.StevePiercy.com/>
>>
>>
>>--
>>#############################################################
>>This message is sent to you because you are subscribed to
>>the mailing list <[hidden email]>.
>>To unsubscribe, E-mail to: <[hidden email]>
>>Send administrative queries to  <[hidden email]>
>>List archive
>http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
>>Project homepage http://montania.se/projects/knop/
>>Google Code has the latest downloads at http://code.google.com/p/knop/
>
>
>--
>Johan Sölve    [FSA Member, Lasso Partner]
>Web Application/Lasso/FileMaker Developer
>MONTANIA SOFTWARE & SOLUTIONS
>http://www.montania.se   mailto:[hidden email]
>(spam-safe email address, replace '-' with 'a')
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Support for inline hosts?

Ric Lewis-3
Hi Steve

This seems to be working for me now. I got the same permission error you were seeing, but then made the formatting of the inline host array more 'explicit', and it seems to work. I also made a couple of tiny changes in knop.lasso to support the -host parameter.

var: 'hostdb' = (array: (pair: (-Datasource)=('MySQLDS')),
                                        (pair: (-Name)=('127.0.0.1')),
                                        (pair: (-Username)=('root')),
                                        (pair: (-password)=('password')));

        var('d_usr' = knop_database(
    -host=$hostdb,
    -database='mydb',
      -table='users',
      -keyfield='id'));


It's been fine in my testing, but it might break on more obscure functions though. Selects, Adds, Updates all seem to work fine.

Cheers,

Ric


On 13 Jan 2012, at 23:14, Steve Piercy - Web Site Builder wrote:

> Even with correct syntax, inline hosts in Knop does not work.  I get a "No permission" error.  Using the same connection information in a normal Lasso inline host method instead of a Knop object works.


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Support for inline hosts?

stevepiercy
Can you paste or attach your knop.lasso modifications, as well
as the individual tags from which Knop is built?

Maybe we can merge them into the main Knop trunk.

--steve


On 1/15/12 at 6:28 PM, [hidden email] (Ric Lewis) pronounced:

>Hi Steve
>
>This seems to be working for me now. I got the same permission
>error you were seeing, but then made the formatting of the
>inline host array more 'explicit', and it seems to work. I also
>made a couple of tiny changes in knop.lasso to support the
>-host parameter.
>
>var: 'hostdb' = (array: (pair: (-Datasource)=('MySQLDS')),
>(pair: (-Name)=('127.0.0.1')), (pair: (-Username)=('root')),
>(pair: (-password)=('password')));
>
>var('d_usr' = knop_database(
>-host=$hostdb,
>-database='mydb',
>-table='users',
>-keyfield='id'));
>
>
>It's been fine in my testing, but it might break on more
>obscure functions though. Selects, Adds, Updates all seem to
>work fine.
>Cheers,
>
>Ric
>
>
>On 13 Jan 2012, at 23:14, Steve Piercy - Web Site Builder wrote:
>
>>Even with correct syntax, inline hosts in Knop does not work.  I get a "No
>permission" error.  Using the same connection information in a
>normal Lasso inline host method instead of a Knop object works.
>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Support for inline hosts?

Ric Lewis-3
Sure - as I say it's been working for me but I don't know what it might break elsewhere. I did test by reverting to my older pre inline-host code and that worked just fine even with the host mods to knop.lasso in place.

Anyway, it's all at the top of the database type, starts at line 767 in my 2011-02-28 18:37:02 knop.lasso (lasso 8 build), just added these four lines:


local: 'database'=string,
'table'=string,
'table_realname'=string, // the actual table name, to be used in SQL statements (in case the table name is aliased in Lasso)
'username'=string,
'password'=string,
'db_connect'=array,
'host'=array, // add this
'datasource_name'=string,
<-snip->

define_tag: 'oncreate',
-required='database',
-required='table',
-optional='host', // add this
-optional='username',
-optional='password',
<-snip->

// store params as instance variables
local_defined('database') ? (self -> 'database') = @#database; 
local_defined('table') ? (self -> 'table') = @#table; 
local_defined('host') ? (self -> 'host') = @#host;  // add this
local_defined('username') ? (self -> 'username') = @#username; 
local_defined('password') ? (self -> 'password') = @#password; 
<-snip->

// build inline connection array
local_defined('database') ? (self -> 'db_connect') -> insert('-database'  = @#database);
local_defined('table') ? (self -> 'db_connect') -> insert('-table'  = @#table);
local_defined('host') ? (self -> 'db_connect') -> insert('-host'  = @#host);  // add this
local_defined('username') ? (self -> 'db_connect') -> insert('-username'  = @#username);
local_defined('password') ? (self -> 'db_connect') -> insert('-password'  = @#password);


On 15 Jan 2012, at 19:49, Steve Piercy - Web Site Builder wrote:

Can you paste or attach your knop.lasso modifications, as well as the individual tags from which Knop is built?

Maybe we can merge them into the main Knop trunk.

--steve


On 1/15/12 at 6:28 PM, [hidden email] (Ric Lewis) pronounced:

Hi Steve

This seems to be working for me now. I got the same permission error you were seeing, but then made the formatting of the inline host array more 'explicit', and it seems to work. I also made a couple of tiny changes in knop.lasso to support the -host parameter.

var: 'hostdb' = (array: (pair: (-Datasource)=('MySQLDS')),
(pair: (-Name)=('127.0.0.1')), (pair: (-Username)=('root')), (pair: (-password)=('password')));

var('d_usr' = knop_database(
-host=$hostdb,
-database='mydb',
-table='users',
-keyfield='id'));


It's been fine in my testing, but it might break on more obscure functions though. Selects, Adds, Updates all seem to work fine.
Cheers,

Ric


On 13 Jan 2012, at 23:14, Steve Piercy - Web Site Builder wrote:

Even with correct syntax, inline hosts in Knop does not work.  I get a "No
permission" error.  Using the same connection information in a normal Lasso inline host method instead of a Knop object works.



-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy               Web Site Builder               Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Support for inline hosts?

list
I added support for hosts in Knop for Lasso 9. All based on the findings from Ric.

Also took the opportunity to commit the latests versions of all the types. Making the public repo synchronized with the version we use ourselves in Amtac.

HDB
Jolle

15 jan 2012 kl. 21:32 skrev Ric Lewis:

> Sure - as I say it's been working for me but I don't know what it might break elsewhere. I did test by reverting to my older pre inline-host code and that worked just fine even with the host mods to knop.lasso in place.
>
> Anyway, it's all at the top of the database type, starts at line 767 in my 2011-02-28 18:37:02 knop.lasso (lasso 8 build), just added these four lines:
>
>
> local: 'database'=string,
> 'table'=string,
> 'table_realname'=string, // the actual table name, to be used in SQL statements (in case the table name is aliased in Lasso)
> 'username'=string,
> 'password'=string,
> 'db_connect'=array,
> 'host'=array, // add this
> 'datasource_name'=string,
> <-snip->
>
> define_tag: 'oncreate',
> -required='database',
> -required='table',
> -optional='host', // add this
> -optional='username',
> -optional='password',
> <-snip->
>
> // store params as instance variables
> local_defined('database') ? (self -> 'database') = @#database;
> local_defined('table') ? (self -> 'table') = @#table;
> local_defined('host') ? (self -> 'host') = @#host; // add this
> local_defined('username') ? (self -> 'username') = @#username;
> local_defined('password') ? (self -> 'password') = @#password;
> <-snip->
>
> // build inline connection array
> local_defined('database') ? (self -> 'db_connect') -> insert('-database'  = @#database);
> local_defined('table') ? (self -> 'db_connect') -> insert('-table'  = @#table);
> local_defined('host') ? (self -> 'db_connect') -> insert('-host'  = @#host);  // add this
> local_defined('username') ? (self -> 'db_connect') -> insert('-username'  = @#username);
> local_defined('password') ? (self -> 'db_connect') -> insert('-password'  = @#password);
>
>
> On 15 Jan 2012, at 19:49, Steve Piercy - Web Site Builder wrote:
>
>> Can you paste or attach your knop.lasso modifications, as well as the individual tags from which Knop is built?
>>
>> Maybe we can merge them into the main Knop trunk.
>>
>> --steve
>>
>>
>> On 1/15/12 at 6:28 PM, [hidden email] (Ric Lewis) pronounced:
>>
>>> Hi Steve
>>>
>>> This seems to be working for me now. I got the same permission error you were seeing, but then made the formatting of the inline host array more 'explicit', and it seems to work. I also made a couple of tiny changes in knop.lasso to support the -host parameter.
>>>
>>> var: 'hostdb' = (array: (pair: (-Datasource)=('MySQLDS')),
>>> (pair: (-Name)=('127.0.0.1')), (pair: (-Username)=('root')), (pair: (-password)=('password')));
>>>
>>> var('d_usr' = knop_database(
>>> -host=$hostdb,
>>> -database='mydb',
>>> -table='users',
>>> -keyfield='id'));
>>>
>>>
>>> It's been fine in my testing, but it might break on more obscure functions though. Selects, Adds, Updates all seem to work fine.
>>> Cheers,
>>>
>>> Ric
>>>
>>>
>>> On 13 Jan 2012, at 23:14, Steve Piercy - Web Site Builder wrote:
>>>
>>>> Even with correct syntax, inline hosts in Knop does not work.  I get a "No
>>> permission" error.  Using the same connection information in a normal Lasso inline host method instead of a Knop object works.
>>>
>>>
>>
>> -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>> Steve Piercy               Web Site Builder               Soquel, CA
>> <[hidden email]>                  <http://www.StevePiercy.com/>
>>
>>
>> --
>> #############################################################
>> This message is sent to you because you are subscribed to
>> the mailing list <[hidden email]>.
>> To unsubscribe, E-mail to: <[hidden email]>
>> Send administrative queries to  <[hidden email]>
>> List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
>> Project homepage http://montania.se/projects/knop/
>> Google Code has the latest downloads at http://code.google.com/p/knop/
>


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Support for inline hosts?

stevepiercy
Thanks, Jolle.

I'm working on the 8 version by modifying the source tags, but I
run into this error when running buildnamespace.lasso:

     The namespace knop_ was created at startup and can not be
unloaded or it
     contains unloadable namespaces or tags.

Anyone know how to work around that?  My Nabble-fu fails me.

--steve


On 1/15/12 at 10:55 PM, [hidden email] pronounced:

>I added support for hosts in Knop for Lasso 9. All based on the findings from Ric.
>
>Also took the opportunity to commit the latests versions of all
>the types. Making the public repo synchronized with the version
>we use ourselves in Amtac.
>
>HDB
>Jolle
>
>15 jan 2012 kl. 21:32 skrev Ric Lewis:
>
>>Sure - as I say it's been working for me but I don't know what it might break
>elsewhere. I did test by reverting to my older pre inline-host
>code and that worked just fine even with the host mods to
>knop.lasso in place.
>>
>>Anyway, it's all at the top of the database type, starts at line 767 in my
>2011-02-28 18:37:02 knop.lasso (lasso 8 build), just added these four lines:
>>
>>
>>local: 'database'=string,
>>'table'=string,
>>'table_realname'=string,    // the actual table name, to be used in SQL
>statements (in case the table name is aliased in Lasso)
>>'username'=string,
>>'password'=string,
>>'db_connect'=array,
>>'host'=array,               // add this
>>'datasource_name'=string,
>><-snip->
>>
>>define_tag: 'oncreate',
>>-required='database',
>>-required='table',
>>-optional='host',               // add this
>>-optional='username',
>>-optional='password',
>><-snip->
>>
>>// store params as instance variables
>>local_defined('database') ? (self -> 'database') = @#database;
>>local_defined('table') ? (self -> 'table') = @#table;
>>local_defined('host') ? (self -> 'host') =
>>@#host;              // add this
>>local_defined('username') ? (self -> 'username') = @#username;
>>local_defined('password') ? (self -> 'password') = @#password; <-snip->
>>
>>// build inline connection array
>>local_defined('database') ? (self -> 'db_connect') -> insert('-database'  =
>@#database);
>>local_defined('table') ? (self -> 'db_connect') -> insert('-table'  =
>@#table);
>>local_defined('host') ? (self -> 'db_connect') -> insert('-host'  = @#host);
>// add this
>>local_defined('username') ? (self -> 'db_connect') -> insert('-username'  =
>@#username);
>>local_defined('password') ? (self -> 'db_connect') -> insert('-password'  =
>@#password);
>>
>>
>>On 15 Jan 2012, at 19:49, Steve Piercy - Web Site Builder wrote:
>>
>>> Can you paste or attach your knop.lasso modifications, as well as the individual
>tags from which Knop is built?
>>>   Maybe we can merge them into the main Knop trunk.
>>>   --steve
>>>    On 1/15/12 at 6:28 PM, [hidden email] (Ric Lewis) pronounced:
>>>
>>>> Hi Steve
>>>>   This seems to be working for me now. I got the same
>>>>permission error you were
>seeing, but then made the formatting of the inline host array
>more 'explicit', and it seems to work. I also made a couple of
>tiny changes in knop.lasso to support the -host parameter.
>>>>   var: 'hostdb' = (array: (pair: (-Datasource)=('MySQLDS')),
>>>> (pair: (-Name)=('127.0.0.1')), (pair: (-Username)=('root')), (pair:
>(-password)=('password')));
>>>>   var('d_usr' = knop_database(
>>>> -host=$hostdb,
>>>> -database='mydb',
>>>> -table='users',
>>>> -keyfield='id'));
>>>>    It's been fine in my testing, but it might break on more
>>>>obscure functions though.
>Selects, Adds, Updates all seem to work fine.
>>>> Cheers,
>>>>   Ric
>>>>    On 13 Jan 2012, at 23:14, Steve Piercy - Web Site
>>>>Builder wrote:
>>>>
>>>>> Even with correct syntax, inline hosts in Knop does not work.  I get a "No
>>>> permission" error.  Using the same connection information in a normal Lasso inline
>host method instead of a Knop object works.
>>>>  
>>>   -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>-- -- -- --
>>> Steve Piercy               Web Site Builder               Soquel, CA
>>> <[hidden email]>                  <http://www.StevePiercy.com/>
>>>    --  #############################################################
>>> This message is sent to you because you are subscribed to
>>> the mailing list <[hidden email]>.
>>> To unsubscribe, E-mail to: <[hidden email]>
>>> Send administrative queries to  <[hidden email]>
>>> List archive
>http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
>>> Project homepage http://montania.se/projects/knop/
>>> Google Code has the latest downloads at http://code.google.com/p/knop/
>>
>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Support for inline hosts?

Johan Solve-2
Are you running knop as prototype? I think that prevents a namespace from unloading.

At 14.46 -0800 2012-01-15, Steve Piercy - Web Site Builder wrote:

>Thanks, Jolle.
>
>I'm working on the 8 version by modifying the source tags, but I run into this error when running buildnamespace.lasso:
>
>    The namespace knop_ was created at startup and can not be unloaded or it
>    contains unloadable namespaces or tags.
>
>Anyone know how to work around that?  My Nabble-fu fails me.
>
>--steve
>
>
>On 1/15/12 at 10:55 PM, [hidden email] pronounced:
>
>>I added support for hosts in Knop for Lasso 9. All based on the findings from Ric.
>>
>>Also took the opportunity to commit the latests versions of all the types. Making the public repo synchronized with the version we use ourselves in Amtac.
>>
>>HDB
>>Jolle
>>
>>15 jan 2012 kl. 21:32 skrev Ric Lewis:
>>
>>>Sure - as I say it's been working for me but I don't know what it might break
>>elsewhere. I did test by reverting to my older pre inline-host code and that worked just fine even with the host mods to knop.lasso in place.
>>>
>>>Anyway, it's all at the top of the database type, starts at line 767 in my
>>2011-02-28 18:37:02 knop.lasso (lasso 8 build), just added these four lines:
>>>
>>>
>>>local: 'database'=string,
>>>'table'=string,
>>>'table_realname'=string,    // the actual table name, to be used in SQL
>>statements (in case the table name is aliased in Lasso)
>>>'username'=string,
>>>'password'=string,
>>>'db_connect'=array,
>>>'host'=array,               // add this
>>>'datasource_name'=string,
>>><-snip->
>>>
>>>define_tag: 'oncreate',
>>>-required='database',
>>>-required='table',
>>>-optional='host',               // add this
>>>-optional='username',
>>>-optional='password',
>>><-snip->
>>>
>>>// store params as instance variables
>>>local_defined('database') ? (self -> 'database') = @#database; local_defined('table') ? (self -> 'table') = @#table; local_defined('host') ? (self -> 'host') = @#host;              // add this
>>>local_defined('username') ? (self -> 'username') = @#username; local_defined('password') ? (self -> 'password') = @#password; <-snip->
>>>
>>>// build inline connection array
>>>local_defined('database') ? (self -> 'db_connect') -> insert('-database'  =
>>@#database);
>>>local_defined('table') ? (self -> 'db_connect') -> insert('-table'  =
>>@#table);
>>>local_defined('host') ? (self -> 'db_connect') -> insert('-host'  = @#host);
>>// add this
>>>local_defined('username') ? (self -> 'db_connect') -> insert('-username'  =
>>@#username);
>>>local_defined('password') ? (self -> 'db_connect') -> insert('-password'  =
>>@#password);
>>>
>>>
>>>On 15 Jan 2012, at 19:49, Steve Piercy - Web Site Builder wrote:
>>>
>>>>Can you paste or attach your knop.lasso modifications, as well as the individual
>>tags from which Knop is built?
>>>>  Maybe we can merge them into the main Knop trunk.
>>>>  --steve
>>>>   On 1/15/12 at 6:28 PM, [hidden email] (Ric Lewis) pronounced:
>>>>
>>>>>Hi Steve
>>>>>  This seems to be working for me now. I got the same permission error you were
>>seeing, but then made the formatting of the inline host array more 'explicit', and it seems to work. I also made a couple of tiny changes in knop.lasso to support the -host parameter.
>>>>>  var: 'hostdb' = (array: (pair: (-Datasource)=('MySQLDS')),
>>>>>(pair: (-Name)=('127.0.0.1')), (pair: (-Username)=('root')), (pair:
>>(-password)=('password')));
>>>>>  var('d_usr' = knop_database(
>>>>>-host=$hostdb,
>>>>>-database='mydb',
>>>>>-table='users',
>>>>>-keyfield='id'));
>>>>>   It's been fine in my testing, but it might break on more obscure functions though.
>>Selects, Adds, Updates all seem to work fine.
>>>>>Cheers,
>>>>>  Ric
>>>>>   On 13 Jan 2012, at 23:14, Steve Piercy - Web Site Builder wrote:
>>>>>
>>>>>>Even with correct syntax, inline hosts in Knop does not work.  I get a "No
>>>>>permission" error.  Using the same connection information in a normal Lasso inline
>>host method instead of a Knop object works.
>>
>>>>  -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>>Steve Piercy               Web Site Builder               Soquel, CA
>>>><[hidden email]>                  <http://www.StevePiercy.com/>
>>>>   --  #############################################################
>>>>This message is sent to you because you are subscribed to
>>>>the mailing list <[hidden email]>.
>>>>To unsubscribe, E-mail to: <[hidden email]>
>>>>Send administrative queries to  <[hidden email]>
>>>>List archive
>>http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
>>>>Project homepage http://montania.se/projects/knop/
>>>>Google Code has the latest downloads at http://code.google.com/p/knop/
>>>
>>
>>
>
>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>Steve Piercy               Web Site Builder
>Soquel, CA
><[hidden email]>                  <http://www.StevePiercy.com/>
>
>
>--
>#############################################################
>This message is sent to you because you are subscribed to
>the mailing list <[hidden email]>.
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>
>List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
>Project homepage http://montania.se/projects/knop/
>Google Code has the latest downloads at http://code.google.com/p/knop/


--
     Johan Sölve    [FSA Member, Lasso Partner]
     Web Application/Lasso/FileMaker Developer
     MONTANIA SOFTWARE & SOLUTIONS
http://www.montania.se   mailto:[hidden email]
 (spam-safe email address, replace '-' with 'a')

--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Support for inline hosts?

stevepiercy
Nope.  I checked.  All instances of -prototype are commented out, e.g.:

    define_type: 'form',
        'knop_base',
        -namespace='knop_';
    //  -prototype;

--steve


On 1/16/12 at 12:11 AM, [hidden email] (Johan Solve) pronounced:

> Are you running knop as prototype? I think that prevents a namespace from unloading.
>
> At 14.46 -0800 2012-01-15, Steve Piercy - Web Site Builder wrote:
> >Thanks, Jolle.
> >
> >I'm working on the 8 version by modifying the source tags, but I run into this error
> when running buildnamespace.lasso:
> >
> >    The namespace knop_ was created at startup and can not be unloaded or it
> >    contains unloadable namespaces or tags.
> >
> >Anyone know how to work around that?  My Nabble-fu fails me.
> >
> >--steve
> >
> >
> >On 1/15/12 at 10:55 PM, [hidden email] pronounced:
> >
> >>I added support for hosts in Knop for Lasso 9. All based on the findings from Ric.
> >>
> >>Also took the opportunity to commit the latests versions of all the types. Making
> the public repo synchronized with the version we use ourselves in Amtac.
> >>
> >>HDB
> >>Jolle
> >>
> >>15 jan 2012 kl. 21:32 skrev Ric Lewis:
> >>
> >>>Sure - as I say it's been working for me but I don't know what it might break
> >>elsewhere. I did test by reverting to my older pre inline-host code and that worked
> just fine even with the host mods to knop.lasso in place.
> >>>
> >>>Anyway, it's all at the top of the database type, starts at line 767 in my
> >>2011-02-28 18:37:02 knop.lasso (lasso 8 build), just added these four lines:
> >>>
> >>>
> >>>local: 'database'=string,
> >>>'table'=string,
> >>>'table_realname'=string,    // the actual table name, to be used in SQL
> >>statements (in case the table name is aliased in Lasso)
> >>>'username'=string,
> >>>'password'=string,
> >>>'db_connect'=array,
> >>>'host'=array,               // add this
> >>>'datasource_name'=string,
> >>><-snip->
> >>>
> >>>define_tag: 'oncreate',
> >>>-required='database',
> >>>-required='table',
> >>>-optional='host',               // add this
> >>>-optional='username',
> >>>-optional='password',
> >>><-snip->
> >>>
> >>>// store params as instance variables
> >>>local_defined('database') ? (self -> 'database') = @#database;
> local_defined('table') ? (self -> 'table') = @#table; local_defined('host') ? (self ->
> 'host') = @#host;              // add this
> >>>local_defined('username') ? (self -> 'username') = @#username;
> local_defined('password') ? (self -> 'password') = @#password; <-snip->
> >>>
> >>>// build inline connection array
> >>>local_defined('database') ? (self -> 'db_connect') -> insert('-database'  =
> >>@#database);
> >>>local_defined('table') ? (self -> 'db_connect') -> insert('-table'  =
> >>@#table);
> >>>local_defined('host') ? (self -> 'db_connect') -> insert('-host'  = @#host);
> >>// add this
> >>>local_defined('username') ? (self -> 'db_connect') -> insert('-username'  =
> >>@#username);
> >>>local_defined('password') ? (self -> 'db_connect') -> insert('-password'  =
> >>@#password);
> >>>
> >>>
> >>>On 15 Jan 2012, at 19:49, Steve Piercy - Web Site Builder wrote:
> >>>
> >>>>Can you paste or attach your knop.lasso modifications, as well as the individual
> >>tags from which Knop is built?
> >>>>  Maybe we can merge them into the main Knop trunk.
> >>>>  --steve
> >>>>   On 1/15/12 at 6:28 PM, [hidden email] (Ric Lewis) pronounced:
> >>>>
> >>>>>Hi Steve
> >>>>>  This seems to be working for me now. I got the same permission error you were
> >>seeing, but then made the formatting of the inline host array more 'explicit', and
> it seems to work. I also made a couple of tiny changes in knop.lasso to support the
> -host parameter.
> >>>>>  var: 'hostdb' = (array: (pair: (-Datasource)=('MySQLDS')),
> >>>>>(pair: (-Name)=('127.0.0.1')), (pair: (-Username)=('root')), (pair:
> >>(-password)=('password')));
> >>>>>  var('d_usr' = knop_database(
> >>>>>-host=$hostdb,
> >>>>>-database='mydb',
> >>>>>-table='users',
> >>>>>-keyfield='id'));
> >>>>>   It's been fine in my testing, but it might break on more obscure functions
> though.
> >>Selects, Adds, Updates all seem to work fine.
> >>>>>Cheers,
> >>>>>  Ric
> >>>>>   On 13 Jan 2012, at 23:14, Steve Piercy - Web Site Builder wrote:
> >>>>>
> >>>>>>Even with correct syntax, inline hosts in Knop does not work.  I get a "No
> >>>>>permission" error.  Using the same connection information in a normal Lasso
> inline
> >>host method instead of a Knop object works.
> >>
> >>>>  -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> >>>>Steve Piercy               Web Site Builder               Soquel, CA
> >>>><[hidden email]>                  <http://www.StevePiercy.com/>
> >>>>   --  #############################################################
> >>>>This message is sent to you because you are subscribed to
> >>>>the mailing list <[hidden email]>.
> >>>>To unsubscribe, E-mail to: <[hidden email]>
> >>>>Send administrative queries to  <[hidden email]>
> >>>>List archive
> >>http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
> >>>>Project homepage http://montania.se/projects/knop/
> >>>>Google Code has the latest downloads at http://code.google.com/p/knop/
> >>>
> >>
> >>
> >
> >-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
> >Steve Piercy               Web Site Builder
> >Soquel, CA
> ><[hidden email]>                  <http://www.StevePiercy.com/>
> >
> >
> >--
> >#############################################################
> >This message is sent to you because you are subscribed to
> >the mailing list <[hidden email]>.
> >To unsubscribe, E-mail to: <[hidden email]>
> >Send administrative queries to  <[hidden email]>
> >List archive
> http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
> >Project homepage http://montania.se/projects/knop/
> >Google Code has the latest downloads at http://code.google.com/p/knop/
>
>
> --
>      Johan Sölve    [FSA Member, Lasso Partner]
>      Web Application/Lasso/FileMaker Developer
>      MONTANIA SOFTWARE & SOLUTIONS
> http://www.montania.se   mailto:[hidden email]
>  (spam-safe email address, replace '-' with 'a')
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Steve Piercy               Web Site Builder               Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Support for inline hosts?

stevepiercy
It must be conflicting somewhere.  I created a new Lasso Site
just for Knop dev work, and now it unloads the namespace.  *shrug*

I also needed to add the new filepaths and modify the
permissions on the directory so it could write there.  Happiness.

Checked into repo.  Have at it!
http://code.google.com/p/knop/source/detail?r=187

--steve


On 1/15/12 at 3:20 PM, [hidden email] (Steve Piercy - Web
Site Builder) pronounced:

>Nope.  I checked.  All instances of -prototype are commented out, e.g.:
>
>define_type: 'form', 'knop_base',
>-namespace='knop_';
>//  -prototype;
>--steve
>
>
>On 1/16/12 at 12:11 AM, [hidden email] (Johan Solve) pronounced:
>
>>Are you running knop as prototype? I think that prevents a namespace from unloading.
>>
>>At 14.46 -0800 2012-01-15, Steve Piercy - Web Site Builder wrote:
>>>Thanks, Jolle.
>>>
>>>I'm working on the 8 version by modifying the source tags, but I run into this
>error
>>when running buildnamespace.lasso:
>>>
>>>The namespace knop_ was created at startup and can not be unloaded or it
>>>contains unloadable namespaces or tags.
>>>
>>>Anyone know how to work around that?  My Nabble-fu fails me.
>>>
>>>--steve
>>>
>>>
>>>On 1/15/12 at 10:55 PM, [hidden email] pronounced:
>>>
>>>>I added support for hosts in Knop for Lasso 9. All based on the findings from Ric.
>>>>
>>>>Also took the opportunity to commit the latests versions of all the types. Making
>>the public repo synchronized with the version we use ourselves in Amtac.
>>>>
>>>>HDB
>>>>Jolle
>>>>
>>>>15 jan 2012 kl. 21:32 skrev Ric Lewis:
>>>>
>>>>>Sure - as I say it's been working for me but I don't know what it might break
>>>>elsewhere. I did test by reverting to my older pre inline-host code and that
>worked
>>just fine even with the host mods to knop.lasso in place.
>>>>>
>>>>>Anyway, it's all at the top of the database type, starts at line 767 in my
>>>>2011-02-28 18:37:02 knop.lasso (lasso 8 build), just added these four lines:
>>>>>
>>>>>
>>>>>local: 'database'=string,
>>>>>'table'=string,
>>>>>'table_realname'=string,    // the actual table name, to be used in SQL
>>>>statements (in case the table name is aliased in Lasso)
>>>>>'username'=string,
>>>>>'password'=string,
>>>>>'db_connect'=array,
>>>>>'host'=array,               // add this
>>>>>'datasource_name'=string,
>>>>><-snip->
>>>>>
>>>>>define_tag: 'oncreate',
>>>>>-required='database',
>>>>>-required='table',
>>>>>-optional='host',               // add this
>>>>>-optional='username',
>>>>>-optional='password',
>>>>><-snip->
>>>>>
>>>>>// store params as instance variables
>>>>>local_defined('database') ? (self -> 'database') = @#database;
>>local_defined('table') ? (self -> 'table') = @#table; local_defined('host') ? (self
>->
>>'host') = @#host;              // add this
>>>>>local_defined('username') ? (self -> 'username') = @#username;
>>local_defined('password') ? (self -> 'password') = @#password; <-snip->
>>>>>
>>>>>// build inline connection array
>>>>>local_defined('database') ? (self -> 'db_connect') -> insert('-database'  =
>>>>@#database);
>>>>>local_defined('table') ? (self -> 'db_connect') -> insert('-table'  =
>>>>@#table);
>>>>>local_defined('host') ? (self -> 'db_connect') -> insert('-host'  = @#host);
>>>>// add this
>>>>>local_defined('username') ? (self -> 'db_connect') -> insert('-username'  =
>>>>@#username);
>>>>>local_defined('password') ? (self -> 'db_connect') -> insert('-password'  =
>>>>@#password);
>>>>>
>>>>>
>>>>>On 15 Jan 2012, at 19:49, Steve Piercy - Web Site Builder wrote:
>>>>>
>>>>>>Can you paste or attach your knop.lasso modifications, as well as the individual
>>>>tags from which Knop is built?
>>>>>>  Maybe we can merge them into the main Knop trunk.
>>>>>>  --steve
>>>>>>   On 1/15/12 at 6:28 PM, [hidden email] (Ric Lewis) pronounced:
>>>>>>
>>>>>>>Hi Steve
>>>>>>>  This seems to be working for me now. I got the same permission error you were
>>>>seeing, but then made the formatting of the inline host array more 'explicit', and
>>it seems to work. I also made a couple of tiny changes in
>>knop.lasso to support the -host parameter.
>>>>>>>  var: 'hostdb' = (array: (pair: (-Datasource)=('MySQLDS')),
>>>>>>>(pair: (-Name)=('127.0.0.1')), (pair: (-Username)=('root')), (pair:
>>>>(-password)=('password')));
>>>>>>>  var('d_usr' = knop_database(
>>>>>>>-host=$hostdb,
>>>>>>>-database='mydb',
>>>>>>>-table='users',
>>>>>>>-keyfield='id'));
>>>>>>>   It's been fine in my testing, but it might break on more obscure functions
>>though.
>>>>Selects, Adds, Updates all seem to work fine.
>>>>>>>Cheers,
>>>>>>>  Ric
>>>>>>>   On 13 Jan 2012, at 23:14, Steve Piercy - Web Site Builder wrote:
>>>>>>>
>>>>>>>>Even with correct syntax, inline hosts in Knop does not work.  I get a "No
>>>>>>>permission" error.  Using the same connection information in a normal Lasso
>>inline
>>>>host method instead of a Knop object works.
>>>>
>>>>>>  -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>>>>Steve Piercy               Web Site Builder               Soquel, CA
>>>>>><[hidden email]>                  <http://www.StevePiercy.com/>
>>>>>>   --  #############################################################
>>>>>>This message is sent to you because you are subscribed to
>>>>>>the mailing list <[hidden email]>.
>>>>>>To unsubscribe, E-mail to: <[hidden email]>
>>>>>>Send administrative queries to  <[hidden email]>
>>>>>>List archive
>>>>http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
>>>>>>Project homepage http://montania.se/projects/knop/
>>>>>>Google Code has the latest downloads at http://code.google.com/p/knop/
>>>>>
>>>>
>>>>
>>>
>>>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>>Steve Piercy               Web Site Builder
>>>Soquel, CA
>>><[hidden email]>                  <http://www.StevePiercy.com/>
>>>
>>>
>>>--
>>>#############################################################
>>>This message is sent to you because you are subscribed to
>>>the mailing list <[hidden email]>.
>>>To unsubscribe, E-mail to: <[hidden email]>
>>>Send administrative queries to  <[hidden email]>
>>>List archive
>>http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
>>>Project homepage http://montania.se/projects/knop/
>>>Google Code has the latest downloads at http://code.google.com/p/knop/
>>
>>
>>--
>>Johan Sölve    [FSA Member, Lasso Partner]
>>Web Application/Lasso/FileMaker Developer
>>MONTANIA SOFTWARE & SOLUTIONS
>>http://www.montania.se   mailto:[hidden email]
>>(spam-safe email address, replace '-' with 'a')
>>
>
>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>Steve Piercy               Web Site Builder               Soquel, CA
><[hidden email]>                  <http://www.StevePiercy.com/>
>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Support for inline hosts?

Johan Solve-2
In reply to this post by stevepiercy
Do you have knop.lasso in LassoStartup instead of LassoLibraries?

At 15.20 -0800 2012-01-15, Steve Piercy - Web Site Builder wrote:

>Nope.  I checked.  All instances of -prototype are commented out, e.g.:
>
>    define_type: 'form',
>        'knop_base',
>        -namespace='knop_';
>    //  -prototype;
>
>--steve
>
>
>On 1/16/12 at 12:11 AM, [hidden email] (Johan Solve) pronounced:
>
>> Are you running knop as prototype? I think that prevents a namespace from unloading.
>>
>> At 14.46 -0800 2012-01-15, Steve Piercy - Web Site Builder wrote:
>> >Thanks, Jolle.
>> >
>> >I'm working on the 8 version by modifying the source tags, but I run into this error
>> when running buildnamespace.lasso:
>> >
>> >    The namespace knop_ was created at startup and can not be unloaded or it
>> >    contains unloadable namespaces or tags.
>> >
>> >Anyone know how to work around that?  My Nabble-fu fails me.
>> >
>> >--steve
>> >
>> >
>> >On 1/15/12 at 10:55 PM, [hidden email] pronounced:
>> >
>> >>I added support for hosts in Knop for Lasso 9. All based on the findings from Ric.
>> >>
>> >>Also took the opportunity to commit the latests versions of all the types. Making
>> the public repo synchronized with the version we use ourselves in Amtac.
>> >>
>> >>HDB
>> >>Jolle
>> >>
>> >>15 jan 2012 kl. 21:32 skrev Ric Lewis:
>> >>
>> >>>Sure - as I say it's been working for me but I don't know what it might break
>> >>elsewhere. I did test by reverting to my older pre inline-host code and that worked
>> just fine even with the host mods to knop.lasso in place.
>> >>>
>> >>>Anyway, it's all at the top of the database type, starts at line 767 in my
>> >>2011-02-28 18:37:02 knop.lasso (lasso 8 build), just added these four lines:
>> >>>
>> >>>
>> >>>local: 'database'=string,
>> >>>'table'=string,
>> >>>'table_realname'=string,    // the actual table name, to be used in SQL
>> >>statements (in case the table name is aliased in Lasso)
>> >>>'username'=string,
>> >>>'password'=string,
>> >>>'db_connect'=array,
>> >>>'host'=array,               // add this
>> >>>'datasource_name'=string,
>> >>><-snip->
>> >>>
>> >>>define_tag: 'oncreate',
>> >>>-required='database',
>> >>>-required='table',
>> >>>-optional='host',               // add this
>> >>>-optional='username',
>> >>>-optional='password',
>> >>><-snip->
>> >>>
>> >>>// store params as instance variables
>> >>>local_defined('database') ? (self -> 'database') = @#database;
>> local_defined('table') ? (self -> 'table') = @#table; local_defined('host') ? (self ->
>> 'host') = @#host;              // add this
>> >>>local_defined('username') ? (self -> 'username') = @#username;
>> local_defined('password') ? (self -> 'password') = @#password; <-snip->
>> >>>
>> >>>// build inline connection array
>> >>>local_defined('database') ? (self -> 'db_connect') -> insert('-database'  =
>> >>@#database);
>> >>>local_defined('table') ? (self -> 'db_connect') -> insert('-table'  =
>> >>@#table);
>> >>>local_defined('host') ? (self -> 'db_connect') -> insert('-host'  = @#host);
>> >>// add this
>> >>>local_defined('username') ? (self -> 'db_connect') -> insert('-username'  =
>> >>@#username);
>> >>>local_defined('password') ? (self -> 'db_connect') -> insert('-password'  =
>> >>@#password);
>> >>>
>> >>>
>> >>>On 15 Jan 2012, at 19:49, Steve Piercy - Web Site Builder wrote:
>> >>>
>> >>>>Can you paste or attach your knop.lasso modifications, as well as the individual
>> >>tags from which Knop is built?
>> >>>>  Maybe we can merge them into the main Knop trunk.
>> >>>>  --steve
>> >>>>   On 1/15/12 at 6:28 PM, [hidden email] (Ric Lewis) pronounced:
>> >>>>
>> >>>>>Hi Steve
>> >>>>>  This seems to be working for me now. I got the same permission error you were
>> >>seeing, but then made the formatting of the inline host array more 'explicit', and
>> it seems to work. I also made a couple of tiny changes in knop.lasso to support the
>> -host parameter.
>> >>>>>  var: 'hostdb' = (array: (pair: (-Datasource)=('MySQLDS')),
>> >>>>>(pair: (-Name)=('127.0.0.1')), (pair: (-Username)=('root')), (pair:
> > >>(-password)=('password')));
>> >>>>>  var('d_usr' = knop_database(
>> >>>>>-host=$hostdb,
>> >>>>>-database='mydb',
>> >>>>>-table='users',
>> >>>>>-keyfield='id'));
>> >>>>>   It's been fine in my testing, but it might break on more obscure functions
>> though.
>> >>Selects, Adds, Updates all seem to work fine.
>> >>>>>Cheers,
>> >>>>>  Ric
>> >>>>>   On 13 Jan 2012, at 23:14, Steve Piercy - Web Site Builder wrote:
>> >>>>>
>> >>>>>>Even with correct syntax, inline hosts in Knop does not work.  I get a "No
>> >>>>>permission" error.  Using the same connection information in a normal Lasso
>> inline
>> >>host method instead of a Knop object works.
>> >>
>> >>>>  -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>> >>>>Steve Piercy               Web Site Builder               Soquel, CA
>> >>>><[hidden email]>                  <http://www.StevePiercy.com/>
>> >>>>   --  #############################################################
>> >>>>This message is sent to you because you are subscribed to
>> >>>>the mailing list <[hidden email]>.
>> >>>>To unsubscribe, E-mail to: <[hidden email]>
>> >>>>Send administrative queries to  <[hidden email]>
>> >>>>List archive
>> >>http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
>> >>>>Project homepage http://montania.se/projects/knop/
>> >>>>Google Code has the latest downloads at http://code.google.com/p/knop/
>> >>>
>> >>
>> >>
>> >
>> >-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>> >Steve Piercy               Web Site Builder
>> >Soquel, CA
>> ><[hidden email]>                  <http://www.StevePiercy.com/>
>> >
>> >
>> >--
>> >#############################################################
>> >This message is sent to you because you are subscribed to
>> >the mailing list <[hidden email]>.
>> >To unsubscribe, E-mail to: <[hidden email]>
>> >Send administrative queries to  <[hidden email]>
>> >List archive
>> http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
>> >Project homepage http://montania.se/projects/knop/
>> >Google Code has the latest downloads at http://code.google.com/p/knop/
>>
>>
>> --
>>      Johan Sölve    [FSA Member, Lasso Partner]
>>      Web Application/Lasso/FileMaker Developer
>>      MONTANIA SOFTWARE & SOLUTIONS
>> http://www.montania.se   mailto:[hidden email]
>>  (spam-safe email address, replace '-' with 'a')
>>
>
>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>Steve Piercy               Web Site Builder               Soquel, CA
><[hidden email]>                  <http://www.StevePiercy.com/>
>
>
>--
>#############################################################
>This message is sent to you because you are subscribed to
>the mailing list <[hidden email]>.
>To unsubscribe, E-mail to: <[hidden email]>
>Send administrative queries to  <[hidden email]>
>List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
>Project homepage http://montania.se/projects/knop/
>Google Code has the latest downloads at http://code.google.com/p/knop/


--
     Johan Sölve    [FSA Member, Lasso Partner]
     Web Application/Lasso/FileMaker Developer
     MONTANIA SOFTWARE & SOLUTIONS
http://www.montania.se   mailto:[hidden email]
 (spam-safe email address, replace '-' with 'a')

--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Support for inline hosts?

stevepiercy
In reply to this post by Ric Lewis-3
Also to make code a little cleaner, this works:

     var('di' = knop_database(
             -host=array(
                 -datasource='mysqlds',
                 -name='localhost',
                 -username='****',
                 -password='****',
                 -tableencoding='utf-8'),
             -database   = 'database',
             -table      = 'table'));

The use of -tableencoding in the host array together with -table
is redundant for the purpose of setting encoding, but it's there
just to illustrate example parameters.

This should save me a couple of hours of setting up Lasso
Security for databases.  Thanks, Ric!

--steve


On 1/15/12 at 6:28 PM, [hidden email] (Ric Lewis) pronounced:

>Hi Steve
>
>This seems to be working for me now. I got the same permission
>error you were seeing, but then made the formatting of the
>inline host array more 'explicit', and it seems to work. I also
>made a couple of tiny changes in knop.lasso to support the
>-host parameter.
>
>var: 'hostdb' = (array: (pair: (-Datasource)=('MySQLDS')),
>(pair: (-Name)=('127.0.0.1')), (pair: (-Username)=('root')),
>(pair: (-password)=('password')));
>
>var('d_usr' = knop_database(
>-host=$hostdb,
>-database='mydb',
>-table='users',
>-keyfield='id'));
>
>
>It's been fine in my testing, but it might break on more
>obscure functions though. Selects, Adds, Updates all seem to
>work fine.
>Cheers,
>
>Ric
>
>
>On 13 Jan 2012, at 23:14, Steve Piercy - Web Site Builder wrote:
>
>>Even with correct syntax, inline hosts in Knop does not work.  I get a "No permission"
>error.  Using the same connection information in a normal Lasso
>inline host method instead of a Knop object works.
>
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Support for inline hosts?

stevepiercy
In reply to this post by Johan Solve-2
Nope.  I always put knop.lasso in the Lasso Site's Library
folder.  It is here:
/Applications/Lasso Professional 8/LassoSites/knop-8/LassoLibraries/knop.lasso

I ended up creating a new Lasso Site, restarted Lasso Server,
and it magically works now.  *shrug*

--steve


On 1/16/12 at 12:40 AM, [hidden email] (Johan Solve) pronounced:

>Do you have knop.lasso in LassoStartup instead of LassoLibraries?
>
>At 15.20 -0800 2012-01-15, Steve Piercy - Web Site Builder wrote:
>>Nope.  I checked.  All instances of -prototype are commented out, e.g.:
>>
>>define_type: 'form',
>>'knop_base',
>>-namespace='knop_';
>>//  -prototype;
>>
>>--steve
>>
>>
>>On 1/16/12 at 12:11 AM, [hidden email] (Johan Solve) pronounced:
>>
>>> Are you running knop as prototype? I think that prevents a namespace from
>unloading.
>>>
>>> At 14.46 -0800 2012-01-15, Steve Piercy - Web Site Builder wrote:
>>> >Thanks, Jolle.
>>> >
>>> >I'm working on the 8 version by modifying the source tags, but I run into this
>error
>>> when running buildnamespace.lasso:
>>> >
>>> >    The namespace knop_ was created at startup and can not be unloaded or it
>>> >    contains unloadable namespaces or tags.
>>> >
>>> >Anyone know how to work around that?  My Nabble-fu fails me.
>>> >
>>> >--steve
>>> >
>>> >
>>> >On 1/15/12 at 10:55 PM, [hidden email] pronounced:
>>> >
>>> >>I added support for hosts in Knop for Lasso 9. All based on the findings from
>Ric.
>>> >>
>>> >>Also took the opportunity to commit the latests versions of all the types. Making
>>> the public repo synchronized with the version we use ourselves in Amtac.
>>> >>
>>> >>HDB
>>> >>Jolle
>>> >>
>>> >>15 jan 2012 kl. 21:32 skrev Ric Lewis:
>>> >>
>>> >>>Sure - as I say it's been working for me but I don't know what it might break
>>> >>elsewhere. I did test by reverting to my older pre inline-host code and that
>worked
>>> just fine even with the host mods to knop.lasso in place.
>>> >>>
>>> >>>Anyway, it's all at the top of the database type, starts at line 767 in my
>>> >>2011-02-28 18:37:02 knop.lasso (lasso 8 build), just added these four lines:
>>> >>>
>>> >>>
>>> >>>local: 'database'=string,
>>> >>>'table'=string,
>>> >>>'table_realname'=string,    // the actual table name, to be used in SQL
>>> >>statements (in case the table name is aliased in Lasso)
>>> >>>'username'=string,
>>> >>>'password'=string,
>>> >>>'db_connect'=array,
>>> >>>'host'=array,               // add this
>>> >>>'datasource_name'=string,
>>> >>><-snip->
>>> >>>
>>> >>>define_tag: 'oncreate',
>>> >>>-required='database',
>>> >>>-required='table',
>>> >>>-optional='host',               // add this
>>> >>>-optional='username',
>>> >>>-optional='password',
>>> >>><-snip->
>>> >>>
>>> >>>// store params as instance variables
>>> >>>local_defined('database') ? (self -> 'database') = @#database;
>>> local_defined('table') ? (self -> 'table') = @#table; local_defined('host') ? (self
>->
>>> 'host') = @#host;              // add this
>>> >>>local_defined('username') ? (self -> 'username') = @#username;
>>> local_defined('password') ? (self -> 'password') = @#password; <-snip->
>>> >>>
>>> >>>// build inline connection array
>>> >>>local_defined('database') ? (self -> 'db_connect') -> insert('-database'  =
>>> >>@#database);
>>> >>>local_defined('table') ? (self -> 'db_connect') -> insert('-table'  =
>>> >>@#table);
>>> >>>local_defined('host') ? (self -> 'db_connect') -> insert('-host'  = @#host);
>>> >>// add this
>>> >>>local_defined('username') ? (self -> 'db_connect') -> insert('-username'  =
>>> >>@#username);
>>> >>>local_defined('password') ? (self -> 'db_connect') -> insert('-password'  =
>>> >>@#password);
>>> >>>
>>> >>>
>>> >>>On 15 Jan 2012, at 19:49, Steve Piercy - Web Site Builder wrote:
>>> >>>
>>> >>>>Can you paste or attach your knop.lasso modifications, as well as the
>individual
>>> >>tags from which Knop is built?
>>> >>>>  Maybe we can merge them into the main Knop trunk.
>>> >>>>  --steve
>>> >>>>   On 1/15/12 at 6:28 PM, [hidden email] (Ric Lewis) pronounced:
>>> >>>>
>>> >>>>>Hi Steve
>>> >>>>>  This seems to be working for me now. I got the same permission error you
>were
>>> >>seeing, but then made the formatting of the inline host array more 'explicit',
>and
>>> it seems to work. I also made a couple of tiny changes in knop.lasso to support the
>>> -host parameter.
>>> >>>>>  var: 'hostdb' = (array: (pair: (-Datasource)=('MySQLDS')),
>>> >>>>>(pair: (-Name)=('127.0.0.1')), (pair: (-Username)=('root')), (pair:
>>>>>(-password)=('password')));
>>> >>>>>  var('d_usr' = knop_database(
>>> >>>>>-host=$hostdb,
>>> >>>>>-database='mydb',
>>> >>>>>-table='users',
>>> >>>>>-keyfield='id'));
>>> >>>>>   It's been fine in my testing, but it might break on more obscure functions
>>> though.
>>> >>Selects, Adds, Updates all seem to work fine.
>>> >>>>>Cheers,
>>> >>>>>  Ric
>>> >>>>>   On 13 Jan 2012, at 23:14, Steve Piercy - Web Site Builder wrote:
>>> >>>>>
>>> >>>>>>Even with correct syntax, inline hosts in Knop does not work.  I get a "No
>>> >>>>>permission" error.  Using the same connection information in a normal Lasso
>>> inline
>>> >>host method instead of a Knop object works.
>>> >>
>>> >>>>  -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>> >>>>Steve Piercy               Web Site Builder               Soquel, CA
>>> >>>><[hidden email]>                  <http://www.StevePiercy.com/>
>>> >>>>   --  #############################################################
>>> >>>>This message is sent to you because you are subscribed to
>>> >>>>the mailing list <[hidden email]>.
>>> >>>>To unsubscribe, E-mail to: <[hidden email]>
>>> >>>>Send administrative queries to  <[hidden email]>
>>> >>>>List archive
>>> >>http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
>>> >>>>Project homepage http://montania.se/projects/knop/
>>> >>>>Google Code has the latest downloads at http://code.google.com/p/knop/
>>> >>>
>>> >>
>>> >>
>>> >
>>> >-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>> >Steve Piercy               Web Site Builder
>>> >Soquel, CA
>>> ><[hidden email]>                  <http://www.StevePiercy.com/>
>>> >
>>> >
>>> >--
>>> >#############################################################
>>> >This message is sent to you because you are subscribed to
>>> >the mailing list <[hidden email]>.
>>> >To unsubscribe, E-mail to: <[hidden email]>
>>> >Send administrative queries to  <[hidden email]>
>>> >List archive
>>> http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
>>> >Project homepage http://montania.se/projects/knop/
>>> >Google Code has the latest downloads at http://code.google.com/p/knop/
>>>
>>>
>>> --
>>>      Johan Sölve    [FSA Member, Lasso Partner]
>>>      Web Application/Lasso/FileMaker Developer
>>>      MONTANIA SOFTWARE & SOLUTIONS
>>> http://www.montania.se   mailto:[hidden email]
>>>  (spam-safe email address, replace '-' with 'a')
>>>
>>
>>-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>>Steve Piercy               Web Site Builder               Soquel, CA
>><[hidden email]>                  <http://www.StevePiercy.com/>
>>
>>
>>--
>>#############################################################
>>This message is sent to you because you are subscribed to
>>the mailing list <[hidden email]>.
>>To unsubscribe, E-mail to: <[hidden email]>
>>Send administrative queries to  <[hidden email]>
>>List archive
>http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
>>Project homepage http://montania.se/projects/knop/
>>Google Code has the latest downloads at http://code.google.com/p/knop/
>
>
>--
>Johan Sölve    [FSA Member, Lasso Partner]
>Web Application/Lasso/FileMaker Developer
>MONTANIA SOFTWARE & SOLUTIONS
>http://www.montania.se   mailto:[hidden email]
>(spam-safe email address, replace '-' with 'a')
>

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-- --
Steve Piercy               Web Site Builder              
Soquel, CA
<[hidden email]>                  <http://www.StevePiercy.com/>


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

knop_user->removedata

Ric Lewis-3
In reply to this post by stevepiercy
From the TODOs on the knop_user type:

Add ->removedata to remove specific user data

I added this a while back to see if I could speed up my (very slow) users sessions: there were a lot of redundant fields been carried around. It didn't actually speed things up (still have to solve that, the speed issue may be inherent to Lasso 8 sessions), but I think it might be useful nonetheless to implement, comes just after 'getdata' tag. Seems to work and hasn't caused any problems so far.

        // This is the standard getdata tag on about line 7700 of knop.lasso

        define_tag: 'getdata', -description='Get field data from the data map',
                -required='field';
                if: (self -> 'data') >> #field;
                        return: (self -> 'data') -> (find: #field);
                else;
                        (self -> '_debug_trace') -> insert(tag_name + ': ' + #field + ' not known');
                /if;
        /define_tag;

        // This is the new removedata tag

        define_tag: 'removedata', -description='Remove field from the data map',
                -required='field';
                if: (self -> 'data') >> #field;
                        (self -> 'data') -> (remove: #field);
                else;
                        (self -> '_debug_trace') -> insert(tag_name + ': ' + #field + ' not known');
                /if;
        /define_tag;






--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Support for inline hosts?

Ric Lewis-3
In reply to this post by stevepiercy
I suppose the next step is to have one knoo_database object per db, and specify the table on the fly, but that might not be so easy to implement, and there would be issues with differing keyfields etc.

I already use the ->settable method of course, but it still means lots of separate db objects.

var('d_usr' = knop_database(
    -host=$hostdb,
    -database='mydb',
      -table='users',
      -keyfield='id',
      -lockfield='lockfield'));

var: 'd_usrgrp'=$d_usr;
$d_usrgrp->settable(-table='users_groups');


On 15 Jan 2012, at 23:57, Steve Piercy - Web Site Builder wrote:

> Also to make code a little cleaner, this works:
>
>    var('di' = knop_database(
>            -host=array(
>                -datasource='mysqlds',
>                -name='localhost',
>                -username='****',
>                -password='****',
>                -tableencoding='utf-8'),
>            -database   = 'database',
>            -table      = 'table'));
>
> The use of -tableencoding in the host array together with -table is redundant for the purpose of setting encoding, but it's there just to illustrate example parameters.
>
> This should save me a couple of hours of setting up Lasso Security for databases.  Thanks, Ric!
>
> --steve


--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: knop_user->removedata

list
In reply to this post by Ric Lewis-3
16 jan 2012 kl. 11:31 skrev Ric Lewis:

> From the TODOs on the knop_user type:
>
> Add ->removedata to remove specific user data
>
> I added this a while back to see if I could speed up my (very slow) users sessions: there were a lot of redundant fields been carried around. It didn't actually speed things up (still have to solve that, the speed issue may be inherent to Lasso 8 sessions),

Nice addition.
My take on speeding user sessions up is to limit returned fields to the ones I need. You can do that without altering knop code:

$session_operator -> login(
        -username = client_param('username'),
        -password = client_param('password'),
        -searchparams = array(
                -returnfield = 'status',
                -returnfield = 'operator_position',
                -returnfield = 'operator_preferred_name',
                -returnfield = 'operator_first_name',
                -returnfield = 'operator_middle_name',
                -returnfield = 'operator_last_name',
                -returnfield = 'email',
                -eq = true, 'status' = 'Active'
        )
) // Check Operator credentials


HDB
Jolle
--
#############################################################
This message is sent to you because you are subscribed to
the mailing list <[hidden email]>.
To unsubscribe, E-mail to: <[hidden email]>
Send administrative queries to  <[hidden email]>
List archive http://lasso.2283332.n4.nabble.com/Knop-Framework-Discussion-f3157831.html
Project homepage http://montania.se/projects/knop/
Google Code has the latest downloads at http://code.google.com/p/knop/
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: knop_user->removedata

Ric Lewis-3
Yes, true, that occurred to me but I guess I saw the TODO and thought aha! I can do that one!

But your solution is much better for my issue. The ->removedata may be useful in other scenarios.

Even after stripping out all unnecessary fields I still get almost a 200ms hit on every (in memory) session which seems excessive.

Lots more optimisation to do in other areas too though...


On 16 Jan 2012, at 10:50, [hidden email] wrote:

Nice addition.
My take on speeding user sessions up is to limit returned fields to the ones I need. You can do that without altering knop code:

$session_operator -> login(
-username = client_param('username'),
-password = client_param('password'),
-searchparams = array(
-returnfield = 'status',
-returnfield = 'operator_position',
-returnfield = 'operator_preferred_name',
-returnfield = 'operator_first_name',
-returnfield = 'operator_middle_name',
-returnfield = 'operator_last_name',
-returnfield = 'email',
-eq = true, 'status' = 'Active'
)
) // Check Operator credentials

123
Loading...