My bad - I mis-read what he was asking about.

On Fri, Aug 2, 2019 at 9:51 AM Timothy Penner via 4D_Tech <
4d_tech@lists.4d.com> wrote:

> Hello,
>
> > What gives? Tell me I made a basic mistake somewhere?!
>
> Here is the blog post regarding the feature:
> https://blog.4d.com/autocomplete-function-expanded-to-object-attributes
>
> TL/DR - Each time you open a method, or edit some code, the method editor
> collects the attributes used in your code and proposes them in the list of
> suggestions.
>
> -Tim
>
>
>
>
>
>
>
> -----Original Message-----
> From: 4D_Tech <4d_tech-boun...@lists.4d.com> On Behalf Of Narinder Chandi
> via 4D_Tech
> Sent: Friday, August 02, 2019 9:42 AM
> To: 4D Tech Mailing List <4d_tech@lists.4d.com>
> Cc: Narinder Chandi <4dtechmailingl...@toolbox.uk.com>
> Subject: No Object Auto-Completion for 4D Commands?
>
> So, I'm in the final phase of a v15 to v17.2 upgrade and
> eliminating/replacing all the remaining _o_ prefixed obsolete 4D commands.
> I came across some Method Editor behaviour that I totally didn't expect...
> btw, this is my very first foray into using C_OBJECT and 4D commands that
> return objects!
>
> Let me illustrate with the following very simple example:
>
> C_OBJECT($object)
>
> $object:=Path to object(Get 4D folder)
>
> Now, when I type $object into the Method Editor, I expected the
> auto-completion to show me available object properties such as
> parentFolder, name and extension but it didn't. I then modified the code to:
>
> $object:=New object
> $object:=Path to object(Get 4D folder)
>
> But that didn't yield anything more - I had assumed in the first example
> that the 4D command would implicitly initialise the object internally. So,
> I have a couple questions a this point:
> * for 4D commands that return an object is object initialisation implicit
> or must "New object" always be called first?
> * is it the case that there is actually no auto-completion for 4D Commands
> that return objects? That would be a real disappointment :((
>
> Note that I also tested the above in a completely new 4D v17 database just
> in case there was something up with a converted database. I also checked
> that the auto-complete settings in Preferences were setup correctly - they
> are identical in both the converted v17 and new v17 databases.
>
> I also tested this example:
>
> C_OBJECT($object1)
> C_OBJECT($object2)
>
> $object1:=New object
> $object1:=Path to object(Get 4D folder)
>
> $object2:=New object
> $object2.foo:="foo"
> $object2.bar:="bar"
>
> In this case I get auto-completion of "object1.foo" as well as
> "object2.foo" which is really not what I would expect at all! It seems to
> me that the Method Editor is wholly indiscriminate about what the
> auto-completion options are!
>
> What gives? Tell me I made a basic mistake somewhere?!
>
> Regards,
>
> Narinder Chandi,
> ToolBox Systems Ltd.
> --
>
>
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **********************************************************************
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> Archive:  http://lists.4d.com/archives.html
> Options: https://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
> **********************************************************************



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

What can be said, can be said clearly,
and what you can’t say, you should shut up about

*Wittgenstein and the Computer *
**********************************************************************
4D Internet Users Group (4D iNUG)
Archive:  http://lists.4d.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to