Hi, Regarding check of method name as string, e.g. for New Process: you could check the name using METHOD GET NAMES. It's not perfect, but better than nothing.
My recommendation regarding project method organization: prefix your method names (and form names) for each "module" with 3 or 4 letters. I like the feature of the explorer home section where you can organize your items in folders. Especially I like to keep forms and associated code (project methods) in one single folder. I use Object and Form methods only to pass the event to a project method, e.g. Case of :(Form event=on clicked) MyEventHandlingMethod(Object get name(object current);"OnClicked") End case I prefer passing the event as a string. This gives me the freedom to create my own events, such as "Update", "Disable" etc. Moving code away from object methods to project methods does not lead to more but to less (and better organized) code, at least this is my experience. Important is to have a clear concept of how to organize the code around the form. I also try to "externalize" parts of my projects to components. Components have their own namespace (except for shared methods). IMO there is nothing wrong with the name "CALL FORM". It calls a form, executes a method and this method has access to the objects of the called form. Olivier -----Ursprüngliche Nachricht----- Von: 4D_Tech [mailto:[email protected]] Im Auftrag von James Crate via 4D_Tech Gesendet: Montag, 20. März 2017 18:45 An: 4D iNug Technical <[email protected]> Cc: James Crate <[email protected]> Betreff: Re: CALL FORM: Some notes on a command that's easy to misunderstand On Mar 16, 2017, at 10:28 PM, David Adams via 4D_Tech <[email protected]> wrote: > > That's not what 4D's "messages" are, they're commands. In fact, the > best names for the new commands are probably these: > > EXECUTE METHOD IN WINDOW > EXECUTE METHOD IN WORKER I was looking forward to finally having something better than CALL PROCESS available, but it is disappointing to see the level of coupling required to utilize the new commands. Something more similar to Cocoa’s NotificationCenter or javascript custom events would have been far more preferable. If you use a string literal for the method name, does the compiler check that the method exists? It would be nice if the tokenized method name could be used; parenthesis could be required to also allow using the return value of a method as the parameter value. (This would be nice for any command that takes a method name, like New Process.) Since using these will require code to be in project methods instead of object/form methods (I hate the invisibility of object methods, but also hate the pollution of the single namespace with thousands of tiny code snippets relevant to a single item), is there any general recommendation on project method organization? I have not been able to get project method folders to work myself. I’m also not sure if it’s even desirable to have project method folders, considering that there is only a single global namespace maybe it is better to have the hundreds to thousands of project methods in a single list? Is there some sort of “quick open” functionality for project methods that I haven’t found yet? Especially with all methods sharing the same list, if I’ve opened a form method type-ahead is useless until I’ve closed the form methods “folder”. Perhaps something like the 4DPop Commands list, but for opening project methods? ********************************************************************** 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:[email protected] **********************************************************************

