I was just looking up a couple of details about 4D's thread-safe commands and noticed a cross-ref to the Command name docs:
http://doc.4d.com/4Dv16/4D/16.1/Command-name.301-3375914.en.html I'm always the last to know. 4D's boosted this command's features pretty substantially. You can now get the thread-safety of the command and what theme it belongs to. Nice! (The property bits only have one value now - but perhaps more will be added later?) I combined a couple of the examples and rewrote them in my own idiom...posted below. All this does is extract the name, thread-safety, and theme of every command in the language into a series of arrays. That's it. It only takes a few minutes to write this code, but I thought I'd post it to draw attention to the new(ish?) powers of Command name...in case I'm *not* the last to know. In your own work you might want filtering, to put the data into a C_OBJECT, etc., etc. // GetCommandList ARRAY LONGINT(Command_Number_al;0) ARRAY TEXT(Command_Names_at;0) ARRAY TEXT(Command_Themes_at;0) ARRAY BOOLEAN(Command_ThreadSafe_ab;0) Repeat C_LONGINT($command_number) C_LONGINT($flags_l) c_text($theme_name) C_TEXT($command_name) $command_number:=$command_number+1 $command_name:=Command name($command_number;$flags_l;$theme_name) If (OK=1) //command number exists If (Length($command_name)>0) //command is not disabled C_BOOLEAN($thread_safe) $thread_safe:=$flags_l ?? 0 APPEND TO ARRAY(Command_Names_at;$command_name) APPEND TO ARRAY(Command_Number_al;$command_number) APPEND TO ARRAY(Command_Themes_at;$theme_name) APPEND TO ARRAY(Command_ThreadSafe_ab;$thread_safe) End if End if Until(OK=0) //end of existing commands ********************************************************************** 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] **********************************************************************

