Page 13 of 22 FirstFirst ... 391011121314151617 ... LastLast
Results 121 to 130 of 217

Thread: TreeThing

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Guild Expert Ramah's Avatar
    Join Date
    Mar 2009
    Location
    Nottinghamshire
    Posts
    1,414
    Blog Entries
    4

    Default

    It already uses a filefilter to only show png's. This is just the save option where it is attempting to keep the filename entered reasonably clean. Anyway, it seems ok at the moment. Hopefully it works on the mac too.
    Royal: I'm very sorry for your loss, your mother was a terribly attractive woman.


    My Cartographer's Guild maps: Finished Maps


    More maps viewable at my DeviantArt page: Ramah-Palmer DeviantArt

  2. #2

    Default

    Separate post for a few other things.

    The "thinking" icon is a MAJOR enhancement. Seriously.
    You'll want to know that on a mac the "Auto re-generate" is always active even when it is turned OFF in the menu. Consequently, anytime you click a button (removal, layers, etc) you get the "thinking" icon. Before the icon, I wasn't sure what was going wrong, but the icon helped to make it clear.

    Also, if you turn on the layers via the Menu and NOT the buttons, then the "thinking" icon does not appear (This is the same behavior as it always was).

  3. #3
    Guild Expert Ramah's Avatar
    Join Date
    Mar 2009
    Location
    Nottinghamshire
    Posts
    1,414
    Blog Entries
    4

    Default

    I would guess that the Mac isn't unselecting the layer buttons but the effect is just graphical when a dialog is open. Do the buttons resort back to being selected when the dialog closes? There is no code in the save routine to unselect them so it just cannot be happening. So, if it's graphical it's just an annoying mac thing.
    As to still having a greyed out save button... :S Stupid question maybe but you ARE giving them a filename? The save button obviously doesn't work until it has a filename to save the file to.
    As for the directory creation... that may be because I am using the modified showOpenDialog instead of the showSaveDialog (to get around the supposed mac Java problem). I'll post up a new version later using a save dialog instead. It works fine on the PC as it is but zzz @ macs.

    Glad the thinking icon is working ok for you. Odd that it doesn't work with the menu though. It's written to automatically change cursor upon UI actions that take longer than 300ms.

    It isn't actually auto-regenerating upon layer change (well... not as much as I class as regenerating, it isn't resizing the arrays or reapplying jitters etc.) but it is redrawing the forest image. I tried having each layer on a separate image so that switching layers on and off was just a matter of refreshing the screen but the memory usage when a large forest was generated was becoming a problem. I prefer it this way. It means recreating the forest image upon each layer change (and layer save) but as that shouldn't really happen that often it isn't that big a deal.
    Royal: I'm very sorry for your loss, your mother was a terribly attractive woman.


    My Cartographer's Guild maps: Finished Maps


    More maps viewable at my DeviantArt page: Ramah-Palmer DeviantArt

  4. #4
    Community Leader jfrazierjr's Avatar
    Join Date
    Oct 2007
    Location
    Apex, NC USA
    Posts
    3,057

    Default

    Search for Mac new folder dialog missing.... I have found that it is a bug in Java(meaning OSx since they made the user interface API's for java) and there is a system property you can set to get the "create new directory" to show up on the Save Dialog window.

    On that note, Ramah, you might want to look into using SystemLookAndFeel of the UIManager class(I think I got those right) to make it use the OS's native "skin" instead of the standard Java one for the open/save dialogs. Worst case scenario it just falls back to the Metal LAF anyway if the chosen LAF is not available.
    My Finished Maps
    Works in Progress(or abandoned tests)
    My Tutorials:
    Explanation of Layer Masks in GIMP
    How to create ISO Mountains in GIMP/PS using the Smudge tool
    ----------------------------------------------------------
    Unless otherwise stated by me in the post, all work is licensed under a Creative Commons Attribution-Noncommercial 3.0 United States License.

  5. #5
    Guild Expert Ramah's Avatar
    Join Date
    Mar 2009
    Location
    Nottinghamshire
    Posts
    1,414
    Blog Entries
    4

    Default

    Heh. Ain't no way I'm using system lookandfeel. It took me an annoyingly long time to get Nimbus working and I ain't replacing it with something that looks terrible. I'd sooner have it broken on macs. Lol!

    Thanks for the tip on the missing create folder thing. I'll take a look into that.

    I was going to upload a new version yesterday which is hopefully fixed for Paul but as I was checking the exe I noticed it was behaving differently to the one in the developing environment. For some reason when I try to load up a large template or background image (4k x 4k ish) it just has the busy cursor for about 3 seconds or so and then just goes back to normal as if I never even sent the request. Although it loads smaller images fine.
    It's quite odd. It loads them up fine in NetBeans. :S So... gonna try and see if I can get to the root of that problem before I update.
    Royal: I'm very sorry for your loss, your mother was a terribly attractive woman.


    My Cartographer's Guild maps: Finished Maps


    More maps viewable at my DeviantArt page: Ramah-Palmer DeviantArt

  6. #6
    Community Leader jfrazierjr's Avatar
    Join Date
    Oct 2007
    Location
    Apex, NC USA
    Posts
    3,057

    Default

    Quote Originally Posted by Ramah View Post
    Heh. Ain't no way I'm using system lookandfeel. It took me an annoyingly long time to get Nimbus working and I ain't replacing it with something that looks terrible. I'd sooner have it broken on macs. Lol!
    ummm .... nevermind.. not quite sure where my brain was....for some really odd reason, I thought you were using the "default".... but just for the record.... when I say SystemlookandFeel, I don't mean the really ugly "metal" one, but the "systemlookandfeel" which will check the actual OS in use and pick the correct LAF for that OS meaning that it appears "fairly close" to the actual OS's buttons, dropdowns, etc. In any event, the Nimbus LAF looks pretty darn good, so... well.. nevermind!!!


    Quote Originally Posted by Ramah View Post
    Thanks for the tip on the missing create folder thing. I'll take a look into that.

    I was going to upload a new version yesterday which is hopefully fixed for Paul but as I was checking the exe I noticed it was behaving differently to the one in the developing environment. For some reason when I try to load up a large template or background image (4k x 4k ish) it just has the busy cursor for about 3 seconds or so and then just goes back to normal as if I never even sent the request. Although it loads smaller images fine.
    It's quite odd. It loads them up fine in NetBeans. :S So... gonna try and see if I can get to the root of that problem before I update.
    My Finished Maps
    Works in Progress(or abandoned tests)
    My Tutorials:
    Explanation of Layer Masks in GIMP
    How to create ISO Mountains in GIMP/PS using the Smudge tool
    ----------------------------------------------------------
    Unless otherwise stated by me in the post, all work is licensed under a Creative Commons Attribution-Noncommercial 3.0 United States License.

  7. #7
    Guild Expert Ramah's Avatar
    Join Date
    Mar 2009
    Location
    Nottinghamshire
    Posts
    1,414
    Blog Entries
    4

    Default

    Ok, so after spending some time on the probelm mentioned above (not the saving on macs problem) I've deduced that the fault seems to lie in the memory allocated to the program. This is annoying as I've altered the VM settings in NetBeans to allow up to 1gb of heap memory in the jar file but this doesn't seem to be the case, only in the IDE (to which I had also edited the startup file to do the same).
    So any large template or background image loaded is blowing the allocated heap size and the program continues on its merry way without loading stuff. I have no idea how long it has been like this really. Has anyone who has used this to create forests in the past had a problem with larger templates?

    Anyway, I've found a pseudo work around for now. By using a wrapper on the jar file I can create an exe and redefine the memory allocation of the program. The program I have used to wrap it is called Launch4j which is a free app that apparently can also create mac, linux and solaris executables. I'm new to this though and not sure if I can create a mac executable on the PC though just by giving it a different extension or whether it needs to be done on a mac.
    So for now I think I'll just get it into a presentable state and then upload the jar file as usual so Paul can test the saving on the mac and if anyone has any comments on this memory problem I'm all ears.
    Royal: I'm very sorry for your loss, your mother was a terribly attractive woman.


    My Cartographer's Guild maps: Finished Maps


    More maps viewable at my DeviantArt page: Ramah-Palmer DeviantArt

  8. #8
    Guild Expert Ramah's Avatar
    Join Date
    Mar 2009
    Location
    Nottinghamshire
    Posts
    1,414
    Blog Entries
    4

    Default

    Here's an updated version for test purposes. Mainly to see if the Save Layers option is now working correctly on macs.

    As I said in my previous post, this is suffering from a low memory allocation for some reason. I'm not sure what the upper limit is on size right now but if I attempt to load a 4k x 4k template in it refuses to play ball. If you want to get bigger forests the only option right now is to wrap it in an exe maker and allot more memory to the program that way. I'll do this myself in later version if I cannot sort out why the heap is being a git.

    On this version I've now put most of the workhorse routines into swingWorkers, which means you need a reasonably up to date version of JVM to run it (version 6 I believe). I would think that most would be ok there though. The swingworkers have allowed me to finally put in a status bar that can relay update messages. I'm still early on in the process though so for now, whenever a process is in operation I've disabled all the controls to stop it being interrupted and throwing up errors. I aim to peel away this disabling in future updates so that button presses will reset the workers or whatever.

    So if Paul or anyone with a mac could test this please and let me know if the Save Layers option works now I'd appreciate it. Cheers.
    Attached Files Attached Files
    Royal: I'm very sorry for your loss, your mother was a terribly attractive woman.


    My Cartographer's Guild maps: Finished Maps


    More maps viewable at my DeviantArt page: Ramah-Palmer DeviantArt

  9. #9

    Default

    963 won't even run. Apple's "Software Updatae" control panel provides it's own version of Java, currently at:

    java version "1.5.0_30"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_30-b03-389-9M3425)
    Java HotSpot(TM) Client VM (build 1.5.0_30-161, mixed mode, sharing)

    and won't update beyond that.
    :-/

  10. #10
    Guild Expert Ramah's Avatar
    Join Date
    Mar 2009
    Location
    Nottinghamshire
    Posts
    1,414
    Blog Entries
    4

    Default

    Quote Originally Posted by paulbhartzog View Post
    963 won't even run. Apple's "Software Updatae" control panel provides it's own version of Java, currently at:

    java version "1.5.0_30"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_30-b03-389-9M3425)
    Java HotSpot(TM) Client VM (build 1.5.0_30-161, mixed mode, sharing)

    and won't update beyond that.
    :-/
    Hmm... well that's odd. Although I did add a line to the code based on something JoeJr posted about a mac command...

    System.setProperty("apple.awt.fileDialogForDirecto ries", "true"); //Hopefully solves missing "Create new directory" button on macs.


    I can't see why it would cause a problem but meh. I'll remove that line, shore up any massive problems with the current code and post up a new test version. Thanks for trying Paul.

    EDIT: Unless of course the reason for the problem is the swingworker code that I mentioned in the previous post. I'm pretty sure I read that it requires version 6 of Java although that has been out for over two years so I wouldn't have though it would be a problem. You said you were a Java programmer? Are you able to work with swingworkers?

    EDIT 2: I just did a brief search and I see that some people say that mac Java 1.5 reached the end of its life two years ago (although it still seems to be updated)? So maybe no swingworker support there?
    Is 1.6 only for Intel based 64-bit macs? Zzz... so confusing.
    Last edited by Ramah; 12-07-2011 at 09:09 AM.
    Royal: I'm very sorry for your loss, your mother was a terribly attractive woman.


    My Cartographer's Guild maps: Finished Maps


    More maps viewable at my DeviantArt page: Ramah-Palmer DeviantArt

Page 13 of 22 FirstFirst ... 391011121314151617 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •