• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

Works in the Twillio Tutorial video but not for me

 
Ranch Hand
Posts: 126
1
MyEclipse IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
name cannot be resolved to a variable

pathname cannot be resolved to a variable

userId cannot be resolved to a variable

Followed along, copied the code exactly. He never declares these variables.

 
Saloon Keeper
Posts: 9720
80
Eclipse IDE Firefox Browser MySQL Database VI Editor Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
name:"/credentials.json"
is not valid Java syntax. Where did you get it from?
 
Carey Brown
Saloon Keeper
Posts: 9720
80
Eclipse IDE Firefox Browser MySQL Database VI Editor Java Windows
 
Ray Gilbert
Ranch Hand
Posts: 126
1
MyEclipse IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Carey Brown wrote:name:"/credentials.json"
is not valid Java syntax. Where did you get it from?



Java GoogleSheets Tutorial
 
Sheriff
Posts: 4006
549
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ray Gilbert wrote:Works in the Twillio Tutorial video but not for me


Please provide a link to the video.

It seems like the tutorial you are following was based on this: Home>Products>G Suite Developer>Sheets>API v4>Guides
 
Ray Gilbert
Ranch Hand
Posts: 126
1
MyEclipse IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Carey Brown wrote:Is this an Android app?



 
Ray Gilbert
Ranch Hand
Posts: 126
1
MyEclipse IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Java Google Sheets Tutorial
 
Ron McLeod
Sheriff
Posts: 4006
549
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What you are seeing is a feature of IntelliJ which provides parameter name hints.  If you watch the video closely, you may see that the presenter never types name: - it appears automatically after getResourceName has been entered.

Remove the hints for name, pathname, and userId that you have typed.
 
Ray Gilbert
Ranch Hand
Posts: 126
1
MyEclipse IDE MySQL Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ron McLeod wrote:What you are seeing is a feature of IntelliJ which provides parameter name hints.  If you watch the video closely, you may see that the presenter never types name: - it appear automatically after getResourceName has been entered.



I'm using Eclipse. How do I get to the parameter. Constants work in Eclipse, I don't know why these don't.
 
Ron McLeod
Sheriff
Posts: 4006
549
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ray Gilbert wrote:I'm using Eclipse. How do I get to the parameter.


The name: hint was provided by the IntelliJ IDE, it is not actually Java code.  

To get your code working, remove the hints which you saw in the video.  For example:

Change this:
To this:
 
Ron McLeod
Sheriff
Posts: 4006
549
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here's a page where the IntelliJ feature is described: IntelliJ IDEA Inlay hints
 
Ray Gilbert
Ranch Hand
Posts: 126
1
MyEclipse IDE MySQL Database Java
  • Likes 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Ron McLeod wrote:

Ray Gilbert wrote:I'm using Eclipse. How do I get to the parameter.


The name: hint was provided by the IntelliJ IDE, it is not actually Java code.  

To get your code working, remove the hints which you saw in the video.  For example:

Change this:
To this:



OMG! I am having the worst DERP moment. I feel really stupid at the moment. Thank you guys for the help. I'll see if I can get the rest of it going.
 
Ron McLeod
Sheriff
Posts: 4006
549
Android Eclipse IDE TypeScript Redhat MicroProfile Quarkus Java Linux
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If it helps - I got confused by this as well when going through an online Javascript course on Udemy a while back.  If you're not an IntelliJ user (which I'm not), its not so obvious that what is displayed on the screen was not typed-in by the presenter in the video.
 
In the renaissance, how big were the dinosaurs? Did you have tiny ads?
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic