question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

FindFirst/Last/Next

See original GitHub issue

Hi abbaye,

Thank you for your great work, I am leveraging your library in a project that allows users to navigate huge binary file: not only works nice, but it is also intuitive and well written.

Nevertheless I have a few problems with the Find function family of the HexEditor control: when a FindFirst/Next/Last function is launched it won’t terminate until all of the matchings are found instead of returning immediately. I investigated the code and this behaviour is dictated by the ByteProvider.FindIndexOf function here which keeps searching for all occurrences by design (causing a series of problems for big files a/o many matches).

May I help you with this improvement?

Expected Behavior

FindFirst/Last/Next should return immediately after the given bytearray has been found.

Actual Behavior

FindFirst/Last/Next returns after the whole file is searched for all matches

Steps to Reproduce the Problem

  1. Invoke the aforementioned function anytime anywhere.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
claudio-tcommented, Oct 22, 2019

I will let you know in a while because at work I am stuck with 2017. I’ll build it at home on my laptop 😃

1reaction
claudio-tcommented, Oct 22, 2019

Hi Derek,

I’ve just managed to try it, but it seems not to work either using the dialog box or calling FindFirst directly (I see that you used an elgant yeld return statement but it doesn’t do the trick).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Recordset.OpenRecordSet - Access
This allows you to navigate a set of records (or rows) in a table. n.b. In almost all circumstances an SQL query will...
Read more >
Recordset.MoveFirst / MoveLast / MoveNext / MovePrevious
To find records that meet a specific condition — use a Find method to move from record to record. To locate a record...
Read more >
WantWare Technical Q&As – Essence
... Open/Close, Update/Sync questions for creating/connecting as well as the “Container” interface (Find, First/Last/Next/Prior, Add/Remove, ...
Read more >
Query in "criteria" in VBA code
I stormed google searching for a solution for this and found nothing. I want to use the .findfirst\next\last method using a criteria that...
Read more >
Find the Current Index and Print Next Record from Array
I have a program, there is 5 Button. The Button works to Find first, Last, Next and Previous Record from array. I have...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found