BBCode Code Block & Microsoft Edge.

Everything else that doesn't fall into one of the other PB categories.
User avatar
Thunder93
Addict
Addict
Posts: 1788
Joined: Tue Mar 21, 2006 12:31 am
Location: Canada

BBCode Code Block & Microsoft Edge.

Post 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... :evil:
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
User avatar
Bisonte
Addict
Addict
Posts: 1233
Joined: Tue Oct 09, 2007 2:15 am

Re: BBCode Code Block & Microsoft Edge.

Post by Bisonte »

Thunder93 wrote:I can't be the only one using Microsoft Edge on here... :evil:
Highlander.... There can be only one :mrgreen:
PureBasic 6.10 LTS (Windows x86/x64) | Windows10 Pro x64 | Asus TUF X570 Gaming Plus | R9 5900X | 64GB RAM | GeForce RTX 3080 TI iChill X4 | HAF XF Evo | build by vannicom​​
English is not my native language... (I often use DeepL to translate my texts.)
Fred
Administrator
Administrator
Posts: 16687
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: BBCode Code Block & Microsoft Edge.

Post by Fred »

the IDE just paste the clipboard content, how can it be an IDE fault ? Better send your report to MS
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: BBCode Code Block & Microsoft Edge.

Post by davido »

The problem appears to be non-breaking space characters interspersed with normal spaces.
Perhaps the IDE could accept both?
DE AA EB
User avatar
Thunder93
Addict
Addict
Posts: 1788
Joined: Tue Mar 21, 2006 12:31 am
Location: Canada

Re: BBCode Code Block & Microsoft Edge.

Post 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?
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
#NULL
Addict
Addict
Posts: 1440
Joined: Thu Aug 30, 2007 11:54 pm
Location: right here

Re: BBCode Code Block & Microsoft Edge.

Post 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? :shock:
User avatar
Thunder93
Addict
Addict
Posts: 1788
Joined: Tue Mar 21, 2006 12:31 am
Location: Canada

Re: BBCode Code Block & Microsoft Edge.

Post 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.........!
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: BBCode Code Block & Microsoft Edge.

Post by davido »

We could ask Fred, politely, if he could allow the IDE to accept $A0 characters.
DE AA EB
User avatar
TI-994A
Addict
Addict
Posts: 2512
Joined: Sat Feb 19, 2011 3:47 am
Location: Singapore
Contact:

Re: BBCode Code Block & Microsoft Edge.

Post 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. :lol:
Texas Instruments TI-99/4A Home Computer: the first home computer with a 16bit processor, crammed into an 8bit architecture. Great hardware - Poor design - Wonderful BASIC engine. And it could talk too! Please visit my YouTube Channel :D
User avatar
Josh
Addict
Addict
Posts: 1183
Joined: Sat Feb 13, 2010 3:45 pm

Re: BBCode Code Block & Microsoft Edge.

Post by Josh »

sorry for my bad english
davido
Addict
Addict
Posts: 1890
Joined: Fri Nov 09, 2012 11:04 pm
Location: Uttoxeter, UK

Re: BBCode Code Block & Microsoft Edge.

Post by davido »

@Josh,
Thank you.
Didn't find that: I'll have to improve my searching technique.
DE AA EB
User avatar
Thunder93
Addict
Addict
Posts: 1788
Joined: Tue Mar 21, 2006 12:31 am
Location: Canada

Re: BBCode Code Block & Microsoft Edge.

Post 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.
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
User avatar
Demivec
Addict
Addict
Posts: 4091
Joined: Mon Jul 25, 2005 3:51 pm
Location: Utah, USA

Re: BBCode Code Block & Microsoft Edge.

Post 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
:)
User avatar
Thunder93
Addict
Addict
Posts: 1788
Joined: Tue Mar 21, 2006 12:31 am
Location: Canada

Re: BBCode Code Block & Microsoft Edge.

Post by Thunder93 »

Demivec, you are clever. This approach would save me from the extra click even by normal means. Thanks :lol: :mrgreen:
ʽʽSuccess is almost totally dependent upon drive and persistence. The extra energy required to make another effort or try another approach is the secret of winning.ʾʾ --Dennis Waitley
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: BBCode Code Block & Microsoft Edge.

Post 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. 8)
Post Reply