Code 1013: The private attribute may be used only on class property definitions.
Ok guys, being new to the Action scripting game, I am already finding myself with Errors. I have researched this for the last few days, and each time I come up with an answered solution, the solution is always the curly bracket. But for the life of me, I can not find a missing bracket! Could someone look at this for me and guide me in the right direction before I lose the rest of my hair. :-)
package
import flash.display.Sprite;
import flash.events.MouseEvent;
public class Main extends Sprite
var xPos:int; //Stores the initial x position
var yPos:int; //Stores the initial y position
public function Main():void
addListeners(alpine,armadillo,battery,blizzard,cactus,carnivoreplant,cloud,coolfire,coral,crystal,dandelion,darkfire); //A function to add the listeners to the clips in the parameters
private function getPosition(target:Object):void
xPos = target.x;
yPos = target.y;
private function dragObject(e:MouseEvent):void
getPosition(e.target);
e.target.startDrag(true);
private function stopDragObject(e:MouseEvent):void
if (e.target.hitTestObject(getChildByName(e.target.name + "Target"))) //Checks the correct drop target
e.target.x = getChildByName(e.target.name + "Target").x; //If its correct, place the clip in the same position as the target
e.target.y = getChildByName(e.target.name + "Target").y;
else
e.target.x = xPos; //If not, return the clip to its original position
e.target.y = yPos;
e.target.stopDrag(); //Stop drag
private function addListeners(... objects):void
for (var i:int = 0; i < objects.length; i++)
objects[i].addEventListener(MouseEvent.MOUSE_DOWN, dragObject);
objects[i].addEventListener(MouseEvent.MOUSE_UP, stopDragObject);
Thank you for the reply Ned.
I took your advice and moved the Closing Bracket with this result in the coding change.
package
import flash.display.Sprite;
import flash.events.MouseEvent;
public class Main extends Sprite
var xPos:int; //Stores the initial x position
var yPos:int; //Stores the initial y position
public function Main():void
addListeners(alpine,armadillo,battery,blizzard,cactus,carnivoreplant,cloud,coolfire,coral,crystal,dandelion,darkfire); //A function to add the listeners to the clips in the parameters
private function getPosition(target:Object):void
xPos = target.x;
yPos = target.y;
private function dragObject(e:MouseEvent):void
getPosition(e.target);
e.target.startDrag(true);
private function stopDragObject(e:MouseEvent):void
if (e.target.hitTestObject(getChildByName(e.target.name + "Target"))) //Checks the correct drop target
e.target.x = getChildByName(e.target.name + "Target").x; //If its correct, place the clip in the same position as the target
e.target.y = getChildByName(e.target.name + "Target").y;
else
e.target.x = xPos; //If not, return the clip to its original position
e.target.y = yPos;
e.target.stopDrag(); //Stop drag
private function addListeners(... objects):void
for (var i:int = 0; i < objects.length; i++)
objects[i].addEventListener(MouseEvent.MOUSE_DOWN, dragObject);
objects[i].addEventListener(MouseEvent.MOUSE_UP, stopDragObject);
The 4 errors still remain on Line 14, 19, 25, and 40. All the same Error Code.
Similar Messages
-
1013: The private attribute may be used only on class property definitions.
import com.doitflash.consts.Orientation;
import com.doitflash.consts.Easing;
import com.doitflash.events.ScrollEvent;
import com.doitflash.starling.utils.scroller.Scroller;
import starling.events.TouchEvent;
import starling.events.TouchPhase;
import starling.events.Touch;
import starling.extensions.ClippedSprite;
import flash.geom.Point;
var content:ClippedSprite = new ClippedSprite(); // the content you want to scroll
content.clipRect = new Rectangle(0, 0, 500, 500); // set the space that you want your content to be visible at, set its mask actually
content.addEventListener(TouchEvent.TOUCH, onTouch);
this.addChild(content);
var scroll:Scroller = new Scroller();
scroll.boundWidth = 500; // set boundWidth according to the mask width
scroll.boundHeight = 500; // set boundHeight according to the mask height
scroll.content = content; // you MUST set scroller content before doing anything else
scroll.orientation = Orientation.VERTICAL; // accepted values: Orientation.AUTO, Orientation.VERTICAL, Orientation.HORIZONTAL
// you call this function, to start scrolling
private function onTouch(e:TouchEvent):void
var touch:Touch = e.getTouch(stage);
var pos:Point = touch.getLocation(stage);
if (touch.phase == TouchPhase.BEGAN)
scroll.startScroll(pos); // on touch begin
else if (touch.phase == TouchPhase.MOVED)
scroll.startScroll(pos); // on touch move
//trace(_scroll.isHoldAreaDone); // to see that we have got out of the hold area or not
else if (touch.phase == TouchPhase.ENDED)
scroll.fling(); // on touch ended
i got this error after pasting this code in.. i cant figure out the problem.. some help pls?use:
import com.doitflash.consts.Orientation;
import com.doitflash.consts.Easing;
import com.doitflash.events.ScrollEvent;
import com.doitflash.starling.utils.scroller.Scroller;
import starling.events.TouchEvent;
import starling.events.TouchPhase;
import starling.events.Touch;
import starling.extensions.ClippedSprite;
import flash.geom.Point;
var content:ClippedSprite = new ClippedSprite(); // the content you want to scroll
content.clipRect = new Rectangle(0, 0, 500, 500); // set the space that you want your content to be visible at, set its mask actually
content.addEventListener(TouchEvent.TOUCH, onTouch);
this.addChild(content);
var scroll:Scroller = new Scroller();
scroll.boundWidth = 500; // set boundWidth according to the mask width
scroll.boundHeight = 500; // set boundHeight according to the mask height
scroll.content = content; // you MUST set scroller content before doing anything else
scroll.orientation = Orientation.VERTICAL; // accepted values: Orientation.AUTO, Orientation.VERTICAL, Orientation.HORIZONTAL
// you call this function, to start scrolling
function onTouch(e:TouchEvent):void
var touch:Touch = e.getTouch(stage);
var pos:Point = touch.getLocation(stage);
if (touch.phase == TouchPhase.BEGAN)
scroll.startScroll(pos); // on touch begin
else if (touch.phase == TouchPhase.MOVED)
scroll.startScroll(pos); // on touch move
//trace(_scroll.isHoldAreaDone); // to see that we have got out of the hold area or not
else if (touch.phase == TouchPhase.ENDED)
scroll.fling(); // on touch ended -
Error 1013: The private attribute may be used only on class property definitions
Been trying to solve this problem for the past 4 hours, been searching all over different forums and I still don't get it, I'm a complete newbie with AS3 and just starting to learn it. Can someone tell me what I have done wrong to get this error.
package {
import flash.display.Sprite;
import flash.events.Event;
public class Main extends Sprite {
private const FIELD_WIDTH:uint=16;
private const FIELD_HEIGHT:uint=12;
private const TILE_SIZE:uint=40;
private var the_snake:the_snake_mc;
private var snakeDirection:uint;
private var snakeContainer:Sprite= new Sprite();
private var bg:bg_mc=new bg_mc();
public function Main() {
addChild(bg);
placeSnake(); }
addEventListener(Event.ENTER_FRAME,onEnterFr);
private function placeSnake():void {
addChild(snakeContainer);
var col:uint=Math.floor(Math.random()*(FIELD_WIDTH-10))+5;
var row:uint=Math.floor(Math.random()*(FIELD_HEIGHT-10))+5;
snakeDirection=Math.floor(Math.random()*4);
the_snake=new the_snake_mc(col*TILE_SIZE,row*TILE_SIZE,snakeDirection+1);
snakeContainer.addChild(the_snake);
switch (snakeDirection) {
case 0 : // facing left
trace("left");
the_snake = new the_snake_mc((col+1)*TILE_SIZE,row*TILE_SIZE,6);
snakeContainer.addChild(the_snake);
the_snake = new the_snake_mc((col+2)*TILE_SIZE,row*TILE_SIZE,6);
snakeContainer.addChild(the_snake);
break;
case 1 : // facing up
trace ("up");
the_snake = new the_snake_mc(col*TILE_SIZE,(row+1)*TILE_SIZE,5);
snakeContainer.addChild(the_snake);
the_snake = new the_snake_mc(col*TILE_SIZE,(row+2)*TILE_SIZE,5);
snakeContainer.addChild(the_snake);
break;
case 2 : // facing down
trace ("down");
the_snake = new the_snake_mc((col-1)*TILE_SIZE.row*TILE_SIZE,6);
snakeContainer.addChild(the_snake);
the_snake = new the_snake_mc((col-2)*TILE_SIZE.row*TILE_SIZE,6);
snakeContainer.addChild(the_snake);
break
case 3 : // facing right
trace ("right");
the_snake = new the_snake_mc(col*TILE_SIZE,(row-1)*TILE_SIZE,5);
snakeContainer.addChild(the_snake);
the_snake = new the_snake_mc(col*TILE_SIZE,(row-2)*TILE_SIZE,5);
snakeContainer.addChild(the_snake);
break;
private function onEnterFr(e:Event) { << ERROR ON THIS LINE
var the_head:the_snake_mc=snakeContainer.addChildAt(0) as the_snake_mc;
var new_piece:the_snake_mc=new the_snake_mc(the_head.x,the_head.y,1);
snakeContainer.addChildAt(new_piece,1);
var the_body:the_snake_mc=snakeContainer.getChildAt(2) as the_snake_mc;
var p:uint=snakeContainer.numChildren;
var the_tail:the_snake_mc=snakeContainer.getChildAt(p-1) as the_snake_mc;
var the_new_tail:the_snake_mc=snakeContainer.getChildAt(p-2) as the_snake_mc;
the_head.moveHead(snakeDirection,TILE_SIZE);
// brute force
if (is_up(new_piece,the_head)&&is_down(new_piece,the_body)) {
new_piece.gotoAndStop(5);
if (is_down(new_piece,the_head)&&is_up(new_piece,the_body)) {
new_piece.gotoAndStop(5);
if (is_left(new_piece,the_head)&&is_right(new_piece,the_body)) {
new_piece.gotoAndStop(6);
if (is_right(new_piece,the_head)&&is_left(new_piece,the_body)) {
new_piece.gotoAndStop(6);
// end of brute force
snakeContainer.removeChild(the_tail);does this solve your problem
package
import flash.display.Sprite;
import flash.events.Event;
public class Main extends Sprite
private const FIELD_WIDTH:uint = 16;
private const FIELD_HEIGHT:uint = 12;
private const TILE_SIZE:uint = 40;
private var the_snake:the_snake_mc;
private var snakeDirection:uint;
private var snakeContainer:Sprite = new Sprite();
private var bg:bg_mc = new bg_mc();
public function Main()
addChild(bg);
placeSnake();
addEventListener(Event.ENTER_FRAME, onEnterFr);
private function placeSnake():void
addChild(snakeContainer);
var col:uint = Math.floor(Math.random() * (FIELD_WIDTH - 10)) + 5;
var row:uint = Math.floor(Math.random() * (FIELD_HEIGHT - 10)) + 5;
snakeDirection = Math.floor(Math.random() * 4);
the_snake = new the_snake_mc(col * TILE_SIZE, row * TILE_SIZE, snakeDirection + 1);
snakeContainer.addChild(the_snake);
switch (snakeDirection)
case 0: // facing left
trace("left");
the_snake = new the_snake_mc((col + 1) * TILE_SIZE, row * TILE_SIZE, 6);
snakeContainer.addChild(the_snake);
the_snake = new the_snake_mc((col + 2) * TILE_SIZE, row * TILE_SIZE, 6);
snakeContainer.addChild(the_snake);
break;
case 1: // facing up
trace("up");
the_snake = new the_snake_mc(col * TILE_SIZE, (row + 1) * TILE_SIZE, 5);
snakeContainer.addChild(the_snake);
the_snake = new the_snake_mc(col * TILE_SIZE, (row + 2) * TILE_SIZE, 5);
snakeContainer.addChild(the_snake);
break;
case 2: // facing down
trace("down");
the_snake = new the_snake_mc((col - 1) * TILE_SIZE.row * TILE_SIZE, 6);
snakeContainer.addChild(the_snake);
the_snake = new the_snake_mc((col - 2) * TILE_SIZE.row * TILE_SIZE, 6);
snakeContainer.addChild(the_snake);
break;
case 3: // facing right
trace("right");
the_snake = new the_snake_mc(col * TILE_SIZE, (row - 1) * TILE_SIZE, 5);
snakeContainer.addChild(the_snake);
the_snake = new the_snake_mc(col * TILE_SIZE, (row - 2) * TILE_SIZE, 5);
snakeContainer.addChild(the_snake);
break;
private function onEnterFr(e:Event)
var the_head:the_snake_mc = snakeContainer.addChildAt(0) as the_snake_mc;
var new_piece:the_snake_mc = new the_snake_mc(the_head.x, the_head.y, 1);
snakeContainer.addChildAt(new_piece, 1);
var the_body:the_snake_mc = snakeContainer.getChildAt(2) as the_snake_mc;
var p:uint = snakeContainer.numChildren;
var the_tail:the_snake_mc = snakeContainer.getChildAt(p - 1) as the_snake_mc;
var the_new_tail:the_snake_mc = snakeContainer.getChildAt(p - 2) as the_snake_mc;
the_head.moveHead(snakeDirection, TILE_SIZE);
// brute force
if (is_up(new_piece, the_head) && is_down(new_piece, the_body))
new_piece.gotoAndStop(5);
if (is_down(new_piece, the_head) && is_up(new_piece, the_body))
new_piece.gotoAndStop(5);
if (is_left(new_piece, the_head) && is_right(new_piece, the_body))
new_piece.gotoAndStop(6);
if (is_right(new_piece, the_head) && is_left(new_piece, the_body))
new_piece.gotoAndStop(6);
// end of brute force
snakeContainer.removeChild(the_tail); -
Private attributes & class property definition errors
I'm setting up functions in a document class file, then from there I am going to call that function from a movieclip in flash. For some reason, maybe I have things set up wrong, but it is throwing me errors such as below:
Line 37 1013: The private attribute may be used only on class property definitions.
What am I doing wrong here and is there something I am not understanding?
Here is my .as code.
modal.as >
package {
import flash.display.*;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.display.*;
import flash.events.*;
import flash.net.URLRequest;
public class modal extends MovieClip {
public function modal() {
private var currentlyShowing:MovieClip=null;
public function showModalContent(clip:MovieClip):void {
if (currentlyShowing!=null) {
removeChild(currentlyShowing);
currentlyShowing=clip;
addChild(currentlyShowing);
public function removeModalContent():void {
if (currentlyShowing!=null) {
removeChild(currentlyShowing);
currentlyShowing=null;
And here is my code that is on the timeline:
slideshowimages_mc.one_mc.addEventListener(MouseEvent.CLICK, oneClick);
function oneClick(event:MouseEvent):void {
var bigimagebg_mc=new mc_bigimagebg ;
showModalContent(bigimagebg_mc);
bigimagebg_mc.x=200;
bigimagebg_mc.y=170;unnest all the named functions and that variable:
package {
import flash.display.*;
import flash.events.Event;
import flash.events.MouseEvent;
import flash.display.*;
import flash.events.*;
import flash.net.URLRequest;
public class modal extends MovieClip {
private var currentlyShowing:MovieClip=null;
public function modal() {
public function showModalContent(clip:MovieClip):void {
if (currentlyShowing!=null) {
removeChild(currentlyShowing);
currentlyShowing=clip;
addChild(currentlyShowing);
public function removeModalContent():void {
if (currentlyShowing!=null) {
removeChild(currentlyShowing);
currentlyShowing=null; -
trying to do a hard reset on my iphone 4s. never had a lock code on the device. I am using an iphone 5 and after update i add a security code.
I am using the same one but it does not accep the code.
Is there any other way to do the hard reset on the device?I went to Setting, General, and reset, I select Reset all settings and contents and it asked me for a 4 digit code but when i use the one on my current iphone 5 id doest work.
-
SQL*Loader-273: READBUFFERS may be used only in direct path.
Hi,
I am trying to upgrade from OWB 10G to 11G. y map from flat file to stage maps work fine in 10G. when i upgrade the maps to 11G i get the error:
Error
RPE-01013: SQL Loader reported error condition, number 1.
SQL*Loader: Release 11.1.0.7.0 - Production on Fri May 8 15:10:20 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
SQL*Loader-273: READBUFFERS may be used only in direct path.
SQL*Loader: Release 11.1.0.7.0 - Production on Fri May 8 15:10:20 2009
Copyright (c) 1982, 2007, Oracle. All rights reserved.
SQL*Loader-273: READBUFFERS may be used only in direct path.
if i go to configure and make the READBUFFERS to = 0 then the map works fine. this used to work fine in 10G. I compared the .CTL file of sql loder and i notice the 10G sql loader file did not care for this property being set. while in 11G .ctl file i see the readbuffer property being set. though i can make the map run in 11G i can not go to each map and then reset it. ...Please help.
ThanksIN 10 G environment
a.)Direct path = False.
b.) Read buffers = 4 (defaults to 4)
10G Code generated :
-- Oracle Warehouse Builder
-- Generator Version : 10.1.0.4.0
-- Created Date : Mon May 11 10:16:31 CDT 2009
-- Modified Date : Mon May 11 10:16:31 CDT 2009
-- Created By : owb_repository
-- Modified By : owb_repository
-- Generated Object Type : SQL*Loader Control File
-- Generated Object Name : GFHGF
-- © 2003 Oracle Corporation. All Rights Reserved.
OPTIONS ( ERRORS=50, BINDSIZE=50000, ROWS=200, READSIZE=65536)
LOAD DATA
CHARACTERSET WE8MSWIN1252
INFILE 'C:\EAND.dat'
INTO TABLE "{{ORACLE10G.Schema}}"."EAND"
APPEND
REENABLE DISABLED_CONSTRAINTS
FIELDS
"PERSON_SSN_SOURCE" POSITION (3:3) CHAR
IN 11 G environment
a.)Direct path = False.
b.) Read buffers = 4 (for new maps crated defaults to 0)
-- Generator Version : 11.1.0.7.0
-- Created Date : Mon May 11 10:06:37 CDT 2009
-- Modified Date : Mon May 11 10:06:37 CDT 2009
-- Created By : OWB_WUSER
-- Modified By : OWB_WUSER
-- Generated Object Type : SQL*Loader Control File
-- Generated Object Name : "GFHGF"
-- Copyright © 2000, 2007, Oracle. All rights reserved.
OPTIONS (BINDSIZE=50000,ERRORS=50,ROWS=200,READSIZE=65536)
LOAD DATA
CHARACTERSET WE8MSWIN1252
INFILE '{{ETL_FILE_LOC.RootPath}}{{}}EAND.dat''
BADFILE '{{ETL_FILE_LOC.RootPath}}{{}}EAND'
READBUFFERS 4
CONCATENATE 1
INTO TABLE "STAG"."EAND"
TRUNCATE
REENABLE DISABLED_CONSTRAINTS
"PERSON_SSN_SOURCE" POSITION (3:3) CHAR
my question is even as both the properties in 10G and 11G are same why does .ctl file generated in 11G has statement "READBUFFERS 4" while this is neglected in owb 10G generated .ctl file? Please Help.
Edited by: user591315 on May 11, 2009 8:14 AM
Edited by: user591315 on May 11, 2009 8:16 AM -
The services yes president St use only passed
I'm police officers and how to get the services yes president St use only passed I 1020 everybody in the county possible health service in the county government yeah there's more demand people is a alright so you need to cut the people themselves demanding Pure Testo Xplode besides their services will be provided then we also need to make hell me as major topic of discussion that we he has said should be delighted leading the HIV epidemic needed message and that his hand shows that a lot most now the earliest to understand that head message I think that lets you it is United States access shiny bentest yes that given is things that yet about did dissection today grass how yet and I know many mothers day actually was that helped a lot yes I will be doing then this is not what I love that song will me yeah so attendees hey don’t know let I'm is not schooled at this to know that listed into I listening to these lames is lead this leading because then his mother son the fact that units I S journalist .http://useexercisesupplements.com/pure-testo-xplode/
-Considering that these switches went eol in ’10 & end of SW maint release as of 7/31/13, can I consider the rev level that is prescribed in this post to be the final, definitive answer regarding the best & most current rev level for these 3750-48PS-e switches ? Or is there the possibilty that SE10 (or some other newer version) comes along & merits a rethink?
This is incorrect (and made worst with the poorly-worded EoL/EoS from Cisco). 12.2(55)SE EoL/EoS only affects platforms (2960, 3560 and 3750) with flash memory of 32 mb and above. Legacy 3560 and 3750 are NOT affected by announcement. And even if you have a 3560 or 3750 with 32 mb flash, I would steadfastly recommend 12.2(55)SE train than 15.0(1)SE, 15.0(2)SE or 15.2(1)E.
If your platform has 16 mb flash, then the "highest" IOS you can run is 12.2(55)SE. My personal recommendation is 12.2(55)SE8 or you could try the newer 12.2(55)SE9. I've got years of good experience with this particular version of IOS, 12.2(55)SE, and must admit this is one of the most stable version I've ever used (and I've used and tested a lot of versions). It's sad that Cisco no longer wants to run with this code. -
I would use the module "https everywhere" wich is an extension that encrypts communications with many major website. The thing is that i dont want to use it all the time.
The way to use it perfectly would be to activate it only when i'm in private mode (wich makes sense IMO).
Is there any way to install / configure it in order it's effective in the private mode but not in the normal one ?
That would be a great feature but i found nothing about it.
Btw, sorry for my bad english, not my mother tongue anyway ;).
Thanks for your support.
Best regardsI know i m running on firefox 24, but i m working with GWT plateform and there is no pluggin for version higher than 24.
Thank you for your help, it fit perfectly with my issue. Much appreciated.
Best regards -
Bouncing off the wall: Problems with passing/using pointers to classes
I have a mostly completed "msPaint" (=assigment) program that is driving me nuts!!!
1. First shape you draw doesn't appear.
1.5 Draw a shape by clicking twice on Panel, can change shape, color, fill with what buttons you see.
2. Subsequently only the newest shape appears. Using System.println(); it appears to be drawing as many shapes as it has made, but it doesn't.
3. I owe much to anyone who helps me, here is complete code. Specifically will ask/reward you to reply to a diff link in which I have dukes, got no answer, and can't reallocate dukes. (=5)
Thank you very much.
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
public class Prog4 extends JApplet implements ActionListener
//private MainPanel drawingpanel;
private JPanel top;
private JPanel left;
private JPanel bottom;
private JPanel bottomleft,bottommiddletop,bottommiddle,bottomright;
//top buttons created
private JButton first,next,previous,last,help;
//bottom buttons created
private JButton custom;
private JButton white,gray,red,purple,blue,green,yellow,orange;
private JButton black,darkgray,darkred,darkpurple,darkblue,darkgreen,darkyellow,darkorange;
private JButton rect,oval,line,solid,hollow,erase;
private CardLayout drawingscreens;
private MyShape [] shapes=new MyShape[10];
private MyShape newshape=new MyShape();
private Data information;//=new Data(newshape, shapes);
private MyPanel temp;//=new MyPanel(information);
private int thiscard;
public int x,y;
//Holder Variable to hold info about shape to be drawn
int shape;
int fill;
int draw;
int tx,ty,bx,by;
public void init()
Container window=getContentPane();
window.setLayout(new FlowLayout(0,0,FlowLayout.LEFT));
//Top Button Setup
first=new JButton("First");
first.addActionListener(this);
first.setPreferredSize(new Dimension(100,40));
next=new JButton("Next");
next.addActionListener(this);
next.setPreferredSize(new Dimension(100,40));
previous=new JButton("Previous");
previous.addActionListener(this);
previous.setPreferredSize(new Dimension(100,40));
last=new JButton("Last");
last.addActionListener(this);
last.setPreferredSize(new Dimension(100,40));
help=new JButton("Help");
help.addActionListener(this);
help.setPreferredSize(new Dimension(100,40));
//TOP PANEL SETUP
top=new JPanel();
top.setLayout(new FlowLayout(0,0,FlowLayout.LEFT));
top.setPreferredSize(new Dimension(800,40));
top.setOpaque(true);
top.setBackground(Color.white);
top.add(first);
top.add(next);
top.add(previous);
top.add(last);
top.add(help);
window.add(top);
//Left Buttons Setup
rect=new JButton("Rectangle");
rect.setPreferredSize(new Dimension(100,40));
rect.addActionListener(this);
oval=new JButton("Oval");
oval.setPreferredSize(new Dimension(100,40));
oval.addActionListener(this);
line=new JButton("Line");
line.setPreferredSize(new Dimension(100,40));
line.addActionListener(this);
solid=new JButton("Solid");
solid.setPreferredSize(new Dimension(100,40));
solid.addActionListener(this);
hollow=new JButton("Hollow");
hollow.setPreferredSize(new Dimension(100,40));
hollow.addActionListener(this);
erase=new JButton("Erase");
erase.setPreferredSize(new Dimension(100,40));
erase.addActionListener(this);
//Left Panel Setup
left=new JPanel();
left.setLayout(new FlowLayout(0,0,FlowLayout.LEFT));
left.setPreferredSize(new Dimension(200,600));
left.add(rect);
left.add(oval);
left.add(line);
left.add(solid);
left.add(hollow);
left.add(erase);
window.add(left);// FlowLayout.LEFT);
//Middle Setup
temp=new panel();
temp.setPreferredSize(new Dimension(600,600));
temp.setOpaque(true);
temp.setBackground(Color.red);
temp.addMouseListener(this);
window.add(temp);
//Panel Listener Initailization
for(int i=0; i<shapes.length; i++)
shapes=new MyShape();
information=new Data(newshape, shapes);
temp=new MyPanel(information);
Listener panelListener=new Listener(temp, newshape, information);
//shapes
window.add(temp);
temp.addMouseListener(panelListener);
//Bottom Buttons Setup
int bsize=20; //Int for horz/vert size of buttons
//Left Setup, creates a JPanel which displays the current color
bottomleft=new JPanel();
bottomleft.setPreferredSize(new Dimension(2*bsize,2*bsize));
bottomleft.setLayout(new FlowLayout(0,0, FlowLayout.LEFT));
bottomleft.setOpaque(true);
//Middle Setup creates buttons for each pregenerated color in the top row
black=new JButton();
black.setPreferredSize(new Dimension(bsize,bsize));
black.setOpaque(true);
black.setBackground(new Color(0,0,0));
black.addActionListener(this);
darkgray=new JButton();
darkgray.setPreferredSize(new Dimension(bsize,bsize));
darkgray.setOpaque(true);
darkgray.setBackground(new Color(70,70,70));
darkgray.addActionListener(this);
darkred=new JButton();
darkred.setPreferredSize(new Dimension(bsize,bsize));
darkred.setOpaque(true);
darkred.setBackground(new Color(180,0,0));
darkred.addActionListener(this);
darkpurple=new JButton();
darkpurple.setPreferredSize(new Dimension(bsize,bsize));
darkpurple.setOpaque(true);
darkpurple.setBackground(new Color(185,0,185));
darkpurple.addActionListener(this);
darkblue=new JButton();
darkblue.setPreferredSize(new Dimension(bsize,bsize));
darkblue.setOpaque(true);
darkblue.setBackground(new Color(0,0,150));
darkblue.addActionListener(this);
darkgreen=new JButton();
darkgreen.setPreferredSize(new Dimension(bsize,bsize));
darkgreen.setOpaque(true);
darkgreen.setBackground(new Color(0,140,0));
darkgreen.addActionListener(this);
darkyellow=new JButton();
darkyellow.setPreferredSize(new Dimension(bsize,bsize));
darkyellow.setOpaque(true);
darkyellow.setBackground(new Color(176,176,0));
darkyellow.addActionListener(this);
darkorange=new JButton();
darkorange.setPreferredSize(new Dimension(bsize,bsize));
darkorange.setOpaque(true);
darkorange.setBackground(new Color(170,85,0));
darkorange.addActionListener(this);
//Adds each button to a Panel
bottommiddletop=new JPanel();
bottommiddletop.setLayout(new FlowLayout(0,0,FlowLayout.LEFT));
bottommiddletop.setPreferredSize(new Dimension(8*bsize,bsize));
bottommiddletop.add(black);
bottommiddletop.add(darkgray);
bottommiddletop.add(darkred);
bottommiddletop.add(darkpurple);
bottommiddletop.add(darkblue);
bottommiddletop.add(darkgreen);
bottommiddletop.add(darkyellow);
bottommiddletop.add(darkorange);
//Bottom Middle Creates bottom row of colors like top
white=new JButton();
white.setPreferredSize(new Dimension(bsize,bsize));
white.setOpaque(true);
white.setBackground(new Color(255,255,255));
white.addActionListener(this);
gray=new JButton();
gray.setPreferredSize(new Dimension(bsize,bsize));
gray.setOpaque(true);
gray.setBackground(new Color(192,192,192));
gray.addActionListener(this);
red=new JButton();
red.setPreferredSize(new Dimension(bsize,bsize));
red.setOpaque(true);
red.setBackground(new Color(255,0,0));
red.addActionListener(this);
purple=new JButton();
purple.setPreferredSize(new Dimension(bsize,bsize));
purple.setOpaque(true);
purple.setBackground(new Color(213,0,213));
purple.addActionListener(this);
blue=new JButton();
blue.setPreferredSize(new Dimension(bsize,bsize));
blue.setOpaque(true);
blue.setBackground(new Color(0,0,255));
blue.addActionListener(this);
green=new JButton();
green.setPreferredSize(new Dimension(bsize,bsize));
green.setOpaque(true);
green.setBackground(new Color(0,255,0));
green.addActionListener(this);
yellow=new JButton();
yellow.setPreferredSize(new Dimension(bsize,bsize));
yellow.setOpaque(true);
yellow.setBackground(new Color(255,255,0));
yellow.addActionListener(this);
orange=new JButton();
orange.setPreferredSize(new Dimension(bsize,bsize));
orange.setOpaque(true);
orange.setBackground(new Color(244,122,0));
orange.addActionListener(this);
//Attaches buttons to a panel
bottommiddle=new JPanel();
bottommiddle.setLayout(new FlowLayout(0,0,FlowLayout.LEFT));
bottommiddle.setPreferredSize(new Dimension(8*bsize,bsize));
bottommiddle.add(white);
bottommiddle.add(gray);
bottommiddle.add( red);
bottommiddle.add(purple);
bottommiddle.add(blue);
bottommiddle.add(green);
bottommiddle.add(yellow);
bottommiddle.add(orange);
//Creates middle panel for bottom
bottom=new JPanel();
bottom.setLayout(new FlowLayout(0,0,FlowLayout.LEFT));
bottom.setPreferredSize(new Dimension(8*bsize,2*bsize));
bottom.add(bottommiddletop);
bottom.add(bottommiddle);
//This is for a button on buttom right to make custom colors.
//Right Setup creates a button which allows you to make your own color
custom=new JButton("More");
custom.setPreferredSize(new Dimension(4*bsize,2*bsize));
custom.setOpaque(true);
bottomright=new JPanel();
bottomright.setLayout(new FlowLayout(0,0,FlowLayout.LEFT));
bottomright.setPreferredSize(new Dimension(4*bsize,2*bsize));
bottomright.add(custom);
//The Panel containing current color is added first
//Then the two colors panels are added
//Then the panel with a custom button is added
window.add(bottomleft);
window.add(bottom);
window.add(bottomright);
public void actionPerformed(ActionEvent e)
//Buttons to change colors
if(e.getSource()==black)
bottomleft.setBackground(new Color(0,0,0));
newshape.setColor(0,0,0);
if(e.getSource()==darkgray)
bottomleft.setBackground(new Color(70,70,70));
newshape.setColor(70,70,70);
if(e.getSource()==darkred)
bottomleft.setBackground(new Color(180,0,0));
newshape.setColor(180,0,0);
if(e.getSource()==darkpurple)
bottomleft.setBackground(new Color(185,0,185));
newshape.setColor(185,0,185);
if(e.getSource()==darkblue)
bottomleft.setBackground(new Color(0,0,150));
newshape.setColor(0,0,150);
if(e.getSource()==darkgreen)
bottomleft.setBackground(new Color(0,140,0));
newshape.setColor(0,140,0);
if(e.getSource()==darkyellow)
bottomleft.setBackground(new Color(176,176,0));
newshape.setColor(176,176,0);
if(e.getSource()==darkorange)
bottomleft.setBackground(new Color(170,85,0));
newshape.setColor(170,85,0);
if(e.getSource()==white)
bottomleft.setBackground(new Color(255,255,255));
newshape.setColor(255,255,255);
if(e.getSource()==blue)
bottomleft.setBackground(new Color(0,0,255));
newshape.setColor(0,0,255);
if(e.getSource()==red)
bottomleft.setBackground(new Color(255,0,0));
newshape.setColor(255,0,0);
if(e.getSource()==green)
bottomleft.setBackground(new Color(0,255,0));
newshape.setColor(0,255,0);
if(e.getSource()==purple)
bottomleft.setBackground(new Color(213,0,213));
newshape.setColor(213,0,213);
if(e.getSource()==yellow)
bottomleft.setBackground(new Color(255,255,0));
newshape.setColor(255,255,0);
if(e.getSource()==orange)
bottomleft.setBackground(new Color(244,122,0));
newshape.setColor(244,122,0);
if(e.getSource()==gray)
bottomleft.setBackground(new Color(192,192,192));
newshape.setColor(192,192,192);
//Code for setting shape to draw
if(e.getSource()==rect)
setShapes();
rect.setBackground(Color.blue);
newshape.setShape(1);
if(e.getSource()==line)
setShapes();
newshape.setShape(0);
line.setBackground(Color.blue);
if(e.getSource()==oval)
setShapes();
newshape.setShape(2);
oval.setBackground(Color.blue);
//Code for setting to fill or not
if(e.getSource()==solid)
solid.setBackground(Color.blue);
hollow.setBackground(Color.gray);
newshape.setFill(1);
if(e.getSource()==hollow)
hollow.setBackground(Color.blue);
solid.setBackground(Color.gray);
newshape.setFill(0);
public void setShapes()
rect.setBackground(Color.gray);
oval.setBackground(Color.gray);
line.setBackground(Color.gray);
class Data
private MyShape newshape;
private MyShape [] shapes;
public Data(MyShape a, MyShape [] b)
newshape=a;
shapes=b;
public void drawShapes(Graphics g)
drawAllShapes(g);
public void sortShapes()
for(int t=8; t>=0; t--)
shapes[t+1]=shapes[t];
shapes[0]=newshape;
System.out.println("Shapes Sorted");
public void drawAllShapes(Graphics g)
newshape.reset(true);
for(int i=9; i>=0; i--)
shapes[i].drawShape(g);
System.out.println("Shapes Drawn??");
class MyPanel extends JPanel
private Data information;
public MyPanel(Data a)
information=a;
setPreferredSize(new Dimension(600,600));
setBackground(Color.blue);
public void paintComponent(Graphics g)
super.paintComponent(g);
information.drawShapes(g);
class Listener extends MouseAdapter
int x,y;
private int [] loc=new int[4];
int horzL, vertL;
private boolean clicked=false;
private boolean sortonce;
private MyPanel temp;
private MyShape newshape;
private Data information;
private int xt,yt,xl,yl;
public Listener(MyPanel d, MyShape b, Data c)
temp=d;
newshape=b;
information=c;
public void mouseClicked(MouseEvent e)
if(clicked==false)
x=e.getX();
y=e.getY();
clicked=true;
else
if(clicked==true)
mouseloc(x,y,e.getX(),e.getY());
information.sortShapes();
temp.repaint();
clicked=false;
public void mouseloc(int xt,int yt,int xl,int yl)
loc[0]=xt;
loc[1]=yt;
loc[2]=xl;
loc[3]=yl;
newshape.setLoc(xt,yt,xl,yl);
newshape.doDraw(true);
class MyShape
private int xL, yL, xR, yR; //Local location ints for this class;
private int red, blue, green; //Local ints defining this color;
private int shape,fill; //Local info about shape
private boolean draw=false; // Determines if Shape will draw
private boolean setupshape=true;
public void MyShape()
public void doDraw(boolean a)
draw=a;
public void setLoc(int xt,int yt,int xb,int yb)
xL=xt;
yL=yt;
xR=xb;
yR=yb;
public void setColor(int r,int b,int g)
red=r;
blue=b;
green=g;
public void setShape(int thisshape)
shape=thisshape;
public void setFill(int fil)
fill=fil;
public void drawShape(Graphics g)
if(draw==true && setupshape==true)
System.out.println("This shape setup");
g.setColor(new Color(red,blue,green));
switch(shape)
case 0: makeLine(g);break;
case 1: makeRect(g);break;
case 2: makeOval(g);break;
setupshape=false;
else if(draw==true)
System.out.println("This shape redrawn");
switch(shape)
case 0: drawLine(g);break;
case 1: drawRect(g);break;
case 2: drawOval(g);break;
public void reset(boolean a)
setupshape=a;
public void drawLine(Graphics g)
g.drawLine(xL,yL,xR,yR);
public void drawRect(Graphics g)
if(fill==0)
g.drawRect(xL,yL,xR,yR);
else
g.fillRect(xL,yL,xR,yR);
public void drawOval(Graphics g)
if(fill==0)
g.drawOval(xL,yL,xR,yR);
else
g.fillOval(xL,yL,xR,yR);
public void makeLine(Graphics g)
g.drawLine(xL,yL,xR,yR);
public void makeRect(Graphics g)
sortvalue();
if(fill==0)
g.drawRect(xL,yL,xR,yR);
else
g.fillRect(xL,yL,xR,yR);
public void makeOval(Graphics g)
sortvalue();
if(fill==0)
g.drawOval(xL,yL,xR,yR);
else
g.fillOval(xL,yL,xR,yR);
public void sortvalue()
if(xR<xL)
int temp=xR;
xR=xL;
xL=temp;
if(yR<yL)
int temp=yR;
yR=yL;
yL=temp;
yR=(yR-yL);
xR=(xR-xL);Sorry mate but you need a lot of work....
I like what you've done but (in my humble opinion) it needs a lot of reworking.
Your problem is you're not storing the shapes. You've set up an array but you never assign the shapes to it. I would reccomend using a vector. Heres a quick bit of pseudo code.
Listener class
mouseClicked method
if first click
get mouse x/y
if second click
get mouse x/y
create new MyShape(x1, y1, x2, y2)
call data.addShape(new MyShape)
Data class
constructor
this.myVector = new Vector()
addShape(MyShape shape) method
this.myVector.addElement(shape) -- add new shape
this.myVector.remove(0) -- remove bottom shape
drawAllShapes method
Enumeration enum= this.myVector.elements()
while(enum.hasMoreElements())
MyShape shape = (MyShape)enum.nextElement()
shape.draw()
Feel free to ask any questions.
Rob. -
Access to class attributs by coding in its mother class method definition
Hi all,
How can I retrieve information about a class attributs by coding?
And is it possible to access to the attributs of the Child class from the Mother class?
REPORT ztest_method.
****** CLASS mother DEFINITION
CLASS mother DEFINITION.
PUBLIC SECTION.
METHODS: get_data.
ENDCLASS. "mother DEFINITION
****** CLASS child DEFINITION
CLASS child DEFINITION inheriting from mother.
ENDCLASS. "child DEFINITION
******* CLASS mother IMPLEMENTATION
CLASS mother IMPLEMENTATION.
METHOD get_data.
***Can I access to child class attributs here?
ENDMETHOD. "get_data
ENDCLASS. "mother IMPLEMENTATION
DATA oref TYPE REF TO CHILD.
DATA: method TYPE string.
DATA: cla_name(20).
START-OF-SELECTION.
CREATE OBJECT oref .
CALL METHOD oref->method). "Here I want to access to this class's attribut without redefine itHi,
a very easy way is to define an attribute TYPE REF TO DATA in the super class and write generic access methods which work with it by dereferencing it and assigning a field symbol. This might even save you the effort of creating a class hierarchy, because one class may be able to handle all the data objects whose types are only known at run-time.
In the below example, the only specific thing about the sub class is the constructor in which the data object is created and typed:
REPORT ztesta.
* CLASS lcl_mother DEFINITION
CLASS lcl_mother DEFINITION.
PUBLIC SECTION.
METHODS get_data EXPORTING es_data TYPE any.
METHODS set_data IMPORTING is_data TYPE any.
PROTECTED SECTION.
DATA mr_data TYPE REF TO data.
ENDCLASS. "lcl_mother DEFINITION
* CLASS lcl_child1 DEFINITION
CLASS lcl_child1 DEFINITION INHERITING FROM lcl_mother.
PUBLIC SECTION.
METHODS constructor.
ENDCLASS. "lcl_child1 DEFINITION
DATA:
lr_child TYPE REF TO lcl_mother,
ls_but000_in TYPE but000,
ls_but000_out type but000.
START-OF-SELECTION.
CREATE OBJECT lr_child TYPE lcl_child1.
ls_but000_in-partner = '0000004711'.
lr_child->set_data( ls_but000_in ).
lr_child->get_data( IMPORTING es_data = ls_but000_out ).
write: / ls_but000_out-partner.
* CLASS lcl_mother IMPLEMENTATION
CLASS lcl_mother IMPLEMENTATION.
METHOD get_data.
FIELD-SYMBOLS:
<fs_data> TYPE ANY.
ASSIGN mr_data->* TO <fs_data>.
MOVE-CORRESPONDING <fs_data> TO es_data.
ENDMETHOD. "get_data
METHOD set_data.
FIELD-SYMBOLS:
<fs_data> TYPE ANY.
ASSIGN mr_data->* TO <fs_data>.
MOVE-CORRESPONDING is_data TO <fs_data>.
ENDMETHOD. "set_data
ENDCLASS. "lcl_mother IMPLEMENTATION
* CLASS lcl_child1 IMPLEMENTATION
CLASS lcl_child1 IMPLEMENTATION.
METHOD constructor.
super->constructor( ).
CREATE DATA mr_data TYPE but000.
ENDMETHOD. "constructor
ENDCLASS. "lcl_child1 IMPLEMENTATION
Another variant would be to define an attribute MV_DATA which is typed individually in each sub class and program dynamically against it in the super class using field symbols.
*& Report ZTESTA
REPORT ztesta.
* CLASS lcl_mother DEFINITION
CLASS lcl_mother DEFINITION.
PUBLIC SECTION.
METHODS get_data EXPORTING es_data TYPE any.
METHODS set_data IMPORTING is_data TYPE any.
ENDCLASS. "lcl_mother DEFINITION
* CLASS lcl_child1 DEFINITION
CLASS lcl_child1 DEFINITION INHERITING FROM lcl_mother.
PUBLIC SECTION.
DATA: ms_data TYPE but000.
METHODS constructor.
ENDCLASS. "lcl_child1 DEFINITION
* CLASS lcl_child2 DEFINITION
CLASS lcl_child2 DEFINITION INHERITING FROM lcl_mother.
PUBLIC SECTION.
DATA: ms_data TYPE t000.
METHODS constructor.
ENDCLASS. "lcl_child1 DEFINITION
DATA:
lr_child1 TYPE REF TO lcl_mother,
lr_child2 TYPE REF TO lcl_mother,
ls_but000 TYPE but000,
ls_t000 TYPE t000.
START-OF-SELECTION.
CREATE OBJECT lr_child1 TYPE lcl_child1.
lr_child1->get_data( IMPORTING es_data = ls_but000 ).
WRITE: / ls_but000-partner.
CREATE OBJECT lr_child2 TYPE lcl_child2.
lr_child2->get_data( IMPORTING es_data = ls_t000 ).
WRITE: / ls_t000-mwaer.
* CLASS lcl_mother IMPLEMENTATION
CLASS lcl_mother IMPLEMENTATION.
METHOD get_data.
FIELD-SYMBOLS:
<fs_data> TYPE ANY.
ASSIGN ('MS_DATA') TO <fs_data>.
es_data = <fs_data>.
ENDMETHOD. "get_data
METHOD set_data.
FIELD-SYMBOLS:
<fs_data> TYPE ANY.
ASSIGN ('MS_DATA') TO <fs_data>.
<fs_data> = is_data.
ENDMETHOD. "set_data
ENDCLASS. "lcl_mother IMPLEMENTATION
* CLASS lcl_child1 IMPLEMENTATION
CLASS lcl_child1 IMPLEMENTATION.
METHOD constructor.
super->constructor( ).
SELECT SINGLE * FROM but000 INTO ms_data.
ENDMETHOD. "constructor
ENDCLASS. "lcl_child1 IMPLEMENTATION
* CLASS lcl_child2 IMPLEMENTATION
CLASS lcl_child2 IMPLEMENTATION.
METHOD constructor.
super->constructor( ).
SELECT SINGLE * FROM t000 INTO ms_data.
ENDMETHOD. "constructor
ENDCLASS. "lcl_child2 IMPLEMENTATION
I hope this helps!
Regards,
Thorsten -
Why do we use only dynamic class loading for JDBC drivers
Hi,
My JDBC experience is that we always use dynamic class loader for drivers.
If we have a well defined package from a vendor, why do we use this dynamic class loading feature for drivers??chandunitw wrote:
Hi,
My JDBC experience is that we always use dynamic class loader for drivers.
If we have a well defined package from a vendor, why do we use this dynamic class loading feature for drivers??Oftentimes, the driver class name is set in a configuration file, not in code. So the thing which processes the configuration file has no idea ahead of time which driver or drivers it will support, so it is not coded specifically for any. So it loads the driver by reflection, since it is given the class name as a string it can use with the reflection API. -
CLIENTThe maintenance tables for the logical files; may we use any client
Please see this link http://help.sap.com/saphelp_47x200/helpdata/en/9f/db95e635c111d1829f0000e829fbfe/content.htm
See the import parameter
CLIENT The maintenance tables for the logical files and paths are client-dependent. Therefore, the desired client can be imported. The current client is stored in the system field SY-MANDT.
Does it mean that we may use any client even if our client number is different?I put it back once more
-
Search for the t-code where the specefic output type is used
Hi
I want to know how can we search for the t-code used for a specefic output type in use?
I have a requirement where in i have a output type, i knwo teh prog name and the form name...
i know it is used in SD and billing but i am not able ot exactly pin point as to in which t-code to be used..so that i can check the output throught the T-code.
Experts sugget!!
Thanks
PrashantHi
It is used for a Standard t-code i want to find that T-code. Through NACE the outputtype (which i already have) i can find teh prog name and the form name.
and through SPRO also its the same info...
i want to knwo for SD-> Billing->INvoice i can find the output type...i want to knwo what T-code needs to be run and on givign the data and running the out put type from the menu and choosing my OUTput type...and seeing the output in the print format.
Hope you got my problem.Thanks for the reply.
Prashant -
Does iTunes embed the isrc codes to the tracks we upload when using cdbaby?
I uploaded my album on iTunes using CD BABY. I have the isrc codes that I bought from cd baby, but they are not embeded on the tracks. Does iTunes embed them on the uploaded tracks? Please, let me know!
Lauradbjordan66 wrote:
The best explanation is that itunes is horrendous at getting art work for ripped cd/songs.
It can be, yes.
Use a third party app. If you are redoing your entire libary, I would suggest Muvundercover.
Good to have a recommendation, but unfortunately i'm not currently running Windows.
One issue I have with simply using search engines is that while you can often find decent cover art manually, the links seem to increasingly point to dodgy sites talking about file-sharing etc, and I am very wary of even clicking on the links.
One advantage of music downloads is that you do tend to get decent artwork even if it's not embedded, but until I can get lossless audio I see little point for most stuff when the CD is just as cheap - convenience factor and impulse buys after a few beers tend to scupper this plan though!
If itunes can rip CDs losslessly then I see little reason why the content vendors are so obstinate about allowing CD (or better) quality uncompressed legitimately purchased downloads.
AC -
Hello I bought a macbook pro on August this year and got a bonus to upgrade the OS from Lion to Mountain Lion for free. I started the donwload but it was interrupted due to internet failure so the upgrade process was aborted. When I tried to initiated the process again, I got a message that says I can not used the same serial number to download Maountain Lion. What can do in order to upgrade the OS using the "bonus" I received with the purchase?
I have the same problem, only Purchases in the App Store shows nothing. The download NEVER showed up in the App Store only in the Launchpad with a progress icon. The Icon said paused but when clicked, it just disappeared with no download.
How am I supposed to get my free upgrade now?
Maybe you are looking for
-
i am having issues with my photo stream not updating. when i first set it up it was working fine and now is not working. the pictures on my ipad are going in to the photo stram album but they are not updating on my computer. i have the ipad 3rd gener
-
Wav Files renamed... now they are UNIX EXECUTABLE FILES
Hello everybody! I ran a script in terminal to batch rename something like 2K+ .wav files following an .csv list. The list contained 2 columns, A: the original name and B: the new desired name. for the ones interested the script is here: http://discu
-
Problem in Configuring the Object Editor User Interface
Hi, I m using NetWeaver 7.0.11 & facing the problem in Configuring the Object Editor User Interface.In the Configuration Browser ,when i click on Object Editor & choose New Configuration & try to select service,it shows the flollowing error: com
-
I cannot find an option in iphone4s to lock on GSM (2g) network. Similar option is available in iPhone 4.
-
Forms6i Builder Web Preview does nothing
On W2k and Forms6i builder when I try to run form as web preview nothing happens. Run as Cilent/Server works OK. Forms server works OK. If I manually enter in browser http://myserver/dev60cgi/ifcgi60.exe?form=module1.fmx works OK What is wrong? How h