SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
Snippet crash
Goto page Previous  1, 2
 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
Snippet crash
Author Message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
What do you mean by "crashed?" Do you get some kind of an error?


Quote:
if I remove those line breaks, it should not insert them into the final result, right? But will that not cause macro misinterpretation?

Correct, it should insert them. The macro is enclosed in $..$ symbols, which mark begging and ending of the macro code within the snippet. Everything else in the snippet code is interpreted literally.
Mon Sep 27, 2010 9:43 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2109

Post Reply with quote
Yes, I did, but that was expected. After removing line breaks the $s of consecutive PROMPT macros got next to each other (see example below)
Code:

$PROMPT(a,a)$$PROMPT(b,b)$$PROMPT(g,g)$$PROMPT(f,f)$$PROMPT(k,k)$


forming $$...$$ macros unintentionally. Inserting spaces between them solves that but it looks a bit... 'untidy'. And still does not explain why were there two line breaks instead of one. I tried using PROMPT right where I use its contents but using $a$ immediately after the PROMPT gives another $$...$$ macro and introducing a space between them is unwanted sometimes.

Is there a way (escape sequence perhaps?) to ignore those line breaks after closing $s or having them on the same line is the only solution? I know it's only convenience and code readability but it would be a nice feature.
Mon Sep 27, 2010 9:55 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
In regard to escape symbols... I asked a similar question earlier today about the code readability and line breaks and didn't get a response yet.
Mon Sep 27, 2010 10:02 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2109

Post Reply with quote
So I'm not the only one wishing this? Well sure, there could be other uses of it as well. That's reassuring.
Mon Sep 27, 2010 10:09 am View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2109

Post Reply with quote
For now I bypassed the problem by moving PROMPT macros at the end of my snippetsu. The readability is reduced but it's still better than having them all on the same line and the extra lines are less disturbing there.

EDIT: I withdraw that. It seems that having the PROMPT macro after the first line where its variable is used results in broken code inserted. Should it not evaluate it first and insert it after?
Mon Sep 27, 2010 4:23 pm View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
The response from development is that, at the moment the snippet execution function doesn't support any magical tricks for inserting line breaks into the snippet code and not carrying them into the editor during code execution. I did ask if it would be possible to implement some sort of an enhancement or an option for entering line breaks in the snippet code for improved readability only and still waiting for a review and reply.
Mon Sep 27, 2010 11:19 pm View user's profile Send private message
gemisigo



Joined: 11 Mar 2010
Posts: 2109

Post Reply with quote
That would be nice, thanky you very much.
Tue Sep 28, 2010 3:45 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.