Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (524)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (592)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / JavaFX / Re: JavaFX events not firing on: 2010-06-25 14:19:49
OK, I've solved my problem. I believe the issue with the breakpoint not being hit is a netbeans issue.
2  Java Game APIs & Engines / JavaFX / Re: JavaFX events not firing on: 2010-06-25 13:49:10
OK, so I've narrowed the issue down to my action event handler. It's the strangest thing... If I place a breakpoint in the function, it is only hit if I remove other lines later in the function. Check out the code:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
content = Button {
            text: "Select"
            action: function() {
                // Breakpoint on the next line. It is only hit if I comment out the contents of the if block. Otherwise it's like
                // the method is never even called.
                if (this.listener != null) {
                    var ch: CharacterEntry = listView.selectedItem as CharacterEntry;
                    if (ch != null) {
                        listener.characterSelected(ch.id);
                    }
                }
            }
        }


I'm worried that this is a compiler error. That would be disappointing because I've been excited about JavaFX ever since I heard about it a couple years ago. I've tried porting a project to it at 1.0, 1.2 and now 1.3 and each time encountered some sort of issue like this that let me know that it's just not ready yet.
3  Java Game APIs & Engines / JavaFX / JavaFX events not firing on: 2010-06-24 19:40:17
I have a JavaFX scene containing a Label, ListView and a Button. My action event is not firing when the button is clicked. Does anyone know why this might be happening? The application so far has two scenes. The first scene is changing to this scene by setting the Stage's scene member to an instance of this scene.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
public class CharacterSelectScene extends Scene, CharacterSelectUi {
    var listener: CharacterSelectUiListener;
    var characters: Sequence;
    var listView: ListView;

    override public function setCharacterSelectUiListener(arg0: CharacterSelectUiListener): Void {
        this.listener = listener;
    }

    override public function setCharacters(arg0: Map): Void {
        characters = for (k in arg0.keySet()) {
            CharacterEntry {
                id: k as CharacterId
                name: arg0.get(k) as String
            }
        }
    }

    override public function getCharacterSelectUiListener(): CharacterSelectUiListener {
        return listener;
    }

    override public function setCharacterSelectEnabled(arg0: Boolean): Void {
       
    }

    init {
        listView = ListView {
                    translateX: 0
                    translateY: 0
                    layoutInfo: LayoutInfo { height: 150 }
                    items: bind characters;
                    cellFactory: function() {
                        def cell: ListCell = ListCell {
                                    node: HBox {
                                        content: [
                                            Label { text: bind
                                                if (cell.empty)
                                                then ""
                                                else ((cell.item as CharacterEntry).name) }
                                        ]
                                    }
                                }
                    }
                };
        content = VBox {
                    content: [
                        Text { content: "Characters" },
                        listView,
                        Button {
                            text: "Select"
                            action: function() {
                                if (listener != null) {
                                    var ch : CharacterEntry = listView.selectedItem as CharacterEntry;
                                    if (ch != null) {
                                        listener.characterSelected(ch.id);
                                    }
                                }
                            }
                        }
                    ]
                }
    }

}
4  Game Development / Newbie & Debugging Questions / Streaming content and local caching with webstart? on: 2008-11-21 17:04:07
Hi everyone!

I'm new to Java development and am working on my first Java game. I've been getting along with Java pretty well so far, but there's one thing I'm struggling with.

My game will have lots of content. Megabytes of it. It's going to be infeasible to send all of it down the tubes before the game begins. What I want to do is demand-load and cache content locally. How can I do this within a webstart application in a platform independent, webstart-y way? Is it OK to read and write directly to the filesystem from within a webstart application? If so, how do I know where it's safe to do so? Can I get write access into the users' home directories or is there some sort of sandboxed folder on the filesystem that's "all mine?" I've read about muffins and I don't think these are the right solution.

Thanks!
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

toopeicgaming1999 (58 views)
2014-11-26 15:22:04

toopeicgaming1999 (52 views)
2014-11-26 15:20:36

toopeicgaming1999 (10 views)
2014-11-26 15:20:08

SHC (24 views)
2014-11-25 12:00:59

SHC (24 views)
2014-11-25 11:53:45

Norakomi (27 views)
2014-11-25 11:26:43

Gibbo3771 (24 views)
2014-11-24 19:59:16

trollwarrior1 (37 views)
2014-11-22 12:13:56

xFryIx (76 views)
2014-11-13 12:34:49

digdugdiggy (52 views)
2014-11-12 21:11:50
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!