Execute on server gotcha

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Execute on server gotcha

4D Tech mailing list
I use EOS methods a lot. They can make a huge difference since we run over
IP connections. As part of my init for new processes I put all tables into
Read Only and unlock the ones I need as I go along. You all probably do
that too.

Every now and then I'd be vexed by occasional locked records. 4D reports
them as being locked by a process I know started off with all tables read
only and I couldn't find anyplace where I'd changed it on that particular
table. And the randomness made it hard to replicate - especially on my
development machine.

This morning I finally realized it was the result of some EOS methods.
Here's the deal (I suspect most of you already know this):

When a method executes on server it runs in the 'twin' instance of the
process on the server. That's a totally separate memory space. It's a
totally separate record locking space as well. So when I set a process to
READ ONLY(*) this is only true for the client side instance of the process.
The server side twin is still the default of READ WRITE(*).

I have some EOS methods that do things like complex queries to get arrays
or sums that are optimized on the server. It hadn't occurred to me this is
where I was locking up records sometimes. But it was. Because the twin
process was still locking all the records it touched.

The solution I implemented is an addition to my process init method. A new
method that executes on the server :

If (Application type=4D Server)

READ ONLY(*)

End if

​I added the test for the application type because calling EOS methods in
single user mode runs in the same process and that could be confusing
sometimes. And in reality I have some more stuff in there but this makes
the point.


--
Kirk Brooks
San Francisco, CA
=======================

*The only thing necessary for the triumph of evil is for good men to do
nothing.*

*- Edmund Burke*
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Execute on server gotcha

4D Tech mailing list

> Le 5 déc. 2017 à 21:17, Kirk Brooks via 4D_Tech <[hidden email]> a écrit :
>
> [...] it was the result of some EOS methods [...]

I think ~90% of my processes start like that since v11: read only on client side, request server to set twin too.
If we had a compatibility option to say that the default state is read only, this would not be necessary:
<http://forums.4d.com/Post/EN/4675315/0/0/#4675316>
Being able to add a record to a read only table sounds strange too… even after 25 years.

--
Arnaud de Montard



**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Execute on server gotcha

4D Tech mailing list
In reply to this post by 4D Tech mailing list
the place to look in documentation is in "Triggers"

http://doc.4d.com/4Dv16R4/4D/16-R4/Triggers.300-3317281.en.html

quote:

• With 4D in local mode, the trigger works with the current selections, current records, table read/write states, record locking operations, etc., of the invoking process.
• With 4D Server, only the context of the database of the invoking client process is preserved (locked records and transactional states). 4D Server also (and only) guarantees that the current record of the table of the trigger is correctly positioned. The other elements of the context (current selections for example) are those of the trigger process

the language is a bit indirect, but the read write state falls under "other elements".

also a must-read:

http://doc.4d.com/4Dv16R4/4D/16-R4/4D-Server-Sets-and-Named-Selections.300-3423889.en.html

a good use of the shared context is to create a set or named selection without a prefix on the client and pass its name(s) to the EOS method. very efficient.

I also like to put a line that says:

ASSERT(METHOD Get attribute(Current method path;Attribute executed on server))

to indicate that the method is EOS.

likewise, I guess you could have assertions to check the read write state,
current selection and current record, etc.

ASSERT feels weird because it's like placing traps everywhere for yourself to fall in,
but it's really important that you do.

> 2017/12/06 5:17、Kirk Brooks via 4D_Tech <[hidden email]> のメール:
>
> So when I set a process to
> READ ONLY(*) this is only true for the client side instance of the process.
> The server side twin is still the default of READ WRITE(*).




**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Execute on server gotcha

4D Tech mailing list
In reply to this post by 4D Tech mailing list
At least with versions of 4D prior to 16, even a READ ONLY will not necessarily release an individual record, local or server. I have ended up making a habit of using LOAD RECORD or UNLOAD RECORD after ending whatever code I am running that edits and saves record(s). The READ ONLY command doesn’t take effect until the selection is refreshed, loading or unloading the record afterwards will guarantee that the record is no longer locked to other processes running anywhere. The same precaution applies to READ WRITE, but I just call that before I retrieve the record I’m working on nearly always, so it’s usually loaded in the correct state as a matter of course.

I find it disconcerting that I can delete any number of records highlighted in an output form, even in READ ONLY mode.

JJ

> On Dec 5, 2017, at 5:38 PM, [hidden email] wrote:
>
> Message: 1
> Date: Tue, 5 Dec 2017 12:17:02 -0800
> From: Kirk Brooks <[hidden email] <mailto:[hidden email]>>
> To: 4D iNug Technical <[hidden email] <mailto:[hidden email]>>
> Subject: Execute on server gotcha
> Message-ID:
> <CAHY=XksWWbx5urH=+GjRzkRcGH0sN=[hidden email] <mailto:CAHY=XksWWbx5urH=+GjRzkRcGH0sN=[hidden email]>>
> Content-Type: text/plain; charset="UTF-8"
>
> I use EOS methods a lot. They can make a huge difference since we run over
> IP connections. As part of my init for new processes I put all tables into
> Read Only and unlock the ones I need as I go along. You all probably do
> that too.
>
> Every now and then I'd be vexed by occasional locked records. 4D reports
> them as being locked by a process I know started off with all tables read
> only and I couldn't find anyplace where I'd changed it on that particular
> table. And the randomness made it hard to replicate - especially on my
> development machine.
>
> This morning I finally realized it was the result of some EOS methods.
> Here's the deal (I suspect most of you already know this):
>
> When a method executes on server it runs in the 'twin' instance of the
> process on the server. That's a totally separate memory space. It's a
> totally separate record locking space as well. So when I set a process to
> READ ONLY(*) this is only true for the client side instance of the process.
> The server side twin is still the default of READ WRITE(*).
>
> I have some EOS methods that do things like complex queries to get arrays
> or sums that are optimized on the server. It hadn't occurred to me this is
> where I was locking up records sometimes. But it was. Because the twin
> process was still locking all the records it touched.
>
> The solution I implemented is an addition to my process init method. A new
> method that executes on the server :
>
> If (Application type=4D Server)
>
> READ ONLY(*)
>
> End if
>
> ​I added the test for the application type because calling EOS methods in
> single user mode runs in the same process and that could be confusing
> sometimes. And in reality I have some more stuff in there but this makes
> the point.
>
>
> --
> Kirk Brooks
> San Francisco, CA
> =======================

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Execute on server gotcha

4D Tech mailing list
READ ONLY is a declaration that applies to subsequent operations.

I think that is pretty clear from the documentation.

http://doc.4d.com/4Dv15/4D/15.5/READ-ONLY.301-3577015.en.html

quote:

READ ONLY changes the state of aTable to read-only for the process in which it is called. All subsequent records that are loaded are locked, and you cannot make any changes made to them. If the optional * parameter is specified, all tables are changed to read-only state.


> 2017/12/06 12:50、Janet Jonas via 4D_Tech <[hidden email]> のメール:
> At least with versions of 4D prior to 16, even a READ ONLY will not necessarily release an individual record, local or server. I have ended up making a habit of using LOAD RECORD or UNLOAD RECORD after ending whatever code I am running that edits and saves record(s).




**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Execute on server gotcha

4D Tech mailing list
In reply to this post by 4D Tech mailing list
Hi Miyako,
Nice post.

On Tue, Dec 5, 2017 at 5:01 PM, Keisuke Miyako via 4D_Tech <
[hidden email]> wrote:

> the place to look in documentation is in "Triggers"
> http://doc.4d.com/4Dv16R4/4D/16-R4/Triggers.300-3317281.en.html

​OK. Not intuitive but I get the correlation. This is the first time anyone
has directly tied the relation of memory spaces for triggers and client
side processes.




> quote:
> • With 4D in local mode, the trigger works with the current selections,
> current records, table read/write states, record locking operations, etc.,
> of the invoking process.
> • With 4D Server, only the context of the database of the invoking client
> process is preserved (locked records and transactional states). 4D Server
> also (and only) guarantees that the current record of the table of the
> trigger is correctly positioned. The other elements of the context (current
> selections for example) are those of the trigger process
>
> the language is a bit indirect,

​like I say "avocado" and ​

​you say "black berry"?


> but the read write state falls under "other elements".
>
​I believe triggers pre-date multiple processes but I haven't looked back
to check. Nonetheless I can see how the technical infrastructure of the
triggers would lend to managing the processes. ​This also seems to imply
that when a client process is created it's established on the server first
and then in the client. Makes sense - I just hadn't thought about it
before.


> also a must-read:
> http://doc.4d.com/4Dv16R4/4D/16-R4/4D-Server-Sets-and-
> Named-Selections.300-3423889.en.html

​And there we have a great visual of the relationship between the client
and server memory spaces. Personally I would include such a visual in a
discussion about processes and the server with a main header of something
like 'Process Memory Spaces' and under that discuss how the various 4D
mechanisms exist and interact. Something to speed up this moment of 'Ah
ha!' ​



> a good use of the shared context is to create a set or named selection
> without a prefix on the client and pass its name(s) to the EOS method. very
> efficient.
>
​Help me with this one. Because you're saying I create a set on the client
side, let's use 'test' since that's what's on the chart. By the chart
'test' only exists on the client memory space. So if I pass the name of
this set to an EOS method then the contents of that set propagate to twin
on the server side? ​


> I also like to put a line that says:
> ASSERT(METHOD Get attribute(Current method path;Attribute executed on
> server))
>
​That is useful for development in single user mode since there's no way to
mimic the effect of running on the server. Do you know if Method Get
Attribute is any faster/slower/it doesn't matter than testing the
application type? ​


--
Kirk Brooks
San Francisco, CA
=======================

*The only thing necessary for the triumph of evil is for good men to do
nothing.*

*- Edmund Burke*
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Execute on server gotcha

4D Tech mailing list
it's probably easier to create and run a proof-of-concept.

if you create a set named "test" on the client side,
and switch contexts with an EOS method,
you would see in the debugger that "test" exists there too.
so you can use that set on the server.

you really shouldn't care whether the set "exists on the client memory space", the scope is all that matters.

but since the scope of a global set include the EOS/trigger process,
I suppose you could say that the content propagates (both ways).

2017/12/06 14:50、Kirk Brooks via 4D_Tech <[hidden email]<mailto:[hidden email]>> のメール:

​Help me with this one. Because you're saying I create a set on the client
side, let's use 'test' since that's what's on the chart. By the chart
'test' only exists on the client memory space. So if I pass the name of
this set to an EOS method then the contents of that set propagate to twin
on the server side? ​



**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Execute on server gotcha

4D Tech mailing list
In reply to this post by 4D Tech mailing list

> Le 6 déc. 2017 à 04:50, Janet Jonas via 4D_Tech <[hidden email]> a écrit :
>
> I have ended up making a habit of using LOAD RECORD or UNLOAD RECORD after ending whatever code I am running that edits and saves record(s).

Could be unnecessary, it depends on what code, for example:
  while(not(end of selection))
    ...
  next record
  end while
  unload record  // >>> useless as end of selection means no current record
This is just to illustrate, but such redundant instruction can result in bad performances on WAN usage and/or a lot of clients connected.

Speaking about read only, I learned this particularity of ARRAY TO SELECTION last year:
"Note: Since it can create new records, this command does not take a table's read-only state (if any) into account"

--
Arnaud de Montard



**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Execute on server gotcha

4D Tech mailing list
In reply to this post by 4D Tech mailing list
clarification please.

if the set created on the client side is "$Test" then it is NOT
available in the trigger/EOS correct?

On Wed, 6 Dec 2017 06:36:53 +0000, Keisuke Miyako via 4D_Tech wrote:

> it's probably easier to create and run a proof-of-concept.
>
> if you create a set named "test" on the client side,
> and switch contexts with an EOS method,
> you would see in the debugger that "test" exists there too.
> so you can use that set on the server.
>
> you really shouldn't care whether the set "exists on the client
> memory space", the scope is all that matters.
>
> but since the scope of a global set include the EOS/trigger process,
> I suppose you could say that the content propagates (both ways).
>
> 2017/12/06 14:50、Kirk Brooks via 4D_Tech
> <[hidden email]<mailto:[hidden email]>> のメール:
>
> ​Help me with this one. Because you're saying I create a set on the client
> side, let's use 'test' since that's what's on the chart. By the chart
> 'test' only exists on the client memory space. So if I pass the name of
> this set to an EOS method then the contents of that set propagate to twin
> on the server side? ​
>
>
>
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[hidden email]
> **********************************************************************
---------------
Gas is for washing parts
Alcohol is for drinkin'
Nitromethane is for racing
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Execute on server gotcha

4D Tech mailing list
In reply to this post by 4D Tech mailing list
Hi Janet,
The point about unloading the records is a good one.
Have you see this recent tip in the KB:  http://kb.4d.com/assetid=77893

Looking at some of my methods that run EOS my biggest issue is the
assumption I was in READ ONLY when in fact it was READ WRITE.

I like the suggestion Miyako made about testing the method execution
attribute at the top of the method. I could couple that with a test of the
application type to indicate indicate when a method intended to run EOS is
actually running in single user.

--
Kirk Brooks
San Francisco, CA
=======================

*The only thing necessary for the triumph of evil is for good men to do
nothing.*

*- Edmund Burke*
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Execute on server gotcha

4D Tech mailing list
In reply to this post by 4D Tech mailing list
Hi Chip,
Correct I believe. Looking at the chart:

http://doc.4d.com/4Dv16R4/4D/16-R4/4D-Server-Sets-and-
Named-Selections.300-3423889.en.html

not only is the $test set local to the client machine but the <>test set is
too - they differ in scope on the client machine's processes. But the
'regular' test set's scope (as I should think of it) is both the client
machine and the twinned process on the server.

That's probably by design within 4D I'm guessing. I always looked at that
chart as specifically referring to triggers but now I know it's accurate
for sets and named selections as well. Which is a pretty cool feature I
haven't taken much advantage of.

On Wed, Dec 6, 2017 at 6:41 AM, Chip Scheide via 4D_Tech <
[hidden email]> wrote:

> clarification please.
>
> if the set created on the client side is "$Test" then it is NOT
> available in the trigger/EOS correct?


--
Kirk Brooks
San Francisco, CA
=======================

*The only thing necessary for the triumph of evil is for good men to do
nothing.*

*- Edmund Burke*
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Execute on server gotcha

4D Tech mailing list
In reply to this post by 4D Tech mailing list
I read the documentation, and that is why I do what I do, I was just trying to note it for the list.

However, being able to delete from a selection created after a READ ONLY(*) command is not according to the documentation, but it “works” for me in practice. I find it handy, but counter to expectations. I prevent that from happening in my application for the regular user.

Anyway, a little off of the original topic.

JJ

> On Dec 6, 2017, at 3:15 AM, [hidden email] wrote:
>
>
> Message: 6
> Date: Wed, 6 Dec 2017 05:25:27 +0000
> From: Keisuke Miyako <[hidden email] <mailto:[hidden email]>>
> To: 4D iNug Technical <[hidden email] <mailto:[hidden email]>>
> Subject: Re: Execute on server gotcha
> Message-ID: <[hidden email] <mailto:[hidden email]>>
> Content-Type: text/plain; charset="utf-8"
>
> READ ONLY is a declaration that applies to subsequent operations.
>
> I think that is pretty clear from the documentation.
>
> http://doc.4d.com/4Dv15/4D/15.5/READ-ONLY.301-3577015.en.html <http://doc.4d.com/4Dv15/4D/15.5/READ-ONLY.301-3577015.en.html>
>
> quote:
>
> READ ONLY changes the state of aTable to read-only for the process in which it is called. All subsequent records that are loaded are locked, and you cannot make any changes made to them. If the optional * parameter is specified, all tables are changed to read-only state.

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Typing a menu ref for Dynamic pop up menu

4D Tech mailing list
In reply to this post by 4D Tech mailing list
        vTopLevelList:=Create menu

If I try to compile the structure without explicitly typing the variable vTopLevelList, the complains that the result of the function is not compatible with the expression.

If I type the variable…

         C_TEXT(vTopLevelList)

The compiler then complains when I try to append to the list saying “Changing the type of vTopLevelList from type text to type Real.

A menu ref is supposed to be a text variable.

What am I missing.

Is anyone else getting a bit annoyed at the changes in typing behavior in the latest R release? I am getting many syntax errors in interpreted mode that I did not get in prior versions. SET QUERY DESTINATION(Into Variable;$foundCount), for example will throw a runtime error in interpreted mode if $foundCount is not explicitly typed.

john



John Baughman
Kailua, Hawaii
(808) 262-0328
[hidden email]





**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Typing a menu ref for Dynamic pop up menu

4D Tech mailing list
 John,

On Thu, Dec 7, 2017 at 1:00 PM, John Baughman via 4D_Tech <4d
[hidden email]> wrote:

> The compiler then complains when I try to append to the list saying
> “Changing the type of vTopLevelList from type text to type Real.
>

​You can only use APPEND MENU ITEM with a menu ref. You mention "I try to
append to the list" which suggests you're using APPEND TO LIST which is
looking for a list ref and that's a longint.

--
Kirk Brooks
San Francisco, CA
=======================

The only thing necessary for the triumph of evil is for good men to do
nothing.

- Edmund Burke
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Typing a menu ref for Dynamic pop up menu

4D Tech mailing list
Duh!  Of course. Actually the method in question had been replaced and was not being used anymore, or more probably not ever used.

Thanks,

John



> On Dec 7, 2017, at 11:13 AM, Kirk Brooks via 4D_Tech <[hidden email]> wrote:
>
> John,
>
> On Thu, Dec 7, 2017 at 1:00 PM, John Baughman via 4D_Tech <4d
> [hidden email]> wrote:
>
>> The compiler then complains when I try to append to the list saying
>> “Changing the type of vTopLevelList from type text to type Real.
>>
>
> ​You can only use APPEND MENU ITEM with a menu ref. You mention "I try to
> append to the list" which suggests you're using APPEND TO LIST which is
> looking for a list ref and that's a longint.
>
> --
> Kirk Brooks
> San Francisco, CA
> =======================
>
> The only thing necessary for the triumph of evil is for good men to do
> nothing.
>
> - Edmund Burke
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[hidden email]
> **********************************************************************

John Baughman
Kailua, Hawaii
(808) 262-0328
[hidden email]





**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Typing a menu ref for Dynamic pop up menu

4D Tech mailing list
 Yeah, I've spent no small amount of time maintaining code I eventually
determined wasn't being used too.

On Thu, Dec 7, 2017 at 1:31 PM, John Baughman via 4D_Tech <
[hidden email]> wrote:

> Duh!  Of course. Actually the method in question had been replaced and was
> not being used anymore, or more probably not ever used.
>
> Thanks,
>
> John
>
>
>
> > On Dec 7, 2017, at 11:13 AM, Kirk Brooks via 4D_Tech <
> [hidden email]> wrote:
> >
> > John,
> >
> > On Thu, Dec 7, 2017 at 1:00 PM, John Baughman via 4D_Tech <4d
> > [hidden email]> wrote:
> >
> >> The compiler then complains when I try to append to the list saying
> >> “Changing the type of vTopLevelList from type text to type Real.
> >>
> >
> > ​You can only use APPEND MENU ITEM with a menu ref. You mention "I try to
> > append to the list" which suggests you're using APPEND TO LIST which is
> > looking for a list ref and that's a longint.
> >
> > --
> > Kirk Brooks
> > San Francisco, CA
> > =======================
> >
> > The only thing necessary for the triumph of evil is for good men to do
> > nothing.
> >
> > - Edmund Burke
> > **********************************************************************
> > 4D Internet Users Group (4D iNUG)
> > FAQ:  http://lists.4d.com/faqnug.html
> > Archive:  http://lists.4d.com/archives.html
> > Options: http://lists.4d.com/mailman/options/4d_tech
> > Unsub:  mailto:[hidden email]
> > **********************************************************************
>
> John Baughman
> Kailua, Hawaii
> (808) 262-0328
> [hidden email]
>
>
>
>
>
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[hidden email]
> **********************************************************************
>



--
Kirk Brooks
San Francisco, CA
=======================

*The only thing necessary for the triumph of evil is for good men to do
nothing.*

*- Edmund Burke*
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Typing a menu ref for Dynamic pop up menu

4D Tech mailing list
In reply to this post by 4D Tech mailing list
On Dec 8, 2017, at 2:00 PM, John Baughman wrote:

> Is anyone else getting a bit annoyed at the changes in typing behavior in the latest R release? I am getting many syntax errors in interpreted mode that I did not get in prior versions. SET QUERY DESTINATION(Into Variable;$foundCount), for example will throw a runtime error in interpreted mode if $foundCount is not explicitly typed.

I’ve not done any compiler work in R releases that required compiling. Just curious, what is your compiler setting for the structure? Is it all variables are typed? If so, try turning that down to let 4D type all variables to see if the runtime error still occurs.

If 4D is using this compiler setting I think it is a great idea. The more they can make the runtime environment work the same as the compiled environment the better. Same runtime errors would be great.

Tim

********************************************
Tim Nevels
Innovative Solutions
785-749-3444
[hidden email]
********************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************