Page 1 of 2
BBCode Code Block & Microsoft Edge.
Posted: Tue Feb 21, 2017 7:09 pm
by Thunder93
I wish PureBasic compiler wouldn't through Syntax error(S) ALWAYS when testing copied code via BBCode Code Block w/Microsoft Edge. I have to keep switching to Internet Explorer to copy every-time, real annoyance.
I don't know why PB IDE can't automatically handle the conversion when pasting copied contents from Microsoft Edge.
I can't be the only one using Microsoft Edge on here...

Re: BBCode Code Block & Microsoft Edge.
Posted: Tue Feb 21, 2017 7:16 pm
by Bisonte
Thunder93 wrote:I can't be the only one using Microsoft Edge on here...

Highlander.... There can be only one

Re: BBCode Code Block & Microsoft Edge.
Posted: Wed Feb 22, 2017 10:25 am
by Fred
the IDE just paste the clipboard content, how can it be an IDE fault ? Better send your report to MS
Re: BBCode Code Block & Microsoft Edge.
Posted: Wed Feb 22, 2017 11:30 am
by davido
The problem appears to be non-breaking space characters interspersed with normal spaces.
Perhaps the IDE could accept both?
Re: BBCode Code Block & Microsoft Edge.
Posted: Wed Feb 22, 2017 1:49 pm
by Thunder93
Exactly.
davido wrote:The problem appears to be non-breaking space characters interspersed with normal spaces.
I like to help people on the PB forums to troubleshoot codes. However I'm finding it annoying as Microsoft Edge user to need be jumping to hoops now to have PB not complain about
syntax error(S) on copied and pasted codes into PB IDE. I'm not going to switch browsers, so I guess this is a conundrum.
davido wrote:Perhaps the IDE could accept both?
Re: BBCode Code Block & Microsoft Edge.
Posted: Wed Feb 22, 2017 2:46 pm
by #NULL
edge gives you a different text as was given by the website, and then a third party application like PB is supposed to guess what was meant in the first place?

Re: BBCode Code Block & Microsoft Edge.
Posted: Wed Feb 22, 2017 3:25 pm
by Thunder93
The only problem I see is with PB IDE for not accepting non-breaking space interspersed with normal spaces. However PB IDE wants to cry syntax error.
What's with the closed-mindedness that I'm receiving here? What is wrong with accepting this style in PB IDE? You guys treating this as if we living still in the stone ages. whatever.........!
Re: BBCode Code Block & Microsoft Edge.
Posted: Wed Feb 22, 2017 4:02 pm
by davido
We could ask Fred, politely, if he could allow the IDE to accept $A0 characters.
Re: BBCode Code Block & Microsoft Edge.
Posted: Wed Feb 22, 2017 4:08 pm
by TI-994A
Thunder93 wrote:You guys treating this as if we living still in the stone ages. whatever.........!
Microsoft Edge is simply too advanced for us cavemen.

Re: BBCode Code Block & Microsoft Edge.
Posted: Wed Feb 22, 2017 6:16 pm
by Josh
Re: BBCode Code Block & Microsoft Edge.
Posted: Wed Feb 22, 2017 7:36 pm
by davido
@Josh,
Thank you.
Didn't find that: I'll have to improve my searching technique.
Re: BBCode Code Block & Microsoft Edge.
Posted: Wed Feb 22, 2017 8:13 pm
by Thunder93
Indeed, That was a nice find. It was just posted, last Saturday.
Hopefully the annoyance won't continue with Edge copying for another two years.
Re: BBCode Code Block & Microsoft Edge.
Posted: Thu Feb 23, 2017 2:17 am
by Demivec
Thunder93 wrote:The only problem I see is with PB IDE for not accepting non-breaking space interspersed with normal spaces. However PB IDE wants to cry syntax error.
What's with the closed-mindedness that I'm receiving here? What is wrong with accepting this style in PB IDE? You guys treating this as if we living still in the stone ages. whatever.........!
You could write a special tool for the PB IDE to paste your clipboard content by first replacing the non-breaking spaces with spaces. You would just compile it to an executable and link it into the PB IDE tools.
Something like this:
Code: Select all
; Tool "InsertClipFromME" This version written by Demivec, inspired by Michael Vogel and kenmo
; Replaces Non-Breaking Space ($A0) with space in clipboard text before pasting it in a source.
;
; Command Line: InsertClipFromME.exe
; Working Directory: %COMPILEFILE
; Name: Insert Clip from ME
; Run Hidden
SCID = Val(GetEnvironmentVariable("PB_TOOL_Scintilla"))
Orig.s = GetClipboardText()
If (SCID And Orig)
Mod.s = ReplaceString(Orig, #CRLF$, #LF$)
Mod = ReplaceString(Mod, Chr($A0), Space(1))
SetClipboardText(Mod)
SendMessage_(SCID, #SCI_PASTE, 0, 0)
SetClipboardText(Orig)
EndIf

Re: BBCode Code Block & Microsoft Edge.
Posted: Thu Feb 23, 2017 2:26 am
by Thunder93
Demivec, you are clever. This approach would save me from the extra click even by normal means. Thanks

Re: BBCode Code Block & Microsoft Edge.
Posted: Thu Feb 23, 2017 2:32 am
by Dude
Thunder93 wrote:What is wrong with accepting this style in PB IDE?
Well, it's wrong because frankly it's not a PureBasic IDE problem. The bug is solely with Edge, and PureBasic doesn't need to change to fix another app's bugs. Once you do that, you need to start doing it for any browser or app that doesn't present the correct clipboard text to PureBasic properly. Where does it end?
As an example, here's a line of PureBasic code that I copied from a hex editor:
Code: Select all
55 73 65 50 4E 47 49 6D 61 67 65 45 6E 63 6F 64 65 72 28 29
Why can't PureBasic also convert that to real code, to not give a syntax error?
Don't get offended: I'm NOT trying to p*ss you off. Just showing why it shouldn't be done.
