Ticket #289 (closed defect: fixed)

Opened 4 months ago

Last modified 4 months ago

Searching functions of the form "function()" should not throw an error

Reported by: athomschke Owned by:
Priority: major Milestone:
Component: Apps Keywords:
Cc:

Description

Currently, if you mark "someFunction()" and hit [ctrl|cmd]+shift+f, it throws:

[Error message] LOGERROR: AttributeConnection?>>update: SyntaxError?: Invalid regular expression: /threeWayDiff)/: Unmatched ')' stack:undefined

[Stack trace] Error when trying to update AttributeConnection?(<lively.morphic.List#1893E... - searchResultList>.selection --> <lively.morphic.Box#6DD22... - MethodFinderPane?>.browse) with value [object Object]: SyntaxError?: Invalid regular expression: /threeWayDiff)/: Unmatched ')' SyntaxError?: Invalid regular expression: /threeWayDiff)/: Unmatched ')'

at new RegExp? (unknown source) at Box.browse (eval at <anonymous> ( http://lively-kernel.org/repository/webwerkstatt/core/generated/combinedModules.js?009b98ef67390dfb0262af8e35409e4f:4044:29)) at  http://lively-kernel.org/repository/webwerkstatt/core/generated/combinedModules.js?009b98ef67390dfb0262af8e35409e4f:5664:19 at AttributeConnection?.update ( http://lively-kernel.org/repository/webwerkstatt/core/generated/combinedModules.js?009b98ef67390dfb0262af8e35409e4f:5675:5) at List.selection ( http://lively-kernel.org/repository/webwerkstatt/core/generated/combinedModules.js?009b98ef67390dfb0262af8e35409e4f:5733:8) at List.updateSelectionAndLineNoProperties ( http://lively-kernel.org/repository/webwerkstatt/core/generated/combinedModules.js?009b98ef67390dfb0262af8e35409e4f:23282:76) at List.selectAt ( http://lively-kernel.org/repository/webwerkstatt/core/generated/combinedModules.js?009b98ef67390dfb0262af8e35409e4f:23275:14) at List.setSelection ( http://lively-kernel.org/repository/webwerkstatt/core/generated/combinedModules.js?009b98ef67390dfb0262af8e35409e4f:23292:14) at Box.setSearch (eval at <anonymous> ( http://lively-kernel.org/repository/webwerkstatt/core/generated/combinedModules.js?009b98ef67390dfb0262af8e35409e4f:4044:29)) at World.openMethodFinderFor ( http://lively-kernel.org/repository/webwerkstatt/core/generated/combinedModules.js?009b98ef67390dfb0262af8e35409e4f:22885:26)

Maybe it should just strip everything between "(" and ")" and search for the function name?

platform: Windows 7 with Chrome 16

Change History

comment:1 Changed 4 months ago by lauritz

  • Status changed from new to closed
  • Resolution set to fixed

Fixed the defect in r132125-r132127, which also corrects syntax highlighting of regexp characters in the code pane (e.g. '(' for opening a group, but commonly used in 'function(' - '(' is highlighted as well now).

Note: See TracTickets for help on using tickets.