Skip to main content
17 events
when toggle format what by license comment
Mar 4, 2021 at 23:42 comment added chivracq My 2cts @OP, but stg ("else") that might (also) be "playing a role" is that for the 16 months since you joined the Forum/Site, from the 15 Qt's you've asked that are (still) visible (all in [0-1] Votes, so I guess a few got automatically deleted by yourself or the over-zealous Cleaning-Bot (-1 is enough...)), you never accepted one single Answer while several Answerers have already referred you to the "What should I do when someone answers my question?" Page...
Mar 4, 2021 at 21:29 answer added Ian Kemp timeline score: 7
Mar 4, 2021 at 19:21 comment added klutt @MarkGrimshaw-Aagaard There is a middle ground between posting all the code you have and posting the line you believe is the problem, and that is creating a [mre]
Mar 4, 2021 at 18:58 comment added Security Hound @MarkGrimshaw-Aagaard - You shouldn't use commentary to clarify a typo. The code you are actually asking about isn't even in this question.
Mar 4, 2021 at 18:47 answer added klutt timeline score: 16
Mar 4, 2021 at 18:26 comment added Mark Grimshaw-Aagaard My typo mistake @KevinB: that comment should read: cursor.insertText(text).matchArray[i].setFunc(); should end up being treated as: cursor.insertText(text).setItalic(textStart, textEnd, true); I've tried setting var blah = matchArray[i].setFunc(); and then cursor.insertText(text).blah(); but I get 'ReferenceError: setItalic is not defined'
Mar 4, 2021 at 17:42 history became hot meta post
Mar 4, 2021 at 17:12 comment added Kevin B For example, cursor.insertText(text).matchArray[i].setFunc() Why does matchArray[i] in this case need to be called on the return of cursor.insertText(text)? Why is doing this on two lines unacceptable? What was the goal there?
Mar 4, 2021 at 17:06 comment added Kevin B i'm not sure what that means: "Define one object's method as another object's method then use it programmatically" you can certainly define properties on existing objects, you can extend something so all instances of it have a given property, but i don't know what you intend to gain from that. Method chaning is a lot more than just adding properties from x to y.
Mar 4, 2021 at 17:00 comment added Mark Grimshaw-Aagaard . . . and yet, in the past when I've tried to strip down the code to only where the problem lies, I've been told to present it within the context of a working function with all details on what I expect the code to do. This I have done (even explaining what setIndex() is – and still I'm asked to explain what it is). I know I have done something wrong – what is that 'rather simple logic/syntax error' and how to correct it so that, as the title of my question states, I can 'Define one object's method as another object's method then use it programmatically'?
Mar 4, 2021 at 16:21 comment added Kevin B The whole issue here seems to be of wrong assumptions, or potentially even an X/Y problem. Most of your question discusses and presents things that are completely irrelevant to the error, because your error is caused by a rather simple logic/syntax error. The issue is... that error was caused by something you tried to do, but your question doesn't really explain why you were trying to do it. It's easy to say "Your code is invalid", but without knowing why you used the invalid syntax... it's anyone's guess as to what should be done instead.
Mar 4, 2021 at 12:55 comment added Heretic Monkey You don't need to "clearly note" where you've edited your post. When interested parties look at your post, they can see a history of the edits done and see whether they agree if the question has been focused enough to reopen. Indeed, it is preferred if the question reads as if it was never edited; the purpose of Stack Overflow is to create a library of high quality questions and answers for future people to find and get answers from, so the question should be clear and focused for those future people when they find it.
Mar 4, 2021 at 12:42 history edited cigien CC BY-SA 4.0
Formatted to make question title visible; minor formatting and copy-edits
Mar 4, 2021 at 12:32 answer added Cerbrus timeline score: 13
Mar 4, 2021 at 12:31 history edited yivi
edited tags
Mar 4, 2021 at 12:28 history edited Tomerikoo CC BY-SA 4.0
edited title
Mar 4, 2021 at 12:24 history asked Mark Grimshaw-Aagaard CC BY-SA 4.0