Any PF programmers in? can i get a hand?
#1
PassionFord Post Whore!!
Thread Starter
Join Date: Nov 2005
Location: Edinburgh
Posts: 4,062
Likes: 0
Received 0 Likes
on
0 Posts
Any PF programmers in? can i get a hand?
Hopefully somebody will know what I'm on about....
I'm trying to build a basic (windows) panel with two text entry fields. I'm trying to learn Groovy 1.6.0 and NetBeans is failing to compile this code and i think its to do with the open quotation mark in the two textfield statements, i cant take them out though because they are in the working examples I've been through from the developers website so they must work in the code, if they don't then I don't know what would
Here's my simple code......
import javax.swing.WindowConstants as WC
import groovy.swing.SwingBuilder
def swingB = new SwingBuilder()
def frame = swingB.frame(tittle:'Example01', location:[100,100],size:[800,800],
defaultCloseOperation:WC.EXIT_ON_CLOSE)
{
panel(border:titledBorder(title:'Name'))
{
label(text:'First name:')
textField(text:",columns:20)
label(text:'Last name:')
textField(text:",columns:20)
}
}
swingB.doLater{frame.visible = true}
Does anybody know why that causes an error?
Thanks in advance
Pete
I'm trying to build a basic (windows) panel with two text entry fields. I'm trying to learn Groovy 1.6.0 and NetBeans is failing to compile this code and i think its to do with the open quotation mark in the two textfield statements, i cant take them out though because they are in the working examples I've been through from the developers website so they must work in the code, if they don't then I don't know what would
Here's my simple code......
import javax.swing.WindowConstants as WC
import groovy.swing.SwingBuilder
def swingB = new SwingBuilder()
def frame = swingB.frame(tittle:'Example01', location:[100,100],size:[800,800],
defaultCloseOperation:WC.EXIT_ON_CLOSE)
{
panel(border:titledBorder(title:'Name'))
{
label(text:'First name:')
textField(text:",columns:20)
label(text:'Last name:')
textField(text:",columns:20)
}
}
swingB.doLater{frame.visible = true}
Does anybody know why that causes an error?
Thanks in advance
Pete
#3
PassionFord Post Whore!!
Thread Starter
Join Date: Nov 2005
Location: Edinburgh
Posts: 4,062
Likes: 0
Received 0 Likes
on
0 Posts
Thanks Chris, I did have it in as a single quote but after your post changed it to two inverted comma's ('') and now this comes up
init:
deps-jar:
Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/3:javac
Compiling 2 source files to C:\Documents and Settings\Owner\My Documents\NetBeansProjects\JavaApplication1\build\ classes
The option destdir cannot be set on the contained <javac> element. The option will be ignored
The option srcdir cannot be set on the contained <javac> element. The option will be ignored
The option includes cannot be set on the contained <javac> element. The option will be ignored
The option excludes cannot be set on the contained <javac> element. The option will be ignored
The option deprecation cannot be set on the contained <javac> element. The option will be ignored
The option includeantruntime cannot be set on the contained <javac> element. The option will be ignored
org.codehaus.groovy.control.MultipleCompilationErr orsException: startup failed, Invalid commandline usage for javac.
javac: invalid target release: ${javac.target}
Usage: javac <options> <source files>
use -help for a list of possible options
1 error
C:\Documents and Settings\Owner\My Documents\NetBeansProjects\JavaApplication1\nbproj ect\build-impl.xml:339: The following error occurred while executing this line:
C:\Documents and Settings\Owner\My Documents\NetBeansProjects\JavaApplication1\nbproj ect\groovy-build.xml:16: Compilation Failed
BUILD FAILED (total time: 1 second)
any ideas?
init:
deps-jar:
Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/3:javac
Compiling 2 source files to C:\Documents and Settings\Owner\My Documents\NetBeansProjects\JavaApplication1\build\ classes
The option destdir cannot be set on the contained <javac> element. The option will be ignored
The option srcdir cannot be set on the contained <javac> element. The option will be ignored
The option includes cannot be set on the contained <javac> element. The option will be ignored
The option excludes cannot be set on the contained <javac> element. The option will be ignored
The option deprecation cannot be set on the contained <javac> element. The option will be ignored
The option includeantruntime cannot be set on the contained <javac> element. The option will be ignored
org.codehaus.groovy.control.MultipleCompilationErr orsException: startup failed, Invalid commandline usage for javac.
javac: invalid target release: ${javac.target}
Usage: javac <options> <source files>
use -help for a list of possible options
1 error
C:\Documents and Settings\Owner\My Documents\NetBeansProjects\JavaApplication1\nbproj ect\build-impl.xml:339: The following error occurred while executing this line:
C:\Documents and Settings\Owner\My Documents\NetBeansProjects\JavaApplication1\nbproj ect\groovy-build.xml:16: Compilation Failed
BUILD FAILED (total time: 1 second)
any ideas?
#6
Wahay!! I've lost my Virginity!!
Join Date: Sep 2007
Location: Kent
Posts: 95
Likes: 0
Received 0 Likes
on
0 Posts
import javax.swing.WindowConstants as WC
import groovy.swing.SwingBuilder
def swingB = new SwingBuilder()
def frame = swingB.frame(>>>tittle<<<:'Example01', location:[100,100],size:[800,800],
defaultCloseOperation:WC.EXIT_ON_CLOSE)
{
panel(border:titledBorder(title:'Name'))
{
label(text:'First name:')
textField(text:",columns:20)
label(text:'Last name:')
textField(text:",columns:20)
}
}
swingB.doLater{frame.visible = true}
shud be fixed, simple spelling mistake... been a while since i have coded though notice i have put three arrows eitherside of it the mistake
import groovy.swing.SwingBuilder
def swingB = new SwingBuilder()
def frame = swingB.frame(>>>tittle<<<:'Example01', location:[100,100],size:[800,800],
defaultCloseOperation:WC.EXIT_ON_CLOSE)
{
panel(border:titledBorder(title:'Name'))
{
label(text:'First name:')
textField(text:",columns:20)
label(text:'Last name:')
textField(text:",columns:20)
}
}
swingB.doLater{frame.visible = true}
shud be fixed, simple spelling mistake... been a while since i have coded though notice i have put three arrows eitherside of it the mistake
Trending Topics
#9
Wahay!! I've lost my Virginity!!
Join Date: Sep 2007
Location: Kent
Posts: 95
Likes: 0
Received 0 Likes
on
0 Posts
if i still had all the programs installed i would spend more time working out what's wrong but im afraid i dont.... plenty of help on google if you have a look though
#10
PassionFord Post Whore!!
Thread Starter
Join Date: Nov 2005
Location: Edinburgh
Posts: 4,062
Likes: 0
Received 0 Likes
on
0 Posts
Tried it again and getting this...
init:
deps-jar:
Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/3:javac
Compiling 3 source files to C:\Documents and Settings\Owner\My Documents\NetBeansProjects\JavaApplication1\build\ classes
The option destdir cannot be set on the contained <javac> element. The option will be ignored
The option srcdir cannot be set on the contained <javac> element. The option will be ignored
The option includes cannot be set on the contained <javac> element. The option will be ignored
The option excludes cannot be set on the contained <javac> element. The option will be ignored
The option deprecation cannot be set on the contained <javac> element. The option will be ignored
The option includeantruntime cannot be set on the contained <javac> element. The option will be ignored
org.codehaus.groovy.control.MultipleCompilationErr orsException: startup failed, C:\Documents and Settings\Owner\My Documents\NetBeansProjects\JavaApplication1\src\Gr oovyScript1.groovy: 12: expecting anything but ''\n''; got it anyway @ line 12, column 40.
label(text:",'First name:')
^
1 error
C:\Documents and Settings\Owner\My Documents\NetBeansProjects\JavaApplication1\nbproj ect\build-impl.xml:339: The following error occurred while executing this line:
C:\Documents and Settings\Owner\My Documents\NetBeansProjects\JavaApplication1\nbproj ect\groovy-build.xml:16: Compilation Failed
BUILD FAILED (total time: 0 seconds)
A bit dramatic eh?
init:
deps-jar:
Trying to override old definition of task http://www.netbeans.org/ns/j2se-project/3:javac
Compiling 3 source files to C:\Documents and Settings\Owner\My Documents\NetBeansProjects\JavaApplication1\build\ classes
The option destdir cannot be set on the contained <javac> element. The option will be ignored
The option srcdir cannot be set on the contained <javac> element. The option will be ignored
The option includes cannot be set on the contained <javac> element. The option will be ignored
The option excludes cannot be set on the contained <javac> element. The option will be ignored
The option deprecation cannot be set on the contained <javac> element. The option will be ignored
The option includeantruntime cannot be set on the contained <javac> element. The option will be ignored
org.codehaus.groovy.control.MultipleCompilationErr orsException: startup failed, C:\Documents and Settings\Owner\My Documents\NetBeansProjects\JavaApplication1\src\Gr oovyScript1.groovy: 12: expecting anything but ''\n''; got it anyway @ line 12, column 40.
label(text:",'First name:')
^
1 error
C:\Documents and Settings\Owner\My Documents\NetBeansProjects\JavaApplication1\nbproj ect\build-impl.xml:339: The following error occurred while executing this line:
C:\Documents and Settings\Owner\My Documents\NetBeansProjects\JavaApplication1\nbproj ect\groovy-build.xml:16: Compilation Failed
BUILD FAILED (total time: 0 seconds)
A bit dramatic eh?
#11
Livin' [H]ard & Fast
Join Date: Feb 2008
Location: Edinburgh
Posts: 564
Likes: 0
Received 0 Likes
on
0 Posts
Hopefully somebody will know what I'm on about....
I'm trying to build a basic (windows) panel with two text entry fields. I'm trying to learn Groovy 1.6.0 and NetBeans is failing to compile this code and i think its to do with the open quotation mark in the two textfield statements, i cant take them out though because they are in the working examples I've been through from the developers website so they must work in the code, if they don't then I don't know what would
Here's my simple code......
import javax.swing.WindowConstants as WC
import groovy.swing.SwingBuilder
def swingB = new SwingBuilder()
def frame = swingB.frame(tittle:'Example01', location:[100,100],size:[800,800],
defaultCloseOperation:WC.EXIT_ON_CLOSE)
{
panel(border:titledBorder(title:'Name'))
{
label(text:'First name:')
textField(text:",columns:20)
label(text:'Last name:')
textField(text:",columns:20)
}
}
swingB.doLater{frame.visible = true}
Does anybody know why that causes an error?
Thanks in advance
Pete
I'm trying to build a basic (windows) panel with two text entry fields. I'm trying to learn Groovy 1.6.0 and NetBeans is failing to compile this code and i think its to do with the open quotation mark in the two textfield statements, i cant take them out though because they are in the working examples I've been through from the developers website so they must work in the code, if they don't then I don't know what would
Here's my simple code......
import javax.swing.WindowConstants as WC
import groovy.swing.SwingBuilder
def swingB = new SwingBuilder()
def frame = swingB.frame(tittle:'Example01', location:[100,100],size:[800,800],
defaultCloseOperation:WC.EXIT_ON_CLOSE)
{
panel(border:titledBorder(title:'Name'))
{
label(text:'First name:')
textField(text:",columns:20)
label(text:'Last name:')
textField(text:",columns:20)
}
}
swingB.doLater{frame.visible = true}
Does anybody know why that causes an error?
Thanks in advance
Pete
#12
Wahay!! I've lost my Virginity!!
Join Date: Sep 2007
Location: Kent
Posts: 95
Likes: 0
Received 0 Likes
on
0 Posts
can you link me to the site your learning from.... might get back into solving this sort of stuff... working on summink now but i have no compilers to check it
#13
Wahay!! I've lost my Virginity!!
Join Date: Sep 2007
Location: Kent
Posts: 95
Likes: 0
Received 0 Likes
on
0 Posts
got bored so had a little play (its been 2 years since ive touched any code so it may be rough and not what your after)
but this should do exactly what your after i reckon.... let me know?
import groovy.swing.SwingBuilder
import javax.swing.WindowConstants as WC
SwingBuilder.build(){
frame(title:'Example01', location:[100,100], size:[800,800],
visible:true, defaultCloseOperation:WC.EXIT_ON_CLOSE){
gridLayout(cols: 2, rows:0)
label 'First name:'
input = textfield(columns:20, actionPerformed: {
output.text = input.text })
label = 'Last name:'
input = textfield(columns:20, actionPerformed: {
output.text = input.text })
}
}
but this should do exactly what your after i reckon.... let me know?
import groovy.swing.SwingBuilder
import javax.swing.WindowConstants as WC
SwingBuilder.build(){
frame(title:'Example01', location:[100,100], size:[800,800],
visible:true, defaultCloseOperation:WC.EXIT_ON_CLOSE){
gridLayout(cols: 2, rows:0)
label 'First name:'
input = textfield(columns:20, actionPerformed: {
output.text = input.text })
label = 'Last name:'
input = textfield(columns:20, actionPerformed: {
output.text = input.text })
}
}
Thread
Thread Starter
Forum
Replies
Last Post
nicodinho
Ford Non RS / XR / ST parts for sale.
6
07-10-2015 12:56 PM
Adam Graham
Restorations, Rebuilds & Projects.
7
06-09-2015 06:04 AM