Author Topic: XLib Documentation  (Read 289 times)

0 Members and 1 Guest are viewing this topic.

Offline captain1342

  • Newbie
  • *
  • Posts: 19
  • Karma: 1
    • View Profile
    • Aperture-Hosting
XLib Documentation
« on: December 26, 2016, 10:44:05 AM »
Heyo,

I am working on a XGUI Module for my Lua Script MRSync ... but I can't find a Documentation for it so... do i Need to search for the stuff I Need in the Lua file or is theer a Documentation i am just to stupid to find?

thanks for reading,

~RD
Aperture-Hosting Leader

Web: https://Aperture-Hosting.de
Mail: Webmaster@Aperture-Hosting.de
Github: https://github.com/captain1242
"Hosting with Vision"

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 7526
  • Karma: 336
  • Sertafide Ulysses Jenius
    • View Profile
    • Team Ulysses [ULib/ULX, other fine releases]
Re: XLib Documentation
« Reply #1 on: December 26, 2016, 01:33:37 PM »
No documentation other than the lua files themselves - but at one time he actually thought he'd have time to do it.
Reference - https://forums.ulyssesmod.net/index.php/topic,9110.msg46561.html
The price one pays for pursuing any profession or calling is an intimate knowledge of its ugly side. - James Baldwin

Offline captain1342

  • Newbie
  • *
  • Posts: 19
  • Karma: 1
    • View Profile
    • Aperture-Hosting
XLib Hidepanel
« Reply #2 on: December 30, 2016, 09:31:52 AM »
Hey is there a way to hide ^text Entrys fully? I Just make them non selectable when i set visible to false
« Last Edit: December 30, 2016, 09:39:47 AM by captain1342 »
Aperture-Hosting Leader

Web: https://Aperture-Hosting.de
Mail: Webmaster@Aperture-Hosting.de
Github: https://github.com/captain1242
"Hosting with Vision"

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 472
  • Karma: 83
  • I write code
    • View Profile
Re: XLib Documentation
« Reply #3 on: December 31, 2016, 04:19:21 AM »
What do you mean by "hide fully?" Isn't making them unselectable and invisible hiding them fully?
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.

Offline captain1342

  • Newbie
  • *
  • Posts: 19
  • Karma: 1
    • View Profile
    • Aperture-Hosting
Re: XLib Documentation
« Reply #4 on: December 31, 2016, 06:45:32 AM »
Strangely.. making them Unselectable and Unvisible doesent make them Unvisible .. but when i just make them Invisible it works
Aperture-Hosting Leader

Web: https://Aperture-Hosting.de
Mail: Webmaster@Aperture-Hosting.de
Github: https://github.com/captain1242
"Hosting with Vision"

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 472
  • Karma: 83
  • I write code
    • View Profile
Re: XLib Documentation
« Reply #5 on: January 01, 2017, 02:23:45 PM »
Can you give us a code snippet to show exactly what you're doing?
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.

Offline captain1342

  • Newbie
  • *
  • Posts: 19
  • Karma: 1
    • View Profile
    • Aperture-Hosting
Re: XLib Documentation
« Reply #6 on: January 04, 2017, 11:50:57 AM »
http://pastebin.com/1NPCpcdD

Thats where I get Currently Errors

and here is the Error:


[ERROR] lua/vgui/dlistview.lua:107: attempt to index local 'Line' (a nil value)
  1. RemoveLine - lua/vgui/dlistview.lua:107
   2. DoClick - addons/msync/lua/ulx/xgui/settings/cl_msync_gui.lua:162
    3. unknown - lua/vgui/dlabel.lua:232

it means this MSync.Modules.enabledModulesList:AddLine( MSync.Modules.enabledModulesList:GetSelected()[1]:GetValue() )

but i dont see anything wrong with it
Aperture-Hosting Leader

Web: https://Aperture-Hosting.de
Mail: Webmaster@Aperture-Hosting.de
Github: https://github.com/captain1242
"Hosting with Vision"

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 472
  • Karma: 83
  • I write code
    • View Profile
Re: XLib Documentation
« Reply #7 on: January 04, 2017, 01:56:02 PM »
I don't think it's that line. The error references RemoveLine, but the line you're saying is causing the error doesn't remove a line; it adds one. My best guess is that it's the next line, but I can't be sure unless you give me the entire file so I can cross reference the line numbers. I'm on an airplane now, posting this via the in-plane WiFi (painfully slow in-plane WiFi, might I add. But I am on a plane, thousands of feet up in the air, so I'm not sure why I expected better), so I can't test what DListView:GetSelected returns. But my guess is that when it returns a table of the lines (according to the wiki), it's not returning a table of the line numbers. I'll do some spelunking in the code for DListView to see what exactly GetSelected returns and how to get the line number from a line (because it doesn't seem to be documented in the wiki) and get back to you.

edit 2: The magic of GitHub strikes again. If the version of DListView_Line on GitHub is to be trusted, then you should be able to do something like Line:GetID() and supply that as the argument to DListView:RemoveLine(). I should probably be a good citizen and document this on the wiki, but I'm lazy and not looking forward to waiting for the page to load on this slow WiFi. Maybe once I get home.

An additional, less important, fact is that DListView:GetSelected()[1] is identical to DListView:GetSelected() (according to the wiki, at least. It's proven to be less than accurate in the past, but usually pretty good).

edit: Looking back at the previous replies, I'm very much confused what this has to do with XLib or making things invisible.
« Last Edit: January 04, 2017, 02:03:20 PM by roastchicken »
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.

Offline captain1342

  • Newbie
  • *
  • Posts: 19
  • Karma: 1
    • View Profile
    • Aperture-Hosting
Re: XLib Documentation
« Reply #8 on: January 04, 2017, 03:56:41 PM »
GetSelected returns a Table cause it allows to give the full Selection back .. but strangely it stays Empty and says its nil but that cant be true .. i mean i see the entries.. also it is add line cause remove line is doing its job but re adding the line to the other table doesent work
Aperture-Hosting Leader

Web: https://Aperture-Hosting.de
Mail: Webmaster@Aperture-Hosting.de
Github: https://github.com/captain1242
"Hosting with Vision"

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 472
  • Karma: 83
  • I write code
    • View Profile
Re: XLib Documentation
« Reply #9 on: January 06, 2017, 10:05:20 AM »
I'm not sure what your issue is. Are you still having errors?
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.

Offline captain1342

  • Newbie
  • *
  • Posts: 19
  • Karma: 1
    • View Profile
    • Aperture-Hosting
Re: XLib Documentation
« Reply #10 on: January 06, 2017, 06:49:44 PM »
Add line is Causing issues cause Remove line does its Job .. and now I dont know what to do.. i mean i need it for a Disabled and Enabled modules list .. if you know a better way to do that then please tell me
Aperture-Hosting Leader

Web: https://Aperture-Hosting.de
Mail: Webmaster@Aperture-Hosting.de
Github: https://github.com/captain1242
"Hosting with Vision"

Offline roastchicken

  • Respected Community Member
  • Sr. Member
  • *****
  • Posts: 472
  • Karma: 83
  • I write code
    • View Profile
Re: XLib Documentation
« Reply #11 on: January 09, 2017, 11:53:24 AM »
Again, please provide me with any errors and the full files those errors point to. Without this crucial information any help I give is just guesswork. I'm still skeptical that your issue is with the Add line, but I can't weigh in further without the full file so I can look at the corresponding line numbers.
Give a man some code and you help him for a day; teach a man to code and you help him for a lifetime.