Need more help

Discussion of your thoughts & requests, help for users and game specific configuration files for Character Tool

Moderators: dorpond, Azhrei

Post Reply
User avatar
Ryuu Kage Desu
Cave Troll
Posts: 44
Joined: Tue Aug 03, 2010 4:11 pm
Location: San Antonio

Need more help

Post by Ryuu Kage Desu »

Ok, I finally got Abeille to open up and work. I've been looking at the topics here and elsewhere. Its all "french!" I get how to place the components. I just need to know how to place a "list" to choose from and link is options to an "info window" for the option and a "stat window" to calculate the values of all the options of the lists (six planed.)
Overcome your mental barriers and open your mind.
Do this and the answers that elude you will be placed at your feet.
Then again, answers are meaningless without the questions.

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Re: Need more help

Post by jay »

The dnd 4e game settings file contains examples of what you want to do. Were you able to get the CT swing components in Abeille. Instructions are here. The component you are interested in is the net.rptools.chartool.ui.charsheet.component.CharSheetTable component. I talk about using this component here. There are ways to attach your tables of data directly to the tables of, but I am at work right now and I can't remember how off of the top of my head. I'll take a look when I get home and write that up in the adopters thread.

Sorry it took me so long to get back to you :(

User avatar
jay
RPTools Team
Posts: 1767
Joined: Tue Feb 07, 2006 1:07 am
Location: Austin, Tx

Re: Need more help

Post by jay »

I took a look at the code and here is how I display a table in a dialog off of a button:

Code: Select all

JavaScript::
var Java = new JavaImporter(net.rptools.chartool.ui.charsheet.component, java.util,
                            net.rptools.chartool.model.property);  
with (Java) {
  var props = new Array("name", "type", "source", "level", "action", "prerequisite", "target", "attack", "defense", "hit");
  var hints = new HashMap();
  hints.put(Utils.HIDE_RECORDS_HINT, Utils.findKeys(rpController.getData().get("powers.powers")));
  hints.put(CharSheetUtils.CONTEXT_HINT, rpController.getData());
  hints.put(CharSheetUtils.PREFERENCES_HINT, 'dnd4e_modifyPowers');
  var dialog = CharSheetUtils.addToListFromGameSettingsTable(rpEvent.getSource(), "Add Powers", 
                         "Select Powers to add to this combatant.", "power", props, 
                         rpController.getData(), "powers.powers", hints);
}
In the 4e character form this is attached to the Add button over the powers table. It is the value of the actionScript property in Abeille. This will display a list of powers in the database to the user. The first argument is a component for parenting the dialog. The second is the title and the third is the instruction text. The fourth is the name of the database table. The props variable contains the list of properties to display as columns and is the fifth argument. The sixth is a reference to the combatant being edited and the seventh is the name of the property getting that will get the selected powers. The last one is hints that are used to set the context for running scripts and the name of the preferences for the created dialog so it shows up at the same place and size every time.

I don't have a way to display a table on just a panel. I've always accessed tables from a dialog that was attached to a button. I'll need to add support for that. How would that need to work to suit your purposes?

User avatar
Ryuu Kage Desu
Cave Troll
Posts: 44
Joined: Tue Aug 03, 2010 4:11 pm
Location: San Antonio

Re: Need more help

Post by Ryuu Kage Desu »

It's ok that you took so long, I'm barely able to get back my self. I'll use what you've given me and see how it works, and get back when I can.
I would say that displaying a "drop down" table to select the options is what I envision, though making it work is the most important issue. As long as I can get each option to spit out a little info in to an info field (per option) and automatically calculate in to the lower fields (totals; AC, buying and selling prices, and so on)
Overcome your mental barriers and open your mind.
Do this and the answers that elude you will be placed at your feet.
Then again, answers are meaningless without the questions.

Post Reply

Return to “CharacterTool”