STAR TREK 2d20
Page 2 of 3 First 123 Last
  1. #11

  2. #12
    I have this
    Code:
          <list_language name="lstLanguages">
            <anchored>
              <left offset="8" />
              <top offset="118" />
              <bottom offset="-4" />
              <size>
                <width>173</width>
              </size>
            </anchored>
            <class>char_language</class>
            <datasource>.languagelist</datasource>
            <allowcreate />
            <allowdelete />
            <acceptdrop>
              <class>language</class>
              <field>lstLanguages</field>
            </acceptdrop>
          </list_language>
    I am using list_language under General>Advanced Template

    Code:
            <acceptdrop>
              <class>skills</class>
              <field>*</field>
            </acceptdrop>
    This is set under Class Properties>Accept Drop Classes, correct?
    I've added the class item 'language' there, but it seems that is an invalid class, or at least that's an error I get in the sidebar item...

  3. #13
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,678
    Blog Entries
    1
    See the differences between my sample code and yours

    Code:
            <acceptdrop>
              <class>skills</class>
              <field>*</field>
            </acceptdrop>
    You are almost there

  4. #14
    I would really recommend for your first project that you not try to fiddle with the core objects so much. You are creating much more work for yourself, and as you learn more, you'll be able to make more edits as you figure things out.

    Regards,
    JPG

  5. #15
    Quote Originally Posted by Moon Wizard View Post
    I would really recommend for your first project that you not try to fiddle with the core objects so much. You are creating much more work for yourself, and as you learn more, you'll be able to make more edits as you figure things out.

    Regards,
    JPG
    I certainly understand the sentiment, and I know there are things I would like to do that I'm just not ready for, but for languages, right now it is vanilla, apart from my formatting, so worst case scenario, it just stays the way it is and I waste some time.

  6. #16
    Quote Originally Posted by damned View Post
    See the differences between my sample code and yours

    Code:
            <acceptdrop>
              <class>skills</class>
              <field>*</field>
            </acceptdrop>
    You are almost there
    The field entry, is that where the controlling object goes, in my case lstLanguages, or is it literally supposed to be an astrix?

    Here's what's generated by Rules Wizard.
    Code:
    <acceptdrop>
              <class>skills</class>
              <field>lstLanguages</field>
    </acceptdrop>

  7. #17
    If you put that value in there, it is literally looking for a database value named "lstLanguages" from any drop which is a "skills" record, which I'm thinking is not what you want. The "*" indicates to copy all fields on drop for that window display class.

    If you want some specific behavior, you are better off overriding the onDrop event directly, and determining what type of object was dropped and what you want to do with it.

    Regards,
    JPG

  8. #18
    So, it looks like the Languages sidebar item I created is not the same as the one in the Options menu. (see attached)
    I can drag and drop from the Options one, but not from the sidebar one.
    I assume this is how it's supposed to work, or that I set up the one in the sidebar wrong.

    From dataLibrary
    Code:
    	LibraryData.aRecords["language"] = {
    		bExport = true,
    		aDataMap = { "language", "reference.language" },
    		aDisplayIcon = { "sidebar", "sidebar_down" },
    		sRecordDisplayClass = "language",
    		}
    From strings
    Code:
    	<string name="library_recordtype_label_language">Languages</string>
    It's working through the Options menu, so I'm good with that, but I would like to know what I did wrong...
    Attached Images Attached Images

  9. #19
    damned's Avatar
    Join Date
    Mar 2011
    Location
    Australia
    Posts
    26,678
    Blog Entries
    1
    If your source is .languagelist then you are using the same list

    This might be generated by the Ruleset Wizard but only based on what you put in it and the values are not all correct

    Code:
    <acceptdrop>
              <class>skills</class>
              <field>lstLanguages</field>
    </acceptdrop>
    Look at the other examples posted

  10. #20
    Quote Originally Posted by Moon Wizard View Post
    If you put that value in there, it is literally looking for a database value named "lstLanguages" from any drop which is a "skills" record, which I'm thinking is not what you want. The "*" indicates to copy all fields on drop for that window display class.

    If you want some specific behavior, you are better off overriding the onDrop event directly, and determining what type of object was dropped and what you want to do with it.

    Regards,
    JPG
    Ah, so it is a wildcard.
    I thought that value would be the name of the listwindow...
    Thanks.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
5E Product Walkthrough Playlist

Log in

Log in