[ANN] Release 9.0.0 DP-8

classic Classic list List threaded Threaded
22 messages Options
12
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[ANN] Release 9.0.0 DP-8

Mark Wieder via use-livecode
Dear list members,

We are pleased to announce the release of LiveCode 9.0.0 DP-8.


Developer Preview Release
=========================
Warning: this is not a stable release.  Please ensure that you back up your
stacks before testing them.

Getting the Release
===================
You can get the release at https://downloads.livecode.com/livecode/ or via
the automatic updater.

Release Contents
================
LiveCode 9.0.0 DP-8 comes with 25 bugfixes. Moreover, more than 40 bugfixes
that were fixed in LiveCode 8.1.x, are now merged into LiveCode 9.0.0 DP-8.

In addition, LiveCode 9.0.0 DP-8 includes a lot of amazing new features:

- Widgets now work correctly in HTML5 standalones (apart from Browser
Widget)
- Script Editor: Support for auto completion of square bracket `[`,
parenthesis `(` or double quote `"` is now added
- A new "Edit Behavior Script" option is now added to the contextual menu
- Support for accepting socket connections on a port in the ephemeral port
range is now added
- Foreign handlers can now use 'objc' as the language, and in that case can
bind to both instance and class methods of Objective-C objects (Mac-only)

And of course, the ability to choose from a list of default handlers to add
to the object script in the script editor, originally implemented in
LiveCode 8.1.6 RC-1 has been included in LiveCode 9.0 DP-8, too.


New script libraries:

- A new QR Code Generation script library has been added. The public domain
licensed QR Code Generator Library (sQuiRt) by John Craig has been added to
the community repository for ease of maintenance and use.
- A new HTTPd script library has been added. The HTTP Server library can be
used to receive and respond to HTTP requests in your application.

New experimental features:

- [Experimental] A new "Mac Native Button" widget is added to LiveCode's
widget collection. This was the result of the implementation of Objective-C
FFI (Foreign Function Interface) in LCB.
- [Experimental] A new "Android Native Field" widget is added to LiveCode's
widget collection. [[ See known issues ]]

As stated before, Objective-C FFI is Mac-only in this DP release. It might
work on iOS too, as long as you do not do anything that requires thread
jumping.

In this context, "experimental" means that these features will continue to
be developed and supported. However, how they are used in script may change
during the development cycle of 9, before it gets to final release.


Known issues
================
- The Browser widget can cause hang in the IDE in some Linux distros - see
http://quality.livecode.com/show_bug.cgi?id=19658
- The Android Native Button widget uses "labelColor", not
"foregound"/"textColor" to set the text color
- The Android Native Button widget "enabled" (and "disabled") property does
not work if you set it by script.
- The HTTPd script library does not load on startup, so you have to issue
the following command from the message box to load it manually:  start
using stack "httpd"
- Unfortunately we tried to get the android native field widget into DP 8
at the last minute, but discovered that it crashes when it becomes focused.
We will of course try to fix this issue as soon as possible.


The full release notes are available from:

http://downloads.livecode.com/livecode/9_0_0/LiveCodeNotes-9_0_0_dp_8.pdf

Feedback
========
Please report any bugs encountered on our BugZilla at
http://quality.livecode.com/

We have a forum available for discussing LiveCode Builder at
http://forums.livecode.com/viewforum.php?f=93

Have fun!

The LiveCode Team
--
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

LiveCode 8, LiveCode 9, their intersection and other questions.

Mark Wieder via use-livecode
As a developer (of sorts) who does most of his work on a fairly
antiquated Macintosh system (10.7.8 Lion)
and on various Ubuntu-based systems (14.04 & 16.04) I am interested to
know how much longer development
on the 8.x.x series is intended to last (as 9.0.0 dp 5 went Mavericks
and above)..

I am also interested to know if new features initially tried in the
8.x.x series are being "pushed forward"
whether any features in 9 are going to be backported into the 8.x.x. series.

AND, if one develops using versions of LiveCode that will only work when
deployed on a Macintosh on Mavericks
or higher whether standalones spun off from those versions will run on
earlier versions of Mac OS?

Richmond.

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: LiveCode 8, LiveCode 9, their intersection and other questions.

Mark Wieder via use-livecode
Richmond Mathewson wrote:

 > I am also interested to know if new features initially tried in the
 > 8.x.x series are being "pushed forward" whether any features in 9 are
 > going to be backported into the 8.x.x. series.

I don't understand "pushed forward", but each new version should be a
superset of the last, so everything in v8 will be in v9 and more.

As for backporting, LC folks explained here that with v8 forward they're
back to the sort of conventional development patterns we see with most
software:

Once any given version goes Stable, new features go into a new version,
Some critical bug fixes will go into both, but to minimize risk of
regressions feature additions are kept to a minimum in Stable versions.

When a new version becomes Stable, work ends on the older version, and a
newer version is begun for adding new features.

Work on 7 and earlier ended when v8 was released as Stable.  When 9
becomes Stable work on v8 will end, and v10 will be created for new
features, and so on.

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] Release 9.0.0 DP-8

Mark Wieder via use-livecode
In reply to this post by Mark Wieder via use-livecode
panagiotis wrote:

 > We are pleased to announce the release of LiveCode 9.0.0 DP-8.
...
 > - A new HTTPd script library has been added. The HTTP Server
 > library can be used to receive and respond to HTTP requests
 > in your application.

A very valuable addition.  I'm curious about what prompted that
development effort, and does it support HTTPS connections, or CGI?

 > New experimental features:
 >
 > - [Experimental] A new "Mac Native Button" widget is added to
 > LiveCode's widget collection.

The Dictionary for this new version doesn't load on Linux this time
(hangs the process actually, one of the known issues), so forgive this
question probably answered there:

Does the syntax for that button style use "button" or "widget"?

What does this do differently from the "Standard" button style?

Does it have the same properties and message handling options we're used
to with buttons?

--
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  [hidden email]                http://www.FourthWorld.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] Release 9.0.0 DP-8

Mark Wieder via use-livecode

> On 14 Jul 2017, at 7:53 am, Richard Gaskin via use-livecode <[hidden email]> wrote:
>
> panagiotis wrote:
>
> > We are pleased to announce the release of LiveCode 9.0.0 DP-8.
> ...
> > - A new HTTPd script library has been added. The HTTP Server
> > library can be used to receive and respond to HTTP requests
> > in your application.
>
> A very valuable addition.  I'm curious about what prompted that development effort, and does it support HTTPS connections, or CGI?

One of my recent projects has been to create a test runner for HTML5. So all our tests that we run on the CI server are bundled up into a HTML5 app and run. In order to get the results back into LiveCode I made the simple HTTP server to handle callbacks that the HTML5 engine sends when it is served from localhost. I separated it into a script library so I could reuse it down the track in FileMaker for web views. I expect others will like to use it for serving browser widget content etc too. It is a rather simplified server script but it’s open source so if you need more than it offers feel free to send a PR. It doesn’t have a normal CGI interface. As the request comes in a callback is delivered to the object that started the server so your response can be dynamically generated.
>
> > New experimental features:
> >
> > - [Experimental] A new "Mac Native Button" widget is added to
> > LiveCode's widget collection.
>
> The Dictionary for this new version doesn't load on Linux this time (hangs the process actually, one of the known issues), so forgive this question probably answered there:
>
> Does the syntax for that button style use "button" or "widget”?

widget
>
> What does this do differently from the "Standard" button style?

It’s the actual native view rather than us getting details of how to draw a button from the OS and drawing it ourselves. It’s mainly an example but it would be useful for layering a button over another native view.
>
> Does it have the same properties and message handling options we're used to with buttons?

Not yet. I believe it only has mouseUp.

Cheers

Monte
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: LiveCode 8, LiveCode 9, their intersection and other questions.

Mark Wieder via use-livecode
In reply to this post by Mark Wieder via use-livecode
Yep, what Richard said. The only caveat at present is we are implementing new IDE features in 8.1 point releases so that we can have iterative incremental improvement in stable versions for our user testing.

Cheers

Monte
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] Release 9.0.0 DP-8

Mark Wieder via use-livecode
In reply to this post by Mark Wieder via use-livecode
> Panos M. wrote:
> Script Editor: Support for auto completion of square bracket `[`,
> parenthesis `(` or double quote `"` is now added.

After writing a long script I really like this feature and miss it
already in LC 8.1.6.

I wonder what's the reason to leave out braces "{}" (may be needed for
connecting to LCB) and single quotes (good for writing an already quoted
javascript string)?

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] Release 9.0.0 DP-8

Mark Wieder via use-livecode
Not universally popular:

http://forums.livecode.com/viewtopic.php?f=8&t=29505

Mayhap it could be made an option adjustable in the Script Editor
section of the Preferences?

Richmond.


On 7/17/17 10:59 am, hh via use-livecode wrote:

>> Panos M. wrote:
>> Script Editor: Support for auto completion of square bracket `[`,
>> parenthesis `(` or double quote `"` is now added.
> After writing a long script I really like this feature and miss it
> already in LC 8.1.6.
>
> I wonder what's the reason to leave out braces "{}" (may be needed for
> connecting to LCB) and single quotes (good for writing an already quoted
> javascript string)?
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] Release 9.0.0 DP-8

Mark Wieder via use-livecode
In reply to this post by Mark Wieder via use-livecode
@Hermann

I am not sure if "{}" were left out on purpose or not, I'll ask Monte.
However, if you want to add them, you have to:

0. Open the script of an object (needed for loading the SE behaviors
1. Type in the msg box:

edit the script of stack "com.livecode.scripteditor.behavior.editorcommon"
at 2968

2. Add the lines

case "{"
   put "}" into tCompletionChar

3. Click Apply

Note: If you want the changes to be saved permanently you either have to
change the permissions of the LC .app bundle (currently they are
read-only), OR open this file (Toolset/palettes/script
editor/behaviors/revsecommoneditorbehavior.livecodescript
<https://github.com/livecode/livecode-ide/pull/1619/files#diff-d5a441f86fc91c60fd52ef2c192f6974>)
with an external Text editor as admin and save those changes.

@Richmond
>>>>>Mayhap it could be made an option adjustable in the Script Editor
section of the Preferences?

Yes, this will make everyone happy, although I personally find this feature
*really* useful.

Best, Panos
--




On Mon, Jul 17, 2017 at 8:59 AM, hh via use-livecode <
[hidden email]> wrote:

> > Panos M. wrote:
> > Script Editor: Support for auto completion of square bracket `[`,
> > parenthesis `(` or double quote `"` is now added.
>
> After writing a long script I really like this feature and miss it
> already in LC 8.1.6.
>
> I wonder what's the reason to leave out braces "{}" (may be needed for
> connecting to LCB) and single quotes (good for writing an already quoted
> javascript string)?
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] Release 9.0.0 DP-8

Mark Wieder via use-livecode
On 2017-07-17 11:05, panagiotis merakos via use-livecode wrote:
> @Hermann
>
> I am not sure if "{}" were left out on purpose or not, I'll ask Monte.
> However, if you want to add them, you have to:

On Purpose. '{' is not a valid LCS bracket - so it shouldn't be appear
outside of strings.

Similarly, single-quote isn't a valid LCS token - so it shouldn't appear
outside of strings.

Indeed, bracket completion has to ignore content of strings otherwise
you can't write stuff like:

   put ( ")" & "'" ) & ( "'" ) into tVar

Without funky things happening.

Warmest Regards,

Mark.

--
Mark Waddingham ~ [hidden email] ~ http://www.livecode.com/
LiveCode: Everyone can create apps

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] Release 9.0.0 DP-8

Mark Wieder via use-livecode
In reply to this post by Mark Wieder via use-livecode
> Mark Waddingham wrote:
> On 2017-07-17 11:05, panagiotis merakos via use-livecode wrote:
> > @Hermann
> > I am not sure if "{}" were left out on purpose or not, I'll ask Monte.
> > However, if you want to add them, you have to:
>
> On Purpose. '{' is not a valid LCS bracket - so it shouldn't be appear
> outside of strings.
> Similarly, single-quote isn't a valid LCS token - so it shouldn't appear
> outside of strings.
> Indeed, bracket completion has to ignore content of strings otherwise
> you can't write stuff like:
>    put ( ")" & "'" ) & ( "'" ) into tVar
> Without funky things happening.

Accepted that it's not there, of course.
But honestly, what I don't understand in your argumentation is:

Code completion doesn't force "{" or "'" to be outside of a string!?

Isn't this more a thing of editing only than of debugging/compiling?
The current completions occur also while I am typing inside of a string...

> single-quote isn't a valid LCS token - so it shouldn't appear outside
> of strings

The following compiles ;-)

on shouldn'tYouNotAppear?
   answer "Just for fun: No."
end shouldn'tYouNotAppear?


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] Release 9.0.0 DP-8

Mark Wieder via use-livecode
On 2017-07-17 14:33, hh via use-livecode wrote:
> Isn't this more a thing of editing only than of debugging/compiling?
> The current completions occur also while I am typing inside of a
> string..

Okay, so having just read the form thread as well...

There are two things here:

   1) Bracket highlighting

   2) Bracket completion

They should both be preferences.

Secondly, both should really only function on 'real' tokens which are
part of script (hence why '{' isn't appropriate at this time for it to
function on). If you are typing a string or a comment then it shouldn't
trigger completion nor highlighting. This is actually quite hard to get
right efficiently (indeed, a lot of editors don't get this right, so I
end up turning such features off).

> on shouldn'tYouNotAppear?
>    answer "Just for fun: No."
> end shouldn'tYouNotAppear?

Heh - well ' was a bad example - its something we'd prefer wasn't
allowed in identifiers as it means the token cannot be used for anything
else (e.g. this stack's textColor). Similarly, the fact that '.' is also
allowed in identifiers means that it could never be an operator (e.g.
tRect.x).

Warmest Regards,

Mark.

--
Mark Waddingham ~ [hidden email] ~ http://www.livecode.com/
LiveCode: Everyone can create apps

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] Release 9.0.0 DP-8

Mark Wieder via use-livecode
In reply to this post by Mark Wieder via use-livecode
On 07/17/2017 03:41 AM, Mark Waddingham via use-livecode wrote:

> Indeed, bracket completion has to ignore content of strings otherwise
> you can't write stuff like:
>
>    put ( ")" & "'" ) & ( "'" ) into tVar
>
> Without funky things happening.

...and with good reason. I can't think why I would *ever* write that.
If I had to do something that daft I'd write it as

put ")''" into tVar

but I would hope the occasion would never arise.

--
  Mark Wieder
  [hidden email]

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] Release 9.0.0 DP-8

Mark Wieder via use-livecode
On 2017-07-17 18:39, Mark Wieder via use-livecode wrote:

> On 07/17/2017 03:41 AM, Mark Waddingham via use-livecode wrote:
>
>> Indeed, bracket completion has to ignore content of strings otherwise
>> you can't write stuff like:
>>
>>    put ( ")" & "'" ) & ( "'" ) into tVar
>>
>> Without funky things happening.
>
> ...and with good reason. I can't think why I would *ever* write that.
> If I had to do something that daft I'd write it as
>
> put ")''" into tVar
>
> but I would hope the occasion would never arise.

Indeed - it is a bit of tortuous example...

However cases of double quotes, single-quotes, un-balanced brackets,
braces and parentheses all occur in various domains - most notably
anything which processes or generates source-code.

Warmest Regards,

Mark.

--
Mark Waddingham ~ [hidden email] ~ http://www.livecode.com/
LiveCode: Everyone can create apps

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] Release 9.0.0 DP-8

Mark Wieder via use-livecode
In reply to this post by Mark Wieder via use-livecode
On 07/17/2017 03:41 AM, Mark Waddingham via use-livecode wrote:

> On Purpose. '{' is not a valid LCS bracket - so it shouldn't be appear
> outside of strings.

I would find "{}" completion *inside* strings very useful in generating
json key:value pairs.

--
  Mark Wieder
  [hidden email]

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] Release 9.0.0 DP-8

Mark Wieder via use-livecode
In reply to this post by Mark Wieder via use-livecode
On 07/17/2017 05:33 AM, hh via use-livecode wrote:

> The following compiles ;-)
>
> on shouldn'tYouNotAppear?
>     answer "Just for fun: No."
> end shouldn'tYouNotAppear?

I *do* use "?" trailers in the ruby sense for functions that return
boolean values.
But double negatives? Eek!

--
  Mark Wieder
  [hidden email]

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] Release 9.0.0 DP-8

Mark Wieder via use-livecode
In reply to this post by Mark Wieder via use-livecode

> On 17 Jul 2017, at 11:36 pm, Mark Waddingham via use-livecode <[hidden email]> wrote:
>
> Okay, so having just read the form thread as well...
>
> There are two things here:
>
>  1) Bracket highlighting
>
>  2) Bracket completion
>
> They should both be preferences.
>
> Secondly, both should really only function on 'real' tokens which are part of script (hence why '{' isn't appropriate at this time for it to function on). If you are typing a string or a comment then it shouldn't trigger completion nor highlighting. This is actually quite hard to get right efficiently (indeed, a lot of editors don't get this right, so I end up turning such features off).


Actually it’s quite helpful within strings. Consider a string to be used with the merge function or just the likelihood of wanting a pair of brackets in a string rather than a single one. As for quotes as they are not valid within a string if you are typing one it’s highly likely you want two and to concatenate something between. For example:

put “foo baz”
— come along later and edit to
put “foo” && tBar && “baz”

There is already an autocomplete preference which the bracket completion and control structure completion checks but it’s currently not exposed in the IDE UI. Do we want fine grained control over which parts of autocompletion we want active? That could be confusing.

Bracket highlighting does need a color pref… I guess if this is empty it could turn it off entirely if people want that.

Cheers

Monte
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] Release 9.0.0 DP-8

Mark Wieder via use-livecode
On 2017-07-17 23:25, Monte Goulding via use-livecode wrote:

> Actually it’s quite helpful within strings. Consider a string to be
> used with the merge function or just the likelihood of wanting a pair
> of brackets in a string rather than a single one. As for quotes as
> they are not valid within a string if you are typing one it’s highly
> likely you want two and to concatenate something between. For example:
>
> put “foo baz”
> — come along later and edit to
> put “foo” && tBar && “baz”
>
> There is already an autocomplete preference which the bracket
> completion and control structure completion checks but it’s currently
> not exposed in the IDE UI. Do we want fine grained control over which
> parts of autocompletion we want active? That could be confusing.
>
> Bracket highlighting does need a color pref… I guess if this is empty
> it could turn it off entirely if people want that.

I think it is worth having a preference for both highlighting and
completion - it serves people's individual tastes, and as long as the
preference is discoverable then it won't add any complexity.

Ideally highlighting would be context aware - so outside of a string, it
highlights other brackets outside of strings; but when in a string it
highlights brackets in strings:

   put (1 "a(2" & tVar ")2" )1 after tFoo

(Numbers used to indicate matching pairs)

I was thinking in terms of syntactically - missing the point of
in-string highlighting (as HH and Mark Wieder pointed out).

Indeed, the current approach is an approximation to the ideal and adding
{ and } to highlighting wouldn't do any harm; and would serve the
use-case of JSON and similar generation.

In terms of ' then, for much the same reason that would probably be
useful - although that might require a bit more work on the highlighting
code as it isn't a matched pair (@montegoulding?).

Warmest Regards,

Mark.

--
Mark Waddingham ~ [hidden email] ~ http://www.livecode.com/
LiveCode: Everyone can create apps

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] Release 9.0.0 DP-8

Mark Wieder via use-livecode

> On 18 Jul 2017, at 5:59 pm, Mark Waddingham via use-livecode <[hidden email]> wrote:
>
> I think it is worth having a preference for both highlighting and completion - it serves people's individual tastes, and as long as the preference is discoverable then it won't add any complexity.

OK, I’ll open a report about those
>
> Ideally highlighting would be context aware - so outside of a string, it highlights other brackets outside of strings; but when in a string it highlights brackets in strings:
>
>  put (1 "a(2" & tVar ")2" )1 after tFoo
>
> (Numbers used to indicate matching pairs)

I think it doesn’t currently do what you are suggesting but in the case above it does what you want anyway ;-)
>
> I was thinking in terms of syntactically - missing the point of in-string highlighting (as HH and Mark Wieder pointed out).
>
> Indeed, the current approach is an approximation to the ideal and adding { and } to highlighting wouldn't do any harm; and would serve the use-case of JSON and similar generation.
>
> In terms of ' then, for much the same reason that would probably be useful - although that might require a bit more work on the highlighting code as it isn't a matched pair (@montegoulding?).

Should be the same as quote so not a big issue if it’s helpful.

Cheers

Monte
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [ANN] Release 9.0.0 DP-8

Mark Wieder via use-livecode
I’ve had the completion capability on my local dev environment for a couple of years via a plugin that I wrote. I wrestled with these same problems years ago. I actually find that it is benefitial to have BOTH completion and no completion. Having a setting to change this is combersome. It is an on-the-fly desire.

So here’s how I solved the problem in my IDE startup script…

Hold down the option key and you get completion. no option key, no completion.

If you’d like to try this on your own, put this into a plugin that loads this into the frontscript. Don’t use LC 9dp8 though as you won’t get the non-option key effect of the pairings...

Bob
/*

* auto complete common pairings with <option><key>

*/

on rawKeyDown pKey

local tChar


if optionkey() = "down" then

switch pKey

case 34

insertText quote&quote

exit rawKeyDown

break

case 39

insertText "''"

exit rawKeyDown

break

case 57

insertText "()"

exit rawKeyDown

break

case 91

insertText "[]"

exit rawKeyDown

break

case 123

insertText "{}"

exit rawKeyDown

break

end switch

end if


pass rawKeyDown

end rawKeyDown



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
12
Loading...