-uselimit support - request for demo code change

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

-uselimit support - request for demo code change

stevepiercy
Howdy Knoppers,

A user contacted my off-list.  They have a FM 11 database and
Lasso 8.x.  They observed that the grids did not function out of
the box.  In the Knop demo code:

/knop8/demo/_library/lib_advanced_list.inc
/knop8/demo/_library/lib_customer_list.inc

...there is a parameter -uselimit.  This causes the following error:

"Error while performing FileMaker database -search action.
Command is invalid (for example, a Set Field script step does
not have a calculation specified). 5"

This is a concatenation of a Lasso error and a FileMaker error.  
It can result from using any unsupported parameter key/value
pair in the action statement.

The user isolated the error in this case to -uselimit.  It
appears not to be implemented in database.inc, although it may
have been supported at one time.

https://github.com/knop-project/knop/blob/master/knop8/source/_ctype/database.inc#L71
https://github.com/knop-project/knop/blob/master/knop8/source/_ctype/database.inc#L81

To handle this, I propose to remove -uselimit from any demo code
because Knop does not currently support it.  Any in favor,
opposed, abstain?

--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: -uselimit support - request for demo code change

list
24 okt 2012 kl. 05:16 skrev Steve Piercy - Web Site Builder <[hidden email]>:

> The user isolated the error in this case to -uselimit.  It appears not to be implemented in database.inc, although it may have been supported at one time.
>
> To handle this, I propose to remove -uselimit from any demo code because Knop does not currently support it.  Any in favor, opposed, abstain?

The uselimit param is not "used" by the knop_database type per se. It is simply passed on to the inline that Knop creates and then dealt with by Lasso. So the same error would occur should someone construct a plain inline with -uselimit and send to a Filemaker DB.

Thus it is not correct to claim that it's not implemented in Knop. It is supported in the same way it's supported by Lasso.

Instead of just removing it from the demo I suggest we add a comment that it should be removed if the demo is used with a Filemaker DB.

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: -uselimit support - request for demo code change

stevepiercy
On 10/24/12 at 9:26 AM, [hidden email] (Jolle Carlestam) pronounced:

>Instead of just removing it from the demo I suggest we add a
>comment that it should be removed if the demo is used with a
>Filemaker DB.

How about doing something like this in the demo code?

     // first set some basic search parameters
     var: 'searchparams'=(array: -maxrecords=$maxrecords, -skiprecords=$skiprecords);

     if(!(Lasso_DatasourceIsFilemaker($d) || Lasso_DatasourceIsFilemakerSA($d)));
         $searchparams->insert(-uselimit);
     /if;

or another technique:

     // first set some basic search parameters
     if(Lasso_DatasourceIsFilemaker($d) || Lasso_DatasourceIsFilemakerSA($d));
         var: 'searchparams'=(array: -maxrecords=$maxrecords, -skiprecords=$skiprecords);
     else;
         var: 'searchparams'=(array: -maxrecords=$maxrecords,
-skiprecords=$skiprecords, -uselimit);
     /if;

I prefer adding something like this to the demo code, instead of
adding another step in the setup, so that developers can get
started easily with a minimum of buttons to push and switches to
flip.  Thoughts?

--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: -uselimit support - request for demo code change

list
24 okt 2012 kl. 10:23 skrev Steve Piercy - Web Site Builder <[hidden email]>:

> On 10/24/12 at 9:26 AM, [hidden email] (Jolle Carlestam) pronounced:
>
>> Instead of just removing it from the demo I suggest we add a comment that it should be removed if the demo is used with a Filemaker DB.
>
> How about doing something like this in the demo code?
>
>    // first set some basic search parameters
>    var: 'searchparams'=(array: -maxrecords=$maxrecords, -skiprecords=$skiprecords);
>
>    if(!(Lasso_DatasourceIsFilemaker($d) || Lasso_DatasourceIsFilemakerSA($d)));
>        $searchparams->insert(-uselimit);
>    /if;
>
> or another technique:
>
>    // first set some basic search parameters
>    if(Lasso_DatasourceIsFilemaker($d) || Lasso_DatasourceIsFilemakerSA($d));
>        var: 'searchparams'=(array: -maxrecords=$maxrecords, -skiprecords=$skiprecords);
>    else;
>        var: 'searchparams'=(array: -maxrecords=$maxrecords, -skiprecords=$skiprecords, -uselimit);
>    /if;
>
> I prefer adding something like this to the demo code, instead of adding another step in the setup, so that developers can get started easily with a minimum of buttons to push and switches to flip.  Thoughts?

Makes sense. But there is a check already performed by knop_database. Maybe it would use less resources to reuse that.

var('searchparams' = $d -> 'isfilemaker' ? (array: -maxrecords=$maxrecords, -skiprecords=$skiprecords) | (array: -maxrecords=$maxrecords, -skiprecords=$skiprecords, -uselimit));

(Untested)

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: -uselimit support - request for demo code change

stevepiercy
On 10/24/12 at 10:34 AM, [hidden email] (Jolle Carlestam) pronounced:

>24 okt 2012 kl. 10:23 skrev Steve Piercy - Web Site Builder <[hidden email]>:
>
>>On 10/24/12 at 9:26 AM, [hidden email] (Jolle Carlestam) pronounced:
>>
>>> Instead of just removing it from the demo I suggest we add a comment that it should
>be removed if the demo is used with a Filemaker DB.
>>
>>How about doing something like this in the demo code?
>>
>>// first set some basic search parameters
>>var: 'searchparams'=(array: -maxrecords=$maxrecords, -skiprecords=$skiprecords);
>>
>>if(!(Lasso_DatasourceIsFilemaker($d) || Lasso_DatasourceIsFilemakerSA($d)));
>>$searchparams->insert(-uselimit);
>>/if;
>>
>>or another technique:
>>
>>// first set some basic search parameters
>>if(Lasso_DatasourceIsFilemaker($d) || Lasso_DatasourceIsFilemakerSA($d));
>>var: 'searchparams'=(array: -maxrecords=$maxrecords,
>-skiprecords=$skiprecords);
>>else;
>>var: 'searchparams'=(array: -maxrecords=$maxrecords,
>-skiprecords=$skiprecords, -uselimit);
>>/if;
>>
>>I prefer adding something like this to the demo code, instead of adding another step
>in the setup, so that developers can get started easily with a
>minimum of buttons to push and switches to flip.  Thoughts?
>
>Makes sense. But there is a check already performed by
>knop_database. Maybe it would use less resources to reuse that.
>
>var('searchparams' = $d -> 'isfilemaker' ? (array:
>-maxrecords=$maxrecords, -skiprecords=$skiprecords) | (array:
>-maxrecords=$maxrecords, -skiprecords=$skiprecords, -uselimit));

I pulled that logic out of database.inc because I did not see
the ->isfilemaker method defined in a way that could be usable externally.

'isfilemaker: '+$d->isfilemaker;
=>
isfilemaker:

and the trace shows this:

     database->isfilemaker not known.

Are you suggesting that we store isfilemaker as an attribute or
create a new (not _unknowntag) method in the database object or
something else?

--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: -uselimit support - request for demo code change

list
24 okt 2012 kl. 10:53 skrev Steve Piercy - Web Site Builder <[hidden email]>:

> I pulled that logic out of database.inc because I did not see the ->isfilemaker method defined in a way that could be usable externally.
>
> 'isfilemaker: '+$d->isfilemaker;
> =>
> isfilemaker:

It is not a method. It is data stored in the type. You need quotes to get it.
'isfilemaker: '+$d->'isfilemaker';

Should work. Still untested. I don't have neither Filemaker or Lasso 8 to test with.

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: -uselimit support - request for demo code change

ottomac
This post has NOT been accepted by the mailing list yet.
Hi Guys

I am set up with Lasso 8.5.6 and FMSA 11 on 10.7 Server. Also running the latest Knop Demo.

I am happy to test any code

Sincerely,
 
 
Paul Moebius | Vice President | Digital One Color ~ Graphics Reimagined
o: 858.576-3600 | c: 858.248.5875 | paulm@d1color.com | www.d1color.com
Become a fan @ https://www.facebook.com/DigitalOneColor/
Sincerely, Paul Moebius | Vice President | Digital One Color ~ Graphics Reimagined o: 858.576-3600 | c: 858.248.5875 | paulm@d1color.com | www.d1color.com
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: -uselimit support - request for demo code change

stevepiercy
In reply to this post by list
On 10/24/12 at 10:57 AM, [hidden email] (Jolle Carlestam) pronounced:

>24 okt 2012 kl. 10:53 skrev Steve Piercy - Web Site Builder <[hidden email]>:
>
>>I pulled that logic out of database.inc because I did not see the ->isfilemaker
>method defined in a way that could be usable externally.
>>
>>'isfilemaker: '+$d->isfilemaker;
>>=>
>>isfilemaker:
>
>It is not a method. It is data stored in the type. You need quotes to get it.
>'isfilemaker: '+$d->'isfilemaker';
>
>Should work. Still untested. I don't have neither Filemaker or Lasso 8 to test with.

Sorry, my mistake, my head's been firmly lodged in Python and
javascript lately.  It's an "instance variable" in Lasso 8
terms, and needs to be quoted in order to return its value.  
think it's now called a "data member" in Lasso 9, the value of
which is returned just as it was in 8, by quoting the data
member name.  So you should be able to test it without FileMaker
on Lasso 9.  I tested it on both 8 and 9 without FM, and it
appears to work.

Here's the change I propose in the Knop demo in the two
lib_*_list.inc files in each version:

     // first set some basic search parameters
     var('searchparams'=array(-maxrecords=$maxrecords, -skiprecords=$skiprecords));

     // use -uselimit only for non-filemaker data sources
     !$d->'isfilemaker' ? $searchparams->insert(-uselimit);

How does that look?  I can commit and push my changes to the
repo, then do a pull request, but I would like a second pair of
eyes for peer review first.  Please let me know.

--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: -uselimit support - request for demo code change

list
24 okt 2012 kl. 16:38 skrev Steve Piercy - Web Site Builder <[hidden email]>:

> Here's the change I propose in the Knop demo in the two lib_*_list.inc files in each version:
>
>    // first set some basic search parameters
>    var('searchparams'=array(-maxrecords=$maxrecords, -skiprecords=$skiprecords));
>
>    // use -uselimit only for non-filemaker data sources
>    !$d->'isfilemaker' ? $searchparams->insert(-uselimit);
>
> How does that look?  I can commit and push my changes to the repo, then do a pull request, but I would like a second pair of eyes for peer review first.  Please let me know.
>

Looks good to me. Go for it!

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: -uselimit support - request for demo code change

stevepiercy
On 10/24/12 at 5:16 PM, [hidden email] (Jolle Carlestam) pronounced:

>24 okt 2012 kl. 16:38 skrev Steve Piercy - Web Site Builder <[hidden email]>:
>
>>Here's the change I propose in the Knop demo in the two lib_*_list.inc files in each
>version:
>>
>>// first set some basic search parameters
>>var('searchparams'=array(-maxrecords=$maxrecords, -skiprecords=$skiprecords));
>>
>>// use -uselimit only for non-filemaker data sources
>>!$d->'isfilemaker' ? $searchparams->insert(-uselimit);
>>
>>How does that look?  I can commit and push my changes to the repo, then do a pull
>request, but I would like a second pair of eyes for peer review
>first.  Please let me know.
>>
>
>Looks good to me. Go for it!

And... done!
https://github.com/knop-project/knop/pull/65

--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: -uselimit support - request for demo code change

Johan Solve-2
At 01.07 -0700 2012-10-24, Steve Piercy - Web Site Builder wrote:

>On 10/24/12 at 5:16 PM, [hidden email] (Jolle Carlestam) pronounced:
>
>>24 okt 2012 kl. 16:38 skrev Steve Piercy - Web Site Builder <[hidden email]>:
>>
>>>Here's the change I propose in the Knop demo in the two lib_*_list.inc files in each
>>version:
>>>
>>>// first set some basic search parameters
>>>var('searchparams'=array(-maxrecords=$maxrecords, -skiprecords=$skiprecords));
>>>
>>>// use -uselimit only for non-filemaker data sources
>>>!$d->'isfilemaker' ? $searchparams->insert(-uselimit);
>>>
>>>How does that look?  I can commit and push my changes to the repo, then do a pull
>>request, but I would like a second pair of eyes for peer review first.  Please let me know.
>>>
>>
>>Looks good to me. Go for it!
>
>And... done!
>https://github.com/knop-project/knop/pull/65
>
>--steve

Bless
--
     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/
Loading...