Introspection and command num > 9000

Hi,

If you have a look soon command num, all command 4D responding to the Command name command have a number include in the range 0-2000 today. That’s include also some WP commands.
For these numbers, we are able to get from dictionaries files information like ‘description, syntax …’. Commande like "Parse formula’ are also able to return ‘Formula out with tokens’.

If you have a look on VP commands, numbering start after 9000 and can be more that 905259. It is the same for all command / member functions … of DataStore, EntitySelection, Entity… You can also notice the some has no number at all.
For the ones having a number, we are able to get from dictionaries files information like ‘description, syntax …’.
For all these command which have a number >2000, there is no dictionary file, Parse formula doesn’t return the token. See pict below

So, the question is: is it a mistake to do not provide a dictionary with the syntax and description? It is plan to provide it? That should be helpful if these information were available.

Patrick

2 Likes

Do not confuse 4D commands and component commands such as VP… or SVG… which are shared methods.

Hi Vincent,

Fine, so why for the component WP we have access? In this case, it is not consistent, no :roll_eyes:?

Patrick

WP… are not shared methods, which you can see since the rendering syntax in the method editor is not the same

Screenshot 2020-06-15 at 10.18.35

The difference is also into the explorer:
The commands are listed in the Commands page
The shared methods are listed in the Methods > Components Methods > 4D ViewPro


2 Likes

Yes there exists a docu-list for thread safe commands
but this list is incomplete
i so i always do not know
is a command notThreadSafe because it is not on this docu-list
or has it only forgotten by 4D to put my command on this list.
To say all what is NOT on this docu-list means always
than the command is notThreadSave, is not correct in all cases
and there is nowhere a list which lists the forgotten commands
so we can know what is only forgotten and what is sure notThreadSafe.
This belongs not only to docu-list of all threadSafe commands,
it is too on the docu-detailed-page of a command not always correct
signed with the threadSafe icon.
I think it is better 4D creates a second icon/status “notThreadSafe”,
so we can see

  • this cmd is threadSafe (has threadSafe icon)
  • this cmd is notThreadSave (has notThreadSave icon)
  • this cmd has not any of the both icons (what means cannot defined or any kind of unknown)

https://doc.4d.com/4Dv18R3/4D//Preemptive_4850914.999-2878208.en.html

https://doc.4d.com/4Dv18R3/4D/18-R3/Command-name.301-4901814.en.html

Per Definition 4D says these are all “Commands”:

  • Normal 4D commands like “Alert”
  • Some commands are attached to collections or objects
  • Use 4D plug-ins or 4D components that add new commands to your 4D

For example too,
collection.length and too all collection.functions()
has a icon threadSave and listed on the threadsafe-docu-page
(but not available with “Command name”).

  • formula.apply (has icon threadsafe and is on list)
  • formula.call (has icon threadsafe and is on list)
  • formula.source (has NO icon and NOT on list, but this cannot be it must be threadsafe)

Only for example (not a complete list)
these command numbers are not supported by command “Command name”
and so you cannot use “Command name” to receive automatically info
“Thread-safety property of command”:

Zusammenfassung

collection.length (Command #9293)
collection.average( ) (Command #705250)
collection.clear( ) (Command #705256)
collection.combine( ) (Command #805254)
collection.concat( ) (Command #705251)
collection.copy( ) (Command #0) Updated 18 R3
collection.count( ) (Command #705244)
collection.countValues( ) (Command #705252)
collection.distinct( ) (Command #805263)
collection.equal( ) (Command #805261)
collection.every( ) (Command #705246)
collection.extract( ) (Command #805251)
collection.fill( ) (Command #805262)
collection.filter( ) (Command #705249)
collection.find( ) (Command #805258)
collection.findIndex( ) (Command #805256)
collection.indexOf( ) (Command #805255)
collection.indices( ) (Command #805265)
collection.insert( ) (Command #0)
collection.join( ) (Command #805266)
collection.lastIndexOf( ) (Command #705247)
collection.map( ) (Command #805252)
collection.max( ) (Command #805288)
collection.min( ) (Command #705254)
collection.orderBy( ) (Command #905251)
collection.orderByMethod( ) (Command #705253)
collection.pop( ) (Command #805253)
collection.push( ) (Command #705255)
collection.query( ) (Command #805267)
collection.reduce( ) (Command #705248)
collection.remove( ) (Command #705242)
collection.resize( ) (Command #705243)
collection.reverse( ) (Command #805264)
collection.shift( ) (Command #805257)
collection.slice( ) (Command #805250)
collection.some( ) (Command #705245)
collection.sort( ) (Command #805259)
collection.sum( ) (Command #805260)
collection.unshift( ) (Command #0) !!!Docu-MISTAKE!!! #0 cannot be cmdNo of col.unshift !!!

formula.source (Command #0) !!!Docu-MISTAKE!!! #0 cannot be cmdNo of col.unshift !!!
formula.apply( ) (Command #905254)
formula.call( ) (Command #0) !!!Docu-MISTAKE!!! #0 cannot be cmdNo of col.unshift !!!

dataStore.{dataclassName} (Command #0)
dataStore.cancelTransaction( ) (Command #0)
dataStore.encryptionStatus( ) (Command #0)
dataStore.getInfo( ) (Command #0)
dataStore.getRequestLog( ) (Command #905264)
dataStore.provideDataKey( ) (Command #0)
dataStore.startRequestLog( ) (Command #0)
dataStore.startTransaction( ) (Command #0)
dataStore.stopRequestLog( ) (Command #0)
dataStore.validateTransaction( ) (Command #0)

file.creationDate (Command #0)
file.creationTime (Command #0)
file.exists (Command #0)
file.extension (Command #0)
file.fullName (Command #0)
file.hidden (Command #0)
file.isAlias (Command #0)
file.isFile (Command #0)
file.isFolder (Command #0)
file.isWritable (Command #0)
file.modificationDate (Command #0)
file.modificationTime (Command #0)
file.name (Command #0)
file.original (Command #0)
file.parent (Command #0)
file.path (Command #0)
file.platformPath (Command #0)
folder.creationDate (Command #0)
folder.creationTime (Command #0)
folder.exists (Command #0)
folder.extension (Command #0)
folder.fullName (Command #0)
folder.hidden (Command #0)
folder.isAlias (Command #0)
folder.isFile (Command #0)
folder.isFolder (Command #0)
folder.isPackage (Command #0)
folder.modificationDate (Command #0)
folder.modificationTime (Command #0)
folder.name (Command #0)
folder.original (Command #0)
folder.parent (Command #0)
folder.path (Command #0)
folder.platformPath (Command #0)
file.copyTo( ) (Command #0)
file.create( ) (Command #0)
file.createAlias( ) (Command #0)
file.delete( ) (Command #0)
file.getContent( ) (Command #0)
file.getIcon( ) (Command #0)
file.getText( ) (Command #0)
file.moveTo( ) (Command #0)
file.rename( ) (Command #0)
file.setContent( ) (Command #0)
file.setText( ) (Command #0)
folder.copyTo( ) (Command #0)
folder.create( ) (Command #0)
folder.createAlias( ) (Command #0)
folder.delete( ) (Command #0)
folder.file( ) (Command #0)
folder.files( ) (Command #0)
folder.folder( ) (Command #0)
folder.folders( ) (Command #0)
folder.getIcon( ) (Command #0)
folder.moveTo( ) (Command #0)
folder.rename( ) (Command #0)

signal.description (Command #0)
signal.signaled (Command #0)
signal.trigger( ) (Command #0)
signal.wait( ) (Command #0)

VP ADD FORMULA NAME (Command #9556)
VP ADD RANGE NAME (Command #9555)
VP ADD SELECTION (Command #905260)
VP ADD STYLESHEET (Command #9753)
VP All (Command #9534)
VP Cell (Command #9538)
VP Cells (Command #9537)
VP Column (Command #9536)
VP COLUMN AUTOFIT (Command #9945)
VP Combine ranges (Command #9540)
VP Convert from 4D View (Command #705241)
VP Convert to picture (Command #9885)
VP DELETE COLUMNS (Command #9912)
VP DELETE ROWS (Command #9913)
VP EXPORT DOCUMENT (Command #905255)
VP Export to object (Command #9029)
VP FLUSH COMMANDS (Command #9588)
VP Font to object (Command #9765)
VP Get active cell (Command #905262)
VP Get cell style (Command #9764)
VP Get column attributes (Command #9909)
VP Get column count (Command #9948)
VP Get default style (Command #9763)
VP Get formula (Command #9587)
VP Get formula by name (Command #9558)
VP Get formulas (Command #9775)
VP Get frozen panes (Command #9955)
VP Get names (Command #9557)
VP Get print info (Command #9815)
VP Get row attributes (Command #9911)
VP Get row count (Command #9950)
VP Get selection (Command #905261)
VP Get sheet options (Command #9957) New 18 R3
VP Get stylesheet (Command #9755)
VP Get stylesheets (Command #9756)
VP Get value (Command #9585)
VP Get values (Command #9773)
VP IMPORT DOCUMENT (Command #905265)
VP IMPORT FROM OBJECT (Command #9030)
VP INSERT COLUMNS (Command #9914)
VP INSERT ROWS (Command #9915)
VP Name (Command #9539)
VP NEW DOCUMENT (Command #9026)
VP Object to font (Command #9766)
VP PRINT (Command #9882)
VP REMOVE NAME (Command #9559)
VP REMOVE STYLESHEET (Command #9754)
VP RESET SELECTION (Command #905257)
VP Row (Command #9535)
VP ROW AUTOFIT (Command #9946)
VP SET ACTIVE CELL (Command #905256)
VP SET ALLOWED METHODS (Command #9777)
VP SET BOOLEAN VALUE (Command #9574)
VP SET BORDER (Command #9767)
VP SET CELL STYLE (Command #9761)
VP SET COLUMN ATTRIBUTES (Command #9908)
VP SET COLUMN COUNT (Command #9947)
VP SET DATE TIME VALUE (Command #9575)
VP SET DATE VALUE (Command #9576)
VP SET DEFAULT STYLE (Command #9762)
VP SET FIELD (Command #9584)
VP SET FORMULA (Command #9583)
VP SET FORMULAS (Command #9774)
VP SET FROZEN PANES (Command #9954)
VP SET NUM VALUE (Command #9581)
VP SET PRINT INFO (Command #9814)
VP SET ROW ATTRIBUTES (Command #9910)
VP SET ROW COUNT (Command #9949)
VP SET SELECTION (Command #905258)
VP SET SHEET OPTIONS (Command #9956) New 18 R3
VP SET TEXT VALUE (Command #9582)
VP SET TIME VALUE (Command #9577)
VP SET VALUE (Command #9573)
VP SET VALUES (Command #9772)
VP SHOW CELL (Command #905259)

Progress Get Button Enabled (Command #0)
Progress Get Button Title (Command #0)
Progress Get Icon (Command #0)
Progress Get Message (Command #0)
Progress Get On Error Method (Command #0)
Progress Get On Stop Method (Command #0)
Progress Get Progress (Command #0)
Progress Get Title (Command #0)
Progress New (Command #0)
Progress QUIT (Command #0)
Progress SET BUTTON ENABLED (Command #0)
Progress SET BUTTON TITLE (Command #0)
Progress SET FONT SIZES (Command #0)
Progress SET FONTS (Command #0)
Progress SET ICON (Command #0)
Progress SET MESSAGE (Command #0)
Progress SET ON ERROR METHOD (Command #0)
Progress SET ON STOP METHOD (Command #0)
Progress SET PROGRESS (Command #0)
Progress SET TITLE (Command #0)
Progress SET WINDOW VISIBLE (Command #0)
Progress Stopped (Command #0)

SVG_ADD_NAMESPACE (Command #65874)
SVG_GET_ATTRIBUTES (Command #65928)
SVG_Get_class (Command #0)
SVG_Get_fill_brush (Command #0)
SVG_Get_ID (Command #65932)
SVG_SET_ATTRIBUTES (Command #65942)
SVG_SET_ATTRIBUTES_BY_ARRAYS (Command #65941)
SVG_SET_CLASS (Command #65870)
SVG_SET_CLIP_PATH (Command #65900)
SVG_SET_DIMENSIONS (Command #65936)
SVG_SET_FILL_BRUSH (Command #65940)
SVG_SET_FILL_RULE (Command #65899)
SVG_SET_FILTER (Command #65930)
SVG_SET_ID (Command #65933)
SVG_SET_MARKER (Command #65931)
SVG_SET_OPACITY (Command #65934)
SVG_SET_ROUNDING_RECT (Command #65935)
SVG_SET_SHAPE_RENDERING (Command #65898)
SVG_SET_STROKE_BRUSH (Command #65939)
SVG_SET_STROKE_DASHARRAY (Command #65897)
SVG_SET_STROKE_LINECAP (Command #705082)
SVG_SET_STROKE_LINEJOIN (Command #705081)
SVG_SET_STROKE_MITERLIMIT (Command #65896)
SVG_SET_STROKE_VECTOR_EFFECT (Command #0)
SVG_SET_STROKE_WIDTH (Command #65938)
SVG_SET_TRANSFORM_FLIP (Command #65949)
SVG_SET_TRANSFORM_MATRIX (Command #65943)
SVG_SET_TRANSFORM_ROTATE (Command #65945)
SVG_SET_TRANSFORM_SCALE (Command #65944)
SVG_SET_TRANSFORM_SKEW (Command #65947)
SVG_SET_TRANSFORM_TRANSLATE (Command #65946)
SVG_SET_VIEWBOX (Command #65929)
SVG_SET_VIEWPORT_FILL (Command #705083)
SVG_SET_VISIBILITY (Command #65948)
SVG_SET_XY (Command #65937)

SVG Colors (Command #65874)
SVG_Color_from_index (Command #65873)
SVG_Color_grey (Command #65924)
SVG_Color_RGB_from_CMYK (Command #65895)
SVG_Color_RGB_from_HLS (Command #65894)
SVG_Color_RGB_from_long (Command #65925)
SVG_FADE_TO_GREY_SCALE (Command #705085)
SVG_Filter_ColorMatrix (Command #0)
SVG_GET_COLORS_ARRAY (Command #65893)
SVG_GET_DEFAULT_BRUSHES (Command #65927)
SVG_Get_named_color_value (Command #0)
SVG_SET_BRIGHTNESS (Command #0)
SVG_SET_DEFAULT_BRUSHES (Command #65926)
SVG_SET_HUE (Command #65868)
SVG_SET_SATURATION (Command #65867)

Only what i can found about “what is a command per 4D definition”
Per Definition 4D says these are all “Commands”:

  • Normal 4D commands like “Alert”
  • Some commands are attached to collections or objects
  • Use 4D plug-ins or 4D components that add new commands to your 4D