Page 2 of 3
Posted: Sat Dec 29, 2007 12:14 pm
by pdwyer
could you show me an example?
Posted: Sat Dec 29, 2007 12:37 pm
by PB
Yes, macros sound interesting.
Posted: Sun Dec 30, 2007 3:59 am
by Dare
A macro as a way to handle split lines? If so, please please show!
Or a macro as an abbreviation for long strings of code, that is, put the long strings in a macro and then use the macro in the code?
Posted: Sun Dec 30, 2007 4:14 am
by PB
Wow, we three Aussies really want it bad!

Posted: Sun Dec 30, 2007 4:26 am
by Dare
PB wrote:Wow, we three Aussies really want it bad!

And also the split lines!
Posted: Sun Dec 30, 2007 4:32 am
by Thalius
a macro to basically shorten code. not for multilines.
How "dynamic" do you need it ? Otherwise id suggest you simply wrap them into teh Macro and call it. Otherwise this will take some thinking ( which i have to do after work later.. gah 4am and i cant sleep ... prolly fricken meds :/
Thalius
Posted: Wed Jan 02, 2008 12:37 pm
by DoubleDutch
If there was an option in the IDE to enable Scintilla word wrap then this would possibly solve this problem.
All the code that would be needed is:
Code: Select all
ScintillaSendMessage(gadget,#SCI_SETHSCROLLBAR,#False)
ScintillaSendMessage(gadget,#SCI_SETWRAPMODE,#SC_WRAP_WORD)
ScintillaSendMessage(gadget,#SCI_SETWRAPVISUALFLAGS,#SC_WRAPVISUALFLAG_END)
If the marker at the end of the wrapped line looked confusing then maybe it should be at the front with:
Posted: Wed Jan 02, 2008 3:37 pm
by gnozal
DoubleDutch wrote:All the code that would be needed is:
Code: Select all
ScintillaSendMessage(gadget,#SCI_SETHSCROLLBAR,#False)
ScintillaSendMessage(gadget,#SCI_SETWRAPMODE,#SC_WRAP_WORD)
ScintillaSendMessage(gadget,#SCI_SETWRAPVISUALFLAGS,#SC_WRAPVISUALFLAG_END)
I am afraid it's not that easy ...
Some highlighting code must also be modified (at least in jaPBe : adding these few lines is not enough).
Posted: Wed Jan 02, 2008 3:44 pm
by Kwai chang caine
Posted: Wed Jan 02, 2008 3:52 pm
by gnozal
Very nice, but in case of error the compiler would report a 'wrong' error line I guess.
Posted: Wed Jan 02, 2008 3:58 pm
by Kwai chang caine
I don't know.
You know me, i'm a baby programmer
But this code works at the moment.
Posted: Wed Jan 02, 2008 4:52 pm
by DoubleDutch
Some highlighting code must also be modified
I did a couple of tests on my stuff and it appears to be completely transparent to the application. Its all done at draw time (it reports as being the same line # and everything).
On the line number column display, it skips lines that are continued.
Posted: Wed Jan 02, 2008 5:11 pm
by netmaestro
in case of error the compiler would report a 'wrong' error line I guess
Very true, and I'm currently experimenting with making another add-on tool that responds to a keypress that will convert the reported line to the correct one.
Posted: Thu Jan 03, 2008 12:16 pm
by DoubleDutch
I made a slight patch for the PureBasic editor here:
http://www.purebasic.fr/english/viewtop ... 962#225962
It seems to work ok, but be careful - you never know!
Very Long Source Statement.
Posted: Sun Oct 05, 2008 11:05 pm
by rtamely
I am new in PB, and I found an issue that I could not break down a long source statement very unconfortable. But not a big issue. I suggest that in source editor screen, those long statement can be seen continuous breaking down like in the rtf editor. but internally it continue as a single long statement.
Thanks