RPTools.net

Discussion and Support

Skip to content

It is currently Sat Nov 18, 2017 8:40 am 






Reply to topic  [ 4 posts ] 

Previous topic | Next topic 

  Print view

Author Message
User avatar  Offline
Cave Troll
 
Joined: Tue Aug 03, 2010 3:11 pm
Posts: 44
Location: San Antonio
 Post subject: Need more help
PostPosted: Wed Sep 01, 2010 12:29 pm 
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.


Top
 Profile  
 
User avatar  Offline
RPTools Team
 
Joined: Tue Feb 07, 2006 1:07 am
Posts: 1766
Location: Austin, Tx
 Post subject: Re: Need more help
PostPosted: Fri Sep 03, 2010 12:36 pm 
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 :(


Top
 Profile  
 
User avatar  Offline
RPTools Team
 
Joined: Tue Feb 07, 2006 1:07 am
Posts: 1766
Location: Austin, Tx
 Post subject: Re: Need more help
PostPosted: Sat Sep 04, 2010 12:06 pm 
I took a look at the code and here is how I display a table in a dialog off of a button:
Code:
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?


Top
 Profile  
 
User avatar  Offline
Cave Troll
 
Joined: Tue Aug 03, 2010 3:11 pm
Posts: 44
Location: San Antonio
 Post subject: Re: Need more help
PostPosted: Mon Oct 04, 2010 5:03 pm 
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Reply to topic  [ 4 posts ] 

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:

Who is online

In total there are 2 users online :: 1 registered, 0 hidden and 1 guest (based on users active over the past 5 minutes)
Most users ever online was 243 on Sun Nov 04, 2012 6:14 am

Users browsing this forum: Yahoo [Bot] and 1 guest





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group

Style based on Andreas08 by Andreas Viklund

Style by Elizabeth Shulman