suggestion: Code Assist for undefined temp vars

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

suggestion: Code Assist for undefined temp vars

jtuchel
Seth and team,

this is an idea that you might already hove in your pipeline - or maybe the feature is already there and I just missed it.

Whenever I write new code, I am quite chaotic (please don't try to extrapolate from this, let's just say this much is true in any case ;-) ). So I tend to write a few statements and use a temp var. Of course this is not defined yet, so I navigate up to the method temps or the temps of this or an outer context.

Wouldn't it be nice if code assist suggested the names of undefined temp vars in the currently edited method or context? The info must be present, because code assist can add squiggles to the names in the editor...

I also seem to remember we once discussed (here on this group?) that saving a method with undefined temps could/should suggest adding them instead of just complaining.

just an idea / or maybe a question if such a thing is already available in VAST

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: suggestion: Code Assist for undefined temp vars

Seth Berman
Hi Joachim,

I would review the "Declare Temporary Variable" section from:
https://www.instantiations.com/docs/91/wwhelp/wwhimpl/js/html/wwhelp.htm#href=vaast/vaast-3.html

There are many ways to do this (see How To Active), but my preferred method is to
1. Write a temp variable name
2. Request code assist (Ctrl+Space)
3. Choose the first one (Declare undefined temp I think its called)
4. Usually the inner-most scope is the correct one, but you can choose with the arrow keys or mouse hover
5. I usually just continue typing which will commit the change.

One could do an add all undefined temps automatically on method save...and I'll look into something like this

-- Seth

On Tuesday, October 16, 2018 at 8:01:49 AM UTC-4, Joachim Tuchel wrote:
Seth and team,

this is an idea that you might already hove in your pipeline - or maybe the feature is already there and I just missed it.

Whenever I write new code, I am quite chaotic (please don't try to extrapolate from this, let's just say this much is true in any case ;-) ). So I tend to write a few statements and use a temp var. Of course this is not defined yet, so I navigate up to the method temps or the temps of this or an outer context.

Wouldn't it be nice if code assist suggested the names of undefined temp vars in the currently edited method or context? The info must be present, because code assist can add squiggles to the names in the editor...

I also seem to remember we once discussed (here on this group?) that saving a method with undefined temps could/should suggest adding them instead of just complaining.

just an idea / or maybe a question if such a thing is already available in VAST

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: suggestion: Code Assist for undefined temp vars

Richard Sargent
Administrator
On Tuesday, October 16, 2018 at 8:37:12 AM UTC-7, Seth Berman wrote:
Hi Joachim,

I would review the "Declare Temporary Variable" section from:
<a href="https://www.instantiations.com/docs/91/wwhelp/wwhimpl/js/html/wwhelp.htm#href=vaast/vaast-3.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.instantiations.com%2Fdocs%2F91%2Fwwhelp%2Fwwhimpl%2Fjs%2Fhtml%2Fwwhelp.htm%23href%3Dvaast%2Fvaast-3.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFaXxzZF_kQSOQhjdh-sZpvPf-kdQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.instantiations.com%2Fdocs%2F91%2Fwwhelp%2Fwwhimpl%2Fjs%2Fhtml%2Fwwhelp.htm%23href%3Dvaast%2Fvaast-3.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFaXxzZF_kQSOQhjdh-sZpvPf-kdQ&#39;;return true;">https://www.instantiations.com/docs/91/wwhelp/wwhimpl/js/html/wwhelp.htm#href=vaast/vaast-3.html

There are many ways to do this (see How To Active), but my preferred method is to
1. Write a temp variable name
2. Request code assist (Ctrl+Space)
3. Choose the first one (Declare undefined temp I think its called)
4. Usually the inner-most scope is the correct one, but you can choose with the arrow keys or mouse hover
5. I usually just continue typing which will commit the change.

One could do an add all undefined temps automatically on method save...and I'll look into something like this

Please don't do this automatically. I would hate to have a mis-typed instance variable reference automatically and silently become a temporary variable reference.



-- Seth

On Tuesday, October 16, 2018 at 8:01:49 AM UTC-4, Joachim Tuchel wrote:
Seth and team,

this is an idea that you might already hove in your pipeline - or maybe the feature is already there and I just missed it.

Whenever I write new code, I am quite chaotic (please don't try to extrapolate from this, let's just say this much is true in any case ;-) ). So I tend to write a few statements and use a temp var. Of course this is not defined yet, so I navigate up to the method temps or the temps of this or an outer context.

Wouldn't it be nice if code assist suggested the names of undefined temp vars in the currently edited method or context? The info must be present, because code assist can add squiggles to the names in the editor...

I also seem to remember we once discussed (here on this group?) that saving a method with undefined temps could/should suggest adding them instead of just complaining.

just an idea / or maybe a question if such a thing is already available in VAST

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: suggestion: Code Assist for undefined temp vars

Seth Berman
Hi Richard,

I personally would agree...though I would need to try it for awhile.  Like most things in this area...there is no right answer and it’s subjective.  That’s why code assist has the number of options that it actually has.
So my inclination here, if we were to do anything, would be to keep the current behavior the default and add an option for folks who would like that behavior.

- Seth

On Tue, Oct 16, 2018 at 3:41 PM Richard Sargent <[hidden email]> wrote:
On Tuesday, October 16, 2018 at 8:37:12 AM UTC-7, Seth Berman wrote:
Hi Joachim,


There are many ways to do this (see How To Active), but my preferred method is to
1. Write a temp variable name
2. Request code assist (Ctrl+Space)
3. Choose the first one (Declare undefined temp I think its called)
4. Usually the inner-most scope is the correct one, but you can choose with the arrow keys or mouse hover
5. I usually just continue typing which will commit the change.

One could do an add all undefined temps automatically on method save...and I'll look into something like this

Please don't do this automatically. I would hate to have a mis-typed instance variable reference automatically and silently become a temporary variable reference.



-- Seth

On Tuesday, October 16, 2018 at 8:01:49 AM UTC-4, Joachim Tuchel wrote:
Seth and team,

this is an idea that you might already hove in your pipeline - or maybe the feature is already there and I just missed it.

Whenever I write new code, I am quite chaotic (please don't try to extrapolate from this, let's just say this much is true in any case ;-) ). So I tend to write a few statements and use a temp var. Of course this is not defined yet, so I navigate up to the method temps or the temps of this or an outer context.

Wouldn't it be nice if code assist suggested the names of undefined temp vars in the currently edited method or context? The info must be present, because code assist can add squiggles to the names in the editor...

I also seem to remember we once discussed (here on this group?) that saving a method with undefined temps could/should suggest adding them instead of just complaining.

just an idea / or maybe a question if such a thing is already available in VAST

Joachim

--
You received this message because you are subscribed to a topic in the Google Groups "VA Smalltalk" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/va-smalltalk/viTjKXqisZs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
--
-----------------------------------------------------
Seth Berman
President & CEO, Instantiations Inc.
[hidden email]


--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: suggestion: Code Assist for undefined temp vars

Louis LaBrunda
+1

Lou

On Tuesday, October 16, 2018 at 4:11:44 PM UTC-4, Seth Berman wrote:
Hi Richard,

I personally would agree...though I would need to try it for awhile.  Like most things in this area...there is no right answer and it’s subjective.  That’s why code assist has the number of options that it actually has.
So my inclination here, if we were to do anything, would be to keep the current behavior the default and add an option for folks who would like that behavior.

- Seth

On Tue, Oct 16, 2018 at 3:41 PM Richard Sargent <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="3rq_UeRvCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">richard...@gemtalksystems.com> wrote:
On Tuesday, October 16, 2018 at 8:37:12 AM UTC-7, Seth Berman wrote:
Hi Joachim,

I would review the "Declare Temporary Variable" section from:
<a href="https://www.instantiations.com/docs/91/wwhelp/wwhimpl/js/html/wwhelp.htm#href=vaast/vaast-3.html" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.instantiations.com%2Fdocs%2F91%2Fwwhelp%2Fwwhimpl%2Fjs%2Fhtml%2Fwwhelp.htm%23href%3Dvaast%2Fvaast-3.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFaXxzZF_kQSOQhjdh-sZpvPf-kdQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.instantiations.com%2Fdocs%2F91%2Fwwhelp%2Fwwhimpl%2Fjs%2Fhtml%2Fwwhelp.htm%23href%3Dvaast%2Fvaast-3.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFaXxzZF_kQSOQhjdh-sZpvPf-kdQ&#39;;return true;">https://www.instantiations.com/docs/91/wwhelp/wwhimpl/js/html/wwhelp.htm#href=vaast/vaast-3.html

There are many ways to do this (see How To Active), but my preferred method is to
1. Write a temp variable name
2. Request code assist (Ctrl+Space)
3. Choose the first one (Declare undefined temp I think its called)
4. Usually the inner-most scope is the correct one, but you can choose with the arrow keys or mouse hover
5. I usually just continue typing which will commit the change.

One could do an add all undefined temps automatically on method save...and I'll look into something like this

Please don't do this automatically. I would hate to have a mis-typed instance variable reference automatically and silently become a temporary variable reference.



-- Seth

On Tuesday, October 16, 2018 at 8:01:49 AM UTC-4, Joachim Tuchel wrote:
Seth and team,

this is an idea that you might already hove in your pipeline - or maybe the feature is already there and I just missed it.

Whenever I write new code, I am quite chaotic (please don't try to extrapolate from this, let's just say this much is true in any case ;-) ). So I tend to write a few statements and use a temp var. Of course this is not defined yet, so I navigate up to the method temps or the temps of this or an outer context.

Wouldn't it be nice if code assist suggested the names of undefined temp vars in the currently edited method or context? The info must be present, because code assist can add squiggles to the names in the editor...

I also seem to remember we once discussed (here on this group?) that saving a method with undefined temps could/should suggest adding them instead of just complaining.

just an idea / or maybe a question if such a thing is already available in VAST

Joachim

--
You received this message because you are subscribed to a topic in the Google Groups "VA Smalltalk" group.
To unsubscribe from this topic, visit <a href="https://groups.google.com/d/topic/va-smalltalk/viTjKXqisZs/unsubscribe" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/topic/va-smalltalk/viTjKXqisZs/unsubscribe&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/topic/va-smalltalk/viTjKXqisZs/unsubscribe&#39;;return true;">https://groups.google.com/d/topic/va-smalltalk/viTjKXqisZs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="3rq_UeRvCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">va-smalltalk...@googlegroups.com.
To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="3rq_UeRvCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">va-sma...@....
Visit this group at <a href="https://groups.google.com/group/va-smalltalk" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/group/va-smalltalk&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/group/va-smalltalk&#39;;return true;">https://groups.google.com/group/va-smalltalk.
For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/optout&#39;;return true;">https://groups.google.com/d/optout.
--
-----------------------------------------------------
Seth Berman
President & CEO, Instantiations Inc.
<a href="javascript:" style="color:rgb(0,0,204)" target="_blank" gdf-obfuscated-mailto="3rq_UeRvCAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">sbe...@...


--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: suggestion: Code Assist for undefined temp vars

jtuchel
In reply to this post by Richard Sargent
Richard, Seth,

I agree that automatically adding mistyped temps is not a good idea. A prompter on method save that offers a list of undefined temps and teh options to
* correct the spelling
* add a temp

would sure be better.

It's not exactly what I was talking about initialiy, but it is probably even better than just adding code completion support for those who remember they need to add temps... And, I think it is very similar to what VisualWorks has had for a while.


Joachim


Am Dienstag, 16. Oktober 2018 21:41:15 UTC+2 schrieb Richard Sargent:
On Tuesday, October 16, 2018 at 8:37:12 AM UTC-7, Seth Berman wrote:
Hi Joachim,

I would review the "Declare Temporary Variable" section from:
<a href="https://www.instantiations.com/docs/91/wwhelp/wwhimpl/js/html/wwhelp.htm#href=vaast/vaast-3.html" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.instantiations.com%2Fdocs%2F91%2Fwwhelp%2Fwwhimpl%2Fjs%2Fhtml%2Fwwhelp.htm%23href%3Dvaast%2Fvaast-3.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFaXxzZF_kQSOQhjdh-sZpvPf-kdQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.instantiations.com%2Fdocs%2F91%2Fwwhelp%2Fwwhimpl%2Fjs%2Fhtml%2Fwwhelp.htm%23href%3Dvaast%2Fvaast-3.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFaXxzZF_kQSOQhjdh-sZpvPf-kdQ&#39;;return true;">https://www.instantiations.com/docs/91/wwhelp/wwhimpl/js/html/wwhelp.htm#href=vaast/vaast-3.html

There are many ways to do this (see How To Active), but my preferred method is to
1. Write a temp variable name
2. Request code assist (Ctrl+Space)
3. Choose the first one (Declare undefined temp I think its called)
4. Usually the inner-most scope is the correct one, but you can choose with the arrow keys or mouse hover
5. I usually just continue typing which will commit the change.

One could do an add all undefined temps automatically on method save...and I'll look into something like this

Please don't do this automatically. I would hate to have a mis-typed instance variable reference automatically and silently become a temporary variable reference.



-- Seth

On Tuesday, October 16, 2018 at 8:01:49 AM UTC-4, Joachim Tuchel wrote:
Seth and team,

this is an idea that you might already hove in your pipeline - or maybe the feature is already there and I just missed it.

Whenever I write new code, I am quite chaotic (please don't try to extrapolate from this, let's just say this much is true in any case ;-) ). So I tend to write a few statements and use a temp var. Of course this is not defined yet, so I navigate up to the method temps or the temps of this or an outer context.

Wouldn't it be nice if code assist suggested the names of undefined temp vars in the currently edited method or context? The info must be present, because code assist can add squiggles to the names in the editor...

I also seem to remember we once discussed (here on this group?) that saving a method with undefined temps could/should suggest adding them instead of just complaining.

just an idea / or maybe a question if such a thing is already available in VAST

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: suggestion: Code Assist for undefined temp vars

jtuchel
In reply to this post by Seth Berman
Seth,

so it's been there for a while without me recognizing it. Why am I not surprised to learn about this? ;-)

I will take a closer look at this. The linked document is really interesting, it's incredible how much functionality you've put into Code Assist that is in danger of staying unrecognized "for ages"....

Thanks for pointing me to this. Adding temps is now a fun task...

Joachim




Am Dienstag, 16. Oktober 2018 17:37:12 UTC+2 schrieb Seth Berman:
Hi Joachim,

I would review the "Declare Temporary Variable" section from:
<a href="https://www.instantiations.com/docs/91/wwhelp/wwhimpl/js/html/wwhelp.htm#href=vaast/vaast-3.html" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.instantiations.com%2Fdocs%2F91%2Fwwhelp%2Fwwhimpl%2Fjs%2Fhtml%2Fwwhelp.htm%23href%3Dvaast%2Fvaast-3.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFaXxzZF_kQSOQhjdh-sZpvPf-kdQ&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwww.instantiations.com%2Fdocs%2F91%2Fwwhelp%2Fwwhimpl%2Fjs%2Fhtml%2Fwwhelp.htm%23href%3Dvaast%2Fvaast-3.html\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNFaXxzZF_kQSOQhjdh-sZpvPf-kdQ&#39;;return true;">https://www.instantiations.com/docs/91/wwhelp/wwhimpl/js/html/wwhelp.htm#href=vaast/vaast-3.html

There are many ways to do this (see How To Active), but my preferred method is to
1. Write a temp variable name
2. Request code assist (Ctrl+Space)
3. Choose the first one (Declare undefined temp I think its called)
4. Usually the inner-most scope is the correct one, but you can choose with the arrow keys or mouse hover
5. I usually just continue typing which will commit the change.

One could do an add all undefined temps automatically on method save...and I'll look into something like this

-- Seth

On Tuesday, October 16, 2018 at 8:01:49 AM UTC-4, Joachim Tuchel wrote:
Seth and team,

this is an idea that you might already hove in your pipeline - or maybe the feature is already there and I just missed it.

Whenever I write new code, I am quite chaotic (please don't try to extrapolate from this, let's just say this much is true in any case ;-) ). So I tend to write a few statements and use a temp var. Of course this is not defined yet, so I navigate up to the method temps or the temps of this or an outer context.

Wouldn't it be nice if code assist suggested the names of undefined temp vars in the currently edited method or context? The info must be present, because code assist can add squiggles to the names in the editor...

I also seem to remember we once discussed (here on this group?) that saving a method with undefined temps could/should suggest adding them instead of just complaining.

just an idea / or maybe a question if such a thing is already available in VAST

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at https://groups.google.com/group/va-smalltalk.
For more options, visit https://groups.google.com/d/optout.