Create account / Log in

WidgedMap doent qualify as Map

Suggestions for additional features for the module editor and Vassal engine.

Moderators: uckelman, Tim M

WidgedMap doent qualify as Map

Postby Dab » March 17th, 2008, 12:55 pm

I would like to have the option to have to have different maps tabbed and integrated as the mainmap. To get rid of lots of additional windows needed to play the module. This will add to a more polished look&feel.

Currently this leads to a flood of Exceptions. Seemingly the Tabbed pane get set up wrong to qualify further as a proper handle for drawing funtionality. Also i see the namespace and thus classname differences.

to be continued
Dab
 
Posts: 37
Joined: January 14th, 2008, 7:28 pm
Location: Berlin, Germany

WidgedMap doent qualify as Map

Postby uckelman » March 17th, 2008, 1:11 pm

Thus spake "Dab":
I would like to have the option to have to have different maps tabbed and int
egrated as the mainmap. To get rid of lots of additional windows needed to pl
ay the module. This will add to a more polished look&feel.

Currently this leads to a flood of Exceptions. Seemingly the Tabbed pane get
set up wrong to qualify further as a proper handle for drawing funtionality.
Also i see the namespace and thus classname differences.

to be continued

How are doing this, with some custom code?

Tabbed components is something we intend to support in either 3.2 or 3.3
(this depends on how quickly we can dispose of the other items on our
list for 3.2). Right now, we're thinking June for 3.2.

--
J.

_______________________________________________
Messages mailing list
Messages@forums.vassalengine.org
http://forums.vassalengine.org/mailman/ ... engine.org

Post generated using Mail2Forum (http://www.mail2forum.com)
User avatar
uckelman
Site Admin
 
Posts: 8849
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Postby Dab » March 17th, 2008, 1:21 pm

by editing the build file. this cannot be produced using the editor i think.

I'd be happy to help on that once i reactivated my java skills and im familiar to the code.
Dab
 
Posts: 37
Joined: January 14th, 2008, 7:28 pm
Location: Berlin, Germany

WidgedMap doent qualify as Map

Postby uckelman » March 17th, 2008, 1:43 pm

Thus spake "Dab":
by editing the build file. this cannot be produced using the editor i think.

That's why it doesn't work. If you can't make one element a child of another
via the Editor, then it's very probable that doing so by hand will cause
your module to fail catastrophically.

I'd be happy to help on that once i reactivated my java skills and im familia
r to the code.

We'd be happy to have you. There are lots of small jobs which we could
use help on, as well, as you get up to speed. Don't hesitate to ask for
advice w/r/t the code---there's a lot of it (120k lines) and there is
no one person who has it all in his head anymore, but someone among the
three old-timers (Rodney, Brent, and myself) will know why things are
the way they are.

--
J.

_______________________________________________
Messages mailing list
Messages@forums.vassalengine.org
http://forums.vassalengine.org/mailman/ ... engine.org

Post generated using Mail2Forum (http://www.mail2forum.com)
User avatar
uckelman
Site Admin
 
Posts: 8849
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: WidgedMap doent qualify as Map

Postby Dab » March 17th, 2008, 2:13 pm

uckelman wrote:Thus spake "Dab":
by editing the build file. this cannot be produced using the editor i think.

That's why it doesn't work. If you can't make one element a child of another
via the Editor, then it's very probable that doing so by hand will cause
your module to fail catastrophically.

I'd be happy to help on that once i reactivated my java skills and im familia
r to the code.

We'd be happy to have you. There are lots of small jobs which we could
use help on, as well, as you get up to speed. Don't hesitate to ask for
advice w/r/t the code---there's a lot of it (120k lines) and there is
no one person who has it all in his head anymore, but someone among the
three old-timers (Rodney, Brent, and myself) will know why things are
the way they are.

--
J.

_______________________________________________
Messages mailing list
Messages@forums.vassalengine.org
http://forums.vassalengine.org/mailman/ ... engine.org

Post generated using Mail2Forum (http://www.mail2forum.com)


Well i did not just edit the buildfile at will. I created all the controls (Tabed pan, etc etc) to have a mesh where i pasted the MapWindow code i already had at the spot there control reach the "old" namespaces. This is st VASSAL.[..].BoardPicker iirc. This is "not ok" but saves lot of work if you redesign a module during creation at a point where you have lots of work already done (Like when i relized i cannot c&p maps into tabbed panes via the Editor - I know now that can just exchange the Boards and MapTraits as they share the same set of classes, this works in the editor as well concludingly, but it took me the detour via the manual editing to get behind that :) ) To the manual editing is not the reason here.


I have to find a way for developing java i am comfortable with first.. then i will get into the code and eventially come to the point where i can contribute. Hopefully!

For now just explain what the makefiles form your branch do around in the trunk ;) just kidding..
Dab
 
Posts: 37
Joined: January 14th, 2008, 7:28 pm
Location: Berlin, Germany

WidgedMap doent qualify as Map

Postby uckelman » March 17th, 2008, 2:47 pm

Thus spake "Dab":
Well i did not just edit the buildfile at will. I created all the controls (T
abed pan, etc etc) to have a mesh where i pasted the MapWindow code i already
had at the spot there control reach the "old" namespaces. This is st VASSAL.
[..].BoardPicker iirc. This is "not ok" but saves lot of work if you redesig
n a module during creation at a point where you have lots of work already don
e (Like when i relized i cannot c&p maps into tabbed panes via the Editor - I
know now that can just exchange the Boards and MapTraits as they share the s
ame set of classes, this works in the editor as well concludingly, but it too
k me the detour via the manual editing to get behind that :) ) To the manual
editing is not the reason here.

No, I'm not saying it's because of the hand-editing---I do hand-editing
myself fairly often. It's because the WidgetMap isn't designed to to
be used that way. All I was saying is that it possible to create something
which is syntactically correct XML but will throw exceptions when you
run it if you're hand-editing.

I have to find a way for developing java i am comfortable with first.. then i
will get into the code and eventially come to the point where i can contribu
te. Hopefully!

Brent and Rodney use Eclipse for development. I work in Vim and build
with a Makefile. I'm not sure what Michael is using.

For now just explain what the makefiles form your branch do around in the tru
nk ;) just kidding..

There's a lot of shell scripting going on in my Makefile; most of the
targets have to do with building releases, not with building the
Java classes. If you do a 'make all', it's just this part which runs:

all: $(CLASSDIR) $(CLASSES) i18n images

$(CLASSDIR):
mkdir -p $(CLASSDIR)

%.class: %.java
$(JC) $(JCFLAGS) $<

images: $(CLASSDIR)/images

$(CLASSDIR)/images: $(CLASSDIR)
svn export $(SRCDIR)/images $(CLASSDIR)/images

i18n: $(CLASSDIR)
for i in `cd $(SRCDIR) && find VASSAL -name '*.properties'`; do cp $(SRCDIR)/$$i $(CLASSDIR)/$$i; done


The $(CLASSDIR) target makes the directory where the compiled classes
will go. The images and i18n targets make sure that various images
and properties files get into the correct locations in $(CLASSDIR).
The '%.class: %.java' target is the one which compiles the code.

That's it!

--
J.

_______________________________________________
Messages mailing list
Messages@forums.vassalengine.org
http://forums.vassalengine.org/mailman/ ... engine.org

Post generated using Mail2Forum (http://www.mail2forum.com)
User avatar
uckelman
Site Admin
 
Posts: 8849
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

WidgedMap doent qualify as Map

Postby mkiefte » March 17th, 2008, 4:03 pm

Brent and Rodney use Eclipse for development. I work in Vim and build
with a Makefile. I'm not sure what Michael is using.

Eclipse, vim, emacs, whatever gets the job done fastest. Eclipse has some very nice refactoring utilities. Vim is great for processing text files in arbitrary ways. Emacs is more lightweight than Eclipse but has a nice interface.

For newbies, Eclipse is the way to go. But the SVN interface is terrible--I never did figure that out.


There's a lot of shell scripting going on in my Makefile; most of the
targets have to do with building releases, not with building the
Java classes. If you do a 'make all', it's just this part which runs:

Joel, what shell are you using? I always have to add SHELL:=bash in the Makefile because you use brace expansion which is not compatible with the default shell (/bin/sh). Perhaps that could just be added to the Makefile?

- M.

Post generated using Mail2Forum (http://www.mail2forum.com)
User avatar
mkiefte
 
Posts: 1144
Joined: January 5th, 2008, 1:29 am
Location: Halifax, Nova Scotia, Canada

WidgedMap doent qualify as Map

Postby timpelican » March 17th, 2008, 4:14 pm

On Mon, March 17, 2008 4:03 pm, Michael Kiefte wrote:

Joel, what shell are you using? I always have to add SHELL:=bash in the
Makefile because you use brace expansion which is not compatible with the
default shell (/bin/sh). Perhaps that could just be added to the
Makefile?

Another case of:

tfranklin@jump0:~$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 2004-08-26 00:28 /bin/sh -> bash

Tends to be a Linux default, except when it isn't ;)

Cheers,
Tim.



_______________________________________________
Messages mailing list
Messages@forums.vassalengine.org
http://forums.vassalengine.org/mailman/ ... engine.org

Post generated using Mail2Forum (http://www.mail2forum.com)
timpelican
 
Posts: 171
Joined: January 2nd, 2008, 3:50 pm

WidgedMap doent qualify as Map

Postby mkiefte » March 17th, 2008, 4:17 pm

Definitely not a Linux default. It's not even a really good idea. The footprint for sh is tiny compared with bash.

- M.

On 17/03/2008, Tim Franklin <tim@pelican.org (tim@pelican.org)> wrote:
On Mon, March 17, 2008 4:03 pm, Michael Kiefte wrote:

Joel, what shell are you using? I always have to add SHELL:=bash in the
Makefile because you use brace expansion which is not compatible with the
default shell (/bin/sh). Perhaps that could just be added to the
Makefile?


Another case of:

tfranklin@jump0:~$ ls -l /bin/sh
lrwxrwxrwx 1 root root 4 2004-08-26 00:28 /bin/sh -> bash

Tends to be a Linux default, except when it isn't ;)

Cheers,

Tim.






Post generated using Mail2Forum (http://www.mail2forum.com)
User avatar
mkiefte
 
Posts: 1144
Joined: January 5th, 2008, 1:29 am
Location: Halifax, Nova Scotia, Canada

WidgedMap doent qualify as Map

Postby timpelican » March 17th, 2008, 4:29 pm

On Mon, March 17, 2008 4:17 pm, Michael Kiefte wrote:
Definitely not a Linux default.

It's definitely a Debian default. I'm fairly sure I've seen it on plenty
of other distributions - the "why do my Linux /bin/sh scripts (full of
bash-isms) not work on other Unices?" question shows up on forums and
mailing lists with alarming regularity.

It's not even a really good idea. The footprint for sh is tiny compared
with bash.

I can see the argument for not making sh be bash, for backwards
compatibility with places where it isn't. The thought of doing anything
extensive (interactive or scripted) in these enlightened days, with raw sh
gives me the heebie-jeebies, resources usage be damned.

Cheers,
Tim.



_______________________________________________
Messages mailing list
Messages@forums.vassalengine.org
http://forums.vassalengine.org/mailman/ ... engine.org

Post generated using Mail2Forum (http://www.mail2forum.com)
timpelican
 
Posts: 171
Joined: January 2nd, 2008, 3:50 pm

WidgedMap doent qualify as Map

Postby uckelman » March 17th, 2008, 6:32 pm

Thus spake "Michael Kiefte":
Joel, what shell are you using? I always have to add SHELL:=bash in the
Makefile because you use brace expansion which is not compatible with the
default shell (/bin/sh). Perhaps that could just be added to the Makefile?


I use bash. It didn't occur to me that I should set the shell explicitly.
I'll add that this evening. (This means that make's default shell is
not the same on my system as on yours.)

--
J.

_______________________________________________
Messages mailing list
Messages@forums.vassalengine.org
http://forums.vassalengine.org/mailman/ ... engine.org

Post generated using Mail2Forum (http://www.mail2forum.com)
User avatar
uckelman
Site Admin
 
Posts: 8849
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

WidgedMap doent qualify as Map

Postby uckelman » March 17th, 2008, 8:36 pm

Thus spake "Michael Kiefte":
Joel, what shell are you using? I always have to add SHELL:=bash in the
Makefile because you use brace expansion which is not compatible with the
default shell (/bin/sh). Perhaps that could just be added to the Makefile?

- M.

Done.

--
J.

_______________________________________________
Messages mailing list
Messages@forums.vassalengine.org
http://forums.vassalengine.org/mailman/ ... engine.org

Post generated using Mail2Forum (http://www.mail2forum.com)
User avatar
uckelman
Site Admin
 
Posts: 8849
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

WidgedMap doent qualify as Map

Postby Brent Easton » March 17th, 2008, 11:11 pm

Hi,

I would like to have the option to have to have different maps tabbed and
integrated as the mainmap. To get rid of lots of additional windows needed
to play the module. This will add to a more polished look&feel.

Currently this leads to a flood of Exceptions. Seemingly the Tabbed pane
get set up wrong to qualify further as a proper handle for drawing
funtionality. Also i see the namespace and thus classname differences.

I am not sure why you are hand-editing the buildfile instead of just creating the Tabbed Maps using the editor?

Is it because you want to move existing maps into a tabbed pane and the cut & paste doesn't work? If so, then I suggest you create the new structure you want with temporary maps so that the buildfile gets created correctly. Then hand edit and carefully replace the data for the new VASSAL.build.widget.WidgetMap's with the old VASSAL.build.module.Map's. (Only WidgetMap's may exist within a MapWidget).

In general, hand-editing of the buildfile is frought with dangers and you MUST know what you are doing. It is not a 'supported' method of editing a module, though some information on how to do it successfully is around. A flood of Exceptions indicates that you have made a mistake.

Regards,
Brent.


_______________________________________________
Messages mailing list
Messages@forums.vassalengine.org
http://forums.vassalengine.org/mailman/ ... engine.org

Post generated using Mail2Forum (http://www.mail2forum.com)
User avatar
Brent Easton
 
Posts: 3176
Joined: December 21st, 2007, 3:06 am
Location: Berry, NSW, Australia

WidgedMap doent qualify as Map

Postby uckelman » March 17th, 2008, 11:18 pm

Thus spake "Brent Easton":
I am not sure why you are hand-editing the buildfile instead of just creating
the Tabbed Maps using the editor?

I think he wants tabbed maps in the main window, which IIRC isn't supported
yet.

--
J.

_______________________________________________
Messages mailing list
Messages@forums.vassalengine.org
http://forums.vassalengine.org/mailman/ ... engine.org

Post generated using Mail2Forum (http://www.mail2forum.com)
User avatar
uckelman
Site Admin
 
Posts: 8849
Joined: December 10th, 2007, 9:48 am
Location: Durham, England

Re: WidgedMap doent qualify as Map

Postby Dab » March 18th, 2008, 2:43 pm

uckelman wrote:Thus spake "Brent Easton":
I am not sure why you are hand-editing the buildfile instead of just creating
the Tabbed Maps using the editor?

I think he wants tabbed maps in the main window, which IIRC isn't supported
yet.

--
J.

_______________________________________________
Messages mailing list
Messages@forums.vassalengine.org
http://forums.vassalengine.org/mailman/ ... engine.org

Post generated using Mail2Forum (http://www.mail2forum.com)


Correct!

To put the hand-editing issue to an end: its nothing else than with the editor, as long as you produce valid XML. The editor is doing nothing more...prop. utililizing a SAX engine. Anyways, what i did can be produced with the editor as well. Just make up a fresh module, put a chart with a tabbed pane and some maps (WidgetMap) in. Then delete the Map that is predefined (MapWindow). This saves without an error (valid XML). But produces lots of exceptions on a low AWT.draw.something-leve...with leads to the conclusion that this is simply not implemented atm. The module will load, create a chat view and a grey area, but is unable to create anything beyond that point.

I see its missing functionality, its ok, Joes mentiont this to be functional for an upcomming release.


JAVA IDEs
--------------
Well i think eclipse is a pharse...i do not like it at all. I am used to writing C/C++ code a lot using an editor and compiling via shell. Glad to hear thats working out for java as well. NETBEANs doesnt do the job for me either. I'd like to have a system i can use on linux (At home) and win(at work)... any vim4win or something similar available?
Dab
 
Posts: 37
Joined: January 14th, 2008, 7:28 pm
Location: Berlin, Germany

Next

Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 2 guests

cron