Problem with callback function for usort()

31 views
Skip to first unread message

Akshay Rokade

unread,
Nov 6, 2017, 11:02:18 AM11/6/17
to Ace Internals Dev
I have php file within that I have code part :

usort($subCategoryData, function ($a, $b)
{
   return $a['categoryLabel'] > $b['categoryLabel'];  // Sortierreihenfolge: "<" = DESC | ">" = "ASC"
});

There is nothing wrong in syntax but still Ace won't work with it.

If I use 
editor.getSession().getAnnotations()

I get like this:
column : 
null
row : 
NaN
text : 
"This.Node_Expr_Closure is not a function"
type : 
"error"
    
Whereas we should not have any annotations. 
Can you please help me for this.
Thanks in advance

Akshay Rokade

unread,
Nov 6, 2017, 11:02:18 AM11/6/17
to Ace Internals Dev
Hi All,
I have code part in php file as follow:

usort($subCategoryData, function ($a, $b)
{
  return $a['categoryLabel'] > $b['categoryLabel'];  // Sortierreihenfolge: "<" = DESC | ">" = "ASC"
});

When I check for editor.getSession().getAnnotations()
I got 
column
 : null
row : 
NaN
text : 
"This.Node_Expr_Closure is not a function"
type : 
"error"
   
Seems that problem Ace editor if we use callback function for usort()


Can you please help for it.
 Thanks in advance.

Harutyun Amirjanyan

unread,
Nov 8, 2017, 10:16:32 AM11/8/17
to ace-in...@googlegroups.com
Which version of ace do you use?​ This should be fixed on 1.2.9
Reply all
Reply to author
Forward
0 new messages