Jump to content
Ian Branch

Strange issues using multiline strings (was "Is it just me?? ")

Recommended Posts

Hi Team,

Seemingly since I installed the D12 Patch:

If I press enter here:

image.thumb.png.cbd325fa89cc689e9146c0508c2a06d6.png

on seemingly any method, or even within the code, more often than not I get this:

image.thumb.png.cd7d38945a2039535d64a4f1554520ff.png

Nothing else has changed.  It is repeatable.

Is it me or is there a bug un the Patch/update?

It didn't happen before the Patch/Update.

 

Regards & TIA,

Ian

Edited by Sherlock
Made the title a bit mor clearer

Share this post


Link to post
7 hours ago, Ian Branch said:

Nothing else has changed.  It is repeatable.

Is it me or is there a bug un the Patch/update?

It didn't happen before the Patch/Update.

 

Unfortunately the parser that the IDE uses is not up to date. I also have some cases where the editor messes up my code I have to pay attention what I am doing. In one class I can add a property only if I paste it from the clipboard entering using the keyboard is not possible.

Embarcadero might replace the IDE in near future (5-10 years from now).

Share this post


Link to post

I can't reproduce it on a new project.

 

Do you have a sample project to share it or can you do a little video to capture your screen ?

 

Do you have auto completion enabled or only on TAB ?

Share this post


Link to post

Hi Team,

For what ever reason, it doesn't happen anymore.

I didn't take notes, but I'm wondering if it was somehow related to the other issue I posted about which has been resolved.  Seemingly corruption of some sort that I couldn't identify.

Unfortunately, I can't recall if I experienced this issue in those Projects specifically, or in others.  😞

Certainly the issue reproduceable and annoying.

Everything is working as expected now.

Thank you all for your contributions.

I will keep my fingers crossed...

 

Regards,

Ian

  • Like 1

Share this post


Link to post

Far as I can tell something causes it to screw up line counting so the line # in the editor and line # the parser sees the code at differ causing it to act very strangely. 

 

No luck trying to create a file that reliably reproduces the issue yet.  

Share this post


Link to post

Hi Brian,

You may have hit on something there.

I think I first noticed it when I was setting up text within the ''' - ''' multi-line structure.

The 4 files I found the issue in had been so edited.

I restored previous versions of each and all was fine.

Today I was just editing one of those files in the IDE and was in the process of restructuring a block of text per the ''' multi-line structure, when it happened.  😞

I had pressed enter at the end of the text line and got a 'finally-end' back.  😞

I did a test again to see if double clicking on the OnShow Event would work, and no, it now failed per my original experience.

I tried to back out the ''' construct, but the issue persisted.  😞

I restored a 1 hour old backup and it was fine.

Note to Self:  Don't bother with ''' constructs for the foreseeable future.

This isn't a Patch 1 specific issue, 3 of the 4 files restored went 'faulty' around mid-Jan & the fourth around mid-Dec.

Unfortunately, I can't replicate this in a test App.  😞

 

Ian

Edited by Ian Branch

Share this post


Link to post

So, the thicken plots....

I have narrowed it down to using the ''' construct with the ExpandedText property of a TTaskDialog.

I create the TTaskDialog in code.

Everything is happy with this:

      ExpandedText := '1.	Wait - The App will try to reconnect until it connects or it has another connection timeout.' + sLineBreak
        + '2.	Cancel - This is a last resort selection and will result in an Application crash and generate a formal error report.' + sLineBreak
        + 'At this error prompt you have the normal error report options.' + sLineBreak +
        'If you don?t know or understand the error report dialog or the options available you should ask to your Workflow System Administrator.'
        + sLineBreak + 'It is strongly recommended that you select these options in the following priority/order => Wait then Cancel.';

As soon as I put all the text into the ''' construct and double click on the OnShow property of the form, It gives me the error that it can't find OnShow.

Interestingly, I didn't get the 'finally-end' inserted as I edited the text.

Edited by Ian Branch

Share this post


Link to post

Hi Ian,

May I respectfully suggest that posts with titles such as "Is it just me?" and "-ummmm what" don't help other users of this forum when they may be searching for solutions to the same or similar problems to your posts.

Surely the title is intended to be a brief summary of what the post is about. You may get someone reading it who knows the answer if you choose your title correctly. 

  • Like 1
  • Thanks 2

Share this post


Link to post
24 minutes ago, Roger Cigol said:

the title is intended to be a brief summary of what the post is about

You beat me to it, Roger!
 

I agree. @Ian Branch Please make topic titles reasonably descriptive of the contents
F.x. 
Is it just me?? -> D12 Formatting issues

Ummmm. What!! -> D12 Form event disappared!

  • Like 2

Share this post


Link to post

Roger, Lars,  Fair comment.  I apologise.  I would edit it if I could.

Share this post


Link to post

Fixed the title. Should the fix be wrong, or if it can be improved. Just holler.

  • Like 1

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×