Jump to content

Table Içindeki Rakamları Toplama


neccooy
 Share

Recommended Posts

Şu şekilde veri alıyorum:

[quote]
my_table = {};
for x = 1, 4 do
miktar = ListIcon.GetCellText("ListBox1", x, 2);
Table.Insert(my_table, x, miktar);
end
[/quote]

Depolanan veriler rakam, bunları toplatmak istiyorum. Nasıl yapabilirim?
Bu arada ListIcon'da ilk satır "0" olarak geçiyor ama table oluştururken 0. dizi olmuyor, bunu nasıl aşabilirim.

İşin aslı, ListIconda o an tüm dolu satırların, artık kaç tane varsa, 3. sütünündaki (listicona göre 2) rakamsal verileri toplatmak istiyorum.
Link to comment
Share on other sites

örnek proje verirsen bakabiliriz. ayrıca listicon indexi ile tablo indexi ni eşleştirmek için dönen sayıyı -1 yaparak kullanabilirsin.

ör:

[quote]my_table = {};
for x = 1, 4 do
miktar = ListIcon.GetCellText("ListBox1", [b]x-1[/b], 2);
Table.Insert(my_table, [b]x-1[/b], miktar);
end[/quote]

Link to comment
Share on other sites

Teşekkürler, "x-1" aklıma gelmemişti. Eve gidince denerim.
Table'daki verileri nasıl toplatabilirim?
Eve gidince örnek projeyi gönderirim, daha anlaşılır olur. Amacıma ulaşmak için belki daha bir pratik yol vardır.
Hoşçakal.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...